From c5fe902ac6e773ec7232ccca67a64856e1b508d0 Mon Sep 17 00:00:00 2001 From: bryan Date: Sun, 5 Mar 2017 10:12:18 -0800 Subject: Update for Danube (work in progress) JIRA: VES-1 Removed preliminary versions of tests for now. Aligned with the Models vHello_3Node_Tacker test. Separated out actions for collectd and monitor install and run them directly vs thru the container. Added parameters as needed for the new design. Updated with typical overview of the test/demo flow. Add port 30000 ingress to vHello security group. Remove juju workaround for port_security. Remote use of id_rsa (replaced with notes on ssh assumptions). Use VDU3 (LB) in traffic generation. Change-Id: I42807449f7526efcd191c0b7b0b4754ffcfffa6e Signed-off-by: bryan --- .../blueprints/tosca-vnfd-hello-ves/blueprint.yaml | 146 +++++++++++++++++++++ 1 file changed, 146 insertions(+) (limited to 'tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml') diff --git a/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml b/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml index d17e300..c652423 100755 --- a/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml +++ b/tests/blueprints/tosca-vnfd-hello-ves/blueprint.yaml @@ -19,6 +19,61 @@ topology_template: image: models-xenial-server availability_zone: nova mgmt_driver: noop + config_drive: true + user_data_format: RAW + user_data: | + #!/bin/bash + set -x + mkdir /home/ubuntu + chown -R ubuntu /home/ubuntu + mkdir /home/ubuntu/.ssh + cat << EOM >/home/ubuntu/.ssh/authorized_keys + + EOM + sudo mount /dev/sr0 /mnt/ + mkdir /tmp/www + cd /tmp/www + mkdir html + cat >Dockerfile <html/index.html + + + + Hello World! + + + + + Welcome to OPNFV @ $host!
+ +
+

Instance ID fom config drive file /mnt/openstack/latest/meta_data.json>

+
+          $id
+          
+

Server setup completed at $(date)

+
+ + EOM + wget -O /tmp/www/html/favicon.ico https://git.opnfv.org/models/plain/tests/blueprints/tosca-vnfd-3node-tacker/favicon.ico + sudo apt-get install apt-transport-https ca-certificates curl software-properties-common + curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add - + sudo apt-key update + echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" >~/dockerrepo + sudo tee -a /etc/apt/sources.list.d/docker.list ~/dockerrepo + sudo add-apt-repository "deb https://apt.dockerproject.org/repo/ ubuntu-xenial main" + sudo apt-get update + sudo apt-get install -y docker-engine + sudo docker pull nginx + sudo docker build -t vhello . + sudo docker run --name vHello -d -p 80:80 vhello config: | param0: key1 param1: key2 @@ -56,6 +111,61 @@ topology_template: image: models-xenial-server availability_zone: nova mgmt_driver: noop + config_drive: true + user_data_format: RAW + user_data: | + #!/bin/bash + set -x + mkdir /home/ubuntu + chown -R ubuntu /home/ubuntu + mkdir /home/ubuntu/.ssh + cat << EOM >/home/ubuntu/.ssh/authorized_keys + + EOM + sudo mount /dev/sr0 /mnt/ + mkdir /tmp/www + cd /tmp/www + mkdir html + cat >Dockerfile <html/index.html + + + + Hello World! + + + + + Welcome to OPNFV @ $host!
+ +
+

Instance ID fom config drive file /mnt/openstack/latest/meta_data.json>

+
+          $id
+          
+

Server setup completed at $(date)

+
+ + EOM + wget -O /tmp/www/html/favicon.ico https://git.opnfv.org/models/plain/tests/blueprints/tosca-vnfd-3node-tacker/favicon.ico + sudo apt-get install apt-transport-https ca-certificates curl software-properties-common + curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add - + sudo apt-key update + echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" >~/dockerrepo + sudo tee -a /etc/apt/sources.list.d/docker.list ~/dockerrepo + sudo add-apt-repository "deb https://apt.dockerproject.org/repo/ ubuntu-xenial main" + sudo apt-get update + sudo apt-get install -y docker-engine + sudo docker pull nginx + sudo docker build -t vhello . + sudo docker run --name vHello -d -p 80:80 vhello config: | param0: key1 param1: key2 @@ -93,6 +203,32 @@ topology_template: image: models-xenial-server availability_zone: nova mgmt_driver: noop + user_data_format: RAW + user_data: | + #!/bin/bash + set -x + mkdir /home/ubuntu + chown -R ubuntu /home/ubuntu + mkdir /home/ubuntu/.ssh + cat << EOM >/home/ubuntu/.ssh/authorized_keys + + EOM + cat << EOF >/tmp/setup.sh + echo "1" | sudo tee /proc/sys/net/ipv4/ip_forward + sudo sysctl net.ipv4.ip_forward=1 + sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -m state \\ + --state NEW -m statistic --mode nth --every 2 --packet 0 \\ + -j DNAT --to-destination :80 + sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -m state \\ + --state NEW -m statistic --mode nth --every 2 --packet 0 \\ + -j DNAT --to-destination :80 + sudo iptables -t nat -A POSTROUTING -j MASQUERADE + EOF + bash /tmp/setup.sh + config: | + param0: key1 + param1: key2 + config: | param0: key1 param1: key2 @@ -130,6 +266,16 @@ topology_template: image: models-xenial-server availability_zone: nova mgmt_driver: noop + user_data_format: RAW + user_data: | + #!/bin/bash + set -x + mkdir /home/ubuntu + chown -R ubuntu /home/ubuntu + mkdir /home/ubuntu/.ssh + cat << EOM >/home/ubuntu/.ssh/authorized_keys + + EOM config: | param0: key1 param1: key2 -- cgit 1.2.3-korg