diff options
author | 2017-11-27 18:13:20 -0800 | |
---|---|---|
committer | 2017-11-27 18:13:20 -0800 | |
commit | 78134af547e3b6c87dddb6e7324960d04376089a (patch) | |
tree | 19e84a1e6c4b2be72695621aab8d491315c35a47 | |
parent | f7e63a63d68a31e13d31d561b9f3a68de89595d7 (diff) |
Fix local command run wrapper
JIRA: MODELS-2
Change-Id: Ia805f155da1e6161d7a8caa661cdb278a85c7e82
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
-rw-r--r-- | tools/kubernetes/demo_deploy.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/kubernetes/demo_deploy.sh b/tools/kubernetes/demo_deploy.sh index 1a63212..1c5e73e 100644 --- a/tools/kubernetes/demo_deploy.sh +++ b/tools/kubernetes/demo_deploy.sh @@ -42,6 +42,10 @@ function run() { start=$((`date +%s`/60)) $1 + step_end "$1" +} + +function step_end() { end=$((`date +%s`/60)) runtime=$((end-start)) log "step \"$1\" duration = $runtime minutes" @@ -55,9 +59,7 @@ exec ssh-agent bash ssh-add $k8s_key $1 EOF - end=$((`date +%s`/60)) - runtime=$((end-start)) - log "step \"$1\" duration = $runtime minutes" + step_end "$1" } extras=$9 @@ -139,7 +141,10 @@ ves_grafana_auth=admin:admin export ves_grafana_auth ves_kafka_hostname=$(ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$k8s_master hostname) export ves_kafka_hostname -run "bash $HOME/ves/tools/demo_deploy.sh $k8s_key $k8s_master \"$k8s_workers\"" +# Can't pass quoted strings in commands +start=$((`date +%s`/60)) +bash $HOME/ves/tools/demo_deploy.sh $k8s_key $k8s_master "$k8s_workers" +step_end "bash $HOME/ves/tools/demo_deploy.sh $k8s_key $k8s_master \"$k8s_workers\"" echo; echo "$0 $(date): All done!" export NODE_PORT=$(ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$k8s_master kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services dw-dokuwiki) |