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: Heat template that deploys vFirewall Closed Loop demo app (vFW and vSink) 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 subnetwork name or ID
56 description: Private subnetwork of the protected 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: vFirewall private IP address towards the protected network
104 description: Private IP address that is assigned to the vFirewall to communicate with the vSink
107 label: vFirewall private IP address towards the ONAP management network
108 description: Private IP address that is assigned to the vFirewall to communicate with ONAP components
111 label: vFirewall private IP address towards public
112 description: Private IP address that is assigned to the vFirewall to communicate with internet
115 label: vPacketGenerator private IP address towards the unprotected network
116 description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall
119 label: vSink private IP address towards the protected network
120 description: Private IP address that is assigned to the vSink to communicate with the vFirewall
123 label: vSink private IP address towards the ONAP management network
124 description: Private IP address that is assigned to the vSink to communicate with ONAP components
127 label: vSink private IP address towards public
128 description: Private IP address that is assigned to the vSink to communicate with internet
131 label: vFirewall name
132 description: Name of the vFirewall
136 description: Name of the vSink
140 description: The VNF ID is provided by ONAP
143 label: vFirewall module ID
144 description: The vFirewall Module ID is provided by ONAP
147 label: DCAE collector IP address
148 description: IP address of the DCAE collector
151 label: DCAE collector port
152 description: Port of the DCAE collector
156 description: Public/Private key pair name
160 description: Public key to be installed on the compute instance
163 label: Repository URL
164 description: URL of the repository that hosts the demo packages
167 label: Repository URL
168 description: URL of the repository that hosts the demo packages
169 install_script_version:
171 label: Installation script version number
172 description: Version number of the scripts that install the vFW demo app
173 demo_artifacts_version:
175 label: Artifacts version used in demo vnfs
176 description: Artifacts (jar, tar.gz) version used in demo vnfs
179 label: Cloud environment
180 description: Cloud environment (e.g., openstack, rackspace)
183 description: ONAP Security Group
193 type: OS::Heat::RandomString
198 type: OS::Nova::KeyPair
204 base: { get_param: key_name }
205 rand: { get_resource: random-str }
206 public_key: { get_param: pub_key }
207 save_private_key: false
209 # Virtual Firewall instantiation
211 type: OS::Neutron::Port
213 network: { get_param: unprotected_private_net_id }
214 fixed_ips: [{"subnet": { get_param: unprotected_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_0 }}]
216 - { get_param: sec_group }
219 type: OS::Neutron::Port
221 allowed_address_pairs: [{ "ip_address": { get_param: vpg_private_ip_0 }}]
222 network: { get_param: protected_private_net_id }
223 fixed_ips: [{"subnet": { get_param: protected_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_1 }}]
225 - { get_param: sec_group }
228 type: OS::Neutron::Port
230 network: { get_param: onap_private_net_id }
231 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_2 }}]
233 - { get_param: sec_group }
236 type: OS::Neutron::Port
238 network: { get_param: ext_private_net_id }
239 fixed_ips: [{"subnet": { get_param: ext_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_3 }}]
241 - { get_param: sec_group }
244 type: OS::Neutron::FloatingIP
246 floating_network: { get_param: public_net_id }
247 port_id: { get_resource: vfw_private_3_port }
250 type: OS::Nova::Server
252 image: { get_param: image_name }
253 flavor: { get_param: flavor_name }
254 name: { get_param: vfw_name_0 }
255 key_name: { get_resource: my_keypair }
257 - port: { get_resource: vfw_private_3_port }
258 - port: { get_resource: vfw_private_0_port }
259 - port: { get_resource: vfw_private_1_port }
260 - port: { get_resource: vfw_private_2_port }
261 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
262 user_data_format: RAW
266 __dcae_collector_ip__ : { get_param: dcae_collector_ip }
267 __dcae_collector_port__ : { get_param: dcae_collector_port }
268 __repo_url_blob__ : { get_param: repo_url_blob }
269 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
270 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
271 __install_script_version__ : { get_param: install_script_version }
272 __vfw_private_ip_0__ : { get_param: vfw_private_ip_0 }
273 __vfw_private_ip_1__ : { get_param: vfw_private_ip_1 }
274 __vfw_private_ip_2__ : { get_param: vfw_private_ip_2 }
275 __vfw_private_ip_3__ : { get_param: vfw_private_ip_3 }
276 __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
277 __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
278 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
279 __cloud_env__ : { get_param: cloud_env }
283 # Create configuration files
285 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
286 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
287 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
288 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
289 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
290 echo "__install_script_version__" > /opt/config/install_script_version.txt
291 echo "__vfw_private_ip_0__" > /opt/config/vfw_private_ip_0.txt
292 echo "__vfw_private_ip_1__" > /opt/config/vfw_private_ip_1.txt
293 echo "__vfw_private_ip_2__" > /opt/config/vfw_private_ip_2.txt
294 echo "__vfw_private_ip_3__" > /opt/config/vfw_private_ip_3.txt
295 echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
296 echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
297 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
298 echo "__cloud_env__" > /opt/config/cloud_env.txt
300 # Download and run install script
301 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_firewall_install.sh -o /opt/v_firewall_install.sh
303 chmod +x v_firewall_install.sh
304 ./v_firewall_install.sh
307 # Virtual Sink instantiation
309 type: OS::Neutron::Port
311 network: { get_param: protected_private_net_id }
312 fixed_ips: [{"subnet": { get_param: protected_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_0 }}]
314 - { get_param: sec_group }
317 type: OS::Neutron::Port
319 network: { get_param: onap_private_net_id }
320 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_1 }}]
322 - { get_param: sec_group }
325 type: OS::Neutron::Port
327 network: { get_param: ext_private_net_id }
328 fixed_ips: [{"subnet": { get_param: ext_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_2 }}]
330 - { get_param: sec_group }
333 type: OS::Neutron::FloatingIP
335 floating_network: { get_param: public_net_id }
336 port_id: { get_resource: vsn_private_2_port }
339 type: OS::Nova::Server
341 image: { get_param: image_name }
342 flavor: { get_param: flavor_name }
343 name: { get_param: vsn_name_0 }
344 key_name: { get_resource: my_keypair }
346 - port: { get_resource: vsn_private_2_port }
347 - port: { get_resource: vsn_private_0_port }
348 - port: { get_resource: vsn_private_1_port }
349 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
350 user_data_format: RAW
354 __protected_net_gw__: { get_param: vfw_private_ip_1 }
355 __unprotected_net__: { get_param: unprotected_private_net_cidr }
356 __repo_url_blob__ : { get_param: repo_url_blob }
357 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
358 __install_script_version__ : { get_param: install_script_version }
359 __vsn_private_ip_0__ : { get_param: vsn_private_ip_0 }
360 __vsn_private_ip_1__ : { get_param: vsn_private_ip_1 }
361 __vsn_private_ip_2__ : { get_param: vsn_private_ip_2 }
362 __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
363 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
364 __cloud_env__ : { get_param: cloud_env }
368 # Create configuration files
370 echo "__protected_net_gw__" > /opt/config/protected_net_gw.txt
371 echo "__unprotected_net__" > /opt/config/unprotected_net.txt
372 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
373 echo "__install_script_version__" > /opt/config/install_script_version.txt
374 echo "__vsn_private_ip_0__" > /opt/config/vsn_private_ip_0.txt
375 echo "__vsn_private_ip_1__" > /opt/config/vsn_private_ip_1.txt
376 echo "__vsn_private_ip_2__" > /opt/config/vsn_private_ip_2.txt
377 echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
378 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
379 echo "__cloud_env__" > /opt/config/cloud_env.txt
381 # Download and run install script
382 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_sink_install.sh -o /opt/v_sink_install.sh
384 chmod +x v_sink_install.sh