From d23119ccfb1451615ee93ccb282756d008312e1b Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Wed, 10 Nov 2021 12:42:55 -0600 Subject: [PATCH] Specify the user to use in the VM --- scripts/{gcp-start.sh => gcp-create.sh} | 7 ++++--- scripts/{gcp-stop.sh => gcp-delete.sh} | 0 2 files changed, 4 insertions(+), 3 deletions(-) rename scripts/{gcp-start.sh => gcp-create.sh} (74%) rename scripts/{gcp-stop.sh => gcp-delete.sh} (100%) diff --git a/scripts/gcp-start.sh b/scripts/gcp-create.sh similarity index 74% rename from scripts/gcp-start.sh rename to scripts/gcp-create.sh index 2a30cfd..7d5ef03 100755 --- a/scripts/gcp-start.sh +++ b/scripts/gcp-create.sh @@ -4,6 +4,7 @@ BRANCH="${1:-gcp-dev}" # checkout branch $1 # Static Config - update gcp-*.sh files +NAME=learner VM=essentials ZONE=us-west2-c PROJECT=CLASS-Essentials @@ -16,13 +17,13 @@ gcloud compute instances create --zone=$ZONE $VM --machine-type=e2-highcpu-4 --p echo "+++ wait for boot" -while ! gcloud compute ssh --zone=$ZONE $VM --command='hostname' ; do +while ! gcloud compute ssh --zone=$ZONE $NAME@$VM --command='hostname' ; do sleep 1 done echo "+++ configuring VM" -gcloud compute ssh --zone=$ZONE $VM --ssh-flag='-A' < .ssh/known_hosts git config --global color.ui auto @@ -38,4 +39,4 @@ echo "+++ configure local ssh" gcloud compute config-ssh echo "+++ starting Jypter" -gcloud compute ssh --zone=$ZONE $VM --ssh-flag='-t -L 8080:localhost:8080 -L 8081:localhost:8081' --command="cd $PROJECT ; ./scripts/jupyter-lab.sh" +gcloud compute ssh --zone=$ZONE $NAME@$VM --ssh-flag='-t -L 8080:localhost:8080 -L 8081:localhost:8081' --command="cd $PROJECT ; ./scripts/jupyter-lab.sh" diff --git a/scripts/gcp-stop.sh b/scripts/gcp-delete.sh similarity index 100% rename from scripts/gcp-stop.sh rename to scripts/gcp-delete.sh