tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 description: Hello VES metadata: template_name: tosca-vnfd-hello-ves topology_template: node_templates: VDU1: type: tosca.nodes.nfv.VDU.Tacker capabilities: nfv_compute: properties: num_cpus: 1 mem_size: 1024 MB disk_size: 4 GB properties: 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 CP11: type: tosca.nodes.nfv.CP.Tacker properties: management: true anti_spoofing_protection: false requirements: - virtualLink: node: VL1 - virtualBinding: node: VDU1 CP12: type: tosca.nodes.nfv.CP.Tacker properties: anti_spoofing_protection: false requirements: - virtualLink: node: VL2 - virtualBinding: node: VDU1 VDU2: type: tosca.nodes.nfv.VDU.Tacker capabilities: nfv_compute: properties: num_cpus: 1 mem_size: 1024 MB disk_size: 4 GB properties: 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 CP21: type: tosca.nodes.nfv.CP.Tacker properties: management: true anti_spoofing_protection: false requirements: - virtualLink: node: VL1 - virtualBinding: node: VDU2 CP22: type: tosca.nodes.nfv.CP.Tacker properties: anti_spoofing_protection: false requirements: - virtualLink: node: VL2 - virtualBinding: node: VDU2 VDU3: type: tosca.nodes.nfv.VDU.Tacker capabilities: nfv_compute: properties: num_cpus: 1 mem_size: 1024 MB disk_size: 4 GB properties: 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 CP31: type: tosca.nodes.nfv.CP.Tacker properties: management: true anti_spoofing_protection: false requirements: - virtualLink: node: VL1 - virtualBinding: node: VDU3 CP32: type: tosca.nodes.nfv.CP.Tacker properties: anti_spoofing_protection: false requirements: - virtualLink: node: VL2 - virtualBinding: node: VDU3 VDU4: type: tosca.nodes.nfv.VDU.Tacker capabilities: nfv_compute: properties: num_cpus: 1 mem_size: 1024 MB disk_size: 4 GB properties: 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 CP41: type: tosca.nodes.nfv.CP.Tacker properties: management: true anti_spoofing_protection: false requirements: - virtualLink: node: VL1 - virtualBinding: node: VDU4 CP42: type: tosca.nodes.nfv.CP.Tacker properties: anti_spoofing_protection: false requirements: - virtualLink: node: VL2 - virtualBinding: node: VDU4 VL1: type: tosca.nodes.nfv.VL properties: network_name: vnf_mgmt vendor: Tacker VL2: type: tosca.nodes.nfv.VL properties: network_name: vnf_private vendor: Tacker