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 that deploys vFirewall demo app for ONAP
38 label: Image name or ID
39 description: Image to be used for compute instance
43 description: Type of instance (flavor) to be used
46 label: Public network name or ID
47 description: Public network that enables remote connection to VNF
48 unprotected_private_net_id:
50 label: Unprotected private network name or ID
51 description: Private network that connects vPacketGenerator with vFirewall
52 protected_private_net_id:
54 label: Protected private network name or ID
55 description: Private network that connects vFirewall with vSink
58 label: ONAP management network name or ID
59 description: Private network that connects ONAP components and the VNF
60 onap_private_subnet_id:
62 label: ONAP management sub-network name or ID
63 description: Private sub-network that connects ONAP components and the VNF
64 unprotected_private_net_cidr:
66 label: Unprotected private network CIDR
67 description: The CIDR of the unprotected private network
68 protected_private_net_cidr:
70 label: Protected private network CIDR
71 description: The CIDR of the protected private network
72 onap_private_net_cidr:
74 label: ONAP private network CIDR
75 description: The CIDR of the protected private network
78 label: vFirewall private IP address towards the unprotected network
79 description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator
82 label: vFirewall private IP address towards the protected network
83 description: Private IP address that is assigned to the vFirewall to communicate with the vSink
86 label: vFirewall private IP address towards the ONAP management network
87 description: Private IP address that is assigned to the vFirewall to communicate with ONAP components
90 label: vPacketGenerator private IP address towards the unprotected network
91 description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall
94 label: vPacketGenerator private IP address towards the ONAP management network
95 description: Private IP address that is assigned to the vPacketGenerator to communicate with ONAP components
98 label: vSink private IP address towards the protected network
99 description: Private IP address that is assigned to the vSink to communicate with the vFirewall
102 label: vSink private IP address towards the ONAP management network
103 description: Private IP address that is assigned to the vSink to communicate with ONAP components
106 label: vFirewall name
107 description: Name of the vFirewall
110 label: vPacketGenerator name
111 description: Name of the vPacketGenerator
115 description: Name of the vSink
119 description: The VNF ID is provided by ECOMP
122 label: vFirewall module ID
123 description: The vFirewall Module ID is provided by ECOMP
126 label: DCAE collector IP address
127 description: IP address of the DCAE collector
130 label: DCAE collector port
131 description: Port of the DCAE collector
135 description: Public/Private key pair name
139 description: Public key to be installed on the compute instance
142 label: Repository URL
143 description: URL of the repository that hosts the demo packages
146 label: Repository URL
147 description: URL of the repository that hosts the demo packages
148 install_script_version:
150 label: Installation script version number
151 description: Version number of the scripts that install the vFW demo app
152 demo_artifacts_version:
154 label: Artifacts version used in demo vnfs
155 description: Artifacts (jar, tar.gz) version used in demo vnfs
158 label: Cloud environment
159 description: Cloud environment (e.g., openstack, rackspace)
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
185 unprotected_private_network:
186 type: OS::Neutron::Net
188 name: { get_param: unprotected_private_net_id }
190 protected_private_network:
191 type: OS::Neutron::Net
193 name: { get_param: protected_private_net_id }
195 unprotected_private_subnet:
196 type: OS::Neutron::Subnet
198 network_id: { get_resource: unprotected_private_network }
199 cidr: { get_param: unprotected_private_net_cidr }
201 protected_private_subnet:
202 type: OS::Neutron::Subnet
204 network_id: { get_resource: protected_private_network }
205 cidr: { get_param: protected_private_net_cidr }
207 # Virtual Firewall instantiation
209 type: OS::Neutron::Port
211 network: { get_resource: unprotected_private_network }
212 fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}]
215 type: OS::Neutron::Port
217 network: { get_resource: protected_private_network }
218 fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}]
221 type: OS::Neutron::Port
223 network: { get_param: onap_private_net_id }
224 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_2 }}]
227 type: OS::Nova::Server
229 image: { get_param: vfw_image_name }
230 flavor: { get_param: vfw_flavor_name }
231 name: { get_param: vfw_name_0 }
232 key_name: { get_resource: my_keypair }
234 - network: { get_param: public_net_id }
235 - port: { get_resource: vfw_private_0_port }
236 - port: { get_resource: vfw_private_1_port }
237 - port: { get_resource: vfw_private_2_port }
238 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
239 user_data_format: RAW
243 __dcae_collector_ip__ : { get_param: dcae_collector_ip }
244 __dcae_collector_port__ : { get_param: dcae_collector_port }
245 __repo_url_blob__ : { get_param: repo_url_blob }
246 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
247 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
248 __install_script_version__ : { get_param: install_script_version }
249 __cloud_env__ : { get_param: cloud_env }
253 # Create configuration files
255 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
256 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
257 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
258 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
259 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
260 echo "__install_script_version__" > /opt/config/install_script_version.txt
261 echo "__cloud_env__" > /opt/config/cloud_env.txt
263 # Download and run install script
264 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_firewall_install.sh -o /opt/v_firewall_install.sh
266 chmod +x v_firewall_install.sh
267 ./v_firewall_install.sh
270 # Virtual Packet Generator instantiation
272 type: OS::Neutron::Port
274 network: { get_resource: unprotected_private_network }
275 fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]
278 type: OS::Neutron::Port
280 network: { get_param: onap_private_net_id }
281 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
284 type: OS::Nova::Server
286 image: { get_param: vfw_image_name }
287 flavor: { get_param: vfw_flavor_name }
288 name: { get_param: vpg_name_0 }
289 key_name: { get_resource: my_keypair }
291 - network: { get_param: public_net_id }
292 - port: { get_resource: vpg_private_0_port }
293 - port: { get_resource: vpg_private_1_port }
294 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
295 user_data_format: RAW
299 __fw_ipaddr__: { get_param: vfw_private_ip_0 }
300 __protected_net_cidr__: { get_param: protected_private_net_cidr }
301 __sink_ipaddr__: { get_param: vsn_private_ip_0 }
302 __repo_url_blob__ : { get_param: repo_url_blob }
303 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
304 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
305 __install_script_version__ : { get_param: install_script_version }
306 __cloud_env__ : { get_param: cloud_env }
310 # Create configuration files
312 echo "__fw_ipaddr__" > /opt/config/fw_ipaddr.txt
313 echo "__protected_net_cidr__" > /opt/config/protected_net_cidr.txt
314 echo "__sink_ipaddr__" > /opt/config/sink_ipaddr.txt
315 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
316 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
317 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
318 echo "__install_script_version__" > /opt/config/install_script_version.txt
319 echo "__cloud_env__" > /opt/config/cloud_env.txt
321 # Download and run install script
322 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh
324 chmod +x v_packetgen_install.sh
325 ./v_packetgen_install.sh
328 # Virtual Sink instantiation
330 type: OS::Neutron::Port
332 network: { get_resource: protected_private_network }
333 fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}]
336 type: OS::Neutron::Port
338 network: { get_param: onap_private_net_id }
339 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_1 }}]
342 type: OS::Nova::Server
344 image: { get_param: vfw_image_name }
345 flavor: { get_param: vfw_flavor_name }
346 name: { get_param: vsn_name_0 }
347 key_name: { get_resource: my_keypair }
349 - network: { get_param: public_net_id }
350 - port: { get_resource: vsn_private_0_port }
351 - port: { get_resource: vsn_private_1_port }
352 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
353 user_data_format: RAW
357 __protected_net_gw__: { get_param: vfw_private_ip_1 }
358 __unprotected_net__: { get_param: unprotected_private_net_cidr }
359 __repo_url_blob__ : { get_param: repo_url_blob }
360 __install_script_version__ : { get_param: install_script_version }
361 __cloud_env__ : { get_param: cloud_env }
365 # Create configuration files
367 echo "__protected_net_gw__" > /opt/config/protected_net_gw.txt
368 echo "__unprotected_net__" > /opt/config/unprotected_net.txt
369 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
370 echo "__install_script_version__" > /opt/config/install_script_version.txt
371 echo "__cloud_env__" > /opt/config/cloud_env.txt
373 # Download and run install script
374 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_sink_install.sh -o /opt/v_sink_install.sh
376 chmod +x v_sink_install.sh