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 vFirewall 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 protected_private_net_id:
\r
54 label: Protected private network name or ID
\r
55 description: Private network that connects vFirewall with vSink
\r
56 onap_private_net_id:
\r
58 label: ONAP management network name or ID
\r
59 description: Private network that connects ONAP components and the VNF
\r
60 onap_private_subnet_id:
\r
62 label: ONAP management sub-network name or ID
\r
63 description: Private sub-network that connects ONAP components and the VNF
\r
64 unprotected_private_net_cidr:
\r
66 label: Unprotected private network CIDR
\r
67 description: The CIDR of the unprotected private network
\r
68 protected_private_net_cidr:
\r
70 label: Protected private network CIDR
\r
71 description: The CIDR of the protected private network
\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: vFirewall private IP address towards the protected network
\r
83 description: Private IP address that is assigned to the vFirewall to communicate with the vSink
\r
86 label: vFirewall private IP address towards the ONAP management network
\r
87 description: Private IP address that is assigned to the vFirewall to communicate with ONAP components
\r
90 label: vPacketGenerator private IP address towards the unprotected network
\r
91 description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall
\r
94 label: vPacketGenerator private IP address towards the ONAP management network
\r
95 description: Private IP address that is assigned to the vPacketGenerator to communicate with ONAP components
\r
98 label: vSink private IP address towards the protected network
\r
99 description: Private IP address that is assigned to the vSink to communicate with the vFirewall
\r
102 label: vSink private IP address towards the ONAP management network
\r
103 description: Private IP address that is assigned to the vSink to communicate with ONAP components
\r
106 label: vFirewall name
\r
107 description: Name of the vFirewall
\r
110 label: vPacketGenerator name
\r
111 description: Name of the vPacketGenerator
\r
115 description: Name of the vSink
\r
119 description: The VNF ID is provided by ONAP
\r
122 label: vFirewall module ID
\r
123 description: The vFirewall Module ID is provided by ONAP
\r
126 label: DCAE collector IP address
\r
127 description: IP address of the DCAE collector
\r
128 dcae_collector_port:
\r
130 label: DCAE collector port
\r
131 description: Port of the DCAE collector
\r
134 label: Key pair name
\r
135 description: Public/Private key pair name
\r
139 description: Public key to be installed on the compute instance
\r
142 label: Repository URL
\r
143 description: URL of the repository that hosts the demo packages
\r
144 repo_url_artifacts:
\r
146 label: Repository URL
\r
147 description: URL of the repository that hosts the demo packages
\r
148 install_script_version:
\r
150 label: Installation script version number
\r
151 description: Version number of the scripts that install the vFW demo app
\r
152 demo_artifacts_version:
\r
154 label: Artifacts version used in demo vnfs
\r
155 description: Artifacts (jar, tar.gz) version used in demo vnfs
\r
158 label: Cloud environment
\r
159 description: Cloud environment (e.g., openstack, rackspace)
\r
169 type: OS::Heat::RandomString
\r
174 type: OS::Nova::KeyPair
\r
178 template: base_rand
\r
180 base: { get_param: key_name }
\r
181 rand: { get_resource: random-str }
\r
182 public_key: { get_param: pub_key }
\r
183 save_private_key: false
\r
185 unprotected_private_network:
\r
186 type: OS::Neutron::Net
\r
188 name: { get_param: unprotected_private_net_id }
\r
190 protected_private_network:
\r
191 type: OS::Neutron::Net
\r
193 name: { get_param: protected_private_net_id }
\r
195 unprotected_private_subnet:
\r
196 type: OS::Neutron::Subnet
\r
198 network_id: { get_resource: unprotected_private_network }
\r
199 cidr: { get_param: unprotected_private_net_cidr }
\r
201 protected_private_subnet:
\r
202 type: OS::Neutron::Subnet
\r
204 network_id: { get_resource: protected_private_network }
\r
205 cidr: { get_param: protected_private_net_cidr }
\r
207 # Virtual Firewall instantiation
\r
208 vfw_private_0_port:
\r
209 type: OS::Neutron::Port
\r
211 network: { get_resource: unprotected_private_network }
\r
212 fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}]
\r
214 vfw_private_1_port:
\r
215 type: OS::Neutron::Port
\r
217 allowed_address_pairs: [{ "ip_address": { get_param: vpg_private_ip_0 }}]
\r
218 network: { get_resource: protected_private_network }
\r
219 fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}]
\r
221 vfw_private_2_port:
\r
222 type: OS::Neutron::Port
\r
224 network: { get_param: onap_private_net_id }
\r
225 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_2 }}]
\r
228 type: OS::Nova::Server
\r
230 image: { get_param: vfw_image_name }
\r
231 flavor: { get_param: vfw_flavor_name }
\r
232 name: { get_param: vfw_name_0 }
\r
233 key_name: { get_resource: my_keypair }
\r
235 - network: { get_param: public_net_id }
\r
236 - port: { get_resource: vfw_private_0_port }
\r
237 - port: { get_resource: vfw_private_1_port }
\r
238 - port: { get_resource: vfw_private_2_port }
\r
239 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
\r
240 user_data_format: RAW
\r
244 __dcae_collector_ip__ : { get_param: dcae_collector_ip }
\r
245 __dcae_collector_port__ : { get_param: dcae_collector_port }
\r
246 __repo_url_blob__ : { get_param: repo_url_blob }
\r
247 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
\r
248 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
\r
249 __install_script_version__ : { get_param: install_script_version }
\r
250 __vfw_private_ip_0__ : { get_param: vfw_private_ip_0 }
\r
251 __vfw_private_ip_1__ : { get_param: vfw_private_ip_1 }
\r
252 __vfw_private_ip_2__ : { get_param: vfw_private_ip_2 }
\r
253 __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
\r
254 __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
\r
255 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
\r
256 __cloud_env__ : { get_param: cloud_env }
\r
260 # Create configuration files
\r
262 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
\r
263 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
\r
264 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
\r
265 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
\r
266 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
\r
267 echo "__install_script_version__" > /opt/config/install_script_version.txt
\r
268 echo "__vfw_private_ip_0__" > /opt/config/vfw_private_ip_0.txt
\r
269 echo "__vfw_private_ip_1__" > /opt/config/vfw_private_ip_1.txt
\r
270 echo "__vfw_private_ip_2__" > /opt/config/vfw_private_ip_2.txt
\r
271 echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
\r
272 echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
\r
273 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
\r
274 echo "__cloud_env__" > /opt/config/cloud_env.txt
\r
276 # Download and run install script
\r
277 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_firewall_install.sh -o /opt/v_firewall_install.sh
\r
279 chmod +x v_firewall_install.sh
\r
280 ./v_firewall_install.sh
\r
283 # Virtual Packet Generator instantiation
\r
284 vpg_private_0_port:
\r
285 type: OS::Neutron::Port
\r
287 network: { get_resource: unprotected_private_network }
\r
288 fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}]
\r
290 vpg_private_1_port:
\r
291 type: OS::Neutron::Port
\r
293 network: { get_param: onap_private_net_id }
\r
294 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}]
\r
297 type: OS::Nova::Server
\r
299 image: { get_param: vfw_image_name }
\r
300 flavor: { get_param: vfw_flavor_name }
\r
301 name: { get_param: vpg_name_0 }
\r
302 key_name: { get_resource: my_keypair }
\r
304 - network: { get_param: public_net_id }
\r
305 - port: { get_resource: vpg_private_0_port }
\r
306 - port: { get_resource: vpg_private_1_port }
\r
307 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
\r
308 user_data_format: RAW
\r
312 __fw_ipaddr__: { get_param: vfw_private_ip_0 }
\r
313 __protected_net_cidr__: { get_param: protected_private_net_cidr }
\r
314 __sink_ipaddr__: { get_param: vsn_private_ip_0 }
\r
315 __repo_url_blob__ : { get_param: repo_url_blob }
\r
316 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
\r
317 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
\r
318 __install_script_version__ : { get_param: install_script_version }
\r
319 __vpg_private_ip_0__ : { get_param: vpg_private_ip_0 }
\r
320 __vpg_private_ip_1__ : { get_param: vpg_private_ip_1 }
\r
321 __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
\r
322 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
\r
323 __cloud_env__ : { get_param: cloud_env }
\r
327 # Create configuration files
\r
329 echo "__fw_ipaddr__" > /opt/config/fw_ipaddr.txt
\r
330 echo "__protected_net_cidr__" > /opt/config/protected_net_cidr.txt
\r
331 echo "__sink_ipaddr__" > /opt/config/sink_ipaddr.txt
\r
332 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
\r
333 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
\r
334 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
\r
335 echo "__install_script_version__" > /opt/config/install_script_version.txt
\r
336 echo "__vpg_private_ip_0__" > /opt/config/vpg_private_ip_0.txt
\r
337 echo "__vpg_private_ip_1__" > /opt/config/vpg_private_ip_1.txt
\r
338 echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
\r
339 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
\r
340 echo "__cloud_env__" > /opt/config/cloud_env.txt
\r
342 # Download and run install script
\r
343 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh
\r
345 chmod +x v_packetgen_install.sh
\r
346 ./v_packetgen_install.sh
\r
349 # Virtual Sink instantiation
\r
350 vsn_private_0_port:
\r
351 type: OS::Neutron::Port
\r
353 network: { get_resource: protected_private_network }
\r
354 fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}]
\r
356 vsn_private_1_port:
\r
357 type: OS::Neutron::Port
\r
359 network: { get_param: onap_private_net_id }
\r
360 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_1 }}]
\r
363 type: OS::Nova::Server
\r
365 image: { get_param: vfw_image_name }
\r
366 flavor: { get_param: vfw_flavor_name }
\r
367 name: { get_param: vsn_name_0 }
\r
368 key_name: { get_resource: my_keypair }
\r
370 - network: { get_param: public_net_id }
\r
371 - port: { get_resource: vsn_private_0_port }
\r
372 - port: { get_resource: vsn_private_1_port }
\r
373 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
\r
374 user_data_format: RAW
\r
378 __protected_net_gw__: { get_param: vfw_private_ip_1 }
\r
379 __unprotected_net__: { get_param: unprotected_private_net_cidr }
\r
380 __repo_url_blob__ : { get_param: repo_url_blob }
\r
381 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
\r
382 __install_script_version__ : { get_param: install_script_version }
\r
383 __vsn_private_ip_0__ : { get_param: vsn_private_ip_0 }
\r
384 __vsn_private_ip_1__ : { get_param: vsn_private_ip_1 }
\r
385 __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
\r
386 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
\r
387 __cloud_env__ : { get_param: cloud_env }
\r
391 # Create configuration files
\r
393 echo "__protected_net_gw__" > /opt/config/protected_net_gw.txt
\r
394 echo "__unprotected_net__" > /opt/config/unprotected_net.txt
\r
395 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
\r
396 echo "__install_script_version__" > /opt/config/install_script_version.txt
\r
397 echo "__vsn_private_ip_0__" > /opt/config/vsn_private_ip_0.txt
\r
398 echo "__vsn_private_ip_1__" > /opt/config/vsn_private_ip_1.txt
\r
399 echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
\r
400 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
\r
401 echo "__cloud_env__" > /opt/config/cloud_env.txt
\r
403 # Download and run install script
\r
404 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_sink_install.sh -o /opt/v_sink_install.sh
\r
406 chmod +x v_sink_install.sh
\r