Update gce starting guide to use get.k8s.io

Also auto install gcloud if it's not present.
This commit is contained in:
Brendan Burns
2015-03-26 14:44:12 -07:00
parent 7386897d00
commit 61b624457d
3 changed files with 62 additions and 45 deletions

View File

@@ -28,12 +28,23 @@ NODE_INSTANCE_PREFIX="${INSTANCE_PREFIX}-minion"
function verify-prereqs {
local cmd
for cmd in gcloud gsutil; do
which "${cmd}" >/dev/null || {
echo "Can't find ${cmd} in PATH, please fix and retry. The Google Cloud "
echo "SDK can be downloaded from https://cloud.google.com/sdk/."
exit 1
}
if ! which "${cmd}" >/dev/null; then
echo "Can't find ${cmd} in PATH. Do you wish to install the Google Cloud SDK? [Y/n]"
local resp
read resp
if [[ "${resp}" != "n" && "${resp}" != "N" ]]; then
curl https://sdk.cloud.google.com | bash
fi
if ! which "${cmd}" >/dev/null; then
echo "Can't find ${cmd} in PATH, please fix and retry. The Google Cloud "
echo "SDK can be downloaded from https://cloud.google.com/sdk/."
exit 1
fi
fi
done
# update and install components as needed
gcloud components update preview
gcloud components update
}
# Create a temp dir that'll be deleted at the end of this bash session.