diff options
authorBryan Sullivan <>2018-02-08 07:06:47 -0800
committerBryan Sullivan <>2018-02-08 16:18:50 -0800
commit2cbdcfde1374b934ee19af4335ae22b13684b294 (patch)
parenta2a44ef26a87aee9429626126492f57200ac392a (diff)
Re-enable prometheus deployment, post-VES
JIRA: MODELS-2 Add clearwater-docker deployment and test Fix missing ~/tmp from anteater changes Fix script paths Insert 5 min delay before clearwater-live-test Fix incorrect call to get nodePort Change-Id: I62b170a82be8062881acf4930bfb00811ef476d0 Signed-off-by: Bryan Sullivan <>
2 files changed, 24 insertions, 9 deletions
diff --git a/tools/kubernetes/ b/tools/kubernetes/
index 42a8499..75bd8f7 100644
--- a/tools/kubernetes/
+++ b/tools/kubernetes/
@@ -1,5 +1,5 @@
-# Copyright 2017 AT&T Intellectual Property, Inc
+# Copyright 2017-2018 AT&T Intellectual Property, Inc
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -106,7 +106,11 @@ EOF
source ~/k8s_env_$
env | grep k8s_
+echo; echo "$0 $(date): Deploying base OS for master and worker nodes..."
+start=$((`date +%s`/60))
source ~/models/tools/maas/ $k8s_user $k8s_key "$k8s_nodes" $extras
+step_end "source ~/models/tools/maas/ $k8s_user $k8s_key \"$k8s_nodes\" $extras"
eval `ssh-agent`
ssh-add $k8s_key
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $k8s_key \
@@ -144,11 +148,6 @@ else
echo; echo "$0 $(date): Skipping ceph (not yet working for AIO deployment)"
-#echo; echo "Setting up Prometheus..."
-#scp -r -o StrictHostKeyChecking=no ~/models/tools/prometheus/* \
-# $k8s_user@$k8s_master:/home/$k8s_user/.
-#run_master "bash setup"
echo; echo "$0 $(date): Setting up cloudify..."
scp -r -o StrictHostKeyChecking=no ~/models/tools/cloudify \
@@ -158,10 +157,10 @@ run_master "bash cloudify/ setup"
echo; echo "$0 $(date): Verifying kubernetes+helm+ceph+cloudify install..."
run "bash $HOME/models/tools/cloudify/ demo start"
-echo; echo "$0 $(date): Setting up VES"
+echo; echo "$0 $(date): Setting up VES..."
# not re-cloned if existing - allows patch testing locally
if [[ ! -d ~/ves ]]; then
- echo; echo "$0 $(date): Cloning VES"
+ echo; echo "$0 $(date): Cloning VES..."
git clone ~/ves
# Can't pass quoted strings in commands
@@ -169,19 +168,34 @@ start=$((`date +%s`/60))
bash $HOME/ves/tools/ $k8s_user $k8s_master cloudify
step_end "bash $HOME/ves/tools/ $k8s_user $k8s_master cloudify"
+echo; echo "Setting up Prometheus..."
+scp -r -o StrictHostKeyChecking=no ~/models/tools/prometheus/* \
+ $k8s_user@$k8s_master:/home/$k8s_user/.
+run_master "bash setup prometheus helm"
+run_master "bash setup grafana helm $k8s_master:3000"
+echo; echo "Installing clearwater-docker..."
+run "bash $HOME/models/tests/ start $k8s_master blsaws latest"
+echo; echo "Waiting 5 minutes for clearwater IMS to be fully ready..."
+sleep 300
+echo; echo "Run clearwater-live-test..."
+run "bash $HOME/models/tests/ test $k8s_master"
echo; echo "$0 $(date): All done!"
deploy_end=$((`date +%s`/60))
log "Deploy \"$1\" duration = $runtime minutes"
source ~/ves/tools/
-port=$(bash ~/models/tools/cloudify/ port nginx)
#echo "Prometheus UI is available at http://$k8s_master:30990"
echo "InfluxDB API is available at http://$ves_influxdb_host:$ves_influxdb_port/query&db=veseventsdb&q=<string>"
echo "Grafana dashboards are available at http://$ves_grafana_host:$ves_grafana_port (login as $ves_grafana_auth)"
echo "Grafana API is available at http://$ves_grafana_auth@$ves_grafana_host:$ves_grafana_port/api/v1/query?query=<string>"
echo "Kubernetes API is available at https://$k8s_master:6443/api/v1/"
echo "Cloudify API access example: curl -u admin:admin --header 'Tenant: default_tenant' http://$k8s_master/api/v3.1/status"
+port=$(bash ~/models/tools/cloudify/ nodePort nginx)
echo "Cloudify-deployed demo app nginx is available at http://$k8s_master:$port"
if [[ "$k8s_master" != "$k8s_workers" ]]; then
export NODE_PORT=$(ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $k8s_user@$k8s_master kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services dw-dokuwiki)
diff --git a/tools/kubernetes/ b/tools/kubernetes/
index e555b28..fb06f5d 100644
--- a/tools/kubernetes/
+++ b/tools/kubernetes/
@@ -180,6 +180,7 @@ function setup_k8s_master() {
sudo kubeadm reset
# Start cluster
log "Start the cluster"
+ mkdir ~/tmp
sudo kubeadm init --pod-network-cidr= >>~/tmp/kubeadm.out
cat ~/tmp/kubeadm.out
export k8s_joincmd=$(grep "kubeadm join" ~/tmp/kubeadm.out)