summaryrefslogtreecommitdiffstats
path: root/tests/vHello_VES.sh
diff options
context:
space:
mode:
authorBryan Sullivan <bryan.sullivan@att.com>2016-10-19 16:04:58 -0700
committerBryan Sullivan <bryan.sullivan@att.com>2016-10-19 16:04:58 -0700
commit8e4aa0f3e446f672ebe159d08ebe025b74d996c8 (patch)
tree278c8bda805f7662db4fbef9d1aa508adfd74665 /tests/vHello_VES.sh
parentc8769dca7f3ffb7add8fb50e0eafb4139d68529b (diff)
Working version with collectd installed on bare metal host
JIRA: VES-1 Change-Id: Ib789b72a42bdd731c0fd0da4863cccc5462cf0b9 Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tests/vHello_VES.sh')
-rw-r--r--tests/vHello_VES.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/vHello_VES.sh b/tests/vHello_VES.sh
index ea05d7f..9ac4aa2 100644
--- a/tests/vHello_VES.sh
+++ b/tests/vHello_VES.sh
@@ -223,6 +223,14 @@ EOF
vdu_url[3]="http://${vdu_ip[3]}"
vdu_url[4]="http://${vdu_ip[4]}:30000/eventListener/v1"
+ echo "$0: $(date) start collectd agent on bare metal hypervisor hosts"
+ hosts=($(openstack hypervisor list | grep -v Hostname | grep -v "+" | awk '{print $4}'))
+ for host in ${hosts[@]}; do
+ ip=$(openstack hypervisor show $host | grep host_ip | awk '{print $4}')
+ scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tacker/blueprints/tosca-vnfd-hello-ves/start.sh ubuntu@$ip:/home/ubuntu/start.sh
+ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu:ubuntu@$ip "nohup bash /home/ubuntu/start.sh collectd $ip ${vdu_ip[4]} hello world &"
+ done
+
echo "$0: $(date) wait 30 seconds for server SSH to be available"
sleep 30
@@ -233,18 +241,18 @@ EOF
done
echo "$0: $(date) start vHello webserver in VDU1 at ${vdu_ip[1]}"
- ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[1]} "bash /home/ubuntu/start.sh webserver ${vdu_id[1]} ${vdu_ip[4]} hello world; exit"
+ ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[1]} "nohup bash /home/ubuntu/start.sh webserver ${vdu_id[1]} ${vdu_ip[4]} hello world &"
echo "$0: $(date) start vHello webserver in VDU2 at ${vdu_ip[2]}"
- ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[2]} "bash /home/ubuntu/start.sh webserver ${vdu_id[2]} ${vdu_ip[4]} hello world; exit"
+ ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[2]} "nohup bash /home/ubuntu/start.sh webserver ${vdu_id[2]} ${vdu_ip[4]} hello world &"
echo "$0: $(date) start LB in VDU3 at ${vdu_ip[3]}"
- ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[3]} "bash /home/ubuntu/start.sh lb ${vdu_id[3]} ${vdu_ip[4]} hello world; exit"
+ ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[3]} "nohup bash /home/ubuntu/start.sh lb ${vdu_id[3]} ${vdu_ip[4]} hello world ${vdu_ip[1]} ${vdu_ip[2]} &"
echo "$0: $(date) start Monitor in VDU4 at ${vdu_ip[4]}"
# Replacing the default collector with monitor.py which has processing logic as well
scp -i /tmp/tacker/vHello.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tacker/blueprints/tosca-vnfd-hello-ves/monitor.py ubuntu@${vdu_ip[4]}:/home/ubuntu/monitor.py
- ssh -i /tmp/tacker/vHello.pem -t -t -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[4]} "bash /home/ubuntu/start.sh monitor ${vdu_id[4]} ${vdu_ip[4]} hello world; exit"
+ ssh -i /tmp/tacker/vHello.pem -t -t -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[4]} "bash /home/ubuntu/start.sh monitor ${vdu_id[4]} ${vdu_ip[4]} hello world"
# echo "$0: $(date) verify vHello server is running at http://${vdu_ip[3]}"
# apt-get install -y curl