1 ##########################################################################
\r
3 #==================LICENSE_START==========================================
\r
6 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
\r
8 # Licensed under the Apache License, Version 2.0 (the "License");
\r
9 # you may not use this file except in compliance with the License.
\r
10 # You may obtain a copy of the License at
\r
11 # http://www.apache.org/licenses/LICENSE-2.0
\r
13 # Unless required by applicable law or agreed to in writing, software
\r
14 # distributed under the License is distributed on an "AS IS" BASIS,
\r
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 # See the License for the specific language governing permissions and
\r
17 # limitations under the License.
\r
19 #==================LICENSE_END============================================
\r
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
\r
23 ##########################################################################
\r
25 heat_template_version: 2013-05-23
\r
27 description: Heat template that deploys the vFirewall Traffic Generator demo app for ONAP
\r
38 label: Image name or ID
\r
39 description: Image to be used for compute instance
\r
43 description: Type of instance (flavor) to be used
\r
46 label: Public network name or ID
\r
47 description: Public network that enables remote connection to VNF
\r
48 unprotected_private_net_id:
\r
50 label: Unprotected private network name or ID
\r
51 description: Private network that connects vPacketGenerator with vFirewall
\r
52 unprotected_private_subnet_id:
\r
54 label: Unprotected private sub-network name or ID
\r
55 description: Private subnetwork for the unprotected network
\r
56 unprotected_private_net_cidr:
\r
58 label: Unprotected private network CIDR
\r
59 description: The CIDR of the unprotected private network
\r
60 protected_private_net_cidr:
\r
62 label: Protected private network CIDR
\r
63 description: The CIDR of the protected private network
\r
64 onap_private_net_id:
\r
66 label: ONAP management network name or ID
\r
67 description: Private network that connects ONAP components and the VNF
\r
68 onap_private_subnet_id:
\r
70 label: ONAP management sub-network name or ID
\r
71 description: Private sub-network that connects ONAP components and the VNF
\r
72 onap_private_net_cidr:
\r
74 label: ONAP private network CIDR
\r
75 description: The CIDR of the protected private network
\r
78 label: vFirewall private IP address towards the unprotected network
\r
79 description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator
\r
82 label: vSink private IP address towards the protected network
\r
83 description: Private IP address that is assigned to the vSink to communicate with the vFirewall
\r
86 label: vPacketGenerator private IP address towards the unprotected network
\r
87 description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall
\r
90 label: vPacketGenerator private IP address towards the ONAP management network
\r
91 description: Private IP address that is assigned to the vPacketGenerator to communicate with ONAP components
\r
94 label: vPacketGenerator name
\r
95 description: Name of the vPacketGenerator
\r
99 description: The VNF ID is provided by ONAP
\r
102 label: vPNG Traffic Generator module ID
\r
103 description: The vPNG Module ID is provided by ONAP
\r
106 label: Key pair name
\r
107 description: Public/Private key pair name
\r
111 description: Public key to be installed on the compute instance
\r
114 label: Repository URL
\r
115 description: URL of the repository that hosts the demo packages
\r
116 repo_url_artifacts:
\r
118 label: Repository URL
\r
119 description: URL of the repository that hosts the demo packages
\r
120 install_script_version:
\r
122 label: Installation script version number
\r
123 description: Version number of the scripts that install the vFW demo app
\r
124 demo_artifacts_version:
\r
126 label: Artifacts version used in demo vnfs
\r
127 description: Artifacts (jar, tar.gz) version used in demo vnfs
\r
130 label: Cloud environment
\r
131 description: Cloud environment (e.g., openstack, rackspace)
\r
141 type: OS::Heat::RandomString
\r
146 type: OS::Nova::KeyPair
\r
150 template: base_rand
\r
152 base: { get_param: key_name }
\r
153 rand: { get_resource: random-str }
\r
154 public_key: { get_param: pub_key }
\r
155 save_private_key: false
\r
158 # Virtual Packet Generator instantiation
\r
159 vpg_private_0_port:
\r
160 type: OS::Neutron::Port
\r
162 network: { get_param: unprotected_private_net_id }
\r
163 fixed_ips: [{"subnet": { get_param: unprotected_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_0 }}]
\r
165 vpg_private_1_port:
\r
166 type: OS::Neutron::Port
\r
168 network: { get_param: onap_private_net_id }
\r
169 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
\r
172 type: OS::Nova::Server
\r
174 image: { get_param: image_name }
\r
175 flavor: { get_param: flavor_name }
\r
176 name: { get_param: vpg_name_0 }
\r
177 key_name: { get_resource: my_keypair }
\r
179 - network: { get_param: public_net_id }
\r
180 - port: { get_resource: vpg_private_0_port }
\r
181 - port: { get_resource: vpg_private_1_port }
\r
182 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
\r
183 user_data_format: RAW
\r
187 __fw_ipaddr__: { get_param: vfw_private_ip_0 }
\r
188 __protected_net_cidr__: { get_param: protected_private_net_cidr }
\r
189 __sink_ipaddr__: { get_param: vsn_private_ip_0 }
\r
190 __repo_url_blob__ : { get_param: repo_url_blob }
\r
191 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
\r
192 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
\r
193 __install_script_version__ : { get_param: install_script_version }
\r
194 __vpg_private_ip_0__ : { get_param: vpg_private_ip_0 }
\r
195 __vpg_private_ip_1__ : { get_param: vpg_private_ip_1 }
\r
196 __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
\r
197 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
\r
198 __cloud_env__ : { get_param: cloud_env }
\r
202 # Create configuration files
\r
204 echo "__fw_ipaddr__" > /opt/config/fw_ipaddr.txt
\r
205 echo "__protected_net_cidr__" > /opt/config/protected_net_cidr.txt
\r
206 echo "__sink_ipaddr__" > /opt/config/sink_ipaddr.txt
\r
207 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
\r
208 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
\r
209 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
\r
210 echo "__install_script_version__" > /opt/config/install_script_version.txt
\r
211 echo "__vpg_private_ip_0__" > /opt/config/vpg_private_ip_0.txt
\r
212 echo "__vpg_private_ip_1__" > /opt/config/vpg_private_ip_1.txt
\r
213 echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
\r
214 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
\r
215 echo "__cloud_env__" > /opt/config/cloud_env.txt
\r
217 # Download and run install script
\r
218 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh
\r
220 chmod +x v_packetgen_install.sh
\r
221 ./v_packetgen_install.sh
\r