From 4c8dbbc3467f1f18ecbe2c18a22e84d744d1abd6 Mon Sep 17 00:00:00 2001 From: Joe Beda Date: Thu, 30 Oct 2014 11:21:37 -0700 Subject: [PATCH] Use the Container VM image in the google-cloud project. Fixes #2078 --- cluster/gce/config-default.sh | 1 + cluster/gce/config-test.sh | 1 + cluster/gce/util.sh | 11 ++--------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index a2cca3241f..ab317650ca 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -23,6 +23,7 @@ NUM_MINIONS=4 # for containervm image, so that gcloud/gcutil will expand this # to the latest supported image. IMAGE=container-vm-v20141016 +IMAGE_PROJECT=google-containers 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 ce85397969..496f9f52cd 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -23,6 +23,7 @@ NUM_MINIONS=2 # for containervm image, so that gcloud/gcutil will expand this # to the latest supported image. IMAGE=container-vm-v20141016 +IMAGE_PROJECT=google-containers 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 95ac3b96d0..295eb2c7a8 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -239,13 +239,6 @@ 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 @@ -310,7 +303,7 @@ function kube-up { --sleep_between_polls "${POLL_SLEEP_INTERVAL}" \ --zone "${ZONE}" \ --machine_type "${MASTER_SIZE}" \ - --image "${IMAGE}" \ + --image "projects/${IMAGE_PROJECT}/global/images/${IMAGE}" \ --tags "${MASTER_TAG}" \ --network "${NETWORK}" \ --service_account_scopes="storage-ro,compute-rw" \ @@ -339,7 +332,7 @@ function kube-up { --sleep_between_polls "${POLL_SLEEP_INTERVAL}" \ --zone "${ZONE}" \ --machine_type "${MINION_SIZE}" \ - --image "${IMAGE}" \ + --image "projects/${IMAGE_PROJECT}/global/images/${IMAGE}" \ --tags "${MINION_TAG}" \ --network "${NETWORK}" \ --service_account_scopes "${MINION_SCOPES}" \