From 93bf70421d2a8abbfbc3889e3e65b0ca4447673f Mon Sep 17 00:00:00 2001 From: bryan Date: Tue, 7 Mar 2017 08:16:46 -0800 Subject: Setup monitor before agents (otherwise they exit) JIRA: VES-1 Setup config drive for LB agent access to UUID. Change-Id: Ieb877d48007bf02c01a6b763143347ab69207924 Signed-off-by: bryan --- tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml | 2 ++ tests/blueprints/tosca-vnfd-hello-ves/start.sh | 2 +- tests/vHello_VES.sh | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml b/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml index c652423..a998dad 100755 --- a/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml +++ b/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml @@ -203,6 +203,7 @@ topology_template: image: models-xenial-server availability_zone: nova mgmt_driver: noop + config_drive: true user_data_format: RAW user_data: | #!/bin/bash @@ -213,6 +214,7 @@ topology_template: cat << EOM >/home/ubuntu/.ssh/authorized_keys EOM + sudo mount /dev/sr0 /mnt/ cat << EOF >/tmp/setup.sh echo "1" | sudo tee /proc/sys/net/ipv4/ip_forward sudo sysctl net.ipv4.ip_forward=1 diff --git a/tests/blueprints/tosca-vnfd-hello-ves/start.sh b/tests/blueprints/tosca-vnfd-hello-ves/start.sh index 76de81d..da44fc7 100755 --- a/tests/blueprints/tosca-vnfd-hello-ves/start.sh +++ b/tests/blueprints/tosca-vnfd-hello-ves/start.sh @@ -202,7 +202,7 @@ setup_monitor () { sed -i -- "/vel_topic_name = /a vdu1_id = $vdu1_id" evel-test-collector/config/collector.conf cp monitor.py evel-test-collector/code/collector/monitor.py -# python evel-test-collector/code/collector/monitor.py --config evel-test-collector/config/collector.conf --section default + nohup python evel-test-collector/code/collector/monitor.py --config evel-test-collector/config/collector.conf --section default > /dev/null 2>&1 & } type=$1 diff --git a/tests/vHello_VES.sh b/tests/vHello_VES.sh index 62a266c..116ba14 100644 --- a/tests/vHello_VES.sh +++ b/tests/vHello_VES.sh @@ -307,6 +307,11 @@ start() { assert "models-tacker-vnfd-002 (artifacts creation)" true assert "models-tacker-vnfd-003 (user_data creation)" true + echo "$0: $(date) setup Monitor in VDU4 at ${vdu_ip[4]}" + scp -i /opt/tacker/vHello -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /opt/tacker/blueprints/tosca-vnfd-hello-ves/start.sh ubuntu@${vdu_ip[4]}:/home/ubuntu/start.sh + scp -i /opt/tacker/vHello -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /opt/tacker/blueprints/tosca-vnfd-hello-ves/monitor.py ubuntu@${vdu_ip[4]}:/home/ubuntu/monitor.py + ssh -i /opt/tacker/vHello -t -t -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[4]} "nohup bash /home/ubuntu/start.sh monitor ${vdu_id[1]} ${vdu_id[2]} ${vdu_id[3]} hello world > ~/monitor.log &" + echo "$0: $(date) Execute agent startup script in the VNF VMs" for i in $vnf_vdui; do ssh -i /opt/tacker/vHello -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[$i]} "sudo chown ubuntu /home/ubuntu" @@ -315,11 +320,6 @@ start() { ubuntu@${vdu_ip[$i]} "nohup bash /home/ubuntu/start.sh agent ${vdu_id[$i]} ${vdu_ip[4]} hello world > /dev/null 2>&1 &" done - echo "$0: $(date) setup Monitor in VDU4 at ${vdu_ip[4]}" - scp -i /opt/tacker/vHello -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /opt/tacker/blueprints/tosca-vnfd-hello-ves/start.sh ubuntu@${vdu_ip[4]}:/home/ubuntu/start.sh - scp -i /opt/tacker/vHello -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /opt/tacker/blueprints/tosca-vnfd-hello-ves/monitor.py ubuntu@${vdu_ip[4]}:/home/ubuntu/monitor.py - ssh -i /opt/tacker/vHello -t -t -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@${vdu_ip[4]} "bash /home/ubuntu/start.sh monitor ${vdu_id[1]} ${vdu_id[2]} ${vdu_id[3]} hello world" - echo "$0: $(date) Startup complete. VDU addresses:" echo "web server 1: ${vdu_ip[1]}" echo "web server 2: ${vdu_ip[2]}" -- cgit 1.2.3-korg