1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright (c) 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: 2015-10-15
27 description: Heat template to install ONAP components
37 ##############################################
39 # Parameters used across all ONAP components #
41 ##############################################
45 description: The ID of the Public network for floating IP address allocation
49 description: The name of the Public network referred by public_net_id
53 description: Name of the Ubuntu 14.04 image
57 description: Name of the Ubuntu 16.04 image
61 description: Name of the Small Flavor supported by the cloud provider
65 description: Name of the Medium Flavor supported by the cloud provider
69 description: Name of the Large Flavor supported by the cloud provider
73 description: Base name of ONAP VMs
77 description: Public/Private key pair name
81 description: Public key to be installed on the compute instance
85 description: Complete URL for the Nexus repository.
89 description: Complete URL for the Nexus repository for docker images.
93 description: Nexus Repository username
97 description: Nexus Repository Password
101 description: Artifacts version of ONAP components
105 description: OpenStack tenant ID
107 openstack_tenant_name:
109 description: OpenStack tenant name (matching with the openstack_tenant_id)
113 description: OpenStack username
117 description: OpenStack password or API Key
121 description: URL of OpenStack Keystone
125 description: Cloud Provider Name in lower case
129 description: Region where the DCAE controller will spin the VMs
131 ######################
133 # Network parameters #
135 ######################
138 type: comma_delimited_list
139 description: List of External DNS for OAM ONAP network
143 description: Public IP of the external DNS for ONAP network
147 description: the forwarder address for setting up ONAP's private DNS server
151 description: CIDR of the OAM ONAP network
153 ### Private IP addresses ###
171 ###########################
173 # Parameters used by DCAE #
175 ###########################
177 dnsaas_config_enabled:
179 description: whether the DNSaaS configuration section is enabled
183 description: the region of the cloud instance providing the Designate DNS as a Service
187 description: the keystone URL of the cloud instance providing the Designate DNS as a Service
191 description: the username of the cloud instance providing the Designate DNS as a Service
195 description: the password of the cloud instance providing the Designate DNS as a Service
199 description: the name of the tenant in the cloud instance providing the Designate DNS as a Service
203 description: the keystone URL for DCAE to use (via MultiCloud)
207 description: the private key of the key-apir used between the DCAE bootstrap container and DCAE VMs
211 description: the prublic key of the key-apir used between the DCAE bootstrap container and DCAE VMs
215 description: the id/name of the CentOS 7 VM imange
219 description: the top level domain to register DCAE VMs (the zone will be random-str.dcae_domain)
233 type: OS::Heat::RandomString
237 # Public key used to access ONAP components
239 type: OS::Nova::KeyPair
245 base: { get_param: key_name }
246 rand: { get_resource: random-str }
247 public_key: { get_param: pub_key }
248 save_private_key: false
251 # ONAP security group
253 type: OS::Neutron::SecurityGroup
260 rand: { get_resource: random-str }
261 description: security group used by ONAP
273 port_range_max: 65535
276 port_range_max: 65535
278 # ONAP management private network
280 type: OS::Neutron::Net
284 template: oam_onap_rand
286 rand: { get_resource: random-str }
289 type: OS::Neutron::Subnet
293 template: oam_onap_rand
295 rand: { get_resource: random-str }
296 network_id: { get_resource: oam_onap }
297 cidr: { get_param: oam_network_cidr }
298 dns_nameservers: { get_param: dns_list }
301 type: OS::Neutron::Router
303 external_gateway_info:
304 network: { get_param: public_net_id }
307 type: OS::Neutron::RouterInterface
309 router_id: { get_resource: router }
310 subnet_id: { get_resource: oam_onap_subnet }
312 # DCAE GEN 2 Controller instantiation
314 type: OS::Neutron::Port
316 network: { get_resource: oam_onap }
317 fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
320 type: OS::Neutron::FloatingIP
322 floating_network_id: { get_param: public_net_id }
323 port_id: { get_resource: dcae_c_private_port }
326 type: OS::Nova::Server
328 image: { get_param: ubuntu_1604_image }
329 flavor: { get_param: flavor_small }
332 template: base-dcae-bootstrap
334 base: { get_param: vm_base_name }
335 key_name: { get_resource: vm_key }
337 - port: { get_resource: dcae_c_private_port }
339 # - { get_resource: onap_sg }
340 user_data_format: RAW
344 __rand_str__: { get_resource: random-str }
346 __artifacts_version__: { get_param: artifacts_version }
347 __docker_version__: { get_param: dcae_docker }
348 __nexus_repo__: { get_param: nexus_repo }
349 __nexus_docker_repo__: { get_param: nexus_docker_repo }
350 __nexus_username__: { get_param: nexus_username }
351 __nexus_password__: { get_param: nexus_password }
352 # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
353 __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
354 __dcae_ip_addr__: { get_param: dcae_ip_addr }
355 __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
356 __dns_ip_addr__: { get_param: dns_ip_addr }
357 __external_dns__: { get_param: external_dns }
358 __dns_forwarder__: { get_param: dns_forwarder }
359 __dcae_domain__: { get_param: dcae_domain }
360 # conf for VMs DCAE is to bringup
361 __openstack_keystone_url__: { get_param: keystone_url }
362 __dcae_keystone_url__: { get_param: dcae_keystone_url }
363 __dcaeos_cloud_env__: { get_param: cloud_env }
364 __dcaeos_keystone_url__: { get_param: dcae_keystone_url }
365 __dcaeos_region__: { get_param: openstack_region }
366 __dcaeos_tenant_id__: { get_param: openstack_tenant_id }
367 __dcaeos_tenant_name__: { get_param: openstack_tenant_name }
368 __dcaeos_security_group__:
370 template: 'onap_sg_rand'
372 rand: { get_resource: random-str }
373 #__dcaeos_security_group__: { get_attr: [onap_sg, name] }
374 __dcaeos_username__: { get_param: openstack_username }
375 __dcaeos_password__: { get_param: openstack_api_key }
376 __dcaeos_key_name__: { get_resource: vm_key }
377 __dcaeos_public_key__: { get_param: dcae_public_key }
378 __dcaeos_private_key__: { get_param: dcae_private_key }
379 __dcaeos_private_network_name__: { get_attr: [oam_onap, name] }
380 __dcaeos_public_network_name__: { get_param: public_net_name }
381 __dcaeos_ubuntu_1604_image__: { get_param: ubuntu_1604_image }
382 __dcaeos_centos_7_image__: { get_param: dcae_centos_7_image }
383 __dcaeos_flavor_id__: { get_param: flavor_medium }
384 __dcaeos_flavor_id_cdap__: { get_param: flavor_large }
385 __dcaeos_dnsaas_config_enabled__: { get_param: dnsaas_config_enabled }
386 __dcaeos_dnsaas_region__: { get_param: dnsaas_region }
387 __dcaeos_dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
388 __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
389 __dcaeos_dnsaas_username__: { get_param: dnsaas_username }
390 __dcaeos_dnsaas_password__: { get_param: dnsaas_password }
392 __mr_ip_addr__: { get_param: mr_k8s_ip_addr }
393 __policy_ip_addr__: { get_param: policy_k8s_ip_addr }
394 __sdc_ip_addr__: { get_param: sdc_k8s_ip_addr }
395 __openo_ip_addr__: { get_param: openo_k8s_ip_addr }
396 __aai1_ip_addr__: { get_param: aai1_k8s_ip_addr }
397 __aai2_ip_addr__: { get_param: aai2_k8s_ip_addr }
399 __dns_floating_ip_addr__: { get_param: dns_ip_addr }
400 __aai1_floating_ip_addr__: { get_param: aai1_k8s_ip_addr }
401 __aai2_floating_ip_addr__: { get_param: aai1_k8s_ip_addr }
402 __mrouter_floating_ip_addr__: { get_param: mr_k8s_ip_addr }
403 __sdc_floating_ip_addr__: { get_param: sdc_k8s_ip_addr }
404 __policy_floating_ip_addr__: { get_param: policy_k8s_ip_addr }
405 __openo_floating_ip_addr__: { get_param: openo_k8s_ip_addr }
406 __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
411 # Create configuration files
413 echo "__rand_str__" > /opt/config/dcae_zone.txt
414 echo "__rand_str__" > /opt/config/rand_str.txt
416 echo "__docker_version__" > /opt/config/docker_version.txt
417 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
418 echo "__nexus_repo__" > /opt/config/nexus_repo.txt
419 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
420 echo "__nexus_username__" > /opt/config/nexus_username.txt
421 echo "__nexus_password__" > /opt/config/nexus_password.txt
422 echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
423 # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
424 echo "__mac_addr__" > /opt/config/mac_addr.txt
425 echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
426 echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
427 echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
428 echo "__external_dns__" > /opt/config/external_dns.txt
429 echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
430 echo "__dcae_domain__" > /opt/config/dcae_domain.txt
431 # conf for the OpenStack env where DCAE is deployed
432 echo "__openstack_keystone_url__" > /opt/config/openstack_keystone_url.txt
433 echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
434 echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
435 echo "__dcaeos_region__" > /opt/config/openstack_region.txt
436 echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
437 echo "__dcaeos_tenant_name__" > /opt/config/tenant_name.txt
438 echo "__dcaeos_username__" > /opt/config/openstack_user.txt
439 echo "__dcaeos_password__" > /opt/config/openstack_password.txt
440 echo "__dcaeos_key_name__" > /opt/config/key_name.txt
441 echo "__dcaeos_public_key__" > /opt/config/pub_key.txt
442 echo "__dcaeos_private_key__" > /opt/config/priv_key
443 echo "__dcaeos_private_network_name__" > /opt/config/openstack_private_network_name.txt
444 echo "__dcaeos_public_network_name__" > /opt/config/public_net_name.txt
445 echo "__dcaeos_public_network_name__" > /opt/config/public_net_id.txt
446 echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
447 echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
448 echo "__dcaeos_security_group__" > /opt/config/security_group.txt
449 echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
450 echo "__dcaeos_flavor_id_cdap__" > /opt/config/flavor_id_cdap.txt
451 echo "__dcaeos_dnsaas_config_enabled__" > /opt/config/dnsaas_config_enabled.txt
452 echo "__dcaeos_dnsaas_region__" > /opt/config/dnsaas_region.txt
453 echo "__dcaeos_dnsaas_keystone_url__" > /opt/config/dnsaas_keystone_url.txt
454 echo "__dnsaas_tenant_name__" > /opt/config/dnsaas_tenant_name.txt
455 echo "__dcaeos_dnsaas_username__" > /opt/config/dnsaas_username.txt
456 echo "__dcaeos_dnsaas_password__" > /opt/config/dnsaas_password.txt
457 # fixed private IP addresses of other ONAP components
458 echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
459 echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
460 echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
461 echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
462 echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
463 echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
465 echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
466 echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
467 echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
468 echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
469 echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
470 echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
471 echo "__openo_floating_ip_addr__" > /opt/config/openo_floating_ip_addr.txt
472 echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
474 # Download and run install script
475 curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae2_install.sh -o /opt/dcae2_install.sh
477 chmod +x dcae2_install.sh
478 ./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
482 description: DCAE Boostrap container external IP Address
483 value: { get_attr: [ dcae_c_floating_ip, floating_ip_address ] }