Increasing machine size from f1-micro to g1-small.
@@ -23,8 +23,9 @@ ZONE=us-central1-f
GROUP=frontend-group
TEMPLATE=$GROUP-tmpl
-MACHINE_TYPE=f1-micro
-IMAGE=debian-8
+MACHINE_TYPE=g1-small
+IMAGE_FAMILY=debian-8
+IMAGE_PROJECT=debian-cloud
STARTUP_SCRIPT=gce/startup-script.sh
SCOPES="datastore,userinfo-email,logging-write,storage-full,cloud-platform"
TAGS=http-server
@@ -97,7 +98,8 @@ gce)
--metadata-from-file startup-script=${STARTUP_SCRIPT} \
--zone=${ZONE} \
--tags=${TAGS} \
- --image=${IMAGE} \
+ --image-family=${IMAGE_FAMILY} \
+ --image-project=${IMAGE_PROJECT} \
--metadata BUCKET=${BUCKET}
# [END gce-single]
;;
@@ -122,12 +124,13 @@ gce-many)
# to create new instances.
# [START create_template]
- gcloud compute instance-templates create $TEMPLATE \
- --image $IMAGE \
- --machine-type $MACHINE_TYPE \
- --scopes $SCOPES \
- --metadata-from-file startup-script=$STARTUP_SCRIPT \
- --tags $TAGS \
+ gcloud compute instance-templates create ${TEMPLATE} \
+ --image-family=${IMAGE_FAMILY} \
+ --image-project=${IMAGE_PROJECT} \
+ --machine-type=${MACHINE_TYPE} \
+ --scopes=${SCOPES} \
+ --metadata-from-file startup-script=${STARTUP_SCRIPT} \
+ --tags ${TAGS} \
--metadata BUCKET=${BUCKET}
# [END create_template]
@@ -143,11 +146,11 @@ gce-many)
# [START create_group]
gcloud compute instance-groups managed \
- create $GROUP \
- --base-instance-name $GROUP \
- --size $MIN_INSTANCES \
- --template $TEMPLATE \
- --zone $ZONE
+ create ${GROUP} \
+ --base-instance-name ${GROUP} \
+ --size ${MIN_INSTANCES} \
+ --template ${TEMPLATE} \
+ --zone ${ZONE}
# [END create_group]
#
