manage_vms is a wrapper for running gcloud commands.
- google SDK is installed and the
gcloud
utility is in the user's PATH envrionment variable. gcloud
is logged in to your ops school google account (rungcloud auth login
to login).
- All of the machines are built using the chef server so that machine should be up before starting any other role
- the chef server machine name will always be
chefserver
for easy access from all other machines connecting to it.
Usage:
manage_vms.sh <action> [-n <name>] [-r <role>] [-m <machine_type>] [-p <project_id>] [-q] [-v] [-c <client_role>]
- list-vms (list current vms in project).
- list-vm-types (list available machine types in project).
- list-roles (list available roles for machines).
- list-projects (list available projects).
- ssh, start, stop, delete (requires vm name).
- create (requires vm name & role, if no type is specified the default will be used).
- project_id (set project id - for multiple project support).
- client_role - sets a custom role for the machine (available when -r is set to chefclient)
- q - no prompt (will not ask for interactive approval on delete).
- v - enable verbose mode (print gcloud command prior to execution)