1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7 # Copyright (c) 2018 Orange Intellectual Property. All rights reserved.
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
20 #==================LICENSE_END============================================
22 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 ##########################################################################
26 heat_template_version: 2013-05-23
28 description: Customized Heat template that deploys the vFirewall Traffic Generator demo app for ONAP
39 label: Image name or ID
40 description: Image to be used for compute instance
44 description: Type of instance (flavor) to be used
47 label: Public network name or ID
48 description: Public network that enables remote connection to VNF
49 unprotected_private_net_id:
51 label: Unprotected private network name or ID
52 description: Private network that connects vPacketGenerator with vFirewall
53 unprotected_private_subnet_id:
55 label: Unprotected private sub-network name or ID
56 description: Private subnetwork for the unprotected network
57 unprotected_private_net_cidr:
59 label: Unprotected private network CIDR
60 description: The CIDR of the unprotected private network
61 protected_private_net_id:
63 label: Protected private network name or ID
64 description: Private network that connects vFirewall with vSink
65 protected_private_subnet_id:
67 label: Protected private subnetwork name or ID
68 description: Private subnetwork of the unprotected network
69 protected_private_net_cidr:
71 label: Protected private network CIDR
72 description: The CIDR of the protected private network
75 label: ONAP management network name or ID
76 description: Private network that connects ONAP components and the VNF
77 onap_private_subnet_id:
79 label: ONAP management sub-network name or ID
80 description: Private sub-network that connects ONAP components and the VNF
81 onap_private_net_cidr:
83 label: ONAP private network CIDR
84 description: The CIDR of the protected private network
87 label: external private network name or ID
88 description: Private network that enables connection to the public network
89 ext_private_subnet_id:
91 label: External private subnetwork name or ID
92 description: Private subnetwork that enables connection to the public network
95 label: External private network CIDR
96 description: The CIDR of the external private network
99 label: vFirewall private IP address towards the unprotected network
100 description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator
103 label: vSink private IP address towards the protected network
104 description: Private IP address that is assigned to the vSink to communicate with the vFirewall
107 label: vPacketGenerator private IP address towards the unprotected network
108 description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall
111 label: vPacketGenerator private IP address towards the ONAP management network
112 description: Private IP address that is assigned to the vPacketGenerator to communicate with ONAP components
115 label: vPacketGenerator private IP address towards public network
116 description: Private IP address that is assigned to the vPacketGenerator to communicate with internet
119 label: vPacketGenerator name
120 description: Name of the vPacketGenerator
124 description: The VNF ID is provided by ONAP
127 label: vPNG Traffic Generator module ID
128 description: The vPNG Module ID is provided by ONAP
132 description: Public/Private key pair name
136 description: Public key to be installed on the compute instance
139 label: Repository URL
140 description: URL of the repository that hosts the demo packages
143 label: Repository URL
144 description: URL of the repository that hosts the demo packages
145 install_script_version:
147 label: Installation script version number
148 description: Version number of the scripts that install the vFW demo app
149 demo_artifacts_version:
151 label: Artifacts version used in demo vnfs
152 description: Artifacts (jar, tar.gz) version used in demo vnfs
155 label: Cloud environment
156 description: Cloud environment (e.g., openstack, rackspace)
159 description: ONAP Security Group
169 type: OS::Heat::RandomString
174 type: OS::Nova::KeyPair
180 base: { get_param: key_name }
181 rand: { get_resource: random-str }
182 public_key: { get_param: pub_key }
183 save_private_key: false
186 unprotected_private_network:
187 type: OS::Neutron::Net
189 name: { get_param: unprotected_private_net_id }
191 unprotected_private_subnet:
192 type: OS::Neutron::Subnet
194 name: { get_param: unprotected_private_subnet_id }
195 network_id: { get_resource: unprotected_private_network }
196 cidr: { get_param: unprotected_private_net_cidr }
198 protected_private_network:
199 type: OS::Neutron::Net
201 name: { get_param: protected_private_net_id }
203 protected_private_subnet:
204 type: OS::Neutron::Subnet
206 name: { get_param: protected_private_subnet_id }
207 network_id: { get_resource: protected_private_network }
208 cidr: { get_param: protected_private_net_cidr }
210 # Virtual Packet Generator instantiation
212 type: OS::Neutron::Port
214 network: { get_resource: unprotected_private_network }
215 fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]
217 - { get_param: sec_group }
220 type: OS::Neutron::Port
222 network: { get_param: onap_private_net_id }
223 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
225 - { get_param: sec_group }
228 type: OS::Neutron::Port
230 network: { get_param: ext_private_net_id }
231 fixed_ips: [{"subnet": { get_param: ext_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_2 }}]
233 - { get_param: sec_group }
236 type: OS::Neutron::FloatingIP
238 floating_network: { get_param: public_net_id }
239 port_id: { get_resource: vpg_private_2_port }
242 type: OS::Nova::Server
244 image: { get_param: image_name }
245 flavor: { get_param: flavor_name }
246 name: { get_param: vpg_name_0 }
247 key_name: { get_resource: my_keypair }
249 - port: { get_resource: vpg_private_2_port }
250 - port: { get_resource: vpg_private_0_port }
251 - port: { get_resource: vpg_private_1_port }
252 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
253 user_data_format: RAW
257 __fw_ipaddr__: { get_param: vfw_private_ip_0 }
258 __protected_net_cidr__: { get_param: protected_private_net_cidr }
259 __sink_ipaddr__: { get_param: vsn_private_ip_0 }
260 __repo_url_blob__ : { get_param: repo_url_blob }
261 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
262 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
263 __install_script_version__ : { get_param: install_script_version }
264 __vpg_private_ip_0__ : { get_param: vpg_private_ip_0 }
265 __vpg_private_ip_1__ : { get_param: vpg_private_ip_1 }
266 __vpg_private_ip_2__ : { get_param: vpg_private_ip_2 }
267 __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
268 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
269 __cloud_env__ : { get_param: cloud_env }
273 # Create configuration files
275 echo "__fw_ipaddr__" > /opt/config/fw_ipaddr.txt
276 echo "__protected_net_cidr__" > /opt/config/protected_net_cidr.txt
277 echo "__sink_ipaddr__" > /opt/config/sink_ipaddr.txt
278 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
279 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
280 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
281 echo "__install_script_version__" > /opt/config/install_script_version.txt
282 echo "__vpg_private_ip_0__" > /opt/config/vpg_private_ip_0.txt
283 echo "__vpg_private_ip_1__" > /opt/config/vpg_private_ip_1.txt
284 echo "__vpg_private_ip_2__" > /opt/config/vpg_private_ip_2.txt
285 echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
286 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
287 echo "__cloud_env__" > /opt/config/cloud_env.txt
289 # Download and run install script
290 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh
292 chmod +x v_packetgen_install.sh
293 ./v_packetgen_install.sh