From 18685d49ed89812055f5ea0ba9a502a610feac0b Mon Sep 17 00:00:00 2001 From: Dawn Chen Date: Wed, 22 Oct 2014 14:42:33 -0700 Subject: [PATCH] Using containervm image for gce by default --- cluster/gce/config-default.sh | 6 ++++-- cluster/gce/config-test.sh | 6 ++++-- cluster/gce/util.sh | 7 +++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index a21db8dcab7..a2cca3241f6 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -19,8 +19,10 @@ ZONE=us-central1-b MASTER_SIZE=n1-standard-1 MINION_SIZE=n1-standard-1 NUM_MINIONS=4 -# gcloud/gcutil will expand this to the latest supported image. -IMAGE=backports-debian-7-wheezy +# TODO(dchen1107): Filed an internal issue to create an alias +# for containervm image, so that gcloud/gcutil will expand this +# to the latest supported image. +IMAGE=container-vm-v20141016 NETWORK=default INSTANCE_PREFIX=kubernetes MASTER_NAME="${INSTANCE_PREFIX}-master" diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index a5cc2389798..ce853979693 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -19,8 +19,10 @@ ZONE=us-central1-b MASTER_SIZE=g1-small MINION_SIZE=g1-small NUM_MINIONS=2 -# gcloud/gcutil will expand this to the latest supported image. -IMAGE=backports-debian-7-wheezy +# TODO(dchen1107): Filed an internal issue to create an alias +# for containervm image, so that gcloud/gcutil will expand this +# to the latest supported image. +IMAGE=container-vm-v20141016 NETWORK=e2e INSTANCE_PREFIX="e2e-test-${USER}" MASTER_NAME="${INSTANCE_PREFIX}-master" diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index e8e62b78c4e..87eb02683cc 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -239,6 +239,13 @@ function kube-up { local htpasswd htpasswd=$(cat "${KUBE_TEMP}/htpasswd") + if ! gcutil getimage "${IMAGE}" > /dev/null 2>&1; then + echo "Adding new image: ${IMAGE}" + gcutil addimage "${IMAGE}" \ + "gs://gcp-containers-images/${IMAGE}.tar.gz" \ + --project "${PROJECT}" + fi + if ! gcutil getnetwork "${NETWORK}" >/dev/null 2>&1; then echo "Creating new network for: ${NETWORK}" # The network needs to be created synchronously or we have a race. The