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 to deploy vCPE Infrastructue emlements (vAAA, vDHCP, vDNS_DHCP, webServer)
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
50 label: ONAP management network name or ID
51 description: Private network that connects ONAP components and the VNF
52 onap_private_subnet_id:
54 label: ONAP management sub-network name or ID
55 description: Private sub-network that connects ONAP components and the VNF
56 onap_private_net_cidr:
58 label: ONAP private network CIDR
59 description: The CIDR of the protected private network
62 label: vAAA private network name or ID
63 description: Private network that connects vAAA with vDNSs
66 label: CPE Signal subnet
67 description: CPE Signal subnet
70 label: vAAA private network CIDR
71 description: The CIDR of the vAAA private network
74 label: vCPE Public network (emulates internet) name or ID
75 description: Private network that connects vGW to emulated internet
78 label: CPE Public subnet
79 description: CPE Public subnet
82 label: vCPE public network CIDR
83 description: The CIDR of the vCPE public
86 label: vAAA private IP address towards the CPE_SIGNAL private network
87 description: Private IP address that is assigned to the vAAA to communicate with the vCPE components
90 label: vAAA private IP address towards the ONAP management network
91 description: Private IP address that is assigned to the vAAA to communicate with ONAP components
94 label: vDNS private IP address towards the CPE_PUBLIC private network
95 description: Private IP address that is assigned to the vDNS to communicate with the vCPE components
98 label: vDNS private IP address towards the ONAP management network
99 description: Private IP address that is assigned to the vDNS to communicate with ONAP components
102 label: vDHCP private IP address towards the CPE_SIGNAL private network
103 description: Private IP address that is assigned to the vDHCP to communicate with the vCPE components
106 label: vDNS private IP address towards the ONAP management network
107 description: Private IP address that is assigned to the vDHCP to communicate with ONAP components
110 label: vWEB private IP address towards the CPE_PUBLIC private network
111 description: Private IP address that is assigned to the vWEB to communicate with the vGWs
114 label: vWEB private IP address towards the ONAP management network
115 description: Private IP address that is assigned to the vWEB to communicate with ONAP components
119 description: Name of the vAAA
123 description: Name of the vDNS
127 description: Name of the vDHCP
131 description: Name of the vWEB
135 description: The VNF ID is provided by ONAP
138 label: vFirewall module ID
139 description: The vAAA Module ID is provided by ONAP
142 label: DCAE collector IP address
143 description: IP address of the DCAE collector
146 label: DCAE collector port
147 description: Port of the DCAE collector
150 label: Message Router IP address
151 description: IP address of the Message Router that for vDHCP configuration
154 label: Message Router Port
155 description: IP port of the Message Router that for vDHCP configuration
159 description: Public/Private key pair name
163 description: Public key to be installed on the compute instance
166 label: Repository URL
167 description: URL of the repository that hosts the demo packages
168 install_script_version:
170 label: Installation script version number
171 description: Version number of the scripts that install the vFW demo app
172 demo_artifacts_version:
174 label: Artifacts version used in demo vnfs
175 description: Artifacts (jar, tar.gz) version used in demo vnfs
178 description: Root URL for the Nexus repository for Maven artifacts.
179 default: "https://nexus.onap.org"
182 label: Cloud environment
183 description: Cloud environment (e.g., openstack, rackspace)
194 type: OS::Heat::RandomString
199 type: OS::Nova::KeyPair
205 base: { get_param: key_name }
206 rand: { get_resource: random-str }
207 public_key: { get_param: pub_key }
208 save_private_key: false
211 # Virtual AAA server Instantiation
213 type: OS::Neutron::Port
215 network: { get_param: cpe_signal_net_id }
216 fixed_ips: [{"subnet": { get_param: cpe_signal_subnet_id }, "ip_address": { get_param: vaaa_private_ip_0 }}]
219 type: OS::Neutron::Port
221 network: { get_param: onap_private_net_id }
222 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vaaa_private_ip_1 }}]
225 type: OS::Nova::Server
227 image: { get_param: vcpe_image_name }
228 flavor: { get_param: vcpe_flavor_name }
229 name: { get_param: vaaa_name_0 }
230 key_name: { get_resource: my_keypair }
232 - network: { get_param: public_net_id }
233 - port: { get_resource: vaaa_private_0_port }
234 - port: { get_resource: vaaa_private_1_port }
235 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
236 user_data_format: RAW
240 __dcae_collector_ip__: { get_param: dcae_collector_ip }
241 __dcae_collector_port__: { get_param: dcae_collector_port }
242 __cpe_signal_net_ipaddr__: { get_param: vaaa_private_ip_0 }
243 __oam_ipaddr__: { get_param: vaaa_private_ip_1 }
244 __oam_cidr__: { get_param: onap_private_net_cidr }
245 __cpe_signal_net_cidr__: { get_param: cpe_signal_net_cidr }
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 "__cpe_signal_net_ipaddr__" > /opt/config/cpe_signal_net_ipaddr.txt
258 echo "__oam_ipaddr__" > /opt/config/oam_ipaddr.txt
259 echo "__oam_cidr__" > /opt/config/oam_cidr.txt
260 echo "__cpe_signal_net_cidr__" > /opt/config/cpe_signal_net_cidr.txt
261 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
262 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
263 echo "__install_script_version__" > /opt/config/install_script_version.txt
264 echo "__cloud_env__" > /opt/config/cloud_env.txt
266 # Download and run install script
267 apt-get -y install unzip
268 if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
269 curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=__install_script_version__" -o /opt/vcpe-scripts-__install_script_version__.zip
270 unzip -j /opt/vcpe-scripts-__install_script_version__.zip -d /opt v_aaa_install.sh
272 chmod +x v_aaa_install.sh
276 # Virtual DNS Instantiation
278 type: OS::Neutron::Port
280 network: { get_param: cpe_public_net_id }
281 fixed_ips: [{"subnet": { get_param: cpe_public_subnet_id }, "ip_address": { get_param: vdns_private_ip_0 }}]
284 type: OS::Neutron::Port
286 network: { get_param: onap_private_net_id }
287 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}]
290 type: OS::Nova::Server
292 image: { get_param: vcpe_image_name }
293 flavor: { get_param: vcpe_flavor_name }
294 name: { get_param: vdns_name_0 }
295 key_name: { get_resource: my_keypair }
297 - network: { get_param: public_net_id }
298 - port: { get_resource: vdns_private_0_port }
299 - port: { get_resource: vdns_private_1_port }
300 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
301 user_data_format: RAW
305 __oam_ipaddr__ : { get_param: vdns_private_ip_1 }
306 __cpe_public_net_ipaddr__: { get_param: vdns_private_ip_0 }
307 __oam_cidr__: { get_param: onap_private_net_cidr }
308 __cpe_public_net_cidr__: { get_param: cpe_public_net_cidr }
309 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
310 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
311 __install_script_version__ : { get_param: install_script_version }
312 __cloud_env__ : { get_param: cloud_env }
316 # Create configuration files
318 echo "__oam_ipaddr__" > /opt/config/oam_ipaddr.txt
319 echo "__cpe_public_net_ipaddr__" > /opt/config/cpe_public_net_ipaddr.txt
320 echo "__oam_cidr__" > /opt/config/oam_cidr.txt
321 echo "__cpe_public_net_cidr__" > /opt/config/cpe_public_net_cidr.txt
322 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
323 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
324 echo "__install_script_version__" > /opt/config/install_script_version.txt
325 echo "__cloud_env__" > /opt/config/cloud_env.txt
327 # Download and run install script
328 apt-get -y install unzip
329 if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
330 curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=__install_script_version__" -o /opt/vcpe-scripts-__install_script_version__.zip
331 unzip -j /opt/vcpe-scripts-__install_script_version__.zip -d /opt v_dns_install.sh
333 chmod +x v_dns_install.sh
337 # Virtual DHCP Instantiation
338 vdhcp_private_0_port:
339 type: OS::Neutron::Port
341 network: { get_param: cpe_signal_net_id }
342 fixed_ips: [{"subnet": { get_param: cpe_signal_subnet_id }, "ip_address": { get_param: vdhcp_private_ip_0 }}]
344 vdhcp_private_1_port:
345 type: OS::Neutron::Port
347 network: { get_param: onap_private_net_id }
348 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdhcp_private_ip_1 }}]
351 type: OS::Nova::Server
353 image: { get_param: vcpe_image_name }
354 flavor: { get_param: vcpe_flavor_name }
355 name: { get_param: vdhcp_name_0 }
356 key_name: { get_resource: my_keypair }
358 - network: { get_param: public_net_id }
359 - port: { get_resource: vdhcp_private_0_port }
360 - port: { get_resource: vdhcp_private_1_port }
361 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
362 user_data_format: RAW
366 __oam_ipaddr__ : { get_param: vdhcp_private_ip_1 }
367 __cpe_signal_ipaddr__ : { get_param: vdhcp_private_ip_0 }
368 __oam_cidr__ : { get_param: onap_private_net_cidr }
369 __cpe_signal_net_cidr__ : { get_param: cpe_signal_net_cidr }
370 __mr_ip_addr__ : { get_param: mr_ip_addr }
371 __mr_ip_port__ : { get_param: mr_ip_port }
372 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
373 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
374 __install_script_version__ : { get_param: install_script_version }
375 __cloud_env__ : { get_param: cloud_env }
379 # Create configuration files
381 echo "__oam_ipaddr__" > /opt/config/oam_ipaddr.txt
382 echo "__cpe_signal_ipaddr__" > /opt/config/cpe_signal_ipaddr.txt
383 echo "__oam_cidr__" > /opt/config/oam_cidr.txt
384 echo "__cpe_signal_net_cidr__" > /opt/config/cpe_signal_net_cidr.txt
385 echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
386 echo "__mr_ip_port__" > /opt/config/mr_ip_port.txt
387 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
388 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
389 echo "__install_script_version__" > /opt/config/install_script_version.txt
390 echo "__cloud_env__" > /opt/config/cloud_env.txt
392 # Download and run install script
393 apt-get -y install unzip
394 if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
395 curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=__install_script_version__" -o /opt/vcpe-scripts-__install_script_version__.zip
396 unzip -j /opt/vcpe-scripts-__install_script_version__.zip -d /opt v_dhcp_install.sh
398 chmod +x v_dhcp_install.sh
403 type: OS::Neutron::Port
405 network: { get_param: cpe_public_net_id }
406 fixed_ips: [{"subnet": { get_param: cpe_public_subnet_id }, "ip_address": { get_param: vweb_private_ip_0 }}]
409 type: OS::Neutron::Port
411 network: { get_param: onap_private_net_id }
412 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vweb_private_ip_1 }}]
416 type: OS::Nova::Server
418 image: { get_param: vcpe_image_name }
419 flavor: { get_param: vcpe_flavor_name }
420 name: { get_param: vweb_name_0 }
421 key_name: { get_resource: my_keypair }
423 - network: { get_param: public_net_id }
424 - port: { get_resource: vweb_private_0_port }
425 - port: { get_resource: vweb_private_1_port }
426 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
427 user_data_format: RAW
431 __oam_ipaddr__ : { get_param: vweb_private_ip_1 }
432 __cpe_public_ipaddr__: { get_param: vweb_private_ip_0 }
433 __oam_cidr__: { get_param: onap_private_net_cidr }
434 __cpe_public_net_cidr__: { get_param: cpe_public_net_cidr }
435 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
436 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
437 __install_script_version__ : { get_param: install_script_version }
438 __cloud_env__ : { get_param: cloud_env }
442 # Create configuration files
444 echo "__oam_ipaddr__" > /opt/config/oam_ipaddr.txt
445 echo "__cpe_public_ipaddr__" > /opt/config/cpe_public_ipaddr.txt
446 echo "__oam_cidr__" > /opt/config/oam_cidr.txt
447 echo "__cpe_public_net_cidr__" > /opt/config/cpe_public_net_cidr.txt
448 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
449 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
450 echo "__install_script_version__" > /opt/config/install_script_version.txt
451 echo "__cloud_env__" > /opt/config/cloud_env.txt
453 # Download and run install script
454 apt-get -y install unzip
455 if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
456 curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=__install_script_version__" -o /opt/vcpe-scripts-__install_script_version__.zip
457 unzip -j /opt/vcpe-scripts-__install_script_version__.zip -d /opt v_web_install.sh
459 chmod +x v_web_install.sh