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 Closed Loop demo app (FW and Sink) 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: vSink private IP address towards the protected network
\r
95 description: Private IP address that is assigned to the vSink to communicate with the vFirewall
\r
98 label: vSink private IP address towards the ONAP management network
\r
99 description: Private IP address that is assigned to the vSink to communicate with ONAP components
\r
102 label: vFirewall name
\r
103 description: Name of the vFirewall
\r
107 description: Name of the vSink
\r
111 description: The VNF ID is provided by ONAP
\r
114 label: vFirewall module ID
\r
115 description: The vFirewall Module ID is provided by ONAP
\r
118 label: DCAE collector IP address
\r
119 description: IP address of the DCAE collector
\r
120 dcae_collector_port:
\r
122 label: DCAE collector port
\r
123 description: Port of the DCAE collector
\r
126 label: Key pair name
\r
127 description: Public/Private key pair name
\r
131 description: Public key to be installed on the compute instance
\r
134 label: Repository URL
\r
135 description: URL of the repository that hosts the demo packages
\r
136 repo_url_artifacts:
\r
138 label: Repository URL
\r
139 description: URL of the repository that hosts the demo packages
\r
140 install_script_version:
\r
142 label: Installation script version number
\r
143 description: Version number of the scripts that install the vFW demo app
\r
144 demo_artifacts_version:
\r
146 label: Artifacts version used in demo vnfs
\r
147 description: Artifacts (jar, tar.gz) version used in demo vnfs
\r
150 label: Cloud environment
\r
151 description: Cloud environment (e.g., openstack, rackspace)
\r
161 type: OS::Heat::RandomString
\r
166 type: OS::Nova::KeyPair
\r
170 template: base_rand
\r
172 base: { get_param: key_name }
\r
173 rand: { get_resource: random-str }
\r
174 public_key: { get_param: pub_key }
\r
175 save_private_key: false
\r
177 unprotected_private_network:
\r
178 type: OS::Neutron::Net
\r
180 name: { get_param: unprotected_private_net_id }
\r
182 protected_private_network:
\r
183 type: OS::Neutron::Net
\r
185 name: { get_param: protected_private_net_id }
\r
187 unprotected_private_subnet:
\r
188 type: OS::Neutron::Subnet
\r
190 name: { get_param: unprotected_private_subnet_id }
\r
191 network_id: { get_resource: unprotected_private_network }
\r
192 cidr: { get_param: unprotected_private_net_cidr }
\r
194 protected_private_subnet:
\r
195 type: OS::Neutron::Subnet
\r
197 name: { get_param: protected_private_subnet_id }
\r
198 network_id: { get_resource: protected_private_network }
\r
199 cidr: { get_param: protected_private_net_cidr }
\r
201 # Virtual Firewall instantiation
\r
202 vfw_private_0_port:
\r
203 type: OS::Neutron::Port
\r
205 network: { get_resource: unprotected_private_network }
\r
206 fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}]
\r
208 vfw_private_1_port:
\r
209 type: OS::Neutron::Port
\r
211 allowed_address_pairs: [{ "ip_address": { get_param: vpg_private_ip_0 }}]
\r
212 network: { get_resource: protected_private_network }
\r
213 fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}]
\r
215 vfw_private_2_port:
\r
216 type: OS::Neutron::Port
\r
218 network: { get_param: onap_private_net_id }
\r
219 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_2 }}]
\r
222 type: OS::Nova::Server
\r
224 image: { get_param: vfw_image_name }
\r
225 flavor: { get_param: vfw_flavor_name }
\r
226 name: { get_param: vfw_name_0 }
\r
227 key_name: { get_resource: my_keypair }
\r
229 - network: { get_param: public_net_id }
\r
230 - port: { get_resource: vfw_private_0_port }
\r
231 - port: { get_resource: vfw_private_1_port }
\r
232 - port: { get_resource: vfw_private_2_port }
\r
233 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
\r
234 user_data_format: RAW
\r
238 __dcae_collector_ip__ : { get_param: dcae_collector_ip }
\r
239 __dcae_collector_port__ : { get_param: dcae_collector_port }
\r
240 __repo_url_blob__ : { get_param: repo_url_blob }
\r
241 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
\r
242 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
\r
243 __install_script_version__ : { get_param: install_script_version }
\r
244 __vfw_private_ip_0__ : { get_param: vfw_private_ip_0 }
\r
245 __vfw_private_ip_1__ : { get_param: vfw_private_ip_1 }
\r
246 __vfw_private_ip_2__ : { get_param: vfw_private_ip_2 }
\r
247 __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
\r
248 __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
\r
249 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
\r
250 __cloud_env__ : { get_param: cloud_env }
\r
254 # Create configuration files
\r
256 echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
\r
257 echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
\r
258 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
\r
259 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
\r
260 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
\r
261 echo "__install_script_version__" > /opt/config/install_script_version.txt
\r
262 echo "__vfw_private_ip_0__" > /opt/config/vfw_private_ip_0.txt
\r
263 echo "__vfw_private_ip_1__" > /opt/config/vfw_private_ip_1.txt
\r
264 echo "__vfw_private_ip_2__" > /opt/config/vfw_private_ip_2.txt
\r
265 echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
\r
266 echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
\r
267 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
\r
268 echo "__cloud_env__" > /opt/config/cloud_env.txt
\r
270 # Download and run install script
\r
271 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_firewall_install.sh -o /opt/v_firewall_install.sh
\r
273 chmod +x v_firewall_install.sh
\r
274 ./v_firewall_install.sh
\r
277 # Virtual Sink instantiation
\r
278 vsn_private_0_port:
\r
279 type: OS::Neutron::Port
\r
281 network: { get_resource: protected_private_network }
\r
282 fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}]
\r
284 vsn_private_1_port:
\r
285 type: OS::Neutron::Port
\r
287 network: { get_param: onap_private_net_id }
\r
288 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_1 }}]
\r
291 type: OS::Nova::Server
\r
293 image: { get_param: vfw_image_name }
\r
294 flavor: { get_param: vfw_flavor_name }
\r
295 name: { get_param: vsn_name_0 }
\r
296 key_name: { get_resource: my_keypair }
\r
298 - network: { get_param: public_net_id }
\r
299 - port: { get_resource: vsn_private_0_port }
\r
300 - port: { get_resource: vsn_private_1_port }
\r
301 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
\r
302 user_data_format: RAW
\r
306 __protected_net_gw__: { get_param: vfw_private_ip_1 }
\r
307 __unprotected_net__: { get_param: unprotected_private_net_cidr }
\r
308 __repo_url_blob__ : { get_param: repo_url_blob }
\r
309 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
\r
310 __install_script_version__ : { get_param: install_script_version }
\r
311 __vsn_private_ip_0__ : { get_param: vsn_private_ip_0 }
\r
312 __vsn_private_ip_1__ : { get_param: vsn_private_ip_1 }
\r
313 __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
\r
314 __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
\r
315 __cloud_env__ : { get_param: cloud_env }
\r
319 # Create configuration files
\r
321 echo "__protected_net_gw__" > /opt/config/protected_net_gw.txt
\r
322 echo "__unprotected_net__" > /opt/config/unprotected_net.txt
\r
323 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
\r
324 echo "__install_script_version__" > /opt/config/install_script_version.txt
\r
325 echo "__vsn_private_ip_0__" > /opt/config/vsn_private_ip_0.txt
\r
326 echo "__vsn_private_ip_1__" > /opt/config/vsn_private_ip_1.txt
\r
327 echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
\r
328 echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
\r
329 echo "__cloud_env__" > /opt/config/cloud_env.txt
\r
331 # Download and run install script
\r
332 curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_sink_install.sh -o /opt/v_sink_install.sh
\r
334 chmod +x v_sink_install.sh
\r
335 ./v_sink_install.sh
\r