scripting tweaks

- use absolute path for kube_root (fixes JUJU_REPOSITORY directory creation issue) - shortcircuit status polling (for rerunning kubeup)
 - more granular polling iterations
pull/6/head
Whit Morriss 2015-04-22 09:31:45 -05:00
parent cc81044230
commit a57a64781a
1 changed files with 11 additions and 2 deletions

View File

@ -19,9 +19,11 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(readlink -f $KUBE_ROOT)
source $KUBE_ROOT/cluster/juju/prereqs/ubuntu-juju.sh
export JUJU_REPOSITORY=${KUBE_ROOT}/cluster/juju/charms
#KUBE_BUNDLE_URL='https://raw.githubusercontent.com/whitmo/bundle-kubernetes/master/bundles.yaml'
KUBE_BUNDLE_PATH=${KUBE_ROOT}/cluster/juju/bundles/local.yaml
function verify-prereqs() {
gather_installation_reqs
@ -103,10 +105,17 @@ function sleep-status(){
maxtime=900
jujustatus=''
echo "Waiting up to 15 minutes to allow the cluster to come online... wait for it..."
while [[ $i < $maxtime && $jujustatus != *"started"* ]]; do
jujustatus=$(juju status kubernetes-master --format=oneline)
if [[ $jujustatus == *"started"* ]];
then
return
fi
while [[ $i < $maxtime && $jujustatus != *"started"* ]]; do
sleep 15
i+=15
jujustatus=$(juju status kubernetes-master --format=oneline)
sleep 30
i+=30
done
# sleep because we cannot get the status back of where the minions are in the deploy phase