From 6a18b74fa3d97a4273ff3f36c751f4a87adbe540 Mon Sep 17 00:00:00 2001 From: Alex Robinson Date: Mon, 23 Feb 2015 13:57:09 -0800 Subject: [PATCH] Minor reordering of GCE kube-up subcommands to keep them logically grouped. --- cluster/gce/util.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 9fea76adfa1..d462659f5f5 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -433,6 +433,13 @@ function kube-up { --target-tags "${MASTER_TAG}" \ --allow tcp:443 & + # We have to make sure the disk is created before creating the master VM, so + # run this in the foreground. + gcloud compute disks create "${MASTER_NAME}-pd" \ + --project "${PROJECT}" \ + --zone "${ZONE}" \ + --size "10GB" + ( echo "#! /bin/bash" echo "mkdir -p /var/cache/kubernetes-install" @@ -460,22 +467,6 @@ function kube-up { grep -v "^#" "${KUBE_ROOT}/cluster/gce/templates/salt-master.sh" ) > "${KUBE_TEMP}/master-start.sh" - # Report logging choice (if any). - if [[ "${ENABLE_NODE_LOGGING-}" == "true" ]]; then - echo "+++ Logging using Fluentd to ${LOGGING_DESTINATION:-unknown}" - # For logging to GCP we need to enable some minion scopes. - if [[ "${LOGGING_DESTINATION-}" == "gcp" ]]; then - MINION_SCOPES+=('https://www.googleapis.com/auth/logging.write') - fi - fi - - # We have to make sure the disk is created before creating the master VM, so - # run this in the foreground. - gcloud compute disks create "${MASTER_NAME}-pd" \ - --project "${PROJECT}" \ - --zone "${ZONE}" \ - --size "10GB" - gcloud compute instances create "${MASTER_NAME}" \ --project "${PROJECT}" \ --zone "${ZONE}" \ @@ -491,6 +482,15 @@ function kube-up { # Create a single firewall rule for all minions. create-firewall-rule "${MINION_TAG}-all" "${CLUSTER_IP_RANGE}" "${MINION_TAG}" & + # Report logging choice (if any). + if [[ "${ENABLE_NODE_LOGGING-}" == "true" ]]; then + echo "+++ Logging using Fluentd to ${LOGGING_DESTINATION:-unknown}" + # For logging to GCP we need to enable some minion scopes. + if [[ "${LOGGING_DESTINATION-}" == "gcp" ]]; then + MINION_SCOPES+=('https://www.googleapis.com/auth/logging.write') + fi + fi + # Wait for last batch of jobs. wait-for-jobs