Replace containervm with GCI as default master image for GCE clusters

pull/6/head
Daniel Wang 2016-05-23 19:16:36 -07:00 committed by Daniel Wang
parent 50524c78a1
commit 3d95151971
6 changed files with 24 additions and 12 deletions

View File

@ -347,7 +347,7 @@ function find-release-tars() {
# This tarball is used by GCI, Ubuntu Trusty, and CoreOS.
KUBE_MANIFESTS_TAR=
if [[ "${KUBE_OS_DISTRIBUTION:-}" == "trusty" || "${KUBE_OS_DISTRIBUTION:-}" == "gci" || "${KUBE_OS_DISTRIBUTION:-}" == "coreos" ]]; then
if [[ "${OS_DISTRIBUTION:-}" == "trusty" || "${OS_DISTRIBUTION:-}" == "gci" || "${OS_DISTRIBUTION:-}" == "coreos" ]]; then
KUBE_MANIFESTS_TAR="${KUBE_ROOT}/server/kubernetes-manifests.tar.gz"
if [[ ! -f "${KUBE_MANIFESTS_TAR}" ]]; then
KUBE_MANIFESTS_TAR="${KUBE_ROOT}/_output/release-tars/kubernetes-manifests.tar.gz"

View File

@ -35,11 +35,20 @@ PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false}
PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false}
OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-debian}
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-container-vm-v20160321}
# Today the cluster startup scripts asssume the master and the nodes use the
# same OS distro, thus same set of initialization instructions (e.g., metadata,
# startup scripts, etc.). The current workaround is the hack in util.sh that
# reloads <os_distro>/helper.sh in the gap between when the master is created
# and when the nodes are created.
# TODO(#26183): Provide a way to differentiate master OS distro and node OS
# distro.
OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-gci}
# For GCI, leaving it blank will auto-select the latest GCI image on the `dev`
# channel.
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-"${MASTER_IMAGE}"}
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-"${MASTER_IMAGE_PROJECT}"}
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-container-vm-v20160321}
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
RKT_VERSION=${KUBE_RKT_VERSION:-0.5.5}

View File

@ -35,11 +35,13 @@ KUBE_APISERVER_REQUEST_TIMEOUT=300
PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false}
PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false}
OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-debian}
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-container-vm-v20160321}
OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-gci}
# For GCI, leaving it blank will auto-select the latest GCI image on the `dev`
# channel.
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-"${MASTER_IMAGE}"}
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-"${MASTER_IMAGE_PROJECT}"}
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-container-vm-v20160321}
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
RKT_VERSION=${KUBE_RKT_VERSION:-0.5.5}

View File

@ -35,11 +35,11 @@ if [[ "${OS_DISTRIBUTION}" == "gci" ]]; then
# Otherwise, we respect whatever set by the user.
gci_images=( $(gcloud compute images list --project google-containers \
--regexp='gci-dev.*' --format='value(name)') )
if [[ -z "${KUBE_GCE_MASTER_IMAGE:-}" ]]; then
if [[ -z "${MASTER_IMAGE:-}" ]]; then
MASTER_IMAGE="${gci_images[0]}"
MASTER_IMAGE_PROJECT="google-containers"
fi
if [[ -z "${KUBE_GCE_NODE_IMAGE:-}" ]]; then
if [[ -z "${NODE_IMAGE:-}" ]]; then
NODE_IMAGE="${gci_images[0]}"
NODE_IMAGE_PROJECT="google-containers"
fi

View File

@ -105,7 +105,7 @@ export PATH=$(dirname "${e2e_test}"):"${PATH}"
--repo-root="${KUBE_ROOT}" \
--node-instance-group="${NODE_INSTANCE_GROUP:-}" \
--prefix="${KUBE_GCE_INSTANCE_PREFIX:-e2e}" \
${KUBE_OS_DISTRIBUTION:+"--os-distro=${KUBE_OS_DISTRIBUTION}"} \
${OS_DISTRIBUTION:+"--os-distro=${OS_DISTRIBUTION}"} \
${NUM_NODES:+"--num-nodes=${NUM_NODES}"} \
${E2E_CLEAN_START:+"--clean-start=true"} \
${E2E_MIN_STARTUP_PODS:+"--minStartupPods=${E2E_MIN_STARTUP_PODS}"} \

View File

@ -8,6 +8,7 @@ cluster/aws/templates/configure-vm-aws.sh: env-to-grains "hostname_override"
cluster/aws/templates/configure-vm-aws.sh: env-to-grains "runtime_config"
cluster/aws/templates/configure-vm-aws.sh: kubelet_api_servers: '${KUBELET_APISERVER}'
cluster/centos/util.sh: local node_ip=${node#*@}
cluster/gce/config-default.sh:# reloads <os_distro>/helper.sh in the gap between when the master is created
cluster/gce/configure-vm.sh: advertise_address: '${EXTERNAL_IP}'
cluster/gce/configure-vm.sh: api_servers: '${KUBERNETES_MASTER_NAME}'
cluster/gce/configure-vm.sh: cloud_config: ${CLOUD_CONFIG}