summaryrefslogtreecommitdiffstats
path: root/tests/vHello_Tacker.sh
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-09-09 18:09:35 -0700
committerblsaws <bryan.sullivan@att.com>2016-09-09 18:09:35 -0700
commit58b9dc377289439f2adedb25e54f50b81b2ff922 (patch)
tree13f3ae9277817f45f1fcdb51ed8bc36fcb0b7999 /tests/vHello_Tacker.sh
parente2ef478df464d634d3bfebec57d3691f221875c6 (diff)
Include start script directly
JIRA: MODELS-23 Change-Id: I12eac5ee6320fc547e6f52feba89b1aeb871ca42 Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'tests/vHello_Tacker.sh')
-rw-r--r--tests/vHello_Tacker.sh21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/vHello_Tacker.sh b/tests/vHello_Tacker.sh
index e6309bb..c03881b 100644
--- a/tests/vHello_Tacker.sh
+++ b/tests/vHello_Tacker.sh
@@ -109,8 +109,25 @@ start() {
echo "$0: start vHello web server"
chown root ~/.ssh/vHello.pem
- scp -i /tmp/tacker/vHello.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/tacker/blueprints/tosca-vnfd-hello-world-tacker/start.sh ubuntu@$SERVER_IP:/home/ubuntu/start.sh
- ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$SERVER_IP "bash /home/ubuntu/start.sh; exit"
+ ssh -i /tmp/tacker/vHello.pem -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$SERVER_IP <<EOF
+cat << EOM | sudo tee /home/ubuntu/index.html
+<!DOCTYPE html>
+<html>
+<head>
+<title>Hello World!</title>
+<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1"/>
+<style>
+body { width: 100%; background-color: white; color: black; padding: 0px; margin: 0px; font-family: sans-serif; font-size:100%; }
+</style>
+</head>
+<body>
+Hello World!<br>
+<a href="http://wiki.opnfv.org"><img src="https://www.opnfv.org/sites/all/themes/opnfv/logo.png"></a>
+</body></html>
+EOM
+nohup sudo python3 -m http.server 80 > /dev/null 2>&1 &
+exit
+EOF
echo "$0: verify vHello server is running"
if [[ $(curl $SERVER_URL | grep -c "Hello, World!") != 1 ]]; then fail; fi