Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrPaulBrewer/f8beeb9af349ad32a219 to your computer and use it in GitHub Desktop.
Save DrPaulBrewer/f8beeb9af349ad32a219 to your computer and use it in GitHub Desktop.
gcloud-discounted-VM-with-disk-and-startup-script.sh
!/bin/bash
# Do NOT use this as-is
# you probably need to change a few lines (disk, subnet, script)
# The google compute engine web UI may provide you
# with an equivalent command line for a specific configuration built in the web UI
gcloud compute instances create "my-spark-notebook" \
--description "docker spark jupyter-notebook analysis platform" \
--zone "us-east1-c" \
--machine-type "n1-highcpu-32" \
--subnet "default-754f8fec2c9e9fe2" \
--metadata startup-script-url=https://storage.googleapis.com/eaftc-spark-init/sparkinit.sh \
--no-restart-on-failure \
--maintenance-policy "TERMINATE" \
--preemptible \
--scopes default="https://www.googleapis.com/auth/cloud.useraccounts.readonly","https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.c\
om/auth/monitoring.write" \
--tags "http-server","https-server" \
--disk "name=jupyter-data,device-name=jupyter-data,mode=rw,boot=no" \
--image "https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-835-13-0-v20160218" \
--boot-disk-size "20" \
--boot-disk-type "pd-ssd" \
--boot-disk-device-name "spark-notebook"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment