From 7adeec3e9ce9630c13f5736d1306197ac36278f2 Mon Sep 17 00:00:00 2001 From: Miao Luo Date: Fri, 2 Sep 2016 09:39:43 -0700 Subject: [PATCH] Update salt usage to accelerate kube-up. Use state.show_highstate to wait for init highstate functions to be done on each node. Then start highstate in parallel on all the minions. --- cluster/vsphere/util.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cluster/vsphere/util.sh b/cluster/vsphere/util.sh index 1265ca4b329..deab193d7d0 100755 --- a/cluster/vsphere/util.sh +++ b/cluster/vsphere/util.sh @@ -465,18 +465,18 @@ function kube-up { printf "Waiting for salt-master to be up on ${KUBE_MASTER} ...\n" remote-pgrep ${KUBE_MASTER_IP} "salt-master" - printf "Waiting for all packages to be installed on ${KUBE_MASTER} ...\n" - kube-check ${KUBE_MASTER_IP} 'sudo salt "kubernetes-master" state.highstate -t 30 | grep -E "Failed:[[:space:]]+0"' - local i for (( i=0; i<${#NODE_NAMES[@]}; i++)); do printf "Waiting for salt-minion to be up on ${NODE_NAMES[$i]} ....\n" remote-pgrep ${KUBE_NODE_IP_ADDRESSES[$i]} "salt-minion" - printf "Waiting for all salt packages to be installed on ${NODE_NAMES[$i]} .... \n" - kube-check ${KUBE_MASTER_IP} 'sudo salt '"${NODE_NAMES[$i]}"' state.highstate -t 30 | grep -E "Failed:[[:space:]]+0"' printf " OK\n" done + printf "Waiting for init highstate to be done on all nodes (this can take a few minutes) ...\n" + kube-check ${KUBE_MASTER_IP} 'sudo salt '\''*'\'' state.show_highstate -t 50' + printf "Waiting for all packages to be installed on all nodes (this can take a few minutes) ...\n" + kube-check ${KUBE_MASTER_IP} 'sudo salt '\''*'\'' state.highstate -t 50 | grep -E "Failed:[[:space:]]+0"' + echo echo "Waiting for master and node initialization."