1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright © 2017 AT&T Intellectual Property. All rights reserved.
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #==================LICENSE_END============================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 ##########################################################################
25 heat_template_version: 2013-05-23
27 description: Heat template to deploy a packet generator for the vLoadBalancer/vDNS demo app for ONAP
38 label: Public network name or ID
39 description: Public network that enables remote connection to VNF
42 label: Image name or ID
43 description: Image to be used for compute instance
47 description: Type of instance (flavor) to be used
50 label: vPacketGenerator name
51 description: Name of the vPacketGenerator
55 description: Public/Private key pair name
59 description: Public key to be installed on the compute instance
63 description: URL of the repository that hosts the demo packages
67 description: URL of the repository that hosts the demo packages
70 label: Public IP of the vLoadBalancer to which we want to send traffic
71 description: Public IP of the vLoadBalancer to which we want to send traffic
72 install_script_version:
74 label: Installation script version number
75 description: Version number of the scripts that install the vFW demo app
76 demo_artifacts_version:
78 label: Artifacts version used in demo vnfs
79 description: Artifacts (jar, tar.gz) version used in demo vnfs
90 type: OS::Heat::RandomString
95 type: OS::Nova::KeyPair
101 base: { get_param: key_name }
102 rand: { get_resource: random-str }
103 public_key: { get_param: pub_key }
104 save_private_key: false
108 type: OS::Nova::Server
110 image: { get_param: vpg_image_name }
111 flavor: { get_param: vpg_flavor_name }
112 name: { get_param: vpg_name_0 }
113 key_name: { get_resource: my_keypair }
115 - network: { get_param: public_net_id }
116 user_data_format: RAW
120 __repo_url_blob__ : { get_param: repo_url_blob }
121 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
122 __vlb_ipaddr__: { get_param: vlb_ipaddr }
123 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
124 __install_script_version__ : { get_param: install_script_version }
128 # Create configuration files
130 echo "__vlb_ipaddr__" > /opt/config/vlb_ipaddr.txt
131 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
132 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
133 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
134 echo "__install_script_version__" > /opt/config/install_script_version.txt
136 # Download and run install script
137 curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh
139 chmod +x v_packetgen_install.sh
140 ./v_packetgen_install.sh