Skip to content

Instantly share code, notes, and snippets.

@kashyapp
Created July 5, 2013 10:48
Show Gist options
  • Save kashyapp/5933716 to your computer and use it in GitHub Desktop.
Save kashyapp/5933716 to your computer and use it in GitHub Desktop.
Launch instance on Google Compute Engine
#!/bin/bash -e
set -x
NAME=steelman
BOOTDISK=boot-steelman
if ! ./gcutil getinstance --zone=us-central1-a ${NAME}; then
./gcutil addinstance \
--zone=us-central1-a \
--disk=${BOOTDISK},boot \
--machine_type=f1-micro \
${NAME}
fi
./gcutil ssh --zone=us-central1-a ${NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment