diff --git a/content/GCP/02_intro_to_compute.ipynb b/content/GCP/02_intro_to_compute.ipynb index 785c3e4..3fd69d4 100644 --- a/content/GCP/02_intro_to_compute.ipynb +++ b/content/GCP/02_intro_to_compute.ipynb @@ -97,7 +97,7 @@ "tags": [] }, "source": [ - "## Follow the Storage Allocation\n", + "## Follow the VM Allocation\n", "\n", "Just as with security, we will audit (follow) the *VM instance* creation by examining at the project *activity*.\n", "\n", diff --git a/scripts/gcp-create.sh b/scripts/gcp-create.sh index b174c0f..5c9cfab 100755 --- a/scripts/gcp-create.sh +++ b/scripts/gcp-create.sh @@ -15,10 +15,24 @@ REPO="git@${GITHUB}:CLASS/${PROJECT}.git" echo "=== gcp-dev.sh $PROJECT $BRANCH" -echo "+++ creating VM" -gcloud compute instances create --zone=$ZONE $VM --machine-type=e2-highcpu-4 --preemptible +echo "+++ creating/starting VM" +gcloud compute instances create --zone=$ZONE $VM \ + --scopes=cloud-platform \ + --machine-type=e2-highcpu-4 --preemptible +gcloud compute instances start $VM IP=$(gcloud compute instances describe essentials --format='value(networkInterfaces.accessConfigs[0].natIP)') +echo "+++ configure local ssh $IP" +gcloud compute config-ssh +ssh-keygen -R $IP +cat > ~/.ssh/$VM.config <