Last active
March 18, 2019 15:21
-
-
Save maxamillion/44e45421b5f3210a865678b84943ca52 to your computer and use it in GitHub Desktop.
gce.py Script vs gcp_compute.py Plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_meta": { | |
"hostvars": { | |
"104.196.66.112": { | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2017-11-02T15:56:44.318-07:00", | |
"deletionProtection": true, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "awx", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/awx", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "2114317324400335940", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "awx", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "104.196.66.112", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "bHC-nLDaT_c=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.7", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/awx", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "FYLDgkTKlA4=", | |
"items": [ | |
"http-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"34.73.152.53": { | |
"canIpForward": true, | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2019-03-11T15:47:51.382-07:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "persistent-disk-0", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/cos-cloud/global/licenses/cos", | |
"https://www.googleapis.com/compute/v1/projects/cos-cloud/global/licenses/cos-pcid", | |
"https://www.googleapis.com/compute/v1/projects/gke-node-images/global/licenses/gke-node" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/gke-tower-qe-default-pool-0aa0f212-745b", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "927016968734333817", | |
"kind": "compute#instance", | |
"labelFingerprint": "2ixRno2sGuM=", | |
"labels": { | |
"goog-gke-node": "" | |
}, | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "pI3RyDFqqE4=", | |
"items": [ | |
{ | |
"key": "instance-template", | |
"value": "projects/720297370058/global/instanceTemplates/gke-tower-qe-default-pool-0aa0f212" | |
}, | |
{ | |
"key": "created-by", | |
"value": "projects/720297370058/zones/us-east1-d/instanceGroupManagers/gke-tower-qe-default-pool-0aa0f212-grp" | |
}, | |
{ | |
"key": "gci-update-strategy", | |
"value": "update_disabled" | |
}, | |
{ | |
"key": "gci-ensure-gke-docker", | |
"value": "true" | |
}, | |
{ | |
"key": "configure-sh", | |
"value": "#!/usr/bin/env bash\n\n# Copyright 2016 The Kubernetes Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Due to the GCE custom metadata size limit, we split the entire script into two\n# files configure.sh and configure-helper.sh. The functionality of downloading\n# kubernetes configuration, manifests, docker images, and binary files are\n# put in configure.sh, which is uploaded via GCE custom metadata.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\n### Hardcoded constants\nDEFAULT_CNI_VERSION=\"v0.6.0\"\nDEFAULT_CNI_SHA1=\"d595d3ded6499a64e8dac02466e2f5f2ce257c9f\"\nDEFAULT_NPD_VERSION=\"v0.6.0\"\nDEFAULT_NPD_SHA1=\"a28e960a21bb74bc0ae09c267b6a340f30e5b3a6\"\nDEFAULT_CRICTL_VERSION=\"v1.11.1\"\nDEFAULT_CRICTL_SHA1=\"527fca5a0ecef6a8e6433e2af9cf83f63aff5694\"\nDEFAULT_MOUNTER_TAR_SHA=\"8003b798cf33c7f91320cd6ee5cec4fa22244571\"\n###\n\n# Use --retry-connrefused opt only if it's supported by curl.\nCURL_RETRY_CONNREFUSED=\"\"\nif curl --help | grep -q -- '--retry-connrefused'; then\n CURL_RETRY_CONNREFUSED='--retry-connrefused'\nfi\n\nfunction set-broken-motd {\n cat > /etc/motd <<EOF\nBroken (or in progress) Kubernetes node setup! Check the cluster initialization status\nusing the following commands.\n\nMaster instance:\n - sudo systemctl status kube-master-installation\n - sudo systemctl status kube-master-configuration\n\nNode instance:\n - sudo systemctl status kube-node-installation\n - sudo systemctl status kube-node-configuration\nEOF\n}\n\nfunction download-kube-env {\n # Fetch kube-env from GCE metadata server.\n (\n umask 077\n local -r tmp_kube_env=\"/tmp/kube-env.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_env}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_env}\" > \"${KUBE_HOME}/kube-env\")\n rm -f \"${tmp_kube_env}\"\n )\n}\n\nfunction download-kubelet-config {\n local -r dest=\"$1\"\n echo \"Downloading Kubelet config file, if it exists\"\n # Fetch kubelet config file from GCE metadata server.\n (\n umask 077\n local -r tmp_kubelet_config=\"/tmp/kubelet-config.yaml\"\n if curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kubelet_config}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kubelet-config; then\n # only write to the final location if curl succeeds\n mv \"${tmp_kubelet_config}\" \"${dest}\"\n elif [[ \"${REQUIRE_METADATA_KUBELET_CONFIG_FILE:-false}\" == \"true\" ]]; then\n echo \"== Failed to download required Kubelet config file from metadata server ==\"\n exit 1\n fi\n )\n}\n\nfunction download-kube-master-certs {\n # Fetch kube-env from GCE metadata server.\n (\n umask 077\n local -r tmp_kube_master_certs=\"/tmp/kube-master-certs.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_master_certs}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-master-certs\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_master_certs}\" > \"${KUBE_HOME}/kube-master-certs\")\n rm -f \"${tmp_kube_master_certs}\"\n )\n}\n\nfunction validate-hash {\n local -r file=\"$1\"\n local -r expected=\"$2\"\n\n actual=$(sha1sum ${file} | awk '{ print $1 }') || true\n if [[ \"${actual}\" != \"${expected}\" ]]; then\n echo \"== ${file} corrupted, sha1 ${actual} doesn't match expected ${expected} ==\"\n return 1\n fi\n}\n\n# Retry a download until we get it. Takes a hash and a set of URLs.\n#\n# $1 is the sha1 of the URL. Can be \"\" if the sha1 is unknown.\n# $2+ are the URLs to download.\nfunction download-or-bust {\n local -r hash=\"$1\"\n shift 1\n\n local -r urls=( $* )\n while true; do\n for url in \"${urls[@]}\"; do\n local file=\"${url##*/}\"\n rm -f \"${file}\"\n if ! curl -f --ipv4 -Lo \"${file}\" --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 ${CURL_RETRY_CONNREFUSED} \"${url}\"; then\n echo \"== Failed to download ${url}. Retrying. ==\"\n elif [[ -n \"${hash}\" ]] && ! validate-hash \"${file}\" \"${hash}\"; then\n echo \"== Hash validation of ${url} failed. Retrying. ==\"\n else\n if [[ -n \"${hash}\" ]]; then\n echo \"== Downloaded ${url} (SHA1 = ${hash}) ==\"\n else\n echo \"== Downloaded ${url} ==\"\n fi\n return\n fi\n done\n done\n}\n\nfunction is-preloaded {\n local -r key=$1\n local -r value=$2\n grep -qs \"${key},${value}\" \"${KUBE_HOME}/preload_info\"\n}\n\nfunction split-commas {\n echo $1 | tr \",\" \"\\n\"\n}\n\nfunction remount-flexvolume-directory {\n local -r flexvolume_plugin_dir=$1\n mkdir -p $flexvolume_plugin_dir\n mount --bind $flexvolume_plugin_dir $flexvolume_plugin_dir\n mount -o remount,exec $flexvolume_plugin_dir\n}\n\nfunction install-gci-mounter-tools {\n CONTAINERIZED_MOUNTER_HOME=\"${KUBE_HOME}/containerized_mounter\"\n local -r mounter_tar_sha=\"${DEFAULT_MOUNTER_TAR_SHA}\"\n if is-preloaded \"mounter\" \"${mounter_tar_sha}\"; then\n echo \"mounter is preloaded.\"\n return\n fi\n\n echo \"Downloading gci mounter tools.\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n download-or-bust \"${mounter_tar_sha}\" \"https://storage.googleapis.com/kubernetes-release/gci-mounter/mounter.tar\"\n cp \"${KUBE_HOME}/kubernetes/server/bin/mounter\" \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n mv \"${KUBE_HOME}/mounter.tar\" /tmp/mounter.tar\n tar xf /tmp/mounter.tar -C \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n rm /tmp/mounter.tar\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs/var/lib/kubelet\"\n}\n\n# Install node problem detector binary.\nfunction install-node-problem-detector {\n if [[ -n \"${NODE_PROBLEM_DETECTOR_VERSION:-}\" ]]; then\n local -r npd_version=\"${NODE_PROBLEM_DETECTOR_VERSION}\"\n local -r npd_sha1=\"${NODE_PROBLEM_DETECTOR_TAR_HASH}\"\n else\n local -r npd_version=\"${DEFAULT_NPD_VERSION}\"\n local -r npd_sha1=\"${DEFAULT_NPD_SHA1}\"\n fi\n local -r npd_tar=\"node-problem-detector-${npd_version}.tar.gz\"\n\n if is-preloaded \"${npd_tar}\" \"${npd_sha1}\"; then\n echo \"node-problem-detector is preloaded.\"\n return\n fi\n\n echo \"Downloading node problem detector.\"\n local -r npd_release_path=\"https://storage.googleapis.com/kubernetes-release\"\n download-or-bust \"${npd_sha1}\" \"${npd_release_path}/node-problem-detector/${npd_tar}\"\n local -r npd_dir=\"${KUBE_HOME}/node-problem-detector\"\n mkdir -p \"${npd_dir}\"\n tar xzf \"${KUBE_HOME}/${npd_tar}\" -C \"${npd_dir}\" --overwrite\n mv \"${npd_dir}/bin\"/* \"${KUBE_BIN}\"\n chmod a+x \"${KUBE_BIN}/node-problem-detector\"\n rmdir \"${npd_dir}/bin\"\n rm -f \"${KUBE_HOME}/${npd_tar}\"\n}\n\nfunction install-cni-binaries {\n local -r cni_tar=\"cni-plugins-amd64-${DEFAULT_CNI_VERSION}.tgz\"\n local -r cni_sha1=\"${DEFAULT_CNI_SHA1}\"\n if is-preloaded \"${cni_tar}\" \"${cni_sha1}\"; then\n echo \"${cni_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading cni binaries\"\n download-or-bust \"${cni_sha1}\" \"https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}\"\n local -r cni_dir=\"${KUBE_HOME}/cni\"\n mkdir -p \"${cni_dir}/bin\"\n tar xzf \"${KUBE_HOME}/${cni_tar}\" -C \"${cni_dir}/bin\" --overwrite\n mv \"${cni_dir}/bin\"/* \"${KUBE_BIN}\"\n rmdir \"${cni_dir}/bin\"\n rm -f \"${KUBE_HOME}/${cni_tar}\"\n}\n\n# Install crictl binary.\nfunction install-crictl {\n if [[ -n \"${CRICTL_VERSION:-}\" ]]; then\n local -r crictl_version=\"${CRICTL_VERSION}\"\n local -r crictl_sha1=\"${CRICTL_TAR_HASH}\"\n else\n local -r crictl_version=\"${DEFAULT_CRICTL_VERSION}\"\n local -r crictl_sha1=\"${DEFAULT_CRICTL_SHA1}\"\n fi\n local -r crictl=\"crictl-${crictl_version}-linux-amd64\"\n\n # Create crictl config file.\n cat > /etc/crictl.yaml <<EOF\nruntime-endpoint: ${CONTAINER_RUNTIME_ENDPOINT:-unix:///var/run/dockershim.sock}\nEOF\n\n if is-preloaded \"${crictl}\" \"${crictl_sha1}\"; then\n echo \"crictl is preloaded\"\n return\n fi\n\n echo \"Downloading crictl\"\n local -r crictl_path=\"https://storage.googleapis.com/kubernetes-release/crictl\"\n download-or-bust \"${crictl_sha1}\" \"${crictl_path}/${crictl}\"\n mv \"${KUBE_HOME}/${crictl}\" \"${KUBE_BIN}/crictl\"\n chmod a+x \"${KUBE_BIN}/crictl\"\n}\n\nfunction install-exec-auth-plugin {\n if [[ ! \"${EXEC_AUTH_PLUGIN_URL:-}\" ]]; then\n return\n fi\n local -r plugin_url=\"${EXEC_AUTH_PLUGIN_URL}\"\n local -r plugin_sha1=\"${EXEC_AUTH_PLUGIN_SHA1}\"\n\n echo \"Downloading gke-exec-auth-plugin binary\"\n download-or-bust \"${plugin_sha1}\" \"${plugin_url}\"\n mv \"${KUBE_HOME}/gke-exec-auth-plugin\" \"${KUBE_BIN}/gke-exec-auth-plugin\"\n chmod a+x \"${KUBE_BIN}/gke-exec-auth-plugin\"\n\n if [[ ! \"${EXEC_AUTH_PLUGIN_LICENSE_URL:-}\" ]]; then\n return\n fi\n local -r license_url=\"${EXEC_AUTH_PLUGIN_LICENSE_URL}\"\n echo \"Downloading gke-exec-auth-plugin license\"\n download-or-bust \"\" \"${license_url}\"\n mv \"${KUBE_HOME}/LICENSE\" \"${KUBE_BIN}/gke-exec-auth-plugin-license\"\n}\n\nfunction install-kube-manifests {\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n local dst_dir=\"${KUBE_HOME}/kube-manifests\"\n mkdir -p \"${dst_dir}\"\n local -r manifests_tar_urls=( $(split-commas \"${KUBE_MANIFESTS_TAR_URL}\") )\n local -r manifests_tar=\"${manifests_tar_urls[0]##*/}\"\n if [ -n \"${KUBE_MANIFESTS_TAR_HASH:-}\" ]; then\n local -r manifests_tar_hash=\"${KUBE_MANIFESTS_TAR_HASH}\"\n else\n echo \"Downloading k8s manifests sha1 (not found in env)\"\n download-or-bust \"\" \"${manifests_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r manifests_tar_hash=$(cat \"${manifests_tar}.sha1\")\n fi\n\n if is-preloaded \"${manifests_tar}\" \"${manifests_tar_hash}\"; then\n echo \"${manifests_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading k8s manifests tar\"\n download-or-bust \"${manifests_tar_hash}\" \"${manifests_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${manifests_tar}\" -C \"${dst_dir}\" --overwrite\n local -r kube_addon_registry=\"${KUBE_ADDON_REGISTRY:-k8s.gcr.io}\"\n if [[ \"${kube_addon_registry}\" != \"k8s.gcr.io\" ]]; then\n find \"${dst_dir}\" -name \\*.yaml -or -name \\*.yaml.in | \\\n xargs sed -ri \"s@(image:\\s.*)k8s.gcr.io@\\1${kube_addon_registry}@\"\n find \"${dst_dir}\" -name \\*.manifest -or -name \\*.json | \\\n xargs sed -ri \"s@(image\\\":\\s+\\\")k8s.gcr.io@\\1${kube_addon_registry}@\"\n fi\n cp \"${dst_dir}/kubernetes/gci-trusty/gci-configure-helper.sh\" \"${KUBE_BIN}/configure-helper.sh\"\n if [[ -e \"${dst_dir}/kubernetes/gci-trusty/gke-internal-configure-helper.sh\" ]]; then\n cp \"${dst_dir}/kubernetes/gci-trusty/gke-internal-configure-helper.sh\" \"${KUBE_BIN}/\"\n fi\n\n cp \"${dst_dir}/kubernetes/gci-trusty/health-monitor.sh\" \"${KUBE_BIN}/health-monitor.sh\"\n\n rm -f \"${KUBE_HOME}/${manifests_tar}\"\n rm -f \"${KUBE_HOME}/${manifests_tar}.sha1\"\n}\n\n# A helper function for loading a docker image. It keeps trying up to 5 times.\n#\n# $1: Full path of the docker image\nfunction try-load-docker-image {\n local -r img=$1\n echo \"Try to load docker image file ${img}\"\n # Temporarily turn off errexit, because we don't want to exit on first failure.\n set +e\n local -r max_attempts=5\n local -i attempt_num=1\n until timeout 30 ${LOAD_IMAGE_COMMAND:-docker load -i} \"${img}\"; do\n if [[ \"${attempt_num}\" == \"${max_attempts}\" ]]; then\n echo \"Fail to load docker image file ${img} after ${max_attempts} retries. Exit!!\"\n exit 1\n else\n attempt_num=$((attempt_num+1))\n sleep 5\n fi\n done\n # Re-enable errexit.\n set -e\n}\n\n# Loads kube-system docker images. It is better to do it before starting kubelet,\n# as kubelet will restart docker daemon, which may interfere with loading images.\nfunction load-docker-images {\n echo \"Start loading kube-system docker images\"\n local -r img_dir=\"${KUBE_HOME}/kube-docker-files\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n try-load-docker-image \"${img_dir}/kube-apiserver.tar\"\n try-load-docker-image \"${img_dir}/kube-controller-manager.tar\"\n try-load-docker-image \"${img_dir}/kube-scheduler.tar\"\n else\n try-load-docker-image \"${img_dir}/kube-proxy.tar\"\n fi\n}\n\n# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,\n# and places them into suitable directories. Files are placed in /home/kubernetes.\nfunction install-kube-binary-config {\n cd \"${KUBE_HOME}\"\n local -r server_binary_tar_urls=( $(split-commas \"${SERVER_BINARY_TAR_URL}\") )\n local -r server_binary_tar=\"${server_binary_tar_urls[0]##*/}\"\n if [[ -n \"${SERVER_BINARY_TAR_HASH:-}\" ]]; then\n local -r server_binary_tar_hash=\"${SERVER_BINARY_TAR_HASH}\"\n else\n echo \"Downloading binary release sha1 (not found in env)\"\n download-or-bust \"\" \"${server_binary_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r server_binary_tar_hash=$(cat \"${server_binary_tar}.sha1\")\n fi\n\n if is-preloaded \"${server_binary_tar}\" \"${server_binary_tar_hash}\"; then\n echo \"${server_binary_tar} is preloaded.\"\n else\n echo \"Downloading binary release tar\"\n download-or-bust \"${server_binary_tar_hash}\" \"${server_binary_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${server_binary_tar}\" -C \"${KUBE_HOME}\" --overwrite\n # Copy docker_tag and image files to ${KUBE_HOME}/kube-docker-files.\n local -r src_dir=\"${KUBE_HOME}/kubernetes/server/bin\"\n local dst_dir=\"${KUBE_HOME}/kube-docker-files\"\n mkdir -p \"${dst_dir}\"\n cp \"${src_dir}/\"*.docker_tag \"${dst_dir}\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]]; then\n cp \"${src_dir}/kube-proxy.tar\" \"${dst_dir}\"\n else\n cp \"${src_dir}/kube-apiserver.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-controller-manager.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-scheduler.tar\" \"${dst_dir}\"\n cp -r \"${KUBE_HOME}/kubernetes/addons\" \"${dst_dir}\"\n fi\n load-docker-images\n mv \"${src_dir}/kubelet\" \"${KUBE_BIN}\"\n mv \"${src_dir}/kubectl\" \"${KUBE_BIN}\"\n\n mv \"${KUBE_HOME}/kubernetes/LICENSES\" \"${KUBE_HOME}\"\n mv \"${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz\" \"${KUBE_HOME}\"\n fi\n\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]] && \\\n [[ \"${ENABLE_NODE_PROBLEM_DETECTOR:-}\" == \"standalone\" ]]; then\n install-node-problem-detector\n fi\n\n if [[ \"${NETWORK_PROVIDER:-}\" == \"kubenet\" ]] || \\\n [[ \"${NETWORK_PROVIDER:-}\" == \"cni\" ]]; then\n install-cni-binaries\n fi\n\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n install-kube-manifests\n chmod -R 755 \"${KUBE_BIN}\"\n\n # Install gci mounter related artifacts to allow mounting storage volumes in GCI\n install-gci-mounter-tools\n\n # Remount the Flexvolume directory with the \"exec\" option, if needed.\n if [[ \"${REMOUNT_VOLUME_PLUGIN_DIR:-}\" == \"true\" && -n \"${VOLUME_PLUGIN_DIR:-}\" ]]; then\n remount-flexvolume-directory \"${VOLUME_PLUGIN_DIR}\"\n fi\n\n # Install crictl on each node.\n install-crictl\n\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]]; then\n # TODO(awly): include the binary and license in the OS image.\n install-exec-auth-plugin\n fi\n\n # Clean up.\n rm -rf \"${KUBE_HOME}/kubernetes\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}.sha1\"\n}\n\n######### Main Function ##########\necho \"Start to install kubernetes files\"\n# if install fails, message-of-the-day (motd) will warn at login shell\nset-broken-motd\n\nKUBE_HOME=\"/home/kubernetes\"\nKUBE_BIN=\"${KUBE_HOME}/bin\"\n\n# download and source kube-env\ndownload-kube-env\nsource \"${KUBE_HOME}/kube-env\"\n\ndownload-kubelet-config \"${KUBE_HOME}/kubelet-config.yaml\"\n\n# master certs\nif [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n download-kube-master-certs\nfi\n\n# binaries and kube-system manifests\ninstall-kube-binary-config\n\necho \"Done for installing kubernetes files\"\n" | |
}, | |
{ | |
"key": "kube-labels", | |
"value": "beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos" | |
}, | |
{ | |
"key": "google-compute-enable-pcid", | |
"value": "true" | |
}, | |
{ | |
"key": "user-data", | |
"value": "#cloud-config\n\nwrite_files:\n - path: /etc/systemd/system/kube-node-installation.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Download and install k8s binaries and configurations\n After=network-online.target\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/mkdir -p /home/kubernetes/bin\n ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin\n ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin\n # Use --retry-connrefused opt only if it's supported by curl.\n ExecStartPre=/bin/bash -c 'OPT=\"\"; if curl --help | grep -q -- \"--retry-connrefused\"; then OPT=\"--retry-connrefused\"; fi; /usr/bin/curl --fail --retry 5 --retry-delay 3 $OPT --silent --show-error -H \"X-Google-Metadata-Request: True\" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh'\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh\n ExecStart=/home/kubernetes/bin/configure.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-node-configuration.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Configure kubernetes node\n After=kube-node-installation.service\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh\n ExecStart=/home/kubernetes/bin/configure-helper.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-container-runtime-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for container runtime\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh container-runtime\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubelet-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for kubelet\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.timer\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Hourly kube-logrotate invocation\n\n [Timer]\n OnCalendar=hourly\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes log rotation\n After=kube-node-configuration.service\n\n [Service]\n Type=oneshot\n ExecStart=-/usr/sbin/logrotate /etc/logrotate.conf\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubernetes.target\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes\n\n [Install]\n WantedBy=multi-user.target\n\nruncmd:\n - systemctl daemon-reload\n - systemctl enable kube-node-installation.service\n - systemctl enable kube-node-configuration.service\n - systemctl enable kube-container-runtime-monitor.service\n - systemctl enable kubelet-monitor.service\n - systemctl enable kube-logrotate.timer\n - systemctl enable kube-logrotate.service\n - systemctl enable kubernetes.target\n - systemctl start kubernetes.target\n" | |
}, | |
{ | |
"key": "kube-env", | |
"value": "ALLOCATE_NODE_CIDRS: \"true\"\nAPI_SERVER_TEST_LOG_LEVEL: --v=3\nAUTOSCALER_ENV_VARS: kube_reserved=cpu=70m,memory=1736Mi,ephemeral-storage=41Gi;node_labels=beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos\nCA_CERT: REDACTED\nCLUSTER_IP_RANGE: 10.24.0.0/14\nCLUSTER_NAME: tower-qe\nCREATE_BOOTSTRAP_KUBECONFIG: \"true\"\nDNS_DOMAIN: cluster.local\nDNS_SERVER_IP: 10.27.240.10\nDOCKER_REGISTRY_MIRROR_URL: https://mirror.gcr.io\nELASTICSEARCH_LOGGING_REPLICAS: \"1\"\nENABLE_CLUSTER_DNS: \"true\"\nENABLE_CLUSTER_LOGGING: \"false\"\nENABLE_CLUSTER_MONITORING: stackdriver\nENABLE_CLUSTER_REGISTRY: \"false\"\nENABLE_CLUSTER_UI: \"true\"\nENABLE_L7_LOADBALANCING: glbc\nENABLE_METRICS_SERVER: \"true\"\nENABLE_NODE_LOGGING: \"true\"\nENABLE_NODE_PROBLEM_DETECTOR: standalone\nENABLE_NODELOCAL_DNS: \"false\"\nENV_TIMESTAMP: \"2019-03-11T22:47:24+00:00\"\nEXTRA_DOCKER_OPTS: --insecure-registry 10.0.0.0/8\nFEATURE_GATES: DynamicKubeletConfig=false,ExperimentalCriticalPodAnnotation=true\nFLUENTD_CONTAINER_RUNTIME_SERVICE: containerd\nHPA_USE_REST_CLIENTS: \"true\"\nINSTANCE_PREFIX: gke-tower-qe-2647dc41\nKUBE_ADDON_REGISTRY: gcr.io/google-containers\nKUBE_MANIFESTS_TAR_HASH: db750e6ae5d326735897d78f0d19859ca687c554\nKUBE_MANIFESTS_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.11.7-gke.4/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.11.7-gke.4/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.11.7-gke.4/kubernetes-manifests.tar.gz\nKUBE_PROXY_TOKEN: kK-_qAXpxMoXnMntN7tE_38LT0CDrzFblZmc7lCwvIM=\nKUBELET_ARGS: --v=2 --cloud-provider=gce --experimental-mounter-path=/home/kubernetes/containerized_mounter/mounter\n --experimental-check-node-capabilities-before-mount=true --cert-dir=/var/lib/kubelet/pki/\n --cni-bin-dir=/home/kubernetes/bin --allow-privileged=true --kubeconfig=/var/lib/kubelet/kubeconfig\n --experimental-kernel-memcg-notification=true --max-pods=110 --network-plugin=kubenet\n --node-labels=beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos\n --volume-plugin-dir=/home/kubernetes/flexvolume --registry-qps=10 --registry-burst=20\n --bootstrap-kubeconfig=/var/lib/kubelet/bootstrap-kubeconfig --node-status-max-images=25\nKUBELET_CERT: REDACTED\nKUBELET_KEY: REDACTED\nKUBERNETES_MASTER: \"false\"\nKUBERNETES_MASTER_NAME: 35.237.6.167\nLOGGING_DESTINATION: gcp\nMONITORING_FLAG_SET: \"false\"\nNETWORK_PROVIDER: kubenet\nNODE_LOCAL_SSDS_EXT: \"\"\nNODE_PROBLEM_DETECTOR_TOKEN: uUE6mZylRjw2-0f_akgRPRXebfSaVuQLByatgzZ6Mxs=\nREMOUNT_VOLUME_PLUGIN_DIR: \"true\"\nREQUIRE_METADATA_KUBELET_CONFIG_FILE: \"true\"\nSALT_TAR_HASH: \"\"\nSALT_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.11.7-gke.4/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.11.7-gke.4/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.11.7-gke.4/kubernetes-salt.tar.gz\nSERVER_BINARY_TAR_HASH: 5582985879f9362685cee6a04375f3f7c108e6dd\nSERVER_BINARY_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.11.7-gke.4/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.11.7-gke.4/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.11.7-gke.4/kubernetes-server-linux-amd64.tar.gz\nSERVICE_CLUSTER_IP_RANGE: 10.27.240.0/20\nVOLUME_PLUGIN_DIR: /home/kubernetes/flexvolume\nZONE: us-east1-d\n" | |
}, | |
{ | |
"key": "enable-oslogin", | |
"value": "false" | |
}, | |
{ | |
"key": "kubelet-config", | |
"value": "apiVersion: kubelet.config.k8s.io/v1beta1\nauthentication:\n anonymous:\n enabled: false\n webhook:\n enabled: false\n x509:\n clientCAFile: /etc/srv/kubernetes/pki/ca-certificates.crt\nauthorization:\n mode: Webhook\ncgroupRoot: /\nclusterDNS:\n- 10.27.240.10\nclusterDomain: cluster.local\nenableDebuggingHandlers: true\nevictionHard:\n memory.available: 100Mi\n nodefs.available: 10%\n nodefs.inodesFree: 5%\nfeatureGates:\n DynamicKubeletConfig: false\n ExperimentalCriticalPodAnnotation: true\nkind: KubeletConfiguration\nkubeReserved:\n cpu: 70m\n ephemeral-storage: 41Gi\n memory: 1736Mi\nreadOnlyPort: 10255\nstaticPodPath: /etc/kubernetes/manifests\n" | |
}, | |
{ | |
"key": "cluster-name", | |
"value": "tower-qe" | |
}, | |
{ | |
"key": "cluster-uid", | |
"value": "2647dc41e9ae9ee668197227e073e8842b10cc2d40a9acf9a3a527a1f25e0fdd" | |
}, | |
{ | |
"key": "cluster-location", | |
"value": "us-east1-d" | |
} | |
], | |
"kind": "compute#metadata" | |
}, | |
"name": "gke-tower-qe-default-pool-0aa0f212-745b", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "external-nat", | |
"natIP": "34.73.152.53", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "0ZBQrxbc9pU=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.32", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/gke-tower-qe-default-pool-0aa0f212-745b", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only", | |
"https://www.googleapis.com/auth/logging.write", | |
"https://www.googleapis.com/auth/monitoring", | |
"https://www.googleapis.com/auth/servicecontrol", | |
"https://www.googleapis.com/auth/service.management.readonly", | |
"https://www.googleapis.com/auth/trace.append" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "pM_OwCJ1M0I=", | |
"items": [ | |
"gke-tower-qe-2647dc41-node" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.185.20.141": { | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2019-02-26T06:45:58.580-08:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "cmeyers-341", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/cmeyers-341", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "2870071275946569674", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "cmeyers-341", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.185.20.141", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "T8hNqugtbCk=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.26", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/cmeyers-341", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "6smc4R4d39I=", | |
"items": [ | |
"http-server", | |
"https-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.185.28.63": { | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2019-01-29T10:56:11.880-08:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "newinstancetvo", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/newinstancetvo", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "828985860635303717", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "newinstancetvo", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.185.28.63", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "gQJePg3gPfQ=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.19", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/newinstancetvo", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "6smc4R4d39I=", | |
"items": [ | |
"http-server", | |
"https-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.190.146.119": { | |
"canIpForward": false, | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2017-05-11T15:30:07.584-07:00", | |
"deletionProtection": true, | |
"description": "", | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "tower-mockups", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/tower-mockups", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "3378743296778656512", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "g1-small", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/g1-small", | |
"metadata": { | |
"fingerprint": "5j4nADESpx4=", | |
"items": [ | |
{ | |
"key": "ssh-keys", | |
"value": "jenkins:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDALeq3UPBUFeEhRjO4CVbXeN4l7yyGNWIX4H/0B9jyik4UZ86poZp+WQrFZUAULVRA2Je8PpV3RjyN1pWdDBF+5E1oeOnydwQBds2fZJqtyO9HpBU8AUKPWO1O1zhYywO0AZpSD7/9QLDO7mpOW03hp8LkcozitW90VxCzdsDlmWuocf5kBWTJt4vQjZ5XU9GFUEwt9Ccj1ddIVQB/Oyq5V+ysHsnnRBeEekB+PQTAgkq93nc4zuz/M8zP+yxCedw6a2VKgTSkntrNtYkeWD1Rz5+tT3hT6vHeREtg4bwOSS8xHe/drnn9+BE+oAWjxVkkWGBMdF5XLLfX6u8Ge1PD [email protected]" | |
} | |
], | |
"kind": "compute#metadata" | |
}, | |
"name": "tower-mockups", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.190.146.119", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "yjGZFDMLynE=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.2", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/tower-mockups", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only", | |
"https://www.googleapis.com/auth/logging.write", | |
"https://www.googleapis.com/auth/monitoring.write", | |
"https://www.googleapis.com/auth/servicecontrol", | |
"https://www.googleapis.com/auth/service.management.readonly", | |
"https://www.googleapis.com/auth/trace.append" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "6smc4R4d39I=", | |
"items": [ | |
"http-server", | |
"https-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.190.167.16": { | |
"canIpForward": false, | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2017-07-19T09:06:39.810-07:00", | |
"deletionProtection": false, | |
"description": "", | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "production-pootle", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/production-pootle", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "4081544983155457376", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-1", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-1", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "production-pootle", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.190.167.16", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "f5b_P_4lNA8=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.4", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/production-pootle", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only", | |
"https://www.googleapis.com/auth/logging.write", | |
"https://www.googleapis.com/auth/monitoring.write", | |
"https://www.googleapis.com/auth/servicecontrol", | |
"https://www.googleapis.com/auth/service.management.readonly", | |
"https://www.googleapis.com/auth/trace.append" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "6smc4R4d39I=", | |
"items": [ | |
"http-server", | |
"https-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.196.219.214": { | |
"canIpForward": false, | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2017-08-30T07:43:46.121-07:00", | |
"deletionProtection": true, | |
"description": "", | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "jenkins-ssh-slave-1", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/jenkins-ssh-slave-1", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "7988984715829539278", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "jenkins-ssh-slave-1", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.196.219.214", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "9RGM0Au9Zbw=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.11", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/jenkins-ssh-slave-1", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only", | |
"https://www.googleapis.com/auth/logging.write", | |
"https://www.googleapis.com/auth/monitoring.write", | |
"https://www.googleapis.com/auth/servicecontrol", | |
"https://www.googleapis.com/auth/service.management.readonly", | |
"https://www.googleapis.com/auth/trace.append" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "42WmSpB8rSM=" | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.196.75.185": { | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2019-02-15T06:58:34.995-08:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "jm-tower-342-01", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/jm-tower-342-01", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "1264486967396756853", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "jm-tower-342-01", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.196.75.185", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "cF6XfJ2F-ZA=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.25", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/jm-tower-342-01", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "6smc4R4d39I=", | |
"items": [ | |
"http-server", | |
"https-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.196.9.30": { | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2017-09-13T07:51:09.814-07:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "towerapi-testing", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/towerapi-testing", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "1278988980378204978", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "towerapi-testing", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.196.9.30", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "MxZOIpDgSDw=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.12", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/towerapi-testing", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "6smc4R4d39I=", | |
"items": [ | |
"http-server", | |
"https-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.231.144.241": { | |
"canIpForward": true, | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2018-11-27T18:08:40.722-08:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "persistent-disk-0", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/cos-cloud/global/licenses/cos" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/gke-devel-default-pool-1b49cc65-lxj4", | |
"type": "PERSISTENT" | |
}, | |
{ | |
"autoDelete": false, | |
"boot": false, | |
"deviceName": "gke-devel-674942a3-dyn-pvc-c643c774-f2b7-11e8-b34a-42010a8e0032", | |
"index": 1, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/gke-devel-674942a3-dyn-pvc-c643c774-f2b7-11e8-b34a-42010a8e0032", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "206498018328856136", | |
"kind": "compute#instance", | |
"labelFingerprint": "2ixRno2sGuM=", | |
"labels": { | |
"goog-gke-node": "" | |
}, | |
"machineType": "n1-standard-8", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-8", | |
"metadata": { | |
"fingerprint": "MhHG5z1bVUo=", | |
"items": [ | |
{ | |
"key": "instance-template", | |
"value": "projects/720297370058/global/instanceTemplates/gke-devel-default-pool-1b49cc65" | |
}, | |
{ | |
"key": "created-by", | |
"value": "projects/720297370058/zones/us-east1-d/instanceGroupManagers/gke-devel-default-pool-1b49cc65-grp" | |
}, | |
{ | |
"key": "gci-update-strategy", | |
"value": "update_disabled" | |
}, | |
{ | |
"key": "gci-ensure-gke-docker", | |
"value": "true" | |
}, | |
{ | |
"key": "configure-sh", | |
"value": "#!/bin/bash\n\n# Copyright 2016 The Kubernetes Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Due to the GCE custom metadata size limit, we split the entire script into two\n# files configure.sh and configure-helper.sh. The functionality of downloading\n# kubernetes configuration, manifests, docker images, and binary files are\n# put in configure.sh, which is uploaded via GCE custom metadata.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\n### Hardcoded constants\nDEFAULT_CNI_VERSION=\"v0.6.0\"\nDEFAULT_CNI_SHA1=\"d595d3ded6499a64e8dac02466e2f5f2ce257c9f\" \nDEFAULT_NPD_VERSION=\"v0.4.1\"\nDEFAULT_NPD_SHA1=\"a57a3fe64cab8a18ec654f5cef0aec59dae62568\"\nDEFAULT_MOUNTER_TAR_SHA=\"8003b798cf33c7f91320cd6ee5cec4fa22244571\"\n###\n\n# Use --retry-connrefused opt only if it's supported by curl.\nCURL_RETRY_CONNREFUSED=\"\"\nif curl --help | grep -q -- '--retry-connrefused'; then\n CURL_RETRY_CONNREFUSED='--retry-connrefused'\nfi\n\nfunction set-broken-motd {\n cat > /etc/motd <<EOF\nBroken (or in progress) Kubernetes node setup! Check the cluster initialization status\nusing the following commands.\n\nMaster instance:\n - sudo systemctl status kube-master-installation\n - sudo systemctl status kube-master-configuration\n\nNode instance:\n - sudo systemctl status kube-node-installation\n - sudo systemctl status kube-node-configuration\nEOF\n}\n\nfunction download-kube-env {\n # Fetch kube-env from GCE metadata server.\n local -r tmp_kube_env=\"/tmp/kube-env.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_env}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_env}\" > \"${KUBE_HOME}/kube-env\")\n rm -f \"${tmp_kube_env}\"\n}\n\nfunction download-kube-master-certs {\n # Fetch kube-env from GCE metadata server.\n local -r tmp_kube_master_certs=\"/tmp/kube-master-certs.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_master_certs}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-master-certs\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_master_certs}\" > \"${KUBE_HOME}/kube-master-certs\")\n rm -f \"${tmp_kube_master_certs}\"\n}\n\nfunction validate-hash {\n local -r file=\"$1\"\n local -r expected=\"$2\"\n\n actual=$(sha1sum ${file} | awk '{ print $1 }') || true\n if [[ \"${actual}\" != \"${expected}\" ]]; then\n echo \"== ${file} corrupted, sha1 ${actual} doesn't match expected ${expected} ==\"\n return 1\n fi\n}\n\n# Retry a download until we get it. Takes a hash and a set of URLs.\n#\n# $1 is the sha1 of the URL. Can be \"\" if the sha1 is unknown.\n# $2+ are the URLs to download.\nfunction download-or-bust {\n local -r hash=\"$1\"\n shift 1\n\n local -r urls=( $* )\n while true; do\n for url in \"${urls[@]}\"; do\n local file=\"${url##*/}\"\n rm -f \"${file}\"\n if ! curl -f --ipv4 -Lo \"${file}\" --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 ${CURL_RETRY_CONNREFUSED} \"${url}\"; then\n echo \"== Failed to download ${url}. Retrying. ==\"\n elif [[ -n \"${hash}\" ]] && ! validate-hash \"${file}\" \"${hash}\"; then\n echo \"== Hash validation of ${url} failed. Retrying. ==\"\n else\n if [[ -n \"${hash}\" ]]; then\n echo \"== Downloaded ${url} (SHA1 = ${hash}) ==\"\n else\n echo \"== Downloaded ${url} ==\"\n fi\n return\n fi\n done\n done\n}\n\nfunction is-preloaded {\n local -r key=$1\n local -r value=$2\n grep -qs \"${key},${value}\" \"${KUBE_HOME}/preload_info\"\n}\n\nfunction split-commas {\n echo $1 | tr \",\" \"\\n\"\n}\n\nfunction remount-flexvolume-directory {\n local -r flexvolume_plugin_dir=$1\n mkdir -p $flexvolume_plugin_dir\n mount --bind $flexvolume_plugin_dir $flexvolume_plugin_dir\n mount -o remount,exec $flexvolume_plugin_dir\n}\n\nfunction install-gci-mounter-tools {\n CONTAINERIZED_MOUNTER_HOME=\"${KUBE_HOME}/containerized_mounter\"\n local -r mounter_tar_sha=\"${DEFAULT_MOUNTER_TAR_SHA}\"\n if is-preloaded \"mounter\" \"${mounter_tar_sha}\"; then\n echo \"mounter is preloaded.\"\n return\n fi\n\n echo \"Downloading gci mounter tools.\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n download-or-bust \"${mounter_tar_sha}\" \"https://storage.googleapis.com/kubernetes-release/gci-mounter/mounter.tar\"\n cp \"${KUBE_HOME}/kubernetes/server/bin/mounter\" \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n mv \"${KUBE_HOME}/mounter.tar\" /tmp/mounter.tar\n tar xf /tmp/mounter.tar -C \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n rm /tmp/mounter.tar\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs/var/lib/kubelet\"\n}\n\n# Install node problem detector binary.\nfunction install-node-problem-detector {\n if [[ -n \"${NODE_PROBLEM_DETECTOR_VERSION:-}\" ]]; then\n local -r npd_version=\"${NODE_PROBLEM_DETECTOR_VERSION}\"\n local -r npd_sha1=\"${NODE_PROBLEM_DETECTOR_TAR_HASH}\"\n else\n local -r npd_version=\"${DEFAULT_NPD_VERSION}\"\n local -r npd_sha1=\"${DEFAULT_NPD_SHA1}\"\n fi\n\n if is-preloaded \"node-problem-detector\" \"${npd_sha1}\"; then\n echo \"node-problem-detector is preloaded.\"\n return\n fi\n\n echo \"Downloading node problem detector.\"\n local -r npd_release_path=\"https://storage.googleapis.com/kubernetes-release\"\n local -r npd_tar=\"node-problem-detector-${npd_version}.tar.gz\"\n download-or-bust \"${npd_sha1}\" \"${npd_release_path}/node-problem-detector/${npd_tar}\"\n local -r npd_dir=\"${KUBE_HOME}/node-problem-detector\"\n mkdir -p \"${npd_dir}\"\n tar xzf \"${KUBE_HOME}/${npd_tar}\" -C \"${npd_dir}\" --overwrite\n mv \"${npd_dir}/bin\"/* \"${KUBE_BIN}\"\n chmod a+x \"${KUBE_BIN}/node-problem-detector\"\n rmdir \"${npd_dir}/bin\"\n rm -f \"${KUBE_HOME}/${npd_tar}\"\n}\n\nfunction install-cni-binaries {\n local -r cni_tar=\"cni-plugins-amd64-${DEFAULT_CNI_VERSION}.tgz\"\n local -r cni_sha1=\"${DEFAULT_CNI_SHA1}\"\n if is-preloaded \"${cni_tar}\" \"${cni_sha1}\"; then\n echo \"${cni_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading cni binaries\"\n download-or-bust \"${cni_sha1}\" \"https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}\"\n local -r cni_dir=\"${KUBE_HOME}/cni\"\n mkdir -p \"${cni_dir}/bin\"\n tar xzf \"${KUBE_HOME}/${cni_tar}\" -C \"${cni_dir}/bin\" --overwrite\n mv \"${cni_dir}/bin\"/* \"${KUBE_BIN}\"\n rmdir \"${cni_dir}/bin\"\n rm -f \"${KUBE_HOME}/${cni_tar}\"\n}\n\nfunction install-kube-manifests {\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n local dst_dir=\"${KUBE_HOME}/kube-manifests\"\n mkdir -p \"${dst_dir}\"\n local -r manifests_tar_urls=( $(split-commas \"${KUBE_MANIFESTS_TAR_URL}\") )\n local -r manifests_tar=\"${manifests_tar_urls[0]##*/}\"\n if [ -n \"${KUBE_MANIFESTS_TAR_HASH:-}\" ]; then\n local -r manifests_tar_hash=\"${KUBE_MANIFESTS_TAR_HASH}\"\n else\n echo \"Downloading k8s manifests sha1 (not found in env)\"\n download-or-bust \"\" \"${manifests_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r manifests_tar_hash=$(cat \"${manifests_tar}.sha1\")\n fi\n\n if is-preloaded \"${manifests_tar}\" \"${manifests_tar_hash}\"; then\n echo \"${manifests_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading k8s manifests tar\"\n download-or-bust \"${manifests_tar_hash}\" \"${manifests_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${manifests_tar}\" -C \"${dst_dir}\" --overwrite\n local -r kube_addon_registry=\"${KUBE_ADDON_REGISTRY:-gcr.io/google_containers}\"\n if [[ \"${kube_addon_registry}\" != \"gcr.io/google_containers\" ]]; then\n find \"${dst_dir}\" -name \\*.yaml -or -name \\*.yaml.in | \\\n xargs sed -ri \"s@(image:\\s.*)gcr.io/google_containers@\\1${kube_addon_registry}@\"\n find \"${dst_dir}\" -name \\*.manifest -or -name \\*.json | \\\n xargs sed -ri \"s@(image\\\":\\s+\\\")gcr.io/google_containers@\\1${kube_addon_registry}@\"\n fi\n cp \"${dst_dir}/kubernetes/gci-trusty/gci-configure-helper.sh\" \"${KUBE_BIN}/configure-helper.sh\"\n cp \"${dst_dir}/kubernetes/gci-trusty/health-monitor.sh\" \"${KUBE_BIN}/health-monitor.sh\"\n\n rm -f \"${KUBE_HOME}/${manifests_tar}\"\n rm -f \"${KUBE_HOME}/${manifests_tar}.sha1\"\n}\n\n# A helper function for loading a docker image. It keeps trying up to 5 times.\n#\n# $1: Full path of the docker image\nfunction try-load-docker-image {\n local -r img=$1\n echo \"Try to load docker image file ${img}\"\n # Temporarily turn off errexit, because we don't want to exit on first failure.\n set +e\n local -r max_attempts=5\n local -i attempt_num=1\n until timeout 30 ${LOAD_IMAGE_COMMAND:-docker load -i} \"${img}\"; do\n if [[ \"${attempt_num}\" == \"${max_attempts}\" ]]; then\n echo \"Fail to load docker image file ${img} after ${max_attempts} retries. Exit!!\"\n exit 1\n else\n attempt_num=$((attempt_num+1))\n sleep 5\n fi\n done\n # Re-enable errexit.\n set -e\n}\n\n# Loads kube-system docker images. It is better to do it before starting kubelet,\n# as kubelet will restart docker daemon, which may interfere with loading images.\nfunction load-docker-images {\n echo \"Start loading kube-system docker images\"\n local -r img_dir=\"${KUBE_HOME}/kube-docker-files\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n try-load-docker-image \"${img_dir}/kube-apiserver.tar\"\n try-load-docker-image \"${img_dir}/kube-controller-manager.tar\"\n try-load-docker-image \"${img_dir}/kube-scheduler.tar\"\n else\n try-load-docker-image \"${img_dir}/kube-proxy.tar\"\n fi\n}\n\n# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,\n# and places them into suitable directories. Files are placed in /home/kubernetes.\nfunction install-kube-binary-config {\n cd \"${KUBE_HOME}\"\n local -r server_binary_tar_urls=( $(split-commas \"${SERVER_BINARY_TAR_URL}\") )\n local -r server_binary_tar=\"${server_binary_tar_urls[0]##*/}\"\n if [[ -n \"${SERVER_BINARY_TAR_HASH:-}\" ]]; then\n local -r server_binary_tar_hash=\"${SERVER_BINARY_TAR_HASH}\"\n else\n echo \"Downloading binary release sha1 (not found in env)\"\n download-or-bust \"\" \"${server_binary_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r server_binary_tar_hash=$(cat \"${server_binary_tar}.sha1\")\n fi\n\n if is-preloaded \"${server_binary_tar}\" \"${server_binary_tar_hash}\"; then\n echo \"${server_binary_tar} is preloaded.\"\n else\n echo \"Downloading binary release tar\"\n download-or-bust \"${server_binary_tar_hash}\" \"${server_binary_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${server_binary_tar}\" -C \"${KUBE_HOME}\" --overwrite\n # Copy docker_tag and image files to ${KUBE_HOME}/kube-docker-files.\n local -r src_dir=\"${KUBE_HOME}/kubernetes/server/bin\"\n local dst_dir=\"${KUBE_HOME}/kube-docker-files\"\n mkdir -p \"${dst_dir}\"\n cp \"${src_dir}/\"*.docker_tag \"${dst_dir}\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]]; then\n cp \"${src_dir}/kube-proxy.tar\" \"${dst_dir}\"\n else\n cp \"${src_dir}/kube-apiserver.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-controller-manager.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-scheduler.tar\" \"${dst_dir}\"\n cp -r \"${KUBE_HOME}/kubernetes/addons\" \"${dst_dir}\"\n fi\n load-docker-images\n mv \"${src_dir}/kubelet\" \"${KUBE_BIN}\"\n mv \"${src_dir}/kubectl\" \"${KUBE_BIN}\"\n\n mv \"${KUBE_HOME}/kubernetes/LICENSES\" \"${KUBE_HOME}\"\n mv \"${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz\" \"${KUBE_HOME}\"\n fi\n\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]] && \\\n [[ \"${ENABLE_NODE_PROBLEM_DETECTOR:-}\" == \"standalone\" ]]; then\n install-node-problem-detector\n fi\n\n if [[ \"${NETWORK_PROVIDER:-}\" == \"kubenet\" ]] || \\\n [[ \"${NETWORK_PROVIDER:-}\" == \"cni\" ]]; then\n install-cni-binaries\n fi\n\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n install-kube-manifests\n chmod -R 755 \"${KUBE_BIN}\"\n\n # Install gci mounter related artifacts to allow mounting storage volumes in GCI\n install-gci-mounter-tools\n\n # Remount the Flexvolume directory with the \"exec\" option, if needed.\n if [[ \"${REMOUNT_VOLUME_PLUGIN_DIR:-}\" == \"true\" && -n \"${VOLUME_PLUGIN_DIR:-}\" ]]; then\n remount-flexvolume-directory \"${VOLUME_PLUGIN_DIR}\"\n fi\n\n # Clean up.\n rm -rf \"${KUBE_HOME}/kubernetes\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}.sha1\"\n}\n\n######### Main Function ##########\necho \"Start to install kubernetes files\"\nset-broken-motd\nKUBE_HOME=\"/home/kubernetes\"\nKUBE_BIN=\"${KUBE_HOME}/bin\"\ndownload-kube-env\nsource \"${KUBE_HOME}/kube-env\"\nif [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n download-kube-master-certs\nfi\ninstall-kube-binary-config\necho \"Done for installing kubernetes files\"\n" | |
}, | |
{ | |
"key": "google-compute-enable-pcid", | |
"value": "true" | |
}, | |
{ | |
"key": "user-data", | |
"value": "#cloud-config\n\nwrite_files:\n - path: /etc/systemd/system/kube-node-installation.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Download and install k8s binaries and configurations\n After=network-online.target\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/mkdir -p /home/kubernetes/bin\n ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin\n ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin\n # Use --retry-connrefused opt only if it's supported by curl.\n ExecStartPre=/bin/bash -c 'OPT=\"\"; if curl --help | grep -q -- \"--retry-connrefused\"; then OPT=\"--retry-connrefused\"; fi; /usr/bin/curl --fail --retry 5 --retry-delay 3 $OPT --silent --show-error -H \"X-Google-Metadata-Request: True\" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh'\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh\n ExecStart=/home/kubernetes/bin/configure.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-node-configuration.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Configure kubernetes node\n After=kube-node-installation.service\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh\n ExecStart=/home/kubernetes/bin/configure-helper.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-docker-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for docker\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh docker\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubelet-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for kubelet\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.timer\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Hourly kube-logrotate invocation\n\n [Timer]\n OnCalendar=hourly\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes log rotation\n After=kube-node-configuration.service\n\n [Service]\n Type=oneshot\n ExecStart=-/usr/sbin/logrotate /etc/logrotate.conf\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubernetes.target\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes\n\n [Install]\n WantedBy=multi-user.target\n\nruncmd:\n - systemctl daemon-reload\n - systemctl enable kube-node-installation.service\n - systemctl enable kube-node-configuration.service\n - systemctl enable kube-docker-monitor.service\n - systemctl enable kubelet-monitor.service\n - systemctl enable kube-logrotate.timer\n - systemctl enable kube-logrotate.service\n - systemctl enable kubernetes.target\n - systemctl start kubernetes.target\n" | |
}, | |
{ | |
"key": "kube-env", | |
"value": "ALLOCATE_NODE_CIDRS: \"true\"\nCA_CERT: REDACTED\nCLUSTER_IP_RANGE: 10.28.0.0/14\nCLUSTER_NAME: devel\nCREATE_BOOTSTRAP_KUBECONFIG: \"true\"\nDISABLE_DOCKER_LIVE_RESTORE: \"true\"\nDNS_DOMAIN: cluster.local\nDNS_SERVER_IP: 10.31.240.10\nDOCKER_REGISTRY_MIRROR_URL: https://mirror.gcr.io\nELASTICSEARCH_LOGGING_REPLICAS: \"1\"\nENABLE_CLUSTER_DNS: \"true\"\nENABLE_CLUSTER_LOGGING: \"false\"\nENABLE_CLUSTER_MONITORING: stackdriver\nENABLE_CLUSTER_REGISTRY: \"false\"\nENABLE_CLUSTER_UI: \"true\"\nENABLE_L7_LOADBALANCING: glbc\nENABLE_METRICS_SERVER: \"true\"\nENABLE_NODE_LOGGING: \"true\"\nENABLE_NODE_PROBLEM_DETECTOR: standalone\nENV_TIMESTAMP: \"2018-11-28T02:08:11+00:00\"\nEVICTION_HARD: memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%\nEXTRA_DOCKER_OPTS: --insecure-registry 10.0.0.0/8\nFEATURE_GATES: ExperimentalCriticalPodAnnotation=true\nHPA_USE_REST_CLIENTS: \"true\"\nINSTANCE_PREFIX: gke-devel-674942a3\nKUBE_ADDON_REGISTRY: gcr.io/google-containers\nKUBE_MANIFESTS_TAR_HASH: 0dc91a4ffe2057d7d74e432c3ae3e7b573a2adc1\nKUBE_MANIFESTS_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.9.7-gke.11/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.9.7-gke.11/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.9.7-gke.11/kubernetes-manifests.tar.gz\nKUBE_PROXY_TOKEN: dgLZWTV9VMPViiL9jjgqGTgKrh12H8vHEEpytkig6B4=\nKUBELET_CERT: REDACTED\nKUBELET_KEY: REDACTED\nKUBELET_TEST_ARGS: --max-pods=110 --kube-reserved=cpu=90m,memory=3483Mi\nKUBERNETES_MASTER: \"false\"\nKUBERNETES_MASTER_NAME: 35.237.89.8\nLOGGING_DESTINATION: gcp\nNETWORK_PROVIDER: kubenet\nNODE_LABELS: beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos\nNODE_LOCAL_SSDS_EXT: \"\"\nNODE_PROBLEM_DETECTOR_TOKEN: a6Dg1oCu7jthRLyXytVOsaAbFrEt3XJRtAvwwl28FPM=\nREMOUNT_VOLUME_PLUGIN_DIR: \"true\"\nSALT_TAR_HASH: 227a631143a632597db91f899bf31e1765ae1e1a\nSALT_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.9.7-gke.11/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.9.7-gke.11/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.9.7-gke.11/kubernetes-salt.tar.gz\nSERVER_BINARY_TAR_HASH: e441bc01a60d0aa7c25cdcd32ebbe52ff3ddb963\nSERVER_BINARY_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.9.7-gke.11/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.9.7-gke.11/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.9.7-gke.11/kubernetes-server-linux-amd64.tar.gz\nSERVICE_CLUSTER_IP_RANGE: 10.31.240.0/20\nVOLUME_PLUGIN_DIR: /home/kubernetes/flexvolume\nZONE: us-east1-d\n" | |
}, | |
{ | |
"key": "enable-oslogin", | |
"value": "false" | |
}, | |
{ | |
"key": "cluster-uid", | |
"value": "674942a32e8988c142d29c4e3a6953c8176a70f153d9ab58a03efdaf16043bbc" | |
}, | |
{ | |
"key": "cluster-name", | |
"value": "devel" | |
}, | |
{ | |
"key": "cluster-location", | |
"value": "us-east1-d" | |
} | |
], | |
"kind": "compute#metadata" | |
}, | |
"name": "gke-devel-default-pool-1b49cc65-lxj4", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "external-nat", | |
"natIP": "35.231.144.241", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "WKii6Z35vNc=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.6", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/gke-devel-default-pool-1b49cc65-lxj4", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only", | |
"https://www.googleapis.com/auth/logging.write", | |
"https://www.googleapis.com/auth/monitoring", | |
"https://www.googleapis.com/auth/service.management.readonly", | |
"https://www.googleapis.com/auth/servicecontrol", | |
"https://www.googleapis.com/auth/trace.append", | |
"https://www.googleapis.com/auth/compute" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "26qSPU1B-CA=", | |
"items": [ | |
"gke-devel-674942a3-node" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
}, | |
"35.231.234.152": { | |
"cpuPlatform": "Intel Haswell", | |
"creationTimestamp": "2018-10-19T14:12:33.090-07:00", | |
"deletionProtection": false, | |
"disks": [ | |
{ | |
"autoDelete": true, | |
"boot": true, | |
"deviceName": "launched-by-jenkins", | |
"index": 0, | |
"interface": "SCSI", | |
"kind": "compute#attachedDisk", | |
"licenses": [ | |
"https://www.googleapis.com/compute/v1/projects/centos-cloud/global/licenses/centos-7" | |
], | |
"mode": "READ_WRITE", | |
"source": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/disks/launched-by-jenkins", | |
"type": "PERSISTENT" | |
} | |
], | |
"id": "29752520597829167", | |
"kind": "compute#instance", | |
"labelFingerprint": "42WmSpB8rSM=", | |
"machineType": "n1-standard-2", | |
"machineType_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/machineTypes/n1-standard-2", | |
"metadata": { | |
"fingerprint": "ikEDENw22fQ=", | |
"kind": "compute#metadata" | |
}, | |
"name": "launched-by-jenkins", | |
"networkInterfaces": [ | |
{ | |
"accessConfigs": [ | |
{ | |
"kind": "compute#accessConfig", | |
"name": "External NAT", | |
"natIP": "35.231.234.152", | |
"networkTier": "PREMIUM", | |
"type": "ONE_TO_ONE_NAT" | |
} | |
], | |
"fingerprint": "76O6XN-bcm8=", | |
"kind": "compute#networkInterface", | |
"name": "nic0", | |
"network": { | |
"name": "default", | |
"region": "global", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/global/networks/default" | |
}, | |
"networkIP": "10.142.0.10", | |
"subnetwork": { | |
"name": "default", | |
"region": "us-east1", | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/regions/us-east1/subnetworks/default" | |
} | |
} | |
], | |
"project": "ansible-tower-engineering", | |
"scheduling": { | |
"automaticRestart": true, | |
"onHostMaintenance": "MIGRATE", | |
"preemptible": false | |
}, | |
"selfLink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d/instances/launched-by-jenkins", | |
"serviceAccounts": [ | |
{ | |
"email": "[email protected]", | |
"scopes": [ | |
"https://www.googleapis.com/auth/devstorage.read_only" | |
] | |
} | |
], | |
"startRestricted": false, | |
"status": "RUNNING", | |
"tags": { | |
"fingerprint": "6smc4R4d39I=", | |
"items": [ | |
"http-server", | |
"https-server" | |
] | |
}, | |
"zone": "us-east1-d", | |
"zone_selflink": "https://www.googleapis.com/compute/v1/projects/ansible-tower-engineering/zones/us-east1-d" | |
} | |
} | |
}, | |
"all": { | |
"children": [ | |
"ungrouped" | |
] | |
}, | |
"ungrouped": { | |
"hosts": [ | |
"104.196.66.112", | |
"34.73.152.53", | |
"35.185.20.141", | |
"35.185.28.63", | |
"35.190.146.119", | |
"35.190.167.16", | |
"35.196.219.214", | |
"35.196.75.185", | |
"35.196.9.30", | |
"35.231.144.241", | |
"35.231.234.152" | |
] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"us-east1-d": [ | |
"awx", | |
"cmeyers-341", | |
"gke-devel-default-pool-1b49cc65-lxj4", | |
"gke-tower-qe-default-pool-0aa0f212-745b", | |
"jenkins-ssh-slave-1", | |
"jm-tower-342-01", | |
"launched-by-jenkins", | |
"newinstancetvo", | |
"production-pootle", | |
"tower-mockups", | |
"towerapi-testing" | |
], | |
"tag_http-server": [ | |
"awx", | |
"cmeyers-341", | |
"jm-tower-342-01", | |
"launched-by-jenkins", | |
"newinstancetvo", | |
"production-pootle", | |
"tower-mockups", | |
"towerapi-testing" | |
], | |
"network_default": [ | |
"awx", | |
"cmeyers-341", | |
"gke-devel-default-pool-1b49cc65-lxj4", | |
"gke-tower-qe-default-pool-0aa0f212-745b", | |
"jenkins-ssh-slave-1", | |
"jm-tower-342-01", | |
"launched-by-jenkins", | |
"newinstancetvo", | |
"production-pootle", | |
"tower-mockups", | |
"towerapi-testing" | |
], | |
"n1-standard-2": [ | |
"awx", | |
"cmeyers-341", | |
"gke-tower-qe-default-pool-0aa0f212-745b", | |
"jenkins-ssh-slave-1", | |
"jm-tower-342-01", | |
"launched-by-jenkins", | |
"newinstancetvo", | |
"towerapi-testing" | |
], | |
"centos-7-v20171025": [ | |
"awx" | |
], | |
"status_running": [ | |
"awx", | |
"cmeyers-341", | |
"gke-devel-default-pool-1b49cc65-lxj4", | |
"gke-tower-qe-default-pool-0aa0f212-745b", | |
"jenkins-ssh-slave-1", | |
"jm-tower-342-01", | |
"launched-by-jenkins", | |
"newinstancetvo", | |
"production-pootle", | |
"tower-mockups", | |
"towerapi-testing" | |
], | |
"10.142.0.7": [ | |
"awx" | |
], | |
"104.196.66.112": [ | |
"awx" | |
], | |
"tag_https-server": [ | |
"cmeyers-341", | |
"jm-tower-342-01", | |
"launched-by-jenkins", | |
"newinstancetvo", | |
"production-pootle", | |
"tower-mockups", | |
"towerapi-testing" | |
], | |
"centos-7-v20190213": [ | |
"cmeyers-341", | |
"jm-tower-342-01" | |
], | |
"10.142.0.26": [ | |
"cmeyers-341" | |
], | |
"35.185.20.141": [ | |
"cmeyers-341" | |
], | |
"tag_gke-devel-674942a3-node": [ | |
"gke-devel-default-pool-1b49cc65-lxj4" | |
], | |
"n1-standard-8": [ | |
"gke-devel-default-pool-1b49cc65-lxj4" | |
], | |
"gke-197-gke11-cos-stable-65-10323-99-0-p2-v181110-pre": [ | |
"gke-devel-default-pool-1b49cc65-lxj4" | |
], | |
"10.142.0.6": [ | |
"gke-devel-default-pool-1b49cc65-lxj4" | |
], | |
"35.231.144.241": [ | |
"gke-devel-default-pool-1b49cc65-lxj4" | |
], | |
"tag_gke-tower-qe-2647dc41-node": [ | |
"gke-tower-qe-default-pool-0aa0f212-745b" | |
], | |
"gke-1117-gke4-cos-69-10895-123-0-v190205-pre": [ | |
"gke-tower-qe-default-pool-0aa0f212-745b" | |
], | |
"10.142.0.32": [ | |
"gke-tower-qe-default-pool-0aa0f212-745b" | |
], | |
"34.73.152.53": [ | |
"gke-tower-qe-default-pool-0aa0f212-745b" | |
], | |
"centos-7-v20170816": [ | |
"jenkins-ssh-slave-1" | |
], | |
"10.142.0.11": [ | |
"jenkins-ssh-slave-1" | |
], | |
"35.196.219.214": [ | |
"jenkins-ssh-slave-1" | |
], | |
"10.142.0.25": [ | |
"jm-tower-342-01" | |
], | |
"35.196.75.185": [ | |
"jm-tower-342-01" | |
], | |
"centos-7-v20181011": [ | |
"launched-by-jenkins" | |
], | |
"10.142.0.10": [ | |
"launched-by-jenkins" | |
], | |
"35.231.234.152": [ | |
"launched-by-jenkins" | |
], | |
"centos-7-v20190116": [ | |
"newinstancetvo" | |
], | |
"10.142.0.19": [ | |
"newinstancetvo" | |
], | |
"35.185.28.63": [ | |
"newinstancetvo" | |
], | |
"n1-standard-1": [ | |
"production-pootle" | |
], | |
"centos-7-v20170717": [ | |
"production-pootle" | |
], | |
"10.142.0.4": [ | |
"production-pootle" | |
], | |
"35.190.167.16": [ | |
"production-pootle" | |
], | |
"g1-small": [ | |
"tower-mockups" | |
], | |
"centos-7-v20170426": [ | |
"tower-mockups" | |
], | |
"10.142.0.2": [ | |
"tower-mockups" | |
], | |
"35.190.146.119": [ | |
"tower-mockups" | |
], | |
"centos-7-v20170829": [ | |
"towerapi-testing" | |
], | |
"10.142.0.12": [ | |
"towerapi-testing" | |
], | |
"35.196.9.30": [ | |
"towerapi-testing" | |
], | |
"_meta": { | |
"hostvars": { | |
"awx": { | |
"gce_uuid": "13b1d76d263d745c05b2c6e5234b4f51074f1222", | |
"gce_id": "2114317324400335940", | |
"gce_image": "centos-7-v20171025", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.7", | |
"gce_public_ip": "104.196.66.112", | |
"gce_name": "awx", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server" | |
], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "104.196.66.112" | |
}, | |
"cmeyers-341": { | |
"gce_uuid": "2227be803599d2a06e7358928d24031699ac5102", | |
"gce_id": "2870071275946569674", | |
"gce_image": "centos-7-v20190213", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.26", | |
"gce_public_ip": "35.185.20.141", | |
"gce_name": "cmeyers-341", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server", | |
"https-server" | |
], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.185.20.141" | |
}, | |
"gke-devel-default-pool-1b49cc65-lxj4": { | |
"gce_uuid": "65c0b74157bcfb1540ee2e2fee9ffd2ff9288585", | |
"gce_id": "206498018328856136", | |
"gce_image": "gke-197-gke11-cos-stable-65-10323-99-0-p2-v181110-pre", | |
"gce_machine_type": "n1-standard-8", | |
"gce_private_ip": "10.142.0.6", | |
"gce_public_ip": "35.231.144.241", | |
"gce_name": "gke-devel-default-pool-1b49cc65-lxj4", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"gke-devel-674942a3-node" | |
], | |
"gce_metadata": { | |
"instance-template": "projects/720297370058/global/instanceTemplates/gke-devel-default-pool-1b49cc65", | |
"created-by": "projects/720297370058/zones/us-east1-d/instanceGroupManagers/gke-devel-default-pool-1b49cc65-grp", | |
"gci-update-strategy": "update_disabled", | |
"gci-ensure-gke-docker": "true", | |
"configure-sh": "#!/bin/bash\n\n# Copyright 2016 The Kubernetes Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Due to the GCE custom metadata size limit, we split the entire script into two\n# files configure.sh and configure-helper.sh. The functionality of downloading\n# kubernetes configuration, manifests, docker images, and binary files are\n# put in configure.sh, which is uploaded via GCE custom metadata.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\n### Hardcoded constants\nDEFAULT_CNI_VERSION=\"v0.6.0\"\nDEFAULT_CNI_SHA1=\"d595d3ded6499a64e8dac02466e2f5f2ce257c9f\" \nDEFAULT_NPD_VERSION=\"v0.4.1\"\nDEFAULT_NPD_SHA1=\"a57a3fe64cab8a18ec654f5cef0aec59dae62568\"\nDEFAULT_MOUNTER_TAR_SHA=\"8003b798cf33c7f91320cd6ee5cec4fa22244571\"\n###\n\n# Use --retry-connrefused opt only if it's supported by curl.\nCURL_RETRY_CONNREFUSED=\"\"\nif curl --help | grep -q -- '--retry-connrefused'; then\n CURL_RETRY_CONNREFUSED='--retry-connrefused'\nfi\n\nfunction set-broken-motd {\n cat > /etc/motd <<EOF\nBroken (or in progress) Kubernetes node setup! Check the cluster initialization status\nusing the following commands.\n\nMaster instance:\n - sudo systemctl status kube-master-installation\n - sudo systemctl status kube-master-configuration\n\nNode instance:\n - sudo systemctl status kube-node-installation\n - sudo systemctl status kube-node-configuration\nEOF\n}\n\nfunction download-kube-env {\n # Fetch kube-env from GCE metadata server.\n local -r tmp_kube_env=\"/tmp/kube-env.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_env}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_env}\" > \"${KUBE_HOME}/kube-env\")\n rm -f \"${tmp_kube_env}\"\n}\n\nfunction download-kube-master-certs {\n # Fetch kube-env from GCE metadata server.\n local -r tmp_kube_master_certs=\"/tmp/kube-master-certs.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_master_certs}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-master-certs\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_master_certs}\" > \"${KUBE_HOME}/kube-master-certs\")\n rm -f \"${tmp_kube_master_certs}\"\n}\n\nfunction validate-hash {\n local -r file=\"$1\"\n local -r expected=\"$2\"\n\n actual=$(sha1sum ${file} | awk '{ print $1 }') || true\n if [[ \"${actual}\" != \"${expected}\" ]]; then\n echo \"== ${file} corrupted, sha1 ${actual} doesn't match expected ${expected} ==\"\n return 1\n fi\n}\n\n# Retry a download until we get it. Takes a hash and a set of URLs.\n#\n# $1 is the sha1 of the URL. Can be \"\" if the sha1 is unknown.\n# $2+ are the URLs to download.\nfunction download-or-bust {\n local -r hash=\"$1\"\n shift 1\n\n local -r urls=( $* )\n while true; do\n for url in \"${urls[@]}\"; do\n local file=\"${url##*/}\"\n rm -f \"${file}\"\n if ! curl -f --ipv4 -Lo \"${file}\" --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 ${CURL_RETRY_CONNREFUSED} \"${url}\"; then\n echo \"== Failed to download ${url}. Retrying. ==\"\n elif [[ -n \"${hash}\" ]] && ! validate-hash \"${file}\" \"${hash}\"; then\n echo \"== Hash validation of ${url} failed. Retrying. ==\"\n else\n if [[ -n \"${hash}\" ]]; then\n echo \"== Downloaded ${url} (SHA1 = ${hash}) ==\"\n else\n echo \"== Downloaded ${url} ==\"\n fi\n return\n fi\n done\n done\n}\n\nfunction is-preloaded {\n local -r key=$1\n local -r value=$2\n grep -qs \"${key},${value}\" \"${KUBE_HOME}/preload_info\"\n}\n\nfunction split-commas {\n echo $1 | tr \",\" \"\\n\"\n}\n\nfunction remount-flexvolume-directory {\n local -r flexvolume_plugin_dir=$1\n mkdir -p $flexvolume_plugin_dir\n mount --bind $flexvolume_plugin_dir $flexvolume_plugin_dir\n mount -o remount,exec $flexvolume_plugin_dir\n}\n\nfunction install-gci-mounter-tools {\n CONTAINERIZED_MOUNTER_HOME=\"${KUBE_HOME}/containerized_mounter\"\n local -r mounter_tar_sha=\"${DEFAULT_MOUNTER_TAR_SHA}\"\n if is-preloaded \"mounter\" \"${mounter_tar_sha}\"; then\n echo \"mounter is preloaded.\"\n return\n fi\n\n echo \"Downloading gci mounter tools.\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n download-or-bust \"${mounter_tar_sha}\" \"https://storage.googleapis.com/kubernetes-release/gci-mounter/mounter.tar\"\n cp \"${KUBE_HOME}/kubernetes/server/bin/mounter\" \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n mv \"${KUBE_HOME}/mounter.tar\" /tmp/mounter.tar\n tar xf /tmp/mounter.tar -C \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n rm /tmp/mounter.tar\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs/var/lib/kubelet\"\n}\n\n# Install node problem detector binary.\nfunction install-node-problem-detector {\n if [[ -n \"${NODE_PROBLEM_DETECTOR_VERSION:-}\" ]]; then\n local -r npd_version=\"${NODE_PROBLEM_DETECTOR_VERSION}\"\n local -r npd_sha1=\"${NODE_PROBLEM_DETECTOR_TAR_HASH}\"\n else\n local -r npd_version=\"${DEFAULT_NPD_VERSION}\"\n local -r npd_sha1=\"${DEFAULT_NPD_SHA1}\"\n fi\n\n if is-preloaded \"node-problem-detector\" \"${npd_sha1}\"; then\n echo \"node-problem-detector is preloaded.\"\n return\n fi\n\n echo \"Downloading node problem detector.\"\n local -r npd_release_path=\"https://storage.googleapis.com/kubernetes-release\"\n local -r npd_tar=\"node-problem-detector-${npd_version}.tar.gz\"\n download-or-bust \"${npd_sha1}\" \"${npd_release_path}/node-problem-detector/${npd_tar}\"\n local -r npd_dir=\"${KUBE_HOME}/node-problem-detector\"\n mkdir -p \"${npd_dir}\"\n tar xzf \"${KUBE_HOME}/${npd_tar}\" -C \"${npd_dir}\" --overwrite\n mv \"${npd_dir}/bin\"/* \"${KUBE_BIN}\"\n chmod a+x \"${KUBE_BIN}/node-problem-detector\"\n rmdir \"${npd_dir}/bin\"\n rm -f \"${KUBE_HOME}/${npd_tar}\"\n}\n\nfunction install-cni-binaries {\n local -r cni_tar=\"cni-plugins-amd64-${DEFAULT_CNI_VERSION}.tgz\"\n local -r cni_sha1=\"${DEFAULT_CNI_SHA1}\"\n if is-preloaded \"${cni_tar}\" \"${cni_sha1}\"; then\n echo \"${cni_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading cni binaries\"\n download-or-bust \"${cni_sha1}\" \"https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}\"\n local -r cni_dir=\"${KUBE_HOME}/cni\"\n mkdir -p \"${cni_dir}/bin\"\n tar xzf \"${KUBE_HOME}/${cni_tar}\" -C \"${cni_dir}/bin\" --overwrite\n mv \"${cni_dir}/bin\"/* \"${KUBE_BIN}\"\n rmdir \"${cni_dir}/bin\"\n rm -f \"${KUBE_HOME}/${cni_tar}\"\n}\n\nfunction install-kube-manifests {\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n local dst_dir=\"${KUBE_HOME}/kube-manifests\"\n mkdir -p \"${dst_dir}\"\n local -r manifests_tar_urls=( $(split-commas \"${KUBE_MANIFESTS_TAR_URL}\") )\n local -r manifests_tar=\"${manifests_tar_urls[0]##*/}\"\n if [ -n \"${KUBE_MANIFESTS_TAR_HASH:-}\" ]; then\n local -r manifests_tar_hash=\"${KUBE_MANIFESTS_TAR_HASH}\"\n else\n echo \"Downloading k8s manifests sha1 (not found in env)\"\n download-or-bust \"\" \"${manifests_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r manifests_tar_hash=$(cat \"${manifests_tar}.sha1\")\n fi\n\n if is-preloaded \"${manifests_tar}\" \"${manifests_tar_hash}\"; then\n echo \"${manifests_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading k8s manifests tar\"\n download-or-bust \"${manifests_tar_hash}\" \"${manifests_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${manifests_tar}\" -C \"${dst_dir}\" --overwrite\n local -r kube_addon_registry=\"${KUBE_ADDON_REGISTRY:-gcr.io/google_containers}\"\n if [[ \"${kube_addon_registry}\" != \"gcr.io/google_containers\" ]]; then\n find \"${dst_dir}\" -name \\*.yaml -or -name \\*.yaml.in | \\\n xargs sed -ri \"s@(image:\\s.*)gcr.io/google_containers@\\1${kube_addon_registry}@\"\n find \"${dst_dir}\" -name \\*.manifest -or -name \\*.json | \\\n xargs sed -ri \"s@(image\\\":\\s+\\\")gcr.io/google_containers@\\1${kube_addon_registry}@\"\n fi\n cp \"${dst_dir}/kubernetes/gci-trusty/gci-configure-helper.sh\" \"${KUBE_BIN}/configure-helper.sh\"\n cp \"${dst_dir}/kubernetes/gci-trusty/health-monitor.sh\" \"${KUBE_BIN}/health-monitor.sh\"\n\n rm -f \"${KUBE_HOME}/${manifests_tar}\"\n rm -f \"${KUBE_HOME}/${manifests_tar}.sha1\"\n}\n\n# A helper function for loading a docker image. It keeps trying up to 5 times.\n#\n# $1: Full path of the docker image\nfunction try-load-docker-image {\n local -r img=$1\n echo \"Try to load docker image file ${img}\"\n # Temporarily turn off errexit, because we don't want to exit on first failure.\n set +e\n local -r max_attempts=5\n local -i attempt_num=1\n until timeout 30 ${LOAD_IMAGE_COMMAND:-docker load -i} \"${img}\"; do\n if [[ \"${attempt_num}\" == \"${max_attempts}\" ]]; then\n echo \"Fail to load docker image file ${img} after ${max_attempts} retries. Exit!!\"\n exit 1\n else\n attempt_num=$((attempt_num+1))\n sleep 5\n fi\n done\n # Re-enable errexit.\n set -e\n}\n\n# Loads kube-system docker images. It is better to do it before starting kubelet,\n# as kubelet will restart docker daemon, which may interfere with loading images.\nfunction load-docker-images {\n echo \"Start loading kube-system docker images\"\n local -r img_dir=\"${KUBE_HOME}/kube-docker-files\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n try-load-docker-image \"${img_dir}/kube-apiserver.tar\"\n try-load-docker-image \"${img_dir}/kube-controller-manager.tar\"\n try-load-docker-image \"${img_dir}/kube-scheduler.tar\"\n else\n try-load-docker-image \"${img_dir}/kube-proxy.tar\"\n fi\n}\n\n# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,\n# and places them into suitable directories. Files are placed in /home/kubernetes.\nfunction install-kube-binary-config {\n cd \"${KUBE_HOME}\"\n local -r server_binary_tar_urls=( $(split-commas \"${SERVER_BINARY_TAR_URL}\") )\n local -r server_binary_tar=\"${server_binary_tar_urls[0]##*/}\"\n if [[ -n \"${SERVER_BINARY_TAR_HASH:-}\" ]]; then\n local -r server_binary_tar_hash=\"${SERVER_BINARY_TAR_HASH}\"\n else\n echo \"Downloading binary release sha1 (not found in env)\"\n download-or-bust \"\" \"${server_binary_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r server_binary_tar_hash=$(cat \"${server_binary_tar}.sha1\")\n fi\n\n if is-preloaded \"${server_binary_tar}\" \"${server_binary_tar_hash}\"; then\n echo \"${server_binary_tar} is preloaded.\"\n else\n echo \"Downloading binary release tar\"\n download-or-bust \"${server_binary_tar_hash}\" \"${server_binary_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${server_binary_tar}\" -C \"${KUBE_HOME}\" --overwrite\n # Copy docker_tag and image files to ${KUBE_HOME}/kube-docker-files.\n local -r src_dir=\"${KUBE_HOME}/kubernetes/server/bin\"\n local dst_dir=\"${KUBE_HOME}/kube-docker-files\"\n mkdir -p \"${dst_dir}\"\n cp \"${src_dir}/\"*.docker_tag \"${dst_dir}\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]]; then\n cp \"${src_dir}/kube-proxy.tar\" \"${dst_dir}\"\n else\n cp \"${src_dir}/kube-apiserver.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-controller-manager.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-scheduler.tar\" \"${dst_dir}\"\n cp -r \"${KUBE_HOME}/kubernetes/addons\" \"${dst_dir}\"\n fi\n load-docker-images\n mv \"${src_dir}/kubelet\" \"${KUBE_BIN}\"\n mv \"${src_dir}/kubectl\" \"${KUBE_BIN}\"\n\n mv \"${KUBE_HOME}/kubernetes/LICENSES\" \"${KUBE_HOME}\"\n mv \"${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz\" \"${KUBE_HOME}\"\n fi\n\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]] && \\\n [[ \"${ENABLE_NODE_PROBLEM_DETECTOR:-}\" == \"standalone\" ]]; then\n install-node-problem-detector\n fi\n\n if [[ \"${NETWORK_PROVIDER:-}\" == \"kubenet\" ]] || \\\n [[ \"${NETWORK_PROVIDER:-}\" == \"cni\" ]]; then\n install-cni-binaries\n fi\n\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n install-kube-manifests\n chmod -R 755 \"${KUBE_BIN}\"\n\n # Install gci mounter related artifacts to allow mounting storage volumes in GCI\n install-gci-mounter-tools\n\n # Remount the Flexvolume directory with the \"exec\" option, if needed.\n if [[ \"${REMOUNT_VOLUME_PLUGIN_DIR:-}\" == \"true\" && -n \"${VOLUME_PLUGIN_DIR:-}\" ]]; then\n remount-flexvolume-directory \"${VOLUME_PLUGIN_DIR}\"\n fi\n\n # Clean up.\n rm -rf \"${KUBE_HOME}/kubernetes\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}.sha1\"\n}\n\n######### Main Function ##########\necho \"Start to install kubernetes files\"\nset-broken-motd\nKUBE_HOME=\"/home/kubernetes\"\nKUBE_BIN=\"${KUBE_HOME}/bin\"\ndownload-kube-env\nsource \"${KUBE_HOME}/kube-env\"\nif [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n download-kube-master-certs\nfi\ninstall-kube-binary-config\necho \"Done for installing kubernetes files\"\n", | |
"google-compute-enable-pcid": "true", | |
"user-data": "#cloud-config\n\nwrite_files:\n - path: /etc/systemd/system/kube-node-installation.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Download and install k8s binaries and configurations\n After=network-online.target\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/mkdir -p /home/kubernetes/bin\n ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin\n ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin\n # Use --retry-connrefused opt only if it's supported by curl.\n ExecStartPre=/bin/bash -c 'OPT=\"\"; if curl --help | grep -q -- \"--retry-connrefused\"; then OPT=\"--retry-connrefused\"; fi; /usr/bin/curl --fail --retry 5 --retry-delay 3 $OPT --silent --show-error -H \"X-Google-Metadata-Request: True\" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh'\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh\n ExecStart=/home/kubernetes/bin/configure.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-node-configuration.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Configure kubernetes node\n After=kube-node-installation.service\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh\n ExecStart=/home/kubernetes/bin/configure-helper.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-docker-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for docker\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh docker\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubelet-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for kubelet\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.timer\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Hourly kube-logrotate invocation\n\n [Timer]\n OnCalendar=hourly\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes log rotation\n After=kube-node-configuration.service\n\n [Service]\n Type=oneshot\n ExecStart=-/usr/sbin/logrotate /etc/logrotate.conf\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubernetes.target\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes\n\n [Install]\n WantedBy=multi-user.target\n\nruncmd:\n - systemctl daemon-reload\n - systemctl enable kube-node-installation.service\n - systemctl enable kube-node-configuration.service\n - systemctl enable kube-docker-monitor.service\n - systemctl enable kubelet-monitor.service\n - systemctl enable kube-logrotate.timer\n - systemctl enable kube-logrotate.service\n - systemctl enable kubernetes.target\n - systemctl start kubernetes.target\n", | |
"kube-env": "ALLOCATE_NODE_CIDRS: \"true\"\nCA_CERT: REDACTED\nCLUSTER_IP_RANGE: 10.28.0.0/14\nCLUSTER_NAME: devel\nCREATE_BOOTSTRAP_KUBECONFIG: \"true\"\nDISABLE_DOCKER_LIVE_RESTORE: \"true\"\nDNS_DOMAIN: cluster.local\nDNS_SERVER_IP: 10.31.240.10\nDOCKER_REGISTRY_MIRROR_URL: https://mirror.gcr.io\nELASTICSEARCH_LOGGING_REPLICAS: \"1\"\nENABLE_CLUSTER_DNS: \"true\"\nENABLE_CLUSTER_LOGGING: \"false\"\nENABLE_CLUSTER_MONITORING: stackdriver\nENABLE_CLUSTER_REGISTRY: \"false\"\nENABLE_CLUSTER_UI: \"true\"\nENABLE_L7_LOADBALANCING: glbc\nENABLE_METRICS_SERVER: \"true\"\nENABLE_NODE_LOGGING: \"true\"\nENABLE_NODE_PROBLEM_DETECTOR: standalone\nENV_TIMESTAMP: \"2018-11-28T02:08:11+00:00\"\nEVICTION_HARD: memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%\nEXTRA_DOCKER_OPTS: --insecure-registry 10.0.0.0/8\nFEATURE_GATES: ExperimentalCriticalPodAnnotation=true\nHPA_USE_REST_CLIENTS: \"true\"\nINSTANCE_PREFIX: gke-devel-674942a3\nKUBE_ADDON_REGISTRY: gcr.io/google-containers\nKUBE_MANIFESTS_TAR_HASH: 0dc91a4ffe2057d7d74e432c3ae3e7b573a2adc1\nKUBE_MANIFESTS_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.9.7-gke.11/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.9.7-gke.11/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.9.7-gke.11/kubernetes-manifests.tar.gz\nKUBE_PROXY_TOKEN: dgLZWTV9VMPViiL9jjgqGTgKrh12H8vHEEpytkig6B4=\nKUBELET_CERT: REDACTED\nKUBELET_KEY: REDACTED\nKUBELET_TEST_ARGS: --max-pods=110 --kube-reserved=cpu=90m,memory=3483Mi\nKUBERNETES_MASTER: \"false\"\nKUBERNETES_MASTER_NAME: 35.237.89.8\nLOGGING_DESTINATION: gcp\nNETWORK_PROVIDER: kubenet\nNODE_LABELS: beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos\nNODE_LOCAL_SSDS_EXT: \"\"\nNODE_PROBLEM_DETECTOR_TOKEN: a6Dg1oCu7jthRLyXytVOsaAbFrEt3XJRtAvwwl28FPM=\nREMOUNT_VOLUME_PLUGIN_DIR: \"true\"\nSALT_TAR_HASH: 227a631143a632597db91f899bf31e1765ae1e1a\nSALT_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.9.7-gke.11/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.9.7-gke.11/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.9.7-gke.11/kubernetes-salt.tar.gz\nSERVER_BINARY_TAR_HASH: e441bc01a60d0aa7c25cdcd32ebbe52ff3ddb963\nSERVER_BINARY_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.9.7-gke.11/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.9.7-gke.11/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.9.7-gke.11/kubernetes-server-linux-amd64.tar.gz\nSERVICE_CLUSTER_IP_RANGE: 10.31.240.0/20\nVOLUME_PLUGIN_DIR: /home/kubernetes/flexvolume\nZONE: us-east1-d\n", | |
"enable-oslogin": "false", | |
"cluster-uid": "674942a32e8988c142d29c4e3a6953c8176a70f153d9ab58a03efdaf16043bbc", | |
"cluster-name": "devel", | |
"cluster-location": "us-east1-d" | |
}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.231.144.241" | |
}, | |
"gke-tower-qe-default-pool-0aa0f212-745b": { | |
"gce_uuid": "88ec5cd1ea87d96801fa034cd6d499d27cccdfef", | |
"gce_id": "927016968734333817", | |
"gce_image": "gke-1117-gke4-cos-69-10895-123-0-v190205-pre", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.32", | |
"gce_public_ip": "34.73.152.53", | |
"gce_name": "gke-tower-qe-default-pool-0aa0f212-745b", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"gke-tower-qe-2647dc41-node" | |
], | |
"gce_metadata": { | |
"instance-template": "projects/720297370058/global/instanceTemplates/gke-tower-qe-default-pool-0aa0f212", | |
"created-by": "projects/720297370058/zones/us-east1-d/instanceGroupManagers/gke-tower-qe-default-pool-0aa0f212-grp", | |
"gci-update-strategy": "update_disabled", | |
"gci-ensure-gke-docker": "true", | |
"configure-sh": "#!/usr/bin/env bash\n\n# Copyright 2016 The Kubernetes Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Due to the GCE custom metadata size limit, we split the entire script into two\n# files configure.sh and configure-helper.sh. The functionality of downloading\n# kubernetes configuration, manifests, docker images, and binary files are\n# put in configure.sh, which is uploaded via GCE custom metadata.\n\nset -o errexit\nset -o nounset\nset -o pipefail\n\n### Hardcoded constants\nDEFAULT_CNI_VERSION=\"v0.6.0\"\nDEFAULT_CNI_SHA1=\"d595d3ded6499a64e8dac02466e2f5f2ce257c9f\"\nDEFAULT_NPD_VERSION=\"v0.6.0\"\nDEFAULT_NPD_SHA1=\"a28e960a21bb74bc0ae09c267b6a340f30e5b3a6\"\nDEFAULT_CRICTL_VERSION=\"v1.11.1\"\nDEFAULT_CRICTL_SHA1=\"527fca5a0ecef6a8e6433e2af9cf83f63aff5694\"\nDEFAULT_MOUNTER_TAR_SHA=\"8003b798cf33c7f91320cd6ee5cec4fa22244571\"\n###\n\n# Use --retry-connrefused opt only if it's supported by curl.\nCURL_RETRY_CONNREFUSED=\"\"\nif curl --help | grep -q -- '--retry-connrefused'; then\n CURL_RETRY_CONNREFUSED='--retry-connrefused'\nfi\n\nfunction set-broken-motd {\n cat > /etc/motd <<EOF\nBroken (or in progress) Kubernetes node setup! Check the cluster initialization status\nusing the following commands.\n\nMaster instance:\n - sudo systemctl status kube-master-installation\n - sudo systemctl status kube-master-configuration\n\nNode instance:\n - sudo systemctl status kube-node-installation\n - sudo systemctl status kube-node-configuration\nEOF\n}\n\nfunction download-kube-env {\n # Fetch kube-env from GCE metadata server.\n (\n umask 077\n local -r tmp_kube_env=\"/tmp/kube-env.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_env}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_env}\" > \"${KUBE_HOME}/kube-env\")\n rm -f \"${tmp_kube_env}\"\n )\n}\n\nfunction download-kubelet-config {\n local -r dest=\"$1\"\n echo \"Downloading Kubelet config file, if it exists\"\n # Fetch kubelet config file from GCE metadata server.\n (\n umask 077\n local -r tmp_kubelet_config=\"/tmp/kubelet-config.yaml\"\n if curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kubelet_config}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kubelet-config; then\n # only write to the final location if curl succeeds\n mv \"${tmp_kubelet_config}\" \"${dest}\"\n elif [[ \"${REQUIRE_METADATA_KUBELET_CONFIG_FILE:-false}\" == \"true\" ]]; then\n echo \"== Failed to download required Kubelet config file from metadata server ==\"\n exit 1\n fi\n )\n}\n\nfunction download-kube-master-certs {\n # Fetch kube-env from GCE metadata server.\n (\n umask 077\n local -r tmp_kube_master_certs=\"/tmp/kube-master-certs.yaml\"\n curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \\\n -H \"X-Google-Metadata-Request: True\" \\\n -o \"${tmp_kube_master_certs}\" \\\n http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-master-certs\n # Convert the yaml format file into a shell-style file.\n eval $(python -c '''\nimport pipes,sys,yaml\nfor k,v in yaml.load(sys.stdin).iteritems():\n print(\"readonly {var}={value}\".format(var = k, value = pipes.quote(str(v))))\n''' < \"${tmp_kube_master_certs}\" > \"${KUBE_HOME}/kube-master-certs\")\n rm -f \"${tmp_kube_master_certs}\"\n )\n}\n\nfunction validate-hash {\n local -r file=\"$1\"\n local -r expected=\"$2\"\n\n actual=$(sha1sum ${file} | awk '{ print $1 }') || true\n if [[ \"${actual}\" != \"${expected}\" ]]; then\n echo \"== ${file} corrupted, sha1 ${actual} doesn't match expected ${expected} ==\"\n return 1\n fi\n}\n\n# Retry a download until we get it. Takes a hash and a set of URLs.\n#\n# $1 is the sha1 of the URL. Can be \"\" if the sha1 is unknown.\n# $2+ are the URLs to download.\nfunction download-or-bust {\n local -r hash=\"$1\"\n shift 1\n\n local -r urls=( $* )\n while true; do\n for url in \"${urls[@]}\"; do\n local file=\"${url##*/}\"\n rm -f \"${file}\"\n if ! curl -f --ipv4 -Lo \"${file}\" --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 ${CURL_RETRY_CONNREFUSED} \"${url}\"; then\n echo \"== Failed to download ${url}. Retrying. ==\"\n elif [[ -n \"${hash}\" ]] && ! validate-hash \"${file}\" \"${hash}\"; then\n echo \"== Hash validation of ${url} failed. Retrying. ==\"\n else\n if [[ -n \"${hash}\" ]]; then\n echo \"== Downloaded ${url} (SHA1 = ${hash}) ==\"\n else\n echo \"== Downloaded ${url} ==\"\n fi\n return\n fi\n done\n done\n}\n\nfunction is-preloaded {\n local -r key=$1\n local -r value=$2\n grep -qs \"${key},${value}\" \"${KUBE_HOME}/preload_info\"\n}\n\nfunction split-commas {\n echo $1 | tr \",\" \"\\n\"\n}\n\nfunction remount-flexvolume-directory {\n local -r flexvolume_plugin_dir=$1\n mkdir -p $flexvolume_plugin_dir\n mount --bind $flexvolume_plugin_dir $flexvolume_plugin_dir\n mount -o remount,exec $flexvolume_plugin_dir\n}\n\nfunction install-gci-mounter-tools {\n CONTAINERIZED_MOUNTER_HOME=\"${KUBE_HOME}/containerized_mounter\"\n local -r mounter_tar_sha=\"${DEFAULT_MOUNTER_TAR_SHA}\"\n if is-preloaded \"mounter\" \"${mounter_tar_sha}\"; then\n echo \"mounter is preloaded.\"\n return\n fi\n\n echo \"Downloading gci mounter tools.\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}\"\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n download-or-bust \"${mounter_tar_sha}\" \"https://storage.googleapis.com/kubernetes-release/gci-mounter/mounter.tar\"\n cp \"${KUBE_HOME}/kubernetes/server/bin/mounter\" \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n chmod a+x \"${CONTAINERIZED_MOUNTER_HOME}/mounter\"\n mv \"${KUBE_HOME}/mounter.tar\" /tmp/mounter.tar\n tar xf /tmp/mounter.tar -C \"${CONTAINERIZED_MOUNTER_HOME}/rootfs\"\n rm /tmp/mounter.tar\n mkdir -p \"${CONTAINERIZED_MOUNTER_HOME}/rootfs/var/lib/kubelet\"\n}\n\n# Install node problem detector binary.\nfunction install-node-problem-detector {\n if [[ -n \"${NODE_PROBLEM_DETECTOR_VERSION:-}\" ]]; then\n local -r npd_version=\"${NODE_PROBLEM_DETECTOR_VERSION}\"\n local -r npd_sha1=\"${NODE_PROBLEM_DETECTOR_TAR_HASH}\"\n else\n local -r npd_version=\"${DEFAULT_NPD_VERSION}\"\n local -r npd_sha1=\"${DEFAULT_NPD_SHA1}\"\n fi\n local -r npd_tar=\"node-problem-detector-${npd_version}.tar.gz\"\n\n if is-preloaded \"${npd_tar}\" \"${npd_sha1}\"; then\n echo \"node-problem-detector is preloaded.\"\n return\n fi\n\n echo \"Downloading node problem detector.\"\n local -r npd_release_path=\"https://storage.googleapis.com/kubernetes-release\"\n download-or-bust \"${npd_sha1}\" \"${npd_release_path}/node-problem-detector/${npd_tar}\"\n local -r npd_dir=\"${KUBE_HOME}/node-problem-detector\"\n mkdir -p \"${npd_dir}\"\n tar xzf \"${KUBE_HOME}/${npd_tar}\" -C \"${npd_dir}\" --overwrite\n mv \"${npd_dir}/bin\"/* \"${KUBE_BIN}\"\n chmod a+x \"${KUBE_BIN}/node-problem-detector\"\n rmdir \"${npd_dir}/bin\"\n rm -f \"${KUBE_HOME}/${npd_tar}\"\n}\n\nfunction install-cni-binaries {\n local -r cni_tar=\"cni-plugins-amd64-${DEFAULT_CNI_VERSION}.tgz\"\n local -r cni_sha1=\"${DEFAULT_CNI_SHA1}\"\n if is-preloaded \"${cni_tar}\" \"${cni_sha1}\"; then\n echo \"${cni_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading cni binaries\"\n download-or-bust \"${cni_sha1}\" \"https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}\"\n local -r cni_dir=\"${KUBE_HOME}/cni\"\n mkdir -p \"${cni_dir}/bin\"\n tar xzf \"${KUBE_HOME}/${cni_tar}\" -C \"${cni_dir}/bin\" --overwrite\n mv \"${cni_dir}/bin\"/* \"${KUBE_BIN}\"\n rmdir \"${cni_dir}/bin\"\n rm -f \"${KUBE_HOME}/${cni_tar}\"\n}\n\n# Install crictl binary.\nfunction install-crictl {\n if [[ -n \"${CRICTL_VERSION:-}\" ]]; then\n local -r crictl_version=\"${CRICTL_VERSION}\"\n local -r crictl_sha1=\"${CRICTL_TAR_HASH}\"\n else\n local -r crictl_version=\"${DEFAULT_CRICTL_VERSION}\"\n local -r crictl_sha1=\"${DEFAULT_CRICTL_SHA1}\"\n fi\n local -r crictl=\"crictl-${crictl_version}-linux-amd64\"\n\n # Create crictl config file.\n cat > /etc/crictl.yaml <<EOF\nruntime-endpoint: ${CONTAINER_RUNTIME_ENDPOINT:-unix:///var/run/dockershim.sock}\nEOF\n\n if is-preloaded \"${crictl}\" \"${crictl_sha1}\"; then\n echo \"crictl is preloaded\"\n return\n fi\n\n echo \"Downloading crictl\"\n local -r crictl_path=\"https://storage.googleapis.com/kubernetes-release/crictl\"\n download-or-bust \"${crictl_sha1}\" \"${crictl_path}/${crictl}\"\n mv \"${KUBE_HOME}/${crictl}\" \"${KUBE_BIN}/crictl\"\n chmod a+x \"${KUBE_BIN}/crictl\"\n}\n\nfunction install-exec-auth-plugin {\n if [[ ! \"${EXEC_AUTH_PLUGIN_URL:-}\" ]]; then\n return\n fi\n local -r plugin_url=\"${EXEC_AUTH_PLUGIN_URL}\"\n local -r plugin_sha1=\"${EXEC_AUTH_PLUGIN_SHA1}\"\n\n echo \"Downloading gke-exec-auth-plugin binary\"\n download-or-bust \"${plugin_sha1}\" \"${plugin_url}\"\n mv \"${KUBE_HOME}/gke-exec-auth-plugin\" \"${KUBE_BIN}/gke-exec-auth-plugin\"\n chmod a+x \"${KUBE_BIN}/gke-exec-auth-plugin\"\n\n if [[ ! \"${EXEC_AUTH_PLUGIN_LICENSE_URL:-}\" ]]; then\n return\n fi\n local -r license_url=\"${EXEC_AUTH_PLUGIN_LICENSE_URL}\"\n echo \"Downloading gke-exec-auth-plugin license\"\n download-or-bust \"\" \"${license_url}\"\n mv \"${KUBE_HOME}/LICENSE\" \"${KUBE_BIN}/gke-exec-auth-plugin-license\"\n}\n\nfunction install-kube-manifests {\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n local dst_dir=\"${KUBE_HOME}/kube-manifests\"\n mkdir -p \"${dst_dir}\"\n local -r manifests_tar_urls=( $(split-commas \"${KUBE_MANIFESTS_TAR_URL}\") )\n local -r manifests_tar=\"${manifests_tar_urls[0]##*/}\"\n if [ -n \"${KUBE_MANIFESTS_TAR_HASH:-}\" ]; then\n local -r manifests_tar_hash=\"${KUBE_MANIFESTS_TAR_HASH}\"\n else\n echo \"Downloading k8s manifests sha1 (not found in env)\"\n download-or-bust \"\" \"${manifests_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r manifests_tar_hash=$(cat \"${manifests_tar}.sha1\")\n fi\n\n if is-preloaded \"${manifests_tar}\" \"${manifests_tar_hash}\"; then\n echo \"${manifests_tar} is preloaded.\"\n return\n fi\n\n echo \"Downloading k8s manifests tar\"\n download-or-bust \"${manifests_tar_hash}\" \"${manifests_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${manifests_tar}\" -C \"${dst_dir}\" --overwrite\n local -r kube_addon_registry=\"${KUBE_ADDON_REGISTRY:-k8s.gcr.io}\"\n if [[ \"${kube_addon_registry}\" != \"k8s.gcr.io\" ]]; then\n find \"${dst_dir}\" -name \\*.yaml -or -name \\*.yaml.in | \\\n xargs sed -ri \"s@(image:\\s.*)k8s.gcr.io@\\1${kube_addon_registry}@\"\n find \"${dst_dir}\" -name \\*.manifest -or -name \\*.json | \\\n xargs sed -ri \"s@(image\\\":\\s+\\\")k8s.gcr.io@\\1${kube_addon_registry}@\"\n fi\n cp \"${dst_dir}/kubernetes/gci-trusty/gci-configure-helper.sh\" \"${KUBE_BIN}/configure-helper.sh\"\n if [[ -e \"${dst_dir}/kubernetes/gci-trusty/gke-internal-configure-helper.sh\" ]]; then\n cp \"${dst_dir}/kubernetes/gci-trusty/gke-internal-configure-helper.sh\" \"${KUBE_BIN}/\"\n fi\n\n cp \"${dst_dir}/kubernetes/gci-trusty/health-monitor.sh\" \"${KUBE_BIN}/health-monitor.sh\"\n\n rm -f \"${KUBE_HOME}/${manifests_tar}\"\n rm -f \"${KUBE_HOME}/${manifests_tar}.sha1\"\n}\n\n# A helper function for loading a docker image. It keeps trying up to 5 times.\n#\n# $1: Full path of the docker image\nfunction try-load-docker-image {\n local -r img=$1\n echo \"Try to load docker image file ${img}\"\n # Temporarily turn off errexit, because we don't want to exit on first failure.\n set +e\n local -r max_attempts=5\n local -i attempt_num=1\n until timeout 30 ${LOAD_IMAGE_COMMAND:-docker load -i} \"${img}\"; do\n if [[ \"${attempt_num}\" == \"${max_attempts}\" ]]; then\n echo \"Fail to load docker image file ${img} after ${max_attempts} retries. Exit!!\"\n exit 1\n else\n attempt_num=$((attempt_num+1))\n sleep 5\n fi\n done\n # Re-enable errexit.\n set -e\n}\n\n# Loads kube-system docker images. It is better to do it before starting kubelet,\n# as kubelet will restart docker daemon, which may interfere with loading images.\nfunction load-docker-images {\n echo \"Start loading kube-system docker images\"\n local -r img_dir=\"${KUBE_HOME}/kube-docker-files\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n try-load-docker-image \"${img_dir}/kube-apiserver.tar\"\n try-load-docker-image \"${img_dir}/kube-controller-manager.tar\"\n try-load-docker-image \"${img_dir}/kube-scheduler.tar\"\n else\n try-load-docker-image \"${img_dir}/kube-proxy.tar\"\n fi\n}\n\n# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,\n# and places them into suitable directories. Files are placed in /home/kubernetes.\nfunction install-kube-binary-config {\n cd \"${KUBE_HOME}\"\n local -r server_binary_tar_urls=( $(split-commas \"${SERVER_BINARY_TAR_URL}\") )\n local -r server_binary_tar=\"${server_binary_tar_urls[0]##*/}\"\n if [[ -n \"${SERVER_BINARY_TAR_HASH:-}\" ]]; then\n local -r server_binary_tar_hash=\"${SERVER_BINARY_TAR_HASH}\"\n else\n echo \"Downloading binary release sha1 (not found in env)\"\n download-or-bust \"\" \"${server_binary_tar_urls[@]/.tar.gz/.tar.gz.sha1}\"\n local -r server_binary_tar_hash=$(cat \"${server_binary_tar}.sha1\")\n fi\n\n if is-preloaded \"${server_binary_tar}\" \"${server_binary_tar_hash}\"; then\n echo \"${server_binary_tar} is preloaded.\"\n else\n echo \"Downloading binary release tar\"\n download-or-bust \"${server_binary_tar_hash}\" \"${server_binary_tar_urls[@]}\"\n tar xzf \"${KUBE_HOME}/${server_binary_tar}\" -C \"${KUBE_HOME}\" --overwrite\n # Copy docker_tag and image files to ${KUBE_HOME}/kube-docker-files.\n local -r src_dir=\"${KUBE_HOME}/kubernetes/server/bin\"\n local dst_dir=\"${KUBE_HOME}/kube-docker-files\"\n mkdir -p \"${dst_dir}\"\n cp \"${src_dir}/\"*.docker_tag \"${dst_dir}\"\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]]; then\n cp \"${src_dir}/kube-proxy.tar\" \"${dst_dir}\"\n else\n cp \"${src_dir}/kube-apiserver.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-controller-manager.tar\" \"${dst_dir}\"\n cp \"${src_dir}/kube-scheduler.tar\" \"${dst_dir}\"\n cp -r \"${KUBE_HOME}/kubernetes/addons\" \"${dst_dir}\"\n fi\n load-docker-images\n mv \"${src_dir}/kubelet\" \"${KUBE_BIN}\"\n mv \"${src_dir}/kubectl\" \"${KUBE_BIN}\"\n\n mv \"${KUBE_HOME}/kubernetes/LICENSES\" \"${KUBE_HOME}\"\n mv \"${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz\" \"${KUBE_HOME}\"\n fi\n\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]] && \\\n [[ \"${ENABLE_NODE_PROBLEM_DETECTOR:-}\" == \"standalone\" ]]; then\n install-node-problem-detector\n fi\n\n if [[ \"${NETWORK_PROVIDER:-}\" == \"kubenet\" ]] || \\\n [[ \"${NETWORK_PROVIDER:-}\" == \"cni\" ]]; then\n install-cni-binaries\n fi\n\n # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.\n install-kube-manifests\n chmod -R 755 \"${KUBE_BIN}\"\n\n # Install gci mounter related artifacts to allow mounting storage volumes in GCI\n install-gci-mounter-tools\n\n # Remount the Flexvolume directory with the \"exec\" option, if needed.\n if [[ \"${REMOUNT_VOLUME_PLUGIN_DIR:-}\" == \"true\" && -n \"${VOLUME_PLUGIN_DIR:-}\" ]]; then\n remount-flexvolume-directory \"${VOLUME_PLUGIN_DIR}\"\n fi\n\n # Install crictl on each node.\n install-crictl\n\n if [[ \"${KUBERNETES_MASTER:-}\" == \"false\" ]]; then\n # TODO(awly): include the binary and license in the OS image.\n install-exec-auth-plugin\n fi\n\n # Clean up.\n rm -rf \"${KUBE_HOME}/kubernetes\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}\"\n rm -f \"${KUBE_HOME}/${server_binary_tar}.sha1\"\n}\n\n######### Main Function ##########\necho \"Start to install kubernetes files\"\n# if install fails, message-of-the-day (motd) will warn at login shell\nset-broken-motd\n\nKUBE_HOME=\"/home/kubernetes\"\nKUBE_BIN=\"${KUBE_HOME}/bin\"\n\n# download and source kube-env\ndownload-kube-env\nsource \"${KUBE_HOME}/kube-env\"\n\ndownload-kubelet-config \"${KUBE_HOME}/kubelet-config.yaml\"\n\n# master certs\nif [[ \"${KUBERNETES_MASTER:-}\" == \"true\" ]]; then\n download-kube-master-certs\nfi\n\n# binaries and kube-system manifests\ninstall-kube-binary-config\n\necho \"Done for installing kubernetes files\"\n", | |
"kube-labels": "beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos", | |
"google-compute-enable-pcid": "true", | |
"user-data": "#cloud-config\n\nwrite_files:\n - path: /etc/systemd/system/kube-node-installation.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Download and install k8s binaries and configurations\n After=network-online.target\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/mkdir -p /home/kubernetes/bin\n ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin\n ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin\n # Use --retry-connrefused opt only if it's supported by curl.\n ExecStartPre=/bin/bash -c 'OPT=\"\"; if curl --help | grep -q -- \"--retry-connrefused\"; then OPT=\"--retry-connrefused\"; fi; /usr/bin/curl --fail --retry 5 --retry-delay 3 $OPT --silent --show-error -H \"X-Google-Metadata-Request: True\" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh'\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh\n ExecStart=/home/kubernetes/bin/configure.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-node-configuration.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Configure kubernetes node\n After=kube-node-installation.service\n\n [Service]\n Type=oneshot\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh\n ExecStart=/home/kubernetes/bin/configure-helper.sh\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-container-runtime-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for container runtime\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh container-runtime\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubelet-monitor.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes health monitoring for kubelet\n After=kube-node-configuration.service\n\n [Service]\n Restart=always\n RestartSec=10\n RemainAfterExit=yes\n RemainAfterExit=yes\n ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh\n ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.timer\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Hourly kube-logrotate invocation\n\n [Timer]\n OnCalendar=hourly\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kube-logrotate.service\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes log rotation\n After=kube-node-configuration.service\n\n [Service]\n Type=oneshot\n ExecStart=-/usr/sbin/logrotate /etc/logrotate.conf\n\n [Install]\n WantedBy=kubernetes.target\n\n - path: /etc/systemd/system/kubernetes.target\n permissions: 0644\n owner: root\n content: |\n [Unit]\n Description=Kubernetes\n\n [Install]\n WantedBy=multi-user.target\n\nruncmd:\n - systemctl daemon-reload\n - systemctl enable kube-node-installation.service\n - systemctl enable kube-node-configuration.service\n - systemctl enable kube-container-runtime-monitor.service\n - systemctl enable kubelet-monitor.service\n - systemctl enable kube-logrotate.timer\n - systemctl enable kube-logrotate.service\n - systemctl enable kubernetes.target\n - systemctl start kubernetes.target\n", | |
"kube-env": "ALLOCATE_NODE_CIDRS: \"true\"\nAPI_SERVER_TEST_LOG_LEVEL: --v=3\nAUTOSCALER_ENV_VARS: kube_reserved=cpu=70m,memory=1736Mi,ephemeral-storage=41Gi;node_labels=beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos\nCA_CERT: REDACTED\nCLUSTER_IP_RANGE: 10.24.0.0/14\nCLUSTER_NAME: tower-qe\nCREATE_BOOTSTRAP_KUBECONFIG: \"true\"\nDNS_DOMAIN: cluster.local\nDNS_SERVER_IP: 10.27.240.10\nDOCKER_REGISTRY_MIRROR_URL: https://mirror.gcr.io\nELASTICSEARCH_LOGGING_REPLICAS: \"1\"\nENABLE_CLUSTER_DNS: \"true\"\nENABLE_CLUSTER_LOGGING: \"false\"\nENABLE_CLUSTER_MONITORING: stackdriver\nENABLE_CLUSTER_REGISTRY: \"false\"\nENABLE_CLUSTER_UI: \"true\"\nENABLE_L7_LOADBALANCING: glbc\nENABLE_METRICS_SERVER: \"true\"\nENABLE_NODE_LOGGING: \"true\"\nENABLE_NODE_PROBLEM_DETECTOR: standalone\nENABLE_NODELOCAL_DNS: \"false\"\nENV_TIMESTAMP: \"2019-03-11T22:47:24+00:00\"\nEXTRA_DOCKER_OPTS: --insecure-registry 10.0.0.0/8\nFEATURE_GATES: DynamicKubeletConfig=false,ExperimentalCriticalPodAnnotation=true\nFLUENTD_CONTAINER_RUNTIME_SERVICE: containerd\nHPA_USE_REST_CLIENTS: \"true\"\nINSTANCE_PREFIX: gke-tower-qe-2647dc41\nKUBE_ADDON_REGISTRY: gcr.io/google-containers\nKUBE_MANIFESTS_TAR_HASH: db750e6ae5d326735897d78f0d19859ca687c554\nKUBE_MANIFESTS_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.11.7-gke.4/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.11.7-gke.4/kubernetes-manifests.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.11.7-gke.4/kubernetes-manifests.tar.gz\nKUBE_PROXY_TOKEN: kK-_qAXpxMoXnMntN7tE_38LT0CDrzFblZmc7lCwvIM=\nKUBELET_ARGS: --v=2 --cloud-provider=gce --experimental-mounter-path=/home/kubernetes/containerized_mounter/mounter\n --experimental-check-node-capabilities-before-mount=true --cert-dir=/var/lib/kubelet/pki/\n --cni-bin-dir=/home/kubernetes/bin --allow-privileged=true --kubeconfig=/var/lib/kubelet/kubeconfig\n --experimental-kernel-memcg-notification=true --max-pods=110 --network-plugin=kubenet\n --node-labels=beta.kubernetes.io/fluentd-ds-ready=true,cloud.google.com/gke-nodepool=default-pool,cloud.google.com/gke-os-distribution=cos\n --volume-plugin-dir=/home/kubernetes/flexvolume --registry-qps=10 --registry-burst=20\n --bootstrap-kubeconfig=/var/lib/kubelet/bootstrap-kubeconfig --node-status-max-images=25\nKUBELET_CERT: REDACTED\nKUBELET_KEY: REDACTED\nKUBERNETES_MASTER: \"false\"\nKUBERNETES_MASTER_NAME: 35.237.6.167\nLOGGING_DESTINATION: gcp\nMONITORING_FLAG_SET: \"false\"\nNETWORK_PROVIDER: kubenet\nNODE_LOCAL_SSDS_EXT: \"\"\nNODE_PROBLEM_DETECTOR_TOKEN: uUE6mZylRjw2-0f_akgRPRXebfSaVuQLByatgzZ6Mxs=\nREMOUNT_VOLUME_PLUGIN_DIR: \"true\"\nREQUIRE_METADATA_KUBELET_CONFIG_FILE: \"true\"\nSALT_TAR_HASH: \"\"\nSALT_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.11.7-gke.4/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.11.7-gke.4/kubernetes-salt.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.11.7-gke.4/kubernetes-salt.tar.gz\nSERVER_BINARY_TAR_HASH: 5582985879f9362685cee6a04375f3f7c108e6dd\nSERVER_BINARY_TAR_URL: https://storage.googleapis.com/kubernetes-release-gke/release/v1.11.7-gke.4/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-eu/release/v1.11.7-gke.4/kubernetes-server-linux-amd64.tar.gz,https://storage.googleapis.com/kubernetes-release-gke-asia/release/v1.11.7-gke.4/kubernetes-server-linux-amd64.tar.gz\nSERVICE_CLUSTER_IP_RANGE: 10.27.240.0/20\nVOLUME_PLUGIN_DIR: /home/kubernetes/flexvolume\nZONE: us-east1-d\n", | |
"enable-oslogin": "false", | |
"kubelet-config": "apiVersion: kubelet.config.k8s.io/v1beta1\nauthentication:\n anonymous:\n enabled: false\n webhook:\n enabled: false\n x509:\n clientCAFile: /etc/srv/kubernetes/pki/ca-certificates.crt\nauthorization:\n mode: Webhook\ncgroupRoot: /\nclusterDNS:\n- 10.27.240.10\nclusterDomain: cluster.local\nenableDebuggingHandlers: true\nevictionHard:\n memory.available: 100Mi\n nodefs.available: 10%\n nodefs.inodesFree: 5%\nfeatureGates:\n DynamicKubeletConfig: false\n ExperimentalCriticalPodAnnotation: true\nkind: KubeletConfiguration\nkubeReserved:\n cpu: 70m\n ephemeral-storage: 41Gi\n memory: 1736Mi\nreadOnlyPort: 10255\nstaticPodPath: /etc/kubernetes/manifests\n", | |
"cluster-name": "tower-qe", | |
"cluster-uid": "2647dc41e9ae9ee668197227e073e8842b10cc2d40a9acf9a3a527a1f25e0fdd", | |
"cluster-location": "us-east1-d" | |
}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "34.73.152.53" | |
}, | |
"jenkins-ssh-slave-1": { | |
"gce_uuid": "9f148f4b726a6f2b99dfb8c0245e86c52d1a6f83", | |
"gce_id": "7988984715829539278", | |
"gce_image": "centos-7-v20170816", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.11", | |
"gce_public_ip": "35.196.219.214", | |
"gce_name": "jenkins-ssh-slave-1", | |
"gce_description": "", | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.196.219.214" | |
}, | |
"jm-tower-342-01": { | |
"gce_uuid": "23e3e968d9ae442f316219be1edc97554115b84b", | |
"gce_id": "1264486967396756853", | |
"gce_image": "centos-7-v20190213", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.25", | |
"gce_public_ip": "35.196.75.185", | |
"gce_name": "jm-tower-342-01", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server", | |
"https-server" | |
], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.196.75.185" | |
}, | |
"launched-by-jenkins": { | |
"gce_uuid": "a28cee7e4af3e642b8471edae68ce6f891ee71da", | |
"gce_id": "29752520597829167", | |
"gce_image": "centos-7-v20181011", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.10", | |
"gce_public_ip": "35.231.234.152", | |
"gce_name": "launched-by-jenkins", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server", | |
"https-server" | |
], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.231.234.152" | |
}, | |
"newinstancetvo": { | |
"gce_uuid": "9d331bac7e004089e03afedbdc0dcbd40c48f464", | |
"gce_id": "828985860635303717", | |
"gce_image": "centos-7-v20190116", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.19", | |
"gce_public_ip": "35.185.28.63", | |
"gce_name": "newinstancetvo", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server", | |
"https-server" | |
], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.185.28.63" | |
}, | |
"production-pootle": { | |
"gce_uuid": "edb50658d9a059dda46e92e0d78ef5d14ec09000", | |
"gce_id": "4081544983155457376", | |
"gce_image": "centos-7-v20170717", | |
"gce_machine_type": "n1-standard-1", | |
"gce_private_ip": "10.142.0.4", | |
"gce_public_ip": "35.190.167.16", | |
"gce_name": "production-pootle", | |
"gce_description": "", | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server", | |
"https-server" | |
], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.190.167.16" | |
}, | |
"tower-mockups": { | |
"gce_uuid": "a72fbe9d2a868f40b20f03e0a2be7fc9d292b083", | |
"gce_id": "3378743296778656512", | |
"gce_image": "centos-7-v20170426", | |
"gce_machine_type": "g1-small", | |
"gce_private_ip": "10.142.0.2", | |
"gce_public_ip": "35.190.146.119", | |
"gce_name": "tower-mockups", | |
"gce_description": "", | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server", | |
"https-server" | |
], | |
"gce_metadata": { | |
"ssh-keys": "jenkins:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDALeq3UPBUFeEhRjO4CVbXeN4l7yyGNWIX4H/0B9jyik4UZ86poZp+WQrFZUAULVRA2Je8PpV3RjyN1pWdDBF+5E1oeOnydwQBds2fZJqtyO9HpBU8AUKPWO1O1zhYywO0AZpSD7/9QLDO7mpOW03hp8LkcozitW90VxCzdsDlmWuocf5kBWTJt4vQjZ5XU9GFUEwt9Ccj1ddIVQB/Oyq5V+ysHsnnRBeEekB+PQTAgkq93nc4zuz/M8zP+yxCedw6a2VKgTSkntrNtYkeWD1Rz5+tT3hT6vHeREtg4bwOSS8xHe/drnn9+BE+oAWjxVkkWGBMdF5XLLfX6u8Ge1PD [email protected]" | |
}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.190.146.119" | |
}, | |
"towerapi-testing": { | |
"gce_uuid": "21b24f2d2708ff8b9c03fc1f1406f4f70e682928", | |
"gce_id": "1278988980378204978", | |
"gce_image": "centos-7-v20170829", | |
"gce_machine_type": "n1-standard-2", | |
"gce_private_ip": "10.142.0.12", | |
"gce_public_ip": "35.196.9.30", | |
"gce_name": "towerapi-testing", | |
"gce_description": null, | |
"gce_status": "RUNNING", | |
"gce_zone": "us-east1-d", | |
"gce_tags": [ | |
"http-server", | |
"https-server" | |
], | |
"gce_metadata": {}, | |
"gce_network": "default", | |
"gce_subnetwork": "default", | |
"ansible_ssh_host": "35.196.9.30" | |
} | |
}, | |
"stats": { | |
"inventory_load_time": 0.39771080017089844, | |
"cache_used": false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment