From 628fa4fa97f3e3daebad8a62c95c5e66fecfe044 Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Mon, 6 Dec 2021 09:16:09 -0600 Subject: [PATCH] Create local ssh file the same as other platforms --- scripts/gcp-create.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/gcp-create.sh b/scripts/gcp-create.sh index b65d6a4..b174c0f 100755 --- a/scripts/gcp-create.sh +++ b/scripts/gcp-create.sh @@ -17,14 +17,14 @@ echo "=== gcp-dev.sh $PROJECT $BRANCH" echo "+++ creating VM" gcloud compute instances create --zone=$ZONE $VM --machine-type=e2-highcpu-4 --preemptible +IP=$(gcloud compute instances describe essentials --format='value(networkInterfaces.accessConfigs[0].natIP)') -echo "+++ wait for boot" +echo "+++ wait for boot $IP" while ! gcloud compute ssh --zone=$ZONE $NAME@$VM --command='hostname' ; do sleep 1 done echo "+++ configuring VM" - gcloud compute ssh --zone=$ZONE $NAME@$VM --ssh-flag='-A' < ~/.ssh/$VM.config <