diff --git a/test/kubemark/start-kubemark.sh b/test/kubemark/start-kubemark.sh index 0d0a0d6f372..fdb0510a38a 100755 --- a/test/kubemark/start-kubemark.sh +++ b/test/kubemark/start-kubemark.sh @@ -24,7 +24,6 @@ source "${KUBE_ROOT}/cluster/kubemark/util.sh" detect-project &> /dev/null export PROJECT - RUN_FROM_DISTRO=${RUN_FROM_DISTRO:-false} MAKE_DIR="${KUBE_ROOT}/cluster/images/kubemark" @@ -63,27 +62,28 @@ gcloud compute instances create ${MASTER_NAME} \ --scopes "storage-ro,compute-rw,logging-write" \ --disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" -MASTER_IP=`gcloud compute instances describe hollow-cluster-master --zone=${ZONE} | grep networkIP | cut -f2 -d":" | sed "s/ //g"` +MASTER_IP=$(gcloud compute instances describe hollow-cluster-master \ + --zone="${ZONE}" --project="${PROJECT}" | grep networkIP | cut -f2 -d":" | sed "s/ //g") -until gcloud compute ssh --zone="${ZONE}" hollow-cluster-master --command="ls" &> /dev/null; do +until gcloud compute ssh --zone="${ZONE}" --project="${PROJECT}" hollow-cluster-master --command="ls" &> /dev/null; do sleep 1 done if [ "${RUN_FROM_DISTRO}" == "false" ]; then - gcloud compute copy-files --zone="${ZONE}" \ + gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \ "${KUBE_ROOT}/_output/release-tars/kubernetes-server-linux-amd64.tar.gz" \ "${KUBE_ROOT}/test/kubemark/start-kubemark-master.sh" \ "${KUBE_ROOT}/test/kubemark/configure-kubectl.sh" \ "hollow-cluster-master":~ else - gcloud compute copy-files --zone="${ZONE}" \ + gcloud compute copy-files --zone="${ZONE}" --project="${PROJECT}" \ "${KUBE_ROOT}/server/kubernetes-server-linux-amd64.tar.gz" \ "${KUBE_ROOT}/test/kubemark/start-kubemark-master.sh" \ "${KUBE_ROOT}/test/kubemark/configure-kubectl.sh" \ "hollow-cluster-master":~ fi -gcloud compute ssh --zone=${ZONE} hollow-cluster-master \ +gcloud compute ssh --zone=${ZONE} --project="${PROJECT}" hollow-cluster-master \ --command="chmod a+x configure-kubectl.sh && chmod a+x start-kubemark-master.sh && sudo ./start-kubemark-master.sh" sed "s/##masterip##/\"${MASTER_IP}\"/g" ${KUBE_ROOT}/test/kubemark/hollow-kubelet_template.json > ${KUBE_ROOT}/test/kubemark/hollow-kubelet.json diff --git a/test/kubemark/stop-kubemark.sh b/test/kubemark/stop-kubemark.sh index 5d6d72edf5c..82a8f7b6698 100755 --- a/test/kubemark/stop-kubemark.sh +++ b/test/kubemark/stop-kubemark.sh @@ -27,7 +27,7 @@ MASTER_NAME="hollow-cluster-master" kubectl delete -f ${KUBE_ROOT}/test/kubemark/hollow-kubelet.json &> /dev/null || true kubectl delete -f ${KUBE_ROOT}/test/kubemark/kubemark-ns.json &> /dev/null || true -gcloud compute instances delete ${MASTER_NAME} \ +gcloud compute instances delete "${MASTER_NAME}" \ --project "${PROJECT}" \ --quiet \ --zone "${ZONE}" || true