From 4a8fadcf87099ac764974133912ef4894284cbe3 Mon Sep 17 00:00:00 2001 From: Bryan Sullivan Date: Tue, 22 Nov 2016 19:58:38 -0800 Subject: Add user data support (verified) to blueprint JIRA: MODELS-23 Change-Id: Ib187e31aee6534b1a1fad230605677ce87913cce Signed-off-by: Bryan Sullivan --- .../tosca-vnfd-hello-world-tacker/blueprint.yaml | 20 +++++++++++++++++ tests/vHello_Tacker.sh | 25 ---------------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/tests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml b/tests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml index 05fcf8a..c06c864 100755 --- a/tests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml +++ b/tests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml @@ -19,6 +19,26 @@ topology_template: image: models-xenial-server availability_zone: nova mgmt_driver: noop + user_data_format: RAW + user_data: | + #!/bin/sh + cd /tmp + cat << EOM | sudo tee index.html + + + + Hello World! + + + + + Hello World!
+ + + EOM + sudo python3 -m http.server 80 config: | param0: key1 param1: key2 diff --git a/tests/vHello_Tacker.sh b/tests/vHello_Tacker.sh index fb0e6eb..41d868d 100644 --- a/tests/vHello_Tacker.sh +++ b/tests/vHello_Tacker.sh @@ -204,31 +204,6 @@ start() { echo "$0: wait 30 seconds for vHello server to startup" sleep 30 - echo "$0: start vHello web server" - chown root /tmp/tacker/vHello.pem - ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$SERVER_IP < - - -Hello World! - - - - -Hello World!
- - -EOM -nohup sudo python3 -m http.server 80 > /dev/null 2>&1 & -exit -EOF - - echo "$0: wait 10 seconds for vHello web server to startup" - sleep 10 - echo "$0: verify vHello server is running" apt-get install -y curl if [[ $(curl $SERVER_URL | grep -c "Hello World") == 0 ]]; then fail; fi -- cgit