Refactor ONAP HEAT template config scripts
[demo.git] / heat / ONAP / onap_openstack.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4 #
5 #
6 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7 #
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
12 #
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.
18 #
19 #==================LICENSE_END============================================
20 #
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 #
23 ##########################################################################
24
25 heat_template_version: 2015-10-15
26
27 description: Heat template to install ONAP components
28
29 ##############
30 #            #
31 # PARAMETERS #
32 #            #
33 ##############
34
35 parameters:
36
37   ##############################################
38   #                                            #
39   # Parameters used across all ONAP components #
40   #                                            #
41   ##############################################
42
43   public_net_id:
44     type: string
45     description: The ID of the Public network for floating IP address allocation
46
47   public_net_name:
48     type: string
49     description: The name of the Public network referred by public_net_id
50
51   ubuntu_1404_image:
52     type: string
53     description: Name of the Ubuntu 14.04 image
54
55   ubuntu_1604_image:
56     type: string
57     description: Name of the Ubuntu 16.04 image
58
59   flavor_small:
60     type: string
61     description: Name of the Small Flavor supported by the cloud provider
62
63   flavor_medium:
64     type: string
65     description: Name of the Medium Flavor supported by the cloud provider
66
67   flavor_large:
68     type: string
69     description: Name of the Large Flavor supported by the cloud provider
70
71   flavor_xlarge:
72     type: string
73     description: Name of the Extra Large Flavor supported by the cloud provider
74
75   vm_base_name:
76     type: string
77     description: Base name of ONAP VMs
78
79   key_name:
80     type: string
81     description: Public/Private key pair name
82
83   pub_key:
84     type: string
85     description: Public key to be installed on the compute instance
86
87   nexus_artifact_repo:
88     type: string
89     description: Complete URL for the Nexus repository for Maven artifacts.
90     default: "https://nexus.onap.org"
91
92   nexus_docker_repo:
93     type: string
94     description: Complete URL for the Nexus repository for docker images.
95
96   nexus_username:
97     type: string
98     description: Nexus Repository username
99
100   nexus_password:
101     type: string
102     description: Nexus Repository Password
103
104   artifacts_version:
105     type: string
106     description: Artifacts version of ONAP components
107
108   dmaap_topic:
109     type: string
110     description: DMaaP Topic name
111
112   openstack_tenant_id:
113     type: string
114     description: OpenStack tenant ID
115
116   openstack_tenant_name:
117     type: string
118     description: OpenStack tenant name (matching with the openstack_tenant_id)
119
120   openstack_username:
121     type: string
122     description: OpenStack username
123
124   openstack_auth_method:
125     type: string
126     description: OpenStack authentication method (password VS. api-key)
127
128   openstack_api_key:
129     type: string
130     description: OpenStack password or API Key
131
132   keystone_url:
133     type: string
134     description: URL of OpenStack Keystone
135
136   cloud_env:
137     type: string
138     description: Cloud Provider Name in lower case
139
140   openstack_region:
141     type: string
142     description: Region where the DCAE controller will spin the VMs
143
144   http_proxy:
145     type: string
146     description: http proxy address
147     default: 'no_proxy'
148
149   https_proxy:
150     type: string
151     description: https proxy address
152     default: 'no_proxy'
153
154   ######################
155   #                    #
156   # Network parameters #
157   #                    #
158   ######################
159
160   dns_list:
161     type: comma_delimited_list
162     description: List of External DNS for OAM ONAP network
163
164   external_dns:
165     type: string
166     description: Public IP of the external DNS for ONAP network
167
168   dns_forwarder:
169     type: string
170     description: the forwarder address for setting up ONAP's private DNS server
171
172   oam_network_cidr:
173     type: string
174     description: CIDR of the OAM ONAP network
175
176   use_oam_net_for_robot:
177     type: boolean
178     description: Whether to use oam_network for Robot VNFs or not.  The default is false, which uses public_net_id.  Set to true if the Robot VNFs are unable to bind to the public network (needed by TLAB).
179     default: false
180
181   ### Private IP addresses ###
182   aai1_ip_addr:
183     type: string
184   aai2_ip_addr:
185     type: string
186   appc_ip_addr:
187     type: string
188   dcae_ip_addr:
189     type: string
190   dns_ip_addr:
191     type: string
192   so_ip_addr:
193     type: string
194   mr_ip_addr:
195     type: string
196   policy_ip_addr:
197     type: string
198   portal_ip_addr:
199     type: string
200   robot_ip_addr:
201     type: string
202   sdc_ip_addr:
203     type: string
204   sdnc_ip_addr:
205     type: string
206   vid_ip_addr:
207     type: string
208   clamp_ip_addr:
209     type: string
210   openo_ip_addr:
211     type: string
212   music_ip_addr:
213     type: string
214   oof_ip_addr:
215     type: string
216   aaf_ip_addr:
217     type: string
218   sms_ip_addr:
219     type: string
220   nbi_ip_addr:
221     type: string
222
223   ###########################
224   #                         #
225   # Parameters used by DCAE #
226   #                         #
227   ###########################
228
229   dcae_deployment_profile:
230     type: string
231     default: R2
232     description: DCAE deployment profile.  Currently supported profiles R2, R2MVP, and R2PLUS.
233
234   dnsaas_config_enabled:
235     type: string
236     default: ""
237     description: (deprecated in R2) whether the DNSaaS configuration section is enabled
238
239   dnsaas_region:
240     type: string
241     default: ""
242     description: (deprecated in R2) the region of the cloud instance providing the Designate DNS as a Service
243
244   dnsaas_keystone_url:
245     type: string
246     default: ""
247     description: (deprecated in R2) the keystone URL of the cloud instance providing the Designate DNS as a Service
248
249   dnsaas_username:
250     type: string
251     default: ""
252     description: (deprecated in R2) the username of the cloud instance providing the Designate DNS as a Service
253
254   dnsaas_password:
255     type: string
256     default: ""
257     description: (deprecated in R2) the password of the cloud instance providing the Designate DNS as a Service
258
259   dnsaas_tenant_name:
260     type: string
261     default: ""
262     description: (deprecated in R2) the name of the tenant in the cloud instance providing the Designate DNS as a Service
263
264   dcae_keystone_url:
265     type: string
266     default: ""
267     description: (deprecated in R2) the keystone URL for DCAE to use (via MultiCloud)
268
269   dcae_private_key:
270     type: string
271     default: ""
272     description: (deprecated in R2) the private key of the key-apir used between the DCAE bootstrap container and DCAE VMs
273
274   dcae_public_key:
275     type: string
276     default: ""
277     description: (deprecated in R2) the prublic key of the key-apir used between the DCAE bootstrap container and DCAE VMs
278
279   dcae_centos_7_image:
280     type: string
281     default: ""
282     description: (deprecated in R2) the id/name of the CentOS 7 VM imange
283
284   dcae_domain:
285     type: string
286     default: ""
287     description: (deprecated in R2) the top level domain to register DCAE VMs (the zone will be random-str.dcae_domain)
288
289   #####################
290   #                   #
291   # ONAP repositories #
292   #                   #
293   #####################
294
295   aai_repo:
296     type: string
297   appc_repo:
298     type: string
299   mr_repo:
300     type: string
301   so_repo:
302     type: string
303   policy_repo:
304     type: string
305   portal_repo:
306     type: string
307   sdc_repo:
308     type: string
309   sdnc_repo:
310     type: string
311   vid_repo:
312     type: string
313   clamp_repo:
314     type: string
315   vnfsdk_repo:
316     type: string
317   music_repo:
318     type: string
319   nbi_repo:
320     type: string
321   aaf_repo:
322     type: string
323   sms_repo:
324     type: string
325   oof_repo:
326     type: string
327
328   ################################
329   #                              #
330   # Docker versions and branches #
331   #                              #
332   ################################
333
334   aai_docker:
335     type: string
336   appc_docker:
337     type: string
338   so_docker:
339     type: string
340
341   dcae_docker:
342     type: string
343     default: latest
344   dcae_snmptrap_docker:
345     type: string
346     default: latest
347     description: Docker image version for onap/org.dcaegen2.collectors.snmptrap
348   dcae_ves_docker:
349     type: string
350     default: latest
351     description: Docker image version for onap/org.dcaegen2.collectors.ves.vescollector
352   dcae_bootstrap_docker:
353     type: string
354     default: latest
355     description: Docker image version for onap/org.dcaegen2.deployments.bootstrap
356   dcae_cm_docker:
357     type: string
358     default: latest
359     description: Docker image version for onap/org.dcaegen2.deployments.cm-container
360   dcae_k8sbootstrap_docker:
361     type: string
362     default: latest
363     description: Docker image version for onap/org.dcaegen2.deployments.k8s-bootstrap-container
364   dcae_redisc_docker:
365     type: string
366     default: latest
367     description: Docker image version for onap/org.dcaegen2.deployments.redis-cluster-container
368   dcae_tca_docker:
369     type: string
370     default: latest
371     description: Docker image version for onap/org.dcaegen2.deployments.tca-cdap-container
372   dcae_cb_docker:
373     type: string
374     default: latest
375     description: Docker image version for onap/org.dcaegen2.platform.cdapbroker
376   dcae_cbs_docker:
377     type: string
378     default: latest
379     description: Docker image version for onap/org.dcaegen2.platform.configbinding
380   dcae_dh_docker:
381     type: string
382     default: latest
383     description: Docker image version for onap/org.dcaegen2.platform.deployment-handler
384   dcae_inv_docker:
385     type: string
386     default: latest
387     description: Docker image version for onap/org.dcaegen2.platform.inventory-api
388   dcae_ph_docker:
389     type: string
390     default: latest
391     description: Docker image version for onap/org.dcaegen2.platform.deployment-handler
392   dcae_sch_docker:
393     type: string
394     default: latest
395     description: Docker image version for onap/org.dcaegen2.platform.servicechange-handler
396   dcae_heartbeat_docker:
397     type: string
398     default: latest
399     description: Docker image version for onap/org.dcaegen2.services.heartbeat
400   dcae_prh_docker:
401     type: string
402     default: latest
403     description: Docker image version for onap/org.dcaegen2.services.prh.prh-app-server
404   holmes_em_docker:
405     type: string
406     default: latest
407     description: Docker image version for onap/holmes/engine-management
408   holmes_rm_docker:
409     type: string
410     default: latest
411     description: Docker image version for onap/holmes/rule-management
412
413   policy_docker:
414     type: string
415   portal_docker:
416     type: string
417   robot_docker:
418     type: string
419   sniro_docker:
420     type: string
421   sdc_docker:
422     type: string
423   sdc_wfd_docker:
424     type: string
425   sdnc_docker:
426     type: string
427   vid_docker:
428     type: string
429   clamp_docker:
430     type: string
431   msb_docker:
432     type: string
433   mvim_docker:
434     type: string
435   mvim_openstack_docker:
436     type: string
437   uui_docker:
438     type: string
439   esr_docker:
440     type: string
441   dgbuilder_docker:
442     type: string
443   cli_docker:
444     type: string
445   music_docker:
446     type: string
447   cassandra_music_docker:
448     type: string
449   optf_has_docker:
450     type: string
451   optf_osdf_docker:
452     type: string
453   aaf_docker:
454     type: string
455   sms_docker:
456     type: string
457   nbi_docker:
458     type: string
459   dbcl_docker:
460     type: string
461
462   vfc_nokia_docker:
463     type: string
464   vfc_nokiav2_docker:
465     type: string
466   vfc_ztevnfmdriver_docker:
467     type: string
468   vfc_ztesdncdriver_docker:
469     type: string
470   vfc_vnfres_docker:
471     type: string
472   vfc_vnfmgr_docker:
473     type: string
474   vfc_vnflcm_docker:
475     type: string
476   vfc_resmanagement_docker:
477     type: string
478   vfc_nslcm_docker:
479     type: string
480   vfc_huawei_docker:
481     type: string
482   vfc_jujudriver_docker:
483     type: string
484   vfc_gvnfmdriver_docker:
485     type: string
486   vfc_emsdriver_docker:
487     type: string
488   vfc_catalog_docker:
489     type: string
490   vfc_wfengine_mgrservice_docker:
491     type: string
492   vfc_wfengine_activiti_docker:
493     type: string
494   vfc_multivimproxy_docker:
495     type: string
496
497   aai_branch:
498     type: string
499   appc_branch:
500     type: string
501   so_branch:
502     type: string
503   mr_branch:
504     type: string
505   policy_branch:
506     type: string
507   portal_branch:
508     type: string
509   sdc_branch:
510     type: string
511   sdnc_branch:
512     type: string
513   vid_branch:
514     type: string
515   clamp_branch:
516     type: string
517   vnfsdk_branch:
518     type: string
519   music_branch:
520     type: string
521   nbi_branch:
522     type: string
523   aaf_branch:
524     type: string
525   sms_branch:
526     type: string
527   oof_branch:
528     type: string
529
530 #############
531 #           #
532 # RESOURCES #
533 #           #
534 #############
535
536 resources:
537   random-str:
538     type: OS::Heat::RandomString
539     properties:
540       length: 4
541
542   # Public key used to access ONAP components
543   vm_key:
544     type: OS::Nova::KeyPair
545     properties:
546       name:
547         str_replace:
548           template: base_rand
549           params:
550             base: { get_param: key_name }
551             rand: { get_resource: random-str }
552       public_key: { get_param: pub_key }
553       save_private_key: false
554
555
556   # ONAP security group
557   onap_sg:
558     type: OS::Neutron::SecurityGroup
559     properties:
560       name:
561         str_replace:
562           template: base_rand
563           params:
564             base: onap_sg
565             rand: { get_resource: random-str }
566       description: security group used by ONAP
567       rules:
568         # All egress traffic
569         - direction: egress
570           ethertype: IPv4
571         - direction: egress
572           ethertype: IPv6
573         # ingress traffic
574         # ICMP
575         - protocol: icmp
576         - protocol: udp
577           port_range_min: 1
578           port_range_max: 65535
579         - protocol: tcp
580           port_range_min: 1
581           port_range_max: 65535
582         # Protocols used for vLB/vDNS use case
583         - protocol: 47
584         - protocol: 53
585         - protocol: 132
586
587
588   # ONAP management private network
589   oam_onap:
590     type: OS::Neutron::Net
591     properties:
592       name:
593         str_replace:
594           template: oam_onap_rand
595           params:
596             rand: { get_resource: random-str }
597
598   oam_onap_subnet:
599     type: OS::Neutron::Subnet
600     properties:
601       name:
602         str_replace:
603           template: oam_onap_rand
604           params:
605             rand: { get_resource: random-str }
606       network_id: { get_resource: oam_onap }
607       cidr: { get_param: oam_network_cidr }
608       dns_nameservers: { get_param: dns_list }
609
610   router:
611     type: OS::Neutron::Router
612     properties:
613       external_gateway_info:
614         network: { get_param: public_net_id }
615
616   router_interface:
617     type: OS::Neutron::RouterInterface
618     properties:
619       router_id: { get_resource: router }
620       subnet_id: { get_resource: oam_onap_subnet }
621
622
623   common_config_script:
624     type: OS::Heat::SoftwareConfig
625     properties:
626       group: ungrouped
627       config:
628         str_replace:
629           params:
630             __artifacts_version__: { get_param: artifacts_version }
631             __cloud_env__: { get_param: cloud_env }
632             __dns_ip_addr__: { get_param: dns_ip_addr }
633             __external_dns__: { get_param: external_dns }
634             __http_proxy__: { get_param: http_proxy }
635             __https_proxy__: { get_param: https_proxy }
636             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
637             __nexus_docker_repo__: { get_param: nexus_docker_repo }
638             __nexus_username__: { get_param: nexus_username }
639             __nexus_password__: { get_param: nexus_password }
640             __openstack_username__: { get_param: openstack_username }
641             __openstack_tenant_id__: { get_param: openstack_tenant_id }
642             __openstack_api_key__: { get_param: openstack_api_key }
643             __openstack_region__: { get_param: openstack_region }
644           template: |
645             #!/bin/bash
646
647             # Create configuration files
648             mkdir -p /opt/config
649             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
650             echo "__cloud_env__" > /opt/config/cloud_env.txt
651             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
652             echo "__external_dns__" > /opt/config/external_dns.txt
653             echo "__http_proxy__" > /opt/config/http_proxy.txt
654             echo "__https_proxy__" > /opt/config/https_proxy.txt
655             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
656             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
657             echo "__nexus_password__" > /opt/config/nexus_password.txt
658             echo "__nexus_username__" > /opt/config/nexus_username.txt
659             echo "__openstack_username__" > /opt/config/openstack_username.txt
660             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
661             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
662             echo "__openstack_region__" > /opt/config/openstack_region.txt
663
664             if [ __http_proxy__ != "no_proxy" ]
665             then
666               echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
667               echo "{" >> /etc/apt/apt.conf.d/apt.conf
668               echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
669               echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
670               echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
671               echo "};" >> /etc/apt/apt.conf.d/apt.conf
672
673               export http_proxy=__http_proxy__
674               export https_proxy=__https_proxy__
675             fi
676
677             # Download and run install script
678             apt update
679             apt-get -y install unzip
680             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
681             while [ ! -s /opt/boot-__artifacts_version__.zip ]; do
682               curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
683             done
684             ln -s /opt/boot-__artifacts_version__.zip /opt/boot.zip
685
686
687   # DNS Server instantiation
688   dns_private_port:
689     type: OS::Neutron::Port
690     properties:
691       network: { get_resource: oam_onap }
692       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
693       security_groups:
694       - { get_resource: onap_sg }
695
696   dns_floating_ip:
697     type: OS::Neutron::FloatingIP
698     properties:
699       floating_network_id: { get_param: public_net_id }
700       port_id: { get_resource: dns_private_port }
701
702   dns_vm:
703     type: OS::Nova::Server
704     properties:
705       image: { get_param: ubuntu_1604_image }
706       flavor: { get_param: flavor_small }
707       name:
708         str_replace:
709           template: base-dns-server
710           params:
711             base: { get_param: vm_base_name }
712       key_name: { get_resource: vm_key }
713       networks:
714         - port: { get_resource: dns_private_port }
715       user_data_format: SOFTWARE_CONFIG
716       user_data: { get_resource: dns_vm_config }
717
718   dns_vm_scripts:
719     type: OS::Heat::CloudConfig
720     properties:
721       cloud_config:
722         write_files:
723         - path: /opt/dns_install.sh
724           permissions: '0755'
725           content: { get_file: cloud-config/dns_install.sh }
726
727   dns_vm_config:
728     type: OS::Heat::MultipartMime
729     properties:
730       parts:
731       - config: { get_resource: common_config_script }
732       - config: { get_resource: dns_vm_scripts }
733       - config:
734           str_replace:
735             params:
736               __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
737               __aai1_ip_addr__: { get_param: aai1_ip_addr }
738               __aai2_ip_addr__: { get_param: aai2_ip_addr }
739               __appc_ip_addr__: { get_param: appc_ip_addr }
740               __dcae_ip_addr__: { get_param: dcae_ip_addr }
741               __so_ip_addr__: { get_param: so_ip_addr }
742               __mr_ip_addr__: { get_param: mr_ip_addr }
743               __policy_ip_addr__: { get_param: policy_ip_addr }
744               __portal_ip_addr__: { get_param: portal_ip_addr }
745               __robot_ip_addr__: { get_param: robot_ip_addr }
746               __sdc_ip_addr__: { get_param: sdc_ip_addr }
747               __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
748               __vid_ip_addr__: { get_param: vid_ip_addr }
749               __clamp_ip_addr__: { get_param: clamp_ip_addr }
750               __openo_ip_addr__: { get_param: openo_ip_addr }
751               __music_ip_addr__: { get_param: music_ip_addr }
752               __oof_ip_addr__: { get_param: oof_ip_addr }
753               __aaf_ip_addr__: { get_param: aaf_ip_addr }
754               __sms_ip_addr__: { get_param: sms_ip_addr }
755               __nbi_ip_addr__: { get_param: nbi_ip_addr }
756               __dns_forwarder__: { get_param: dns_forwarder }
757             template: |
758               #!/bin/bash
759
760               # Create configuration files
761               echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
762               echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
763               echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
764               echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
765               echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
766               echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
767               echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
768               echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
769               echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
770               echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
771               echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
772               echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
773               echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
774               echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
775               echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
776               echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
777               echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
778               echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
779               echo "__sms_ip_addr__" > /opt/config/sms_ip_addr.txt
780               echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
781               echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
782
783               cd /opt
784               ./dns_install.sh
785
786
787   # A&AI instantiation (2 VMs)
788   aai1_private_port:
789     type: OS::Neutron::Port
790     properties:
791       network: { get_resource: oam_onap }
792       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
793       security_groups:
794       - { get_resource: onap_sg }
795
796   aai1_floating_ip:
797     type: OS::Neutron::FloatingIP
798     properties:
799       floating_network_id: { get_param: public_net_id }
800       port_id: { get_resource: aai1_private_port }
801
802   aai1_vm:
803     type: OS::Nova::Server
804     depends_on: aai2_vm
805     properties:
806       image: { get_param: ubuntu_1604_image }
807       flavor: { get_param: flavor_xlarge }
808       name:
809         str_replace:
810           template: base-aai-inst1
811           params:
812             base: { get_param: vm_base_name }
813       key_name: { get_resource: vm_key }
814       networks:
815         - port: { get_resource: aai1_private_port }
816       user_data_format: SOFTWARE_CONFIG
817       user_data: { get_resource: aai1_vm_config }
818
819   aai1_vm_scripts:
820     type: OS::Heat::CloudConfig
821     properties:
822       cloud_config:
823         write_files:
824         - path: /opt/aai_install.sh
825           permissions: '0755'
826           content: { get_file: cloud-config/aai_install.sh }
827
828   aai1_vm_config:
829     type: OS::Heat::MultipartMime
830     properties:
831       parts:
832       - config: { get_resource: common_config_script }
833       - config: { get_resource: aai1_vm_scripts }
834       - config:
835           str_replace:
836             params:
837               __dmaap_topic__: { get_param: dmaap_topic }
838               __docker_version__: { get_param: aai_docker }
839               __gerrit_branch__: { get_param: aai_branch }
840               __aai_repo__: { get_param: aai_repo }
841             template: |
842               #!/bin/bash
843
844               # Create configuration files
845               echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
846               echo "__docker_version__" > /opt/config/docker_version.txt
847               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
848               echo "aai_instance_1" > /opt/config/aai_instance.txt
849               echo "__aai_repo__" > /opt/config/remote_repo.txt
850
851               cd /opt
852               ./aai_install.sh
853
854
855   aai2_private_port:
856     type: OS::Neutron::Port
857     properties:
858       network: { get_resource: oam_onap }
859       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
860       security_groups:
861       - { get_resource: onap_sg }
862
863   aai2_floating_ip:
864     type: OS::Neutron::FloatingIP
865     properties:
866       floating_network_id: { get_param: public_net_id }
867       port_id: { get_resource: aai2_private_port }
868
869   aai2_vm:
870     type: OS::Nova::Server
871     properties:
872       image: { get_param: ubuntu_1604_image }
873       flavor: { get_param: flavor_xlarge }
874       name:
875         str_replace:
876           template: base-aai-inst2
877           params:
878             base: { get_param: vm_base_name }
879       key_name: { get_resource: vm_key }
880       networks:
881         - port: { get_resource: aai2_private_port }
882       user_data_format: SOFTWARE_CONFIG
883       user_data: { get_resource: aai2_vm_config }
884
885   aai2_vm_scripts:
886     type: OS::Heat::CloudConfig
887     properties:
888       cloud_config:
889         write_files:
890         - path: /opt/aai_install.sh
891           permissions: '0755'
892           content: { get_file: cloud-config/aai_install.sh }
893
894   aai2_vm_config:
895     type: OS::Heat::MultipartMime
896     properties:
897       parts:
898       - config: { get_resource: common_config_script }
899       - config: { get_resource: aai2_vm_scripts }
900       - config:
901           str_replace:
902             params:
903               __dmaap_topic__: { get_param: dmaap_topic }
904               __docker_version__: { get_param: aai_docker }
905               __gerrit_branch__: { get_param: aai_branch }
906               __aai_repo__: { get_param: aai_repo }
907             template: |
908               #!/bin/bash
909
910               # Create configuration files
911               echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
912               echo "__docker_version__" > /opt/config/docker_version.txt
913               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
914               echo "aai_instance_2" > /opt/config/aai_instance.txt
915               echo "__aai_repo__" > /opt/config/remote_repo.txt
916
917               cd /opt
918               ./aai_install.sh
919
920
921   # SO instantiation
922   so_private_port:
923     type: OS::Neutron::Port
924     properties:
925       network: { get_resource: oam_onap }
926       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: so_ip_addr }}]
927       security_groups:
928       - { get_resource: onap_sg }
929
930   so_floating_ip:
931     type: OS::Neutron::FloatingIP
932     properties:
933       floating_network_id: { get_param: public_net_id }
934       port_id: { get_resource: so_private_port }
935
936   so_vm:
937     type: OS::Nova::Server
938     properties:
939       image: { get_param: ubuntu_1604_image }
940       flavor: { get_param: flavor_large }
941       name:
942         str_replace:
943           template: base-so
944           params:
945             base: { get_param: vm_base_name }
946       key_name: { get_resource: vm_key }
947       networks:
948         - port: { get_resource: so_private_port }
949       user_data_format: SOFTWARE_CONFIG
950       user_data: { get_resource: so_vm_config }
951
952   so_vm_scripts:
953     type: OS::Heat::CloudConfig
954     properties:
955       cloud_config:
956         write_files:
957         - path: /opt/so_install.sh
958           permissions: '0755'
959           content: { get_file: cloud-config/so_install.sh }
960
961   so_vm_config:
962     type: OS::Heat::MultipartMime
963     properties:
964       parts:
965       - config: { get_resource: common_config_script }
966       - config: { get_resource: so_vm_scripts }
967       - config:
968           str_replace:
969             params:
970               __keystone_url__: { get_param: keystone_url }
971               __dmaap_topic__: { get_param: dmaap_topic }
972               __openo_ip__: { get_param: openo_ip_addr }
973               __docker_version__: { get_param: so_docker }
974               __gerrit_branch__: { get_param: so_branch }
975               __so_repo__: { get_param: so_repo }
976             template: |
977               #!/bin/bash
978
979               # Create configuration files
980               echo "__openo_ip__" > /opt/config/openo_ip.txt
981               echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
982               ln -s /opt/config/openstack_tenant_id.txt /opt/config/tenant_id.txt
983               echo "__keystone_url__" > /opt/config/keystone.txt
984               echo "__docker_version__" > /opt/config/docker_version.txt
985               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
986               echo "__so_repo__" > /opt/config/remote_repo.txt
987
988               cd /opt
989               ./so_install.sh
990
991
992   # Message Router instantiation
993   mrouter_private_port:
994     type: OS::Neutron::Port
995     properties:
996       network: { get_resource: oam_onap }
997       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
998       security_groups:
999       - { get_resource: onap_sg }
1000
1001   mrouter_floating_ip:
1002     type: OS::Neutron::FloatingIP
1003     properties:
1004       floating_network_id: { get_param: public_net_id }
1005       port_id: { get_resource: mrouter_private_port }
1006
1007   mrouter_vm:
1008     type: OS::Nova::Server
1009     properties:
1010       image: { get_param: ubuntu_1604_image }
1011       flavor: { get_param: flavor_large }
1012       name:
1013         str_replace:
1014           template: base-message-router
1015           params:
1016             base: { get_param: vm_base_name }
1017       key_name: { get_resource: vm_key }
1018       networks:
1019         - port: { get_resource: mrouter_private_port }
1020       user_data_format: SOFTWARE_CONFIG
1021       user_data: { get_resource: mrouter_vm_config }
1022
1023   mrouter_vm_scripts:
1024     type: OS::Heat::CloudConfig
1025     properties:
1026       cloud_config:
1027         write_files:
1028         - path: /opt/mr_install.sh
1029           permissions: '0755'
1030           content: { get_file: cloud-config/mr_install.sh }
1031
1032   mrouter_vm_config:
1033     type: OS::Heat::MultipartMime
1034     properties:
1035       parts:
1036       - config: { get_resource: common_config_script }
1037       - config: { get_resource: mrouter_vm_scripts }
1038       - config:
1039           str_replace:
1040             params:
1041               __gerrit_branch__: { get_param: mr_branch }
1042               __mr_repo__: { get_param: mr_repo }
1043               __dbcl_docker__: { get_param: dbcl_docker }
1044             template: |
1045               #!/bin/bash
1046
1047               # Create configuration files
1048               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1049               echo "__mr_repo__" > /opt/config/remote_repo.txt
1050               echo "__dbcl_docker__" > /opt/config/docker_version.txt
1051
1052               cd /opt
1053               ./mr_install.sh
1054
1055
1056   # Robot Framework instantiation
1057   robot_private_port:
1058     type: OS::Neutron::Port
1059     properties:
1060       network: { get_resource: oam_onap }
1061       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
1062       security_groups:
1063       - { get_resource: onap_sg }
1064
1065   robot_floating_ip:
1066     type: OS::Neutron::FloatingIP
1067     properties:
1068       floating_network_id: { get_param: public_net_id }
1069       port_id: { get_resource: robot_private_port }
1070
1071   robot_vm:
1072     type: OS::Nova::Server
1073     properties:
1074       image: { get_param: ubuntu_1604_image }
1075       flavor: { get_param: flavor_medium }
1076       name:
1077         str_replace:
1078           template: base-robot
1079           params:
1080             base: { get_param: vm_base_name }
1081       key_name: { get_resource: vm_key }
1082       networks:
1083         - port: { get_resource: robot_private_port }
1084       user_data_format: SOFTWARE_CONFIG
1085       user_data: { get_resource: robot_vm_config }
1086
1087   robot_vm_scripts:
1088     type: OS::Heat::CloudConfig
1089     properties:
1090       cloud_config:
1091         write_files:
1092         - path: /opt/robot_install.sh
1093           permissions: '0755'
1094           content: { get_file: cloud-config/robot_install.sh }
1095
1096   robot_vm_config:
1097     type: OS::Heat::MultipartMime
1098     properties:
1099       parts:
1100       - config: { get_resource: common_config_script }
1101       - config: { get_resource: robot_vm_scripts }
1102       - config:
1103           str_replace:
1104             params:
1105               __network_name__: { get_attr: [oam_onap, name] }
1106               __keystone_url__: { get_param: keystone_url }
1107               __aai1_ip_addr__: { get_param: aai1_ip_addr }
1108               __aai2_ip_addr__: { get_param: aai2_ip_addr }
1109               __appc_ip_addr__: { get_param: appc_ip_addr }
1110               __dcae_ip_addr__: { get_param: dcae_ip_addr }
1111               __dcae_collector_ip__: { get_param: dcae_ip_addr }
1112               __so_ip_addr__: { get_param: so_ip_addr }
1113               __mr_ip_addr__: { get_param: mr_ip_addr }
1114               __policy_ip_addr__: { get_param: policy_ip_addr }
1115               __portal_ip_addr__: { get_param: portal_ip_addr }
1116               __sdc_ip_addr__: { get_param: sdc_ip_addr }
1117               __sdc_fe_ip_addr__: { get_param: sdc_ip_addr }
1118               __sdc_be_ip_addr__: { get_param: sdc_ip_addr }
1119               __sdc_be_onboard_ip_addr__: { get_param: sdc_ip_addr }
1120               __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1121               __vid_ip_addr__: { get_param: vid_ip_addr }
1122               __clamp_ip_addr__: { get_param: clamp_ip_addr }
1123               __openo_ip_addr__: { get_param: openo_ip_addr }
1124               __music_ip_addr__: { get_param: music_ip_addr }
1125               __oof_ip_addr__: { get_param: oof_ip_addr }
1126               __aaf_ip_addr__: { get_param: aaf_ip_addr }
1127               __nbi_ip_addr__: { get_param: nbi_ip_addr }
1128               __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1129               __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1130               __vm_image_name__: { get_param: ubuntu_1404_image }
1131               __vm_flavor__: { get_param: flavor_medium }
1132               __public_net_id__: { get_param: public_net_id }
1133               __oam_network_id__: { get_resource: oam_onap }
1134               __script_version__: { get_param: artifacts_version }
1135               __docker_version__: { get_param: robot_docker }
1136               __sniro_docker_version__: { get_param: sniro_docker }
1137               __vnf_pub_key__: { get_param: pub_key }
1138               __use_oam_net_for_robot__: { get_param: use_oam_net_for_robot }
1139             template: |
1140               #!/bin/bash
1141
1142               # Create configuration files
1143               echo "__network_name__" > /opt/config/network.txt
1144               ln -s /opt/config/openstack_region.txt /opt/config/region.txt
1145               echo "__docker_version__" > /opt/config/docker_version.txt
1146               echo "__sniro_docker_version__" > /opt/config/sniro_docker_version.txt
1147               echo "__keystone_url__" > /opt/config/keystone.txt
1148               echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
1149               echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
1150               echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
1151               echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1152               echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
1153               echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
1154               echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1155               echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1156               echo "__policy_ip_addr__" > /opt/config/policy_healthcheck_ip_addr.txt
1157               echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
1158               echo "__portal_ip_addr__" > /opt/config/cli_ip_addr.txt
1159               echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1160               echo "__sdc_fe_ip_addr__" > /opt/config/sdc_fe_ip_addr.txt
1161               echo "__sdc_be_ip_addr__" > /opt/config/sdc_be_ip_addr.txt
1162               echo "__sdc_be_onboard_ip_addr__" > /opt/config/sdc_be_onboard_ip_addr.txt
1163               echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
1164               echo "__sdnc_ip_addr__" > /opt/config/sdnc_portal_ip_addr.txt
1165               echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
1166               echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
1167               echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
1168               echo "__openo_ip_addr__" > /opt/config/vnfsdk_ip_addr.txt
1169               echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
1170               echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
1171               echo "__oof_ip_addr__" > /opt/config/oof_homing_ip_addr.txt
1172               echo "__oof_ip_addr__" > /opt/config/oof_sniro_ip_addr.txt
1173               echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
1174               echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
1175               echo "__vm_flavor__" > /opt/config/vm_flavor.txt
1176               echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1177               echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1178               echo "__vm_image_name__" > /opt/config/vm_image_name.txt
1179               echo "__script_version__" > /opt/config/script_version.txt
1180               if [ "__use_oam_net_for_robot__" != "False" ] && [ "__use_oam_net_for_robot__" != "false" ]; then
1181                 echo "__oam_network_id__" > /opt/config/public_net_id.txt
1182               else
1183                 echo "__public_net_id__" > /opt/config/public_net_id.txt
1184               fi
1185               echo "__oam_network_id__" > /opt/config/oam_network_id.txt
1186               echo "__use_oam_net_for_robot__" > /opt/config/use_oam_net_for_robot.txt
1187               echo "__vnf_pub_key__" > /opt/config/vnf_pub_key.txt
1188               echo "localhost" > /opt/config/log_elasticsearch_ip_addr.txt # these tests will be skipped by robot
1189               echo "localhost" > /opt/config/log_logstash_ip_addr.txt # these tests will be skipped by robot
1190               echo "localhost" > /opt/config/log_kibana_ip_addr.txt # these tests will be skipped by robot
1191
1192               cd /opt
1193               ./robot_install.sh
1194
1195
1196   # VID instantiation
1197   vid_private_port:
1198     type: OS::Neutron::Port
1199     properties:
1200       network: { get_resource: oam_onap }
1201       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
1202       security_groups:
1203       - { get_resource: onap_sg }
1204
1205   vid_floating_ip:
1206     type: OS::Neutron::FloatingIP
1207     properties:
1208       floating_network_id: { get_param: public_net_id }
1209       port_id: { get_resource: vid_private_port }
1210
1211   vid_vm:
1212     type: OS::Nova::Server
1213     properties:
1214       image: { get_param: ubuntu_1604_image }
1215       flavor: { get_param: flavor_medium }
1216       name:
1217         str_replace:
1218           template: base-vid
1219           params:
1220             base: { get_param: vm_base_name }
1221       key_name: { get_resource: vm_key }
1222       networks:
1223         - port: { get_resource: vid_private_port }
1224       user_data_format: SOFTWARE_CONFIG
1225       user_data: { get_resource: vid_vm_config }
1226
1227   vid_vm_scripts:
1228     type: OS::Heat::CloudConfig
1229     properties:
1230       cloud_config:
1231         write_files:
1232         - path: /opt/vid_install.sh
1233           permissions: '0755'
1234           content: { get_file: cloud-config/vid_install.sh }
1235
1236   vid_vm_config:
1237     type: OS::Heat::MultipartMime
1238     properties:
1239       parts:
1240       - config: { get_resource: common_config_script }
1241       - config: { get_resource: vid_vm_scripts }
1242       - config:
1243           str_replace:
1244             params:
1245               __docker_version__: { get_param: vid_docker }
1246               __gerrit_branch__: { get_param: vid_branch }
1247               __vid_repo__: { get_param: vid_repo }
1248             template: |
1249               #!/bin/bash
1250
1251               # Create configuration files
1252               echo "__docker_version__" > /opt/config/docker_version.txt
1253               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1254               echo "__vid_repo__" > /opt/config/remote_repo.txt
1255
1256               cd /opt
1257               ./vid_install.sh
1258
1259
1260   # SDN-C instantiation
1261   sdnc_private_port:
1262     type: OS::Neutron::Port
1263     properties:
1264       network: { get_resource: oam_onap }
1265       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
1266       security_groups:
1267       - { get_resource: onap_sg }
1268
1269   sdnc_floating_ip:
1270     type: OS::Neutron::FloatingIP
1271     properties:
1272       floating_network_id: { get_param: public_net_id }
1273       port_id: { get_resource: sdnc_private_port }
1274
1275   sdnc_vm:
1276     type: OS::Nova::Server
1277     properties:
1278       image: { get_param: ubuntu_1604_image }
1279       flavor: { get_param: flavor_large }
1280       name:
1281         str_replace:
1282           template: base-sdnc
1283           params:
1284             base: { get_param: vm_base_name }
1285       key_name: { get_resource: vm_key }
1286       networks:
1287         - port: { get_resource: sdnc_private_port }
1288       user_data_format: SOFTWARE_CONFIG
1289       user_data: { get_resource: sdnc_vm_config }
1290
1291   sdnc_vm_scripts:
1292     type: OS::Heat::CloudConfig
1293     properties:
1294       cloud_config:
1295         write_files:
1296         - path: /opt/sdnc_install.sh
1297           permissions: '0755'
1298           content: { get_file: cloud-config/sdnc_install.sh }
1299
1300   sdnc_vm_config:
1301     type: OS::Heat::MultipartMime
1302     properties:
1303       parts:
1304       - config: { get_resource: common_config_script }
1305       - config: { get_resource: sdnc_vm_scripts }
1306       - config:
1307           str_replace:
1308             params:
1309               __docker_version__: { get_param: sdnc_docker }
1310               __gerrit_branch__: { get_param: sdnc_branch }
1311               __dgbuilder_docker__: { get_param: dgbuilder_docker }
1312               __sdnc_repo__: { get_param: sdnc_repo }
1313             template: |
1314               #!/bin/bash
1315
1316               # Create configuration files
1317               echo "__docker_version__" > /opt/config/docker_version.txt
1318               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1319               echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1320               echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1321
1322               cd /opt
1323               ./sdnc_install.sh
1324
1325
1326   # SDC instantiation
1327   sdc_private_port:
1328     type: OS::Neutron::Port
1329     properties:
1330       network: { get_resource: oam_onap }
1331       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1332       security_groups:
1333       - { get_resource: onap_sg }
1334
1335   sdc_floating_ip:
1336     type: OS::Neutron::FloatingIP
1337     properties:
1338       floating_network_id: { get_param: public_net_id }
1339       port_id: { get_resource: sdc_private_port }
1340
1341   sdc_volume_data:
1342     type: OS::Cinder::Volume
1343     properties:
1344       name: vol1-sdc-data
1345       size: 100
1346
1347   sdc_vm:
1348     type: OS::Nova::Server
1349     properties:
1350       image: { get_param: ubuntu_1604_image }
1351       flavor: { get_param: flavor_xlarge }
1352       name:
1353         str_replace:
1354           template: base-sdc
1355           params:
1356             base: { get_param: vm_base_name }
1357       key_name: { get_resource: vm_key }
1358       networks:
1359         - port: { get_resource: sdc_private_port }
1360       block_device_mapping:
1361         - device_name: /dev/vdb
1362           volume_id: {get_resource: sdc_volume_data}
1363       user_data_format: SOFTWARE_CONFIG
1364       user_data: { get_resource: sdc_vm_config }
1365
1366   sdc_vm_scripts:
1367     type: OS::Heat::CloudConfig
1368     properties:
1369       cloud_config:
1370         write_files:
1371         - path: /opt/sdc_install.sh
1372           permissions: '0755'
1373           content: { get_file: cloud-config/sdc_install.sh }
1374
1375   sdc_vm_config:
1376     type: OS::Heat::MultipartMime
1377     properties:
1378       parts:
1379       - config: { get_resource: common_config_script }
1380       - config: { get_resource: sdc_vm_scripts }
1381       - config:
1382           str_replace:
1383             params:
1384               __env_name__: { get_param: dmaap_topic }
1385               __mr_ip_addr__: { get_param: mr_ip_addr }
1386               __private_ip__: { get_param: sdc_ip_addr }
1387               __docker_version__: { get_param: sdc_docker }
1388               __sdc_wfd_docker__: { get_param: sdc_wfd_docker }
1389               __gerrit_branch__: { get_param: sdc_branch }
1390               __sdc_repo__: { get_param: sdc_repo }
1391             template: |
1392               #!/bin/bash
1393
1394               # Create configuration files
1395               echo "__env_name__" > /opt/config/env_name.txt
1396               echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1397               echo "__private_ip__" > /opt/config/private_ip.txt
1398               echo "__docker_version__" > /opt/config/docker_version.txt
1399               echo "__sdc_wfd_docker__" > /opt/config/sdc_wfd_docker.txt
1400               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1401               echo "__sdc_repo__" > /opt/config/remote_repo.txt
1402
1403               cd /opt
1404               ./sdc_install.sh
1405
1406
1407   # PORTAL instantiation
1408   portal_private_port:
1409     type: OS::Neutron::Port
1410     properties:
1411       network: { get_resource: oam_onap }
1412       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1413       security_groups:
1414       - { get_resource: onap_sg }
1415
1416   portal_floating_ip:
1417     type: OS::Neutron::FloatingIP
1418     properties:
1419       floating_network_id: { get_param: public_net_id }
1420       port_id: { get_resource: portal_private_port }
1421
1422   portal_vm:
1423     type: OS::Nova::Server
1424     properties:
1425       image: { get_param: ubuntu_1604_image }
1426       flavor: { get_param: flavor_large }
1427       name:
1428         str_replace:
1429           template: base-portal
1430           params:
1431             base: { get_param: vm_base_name }
1432       key_name: { get_resource: vm_key }
1433       networks:
1434         - port: { get_resource: portal_private_port }
1435       user_data_format: SOFTWARE_CONFIG
1436       user_data: { get_resource: portal_vm_config }
1437
1438   portal_vm_scripts:
1439     type: OS::Heat::CloudConfig
1440     properties:
1441       cloud_config:
1442         write_files:
1443         - path: /opt/portal_install.sh
1444           permissions: '0755'
1445           content: { get_file: cloud-config/portal_install.sh }
1446
1447   portal_vm_config:
1448     type: OS::Heat::MultipartMime
1449     properties:
1450       parts:
1451       - config: { get_resource: common_config_script }
1452       - config: { get_resource: portal_vm_scripts }
1453       - config:
1454           str_replace:
1455             params:
1456               __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1457               __docker_version__: { get_param: portal_docker }
1458               __gerrit_branch__: { get_param: portal_branch }
1459               __cli_docker__: { get_param: cli_docker }
1460               __portal_repo__: { get_param: portal_repo }
1461             template: |
1462               #!/bin/bash
1463
1464               # Create configuration files
1465               echo "__public_ip__" > /opt/config/public_ip.txt
1466               echo "__docker_version__" > /opt/config/docker_version.txt
1467               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1468               echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1469               echo "__portal_repo__" > /opt/config/remote_repo.txt
1470
1471               cd /opt
1472               ./portal_install.sh
1473
1474
1475   # Policy Engine instantiation
1476   policy_private_port:
1477     type: OS::Neutron::Port
1478     properties:
1479       network: { get_resource: oam_onap }
1480       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1481       security_groups:
1482       - { get_resource: onap_sg }
1483
1484   policy_floating_ip:
1485     type: OS::Neutron::FloatingIP
1486     properties:
1487       floating_network_id: { get_param: public_net_id }
1488       port_id: { get_resource: policy_private_port }
1489
1490   policy_vm:
1491     type: OS::Nova::Server
1492     properties:
1493       image: { get_param: ubuntu_1604_image }
1494       flavor: { get_param: flavor_xlarge }
1495       name:
1496         str_replace:
1497           template: base-policy
1498           params:
1499             base: { get_param: vm_base_name }
1500       key_name: { get_resource: vm_key }
1501       networks:
1502         - port: { get_resource: policy_private_port }
1503       user_data_format: SOFTWARE_CONFIG
1504       user_data: { get_resource: policy_vm_config }
1505
1506   policy_vm_scripts:
1507     type: OS::Heat::CloudConfig
1508     properties:
1509       cloud_config:
1510         write_files:
1511         - path: /opt/policy_install.sh
1512           permissions: '0755'
1513           content: { get_file: cloud-config/policy_install.sh }
1514
1515   policy_vm_config:
1516     type: OS::Heat::MultipartMime
1517     properties:
1518       parts:
1519       - config: { get_resource: common_config_script }
1520       - config: { get_resource: policy_vm_scripts }
1521       - config:
1522           str_replace:
1523             params:
1524               __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1525               __docker_version__: { get_param: policy_docker }
1526               __gerrit_branch__: { get_param: policy_branch }
1527               __policy_repo__: { get_param: policy_repo }
1528             template: |
1529               #!/bin/bash
1530
1531               # Create configuration files
1532               echo "__public_ip__" > /opt/config/public_ip.txt
1533               echo "__docker_version__" > /opt/config/docker_version.txt
1534               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1535               echo "__policy_repo__" > /opt/config/remote_repo.txt
1536
1537               cd /opt
1538               ./policy_install.sh
1539
1540
1541   # APP-C instantiation
1542   appc_private_port:
1543     type: OS::Neutron::Port
1544     properties:
1545       network: { get_resource: oam_onap }
1546       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1547       security_groups:
1548       - { get_resource: onap_sg }
1549
1550   appc_floating_ip:
1551     type: OS::Neutron::FloatingIP
1552     properties:
1553       floating_network_id: { get_param: public_net_id }
1554       port_id: { get_resource: appc_private_port }
1555
1556   appc_vm:
1557     type: OS::Nova::Server
1558     properties:
1559       image: { get_param: ubuntu_1604_image }
1560       flavor: { get_param: flavor_large }
1561       name:
1562         str_replace:
1563           template: base-appc
1564           params:
1565             base: { get_param: vm_base_name }
1566       key_name: { get_resource: vm_key }
1567       networks:
1568         - port: { get_resource: appc_private_port }
1569       user_data_format: SOFTWARE_CONFIG
1570       user_data: { get_resource: appc_vm_config }
1571
1572   appc_vm_scripts:
1573     type: OS::Heat::CloudConfig
1574     properties:
1575       cloud_config:
1576         write_files:
1577         - path: /opt/appc_install.sh
1578           permissions: '0755'
1579           content: { get_file: cloud-config/appc_install.sh }
1580
1581   appc_vm_config:
1582     type: OS::Heat::MultipartMime
1583     properties:
1584       parts:
1585       - config: { get_resource: common_config_script }
1586       - config: { get_resource: appc_vm_scripts }
1587       - config:
1588           str_replace:
1589             params:
1590               __dmaap_topic__: { get_param: dmaap_topic }
1591               __docker_version__: { get_param: appc_docker }
1592               __gerrit_branch__: { get_param: appc_branch }
1593               __dgbuilder_docker__: { get_param: dgbuilder_docker }
1594               __appc_repo__: { get_param: appc_repo }
1595             template: |
1596               #!/bin/bash
1597
1598               # Create configuration files
1599               echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1600               echo "__docker_version__" > /opt/config/docker_version.txt
1601               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1602               echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1603               echo "__appc_repo__" > /opt/config/remote_repo.txt
1604
1605               cd /opt
1606               ./appc_install.sh
1607
1608
1609   # CLAMP instantiation
1610   clamp_private_port:
1611     type: OS::Neutron::Port
1612     properties:
1613       network: { get_resource: oam_onap }
1614       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1615       security_groups:
1616       - { get_resource: onap_sg }
1617
1618   clamp_floating_ip:
1619     type: OS::Neutron::FloatingIP
1620     properties:
1621       floating_network_id: { get_param: public_net_id }
1622       port_id: { get_resource: clamp_private_port }
1623
1624   clamp_vm:
1625     type: OS::Nova::Server
1626     properties:
1627       image: { get_param: ubuntu_1604_image }
1628       flavor: { get_param: flavor_medium }
1629       name:
1630         str_replace:
1631           template: base-clamp
1632           params:
1633             base: { get_param: vm_base_name }
1634       key_name: { get_resource: vm_key }
1635       networks:
1636         - port: { get_resource: clamp_private_port }
1637       user_data_format: SOFTWARE_CONFIG
1638       user_data: { get_resource: clamp_vm_config }
1639
1640   clamp_vm_scripts:
1641     type: OS::Heat::CloudConfig
1642     properties:
1643       cloud_config:
1644         write_files:
1645         - path: /opt/clamp_install.sh
1646           permissions: '0755'
1647           content: { get_file: cloud-config/clamp_install.sh }
1648
1649   clamp_vm_config:
1650     type: OS::Heat::MultipartMime
1651     properties:
1652       parts:
1653       - config: { get_resource: common_config_script }
1654       - config: { get_resource: clamp_vm_scripts }
1655       - config:
1656           str_replace:
1657             params:
1658               __keystone_url__: { get_param: keystone_url }
1659               __dmaap_topic__: { get_param: dmaap_topic }
1660               __docker_version__: { get_param: clamp_docker }
1661               __gerrit_branch__: { get_param: clamp_branch }
1662               __clamp_repo__: { get_param: clamp_repo }
1663             template: |
1664               #!/bin/bash
1665
1666               # Create configuration files
1667               echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1668               ln -s /opt/config/openstack_tenant_id.txt /opt/config/tenant_id.txt
1669               echo "__keystone_url__" > /opt/config/keystone.txt
1670               echo "__docker_version__" > /opt/config/docker_version.txt
1671               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1672               echo "__clamp_repo__" > /opt/config/remote_repo.txt
1673
1674               cd /opt
1675               ./clamp_install.sh
1676
1677
1678   # OPEN-O VM instantiation
1679   openo_private_port:
1680     type: OS::Neutron::Port
1681     properties:
1682       network: { get_resource: oam_onap }
1683       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1684       security_groups:
1685       - { get_resource: onap_sg }
1686
1687   openo_floating_ip:
1688     type: OS::Neutron::FloatingIP
1689     properties:
1690       floating_network_id: { get_param: public_net_id }
1691       port_id: { get_resource: openo_private_port }
1692
1693   openo_vm:
1694     type: OS::Nova::Server
1695     properties:
1696       image: { get_param: ubuntu_1604_image }
1697       flavor: { get_param: flavor_xlarge }
1698       name:
1699         str_replace:
1700           template: base-multi-service
1701           params:
1702             base: { get_param: vm_base_name }
1703       key_name: { get_resource: vm_key }
1704       networks:
1705         - port: { get_resource: openo_private_port }
1706       user_data_format: SOFTWARE_CONFIG
1707       user_data: { get_resource: openo_vm_config }
1708
1709   openo_vm_scripts:
1710     type: OS::Heat::CloudConfig
1711     properties:
1712       cloud_config:
1713         write_files:
1714         - path: /opt/openo_install.sh
1715           permissions: '0755'
1716           content: { get_file: cloud-config/openo_install.sh }
1717
1718   openo_vm_config:
1719     type: OS::Heat::MultipartMime
1720     properties:
1721       parts:
1722       - config: { get_resource: common_config_script }
1723       - config: { get_resource: openo_vm_scripts }
1724       - config:
1725           str_replace:
1726             params:
1727               __oam_network_cidr__: { get_param: oam_network_cidr }
1728               __aai1_ip_addr__: { get_param: aai1_ip_addr }
1729               __aai2_ip_addr__: { get_param: aai2_ip_addr }
1730               __appc_ip_addr__: { get_param: appc_ip_addr }
1731               __dcae_ip_addr__: { get_param: dcae_ip_addr }
1732               __so_ip_addr__: { get_param: so_ip_addr }
1733               __mr_ip_addr__: { get_param: mr_ip_addr }
1734               __policy_ip_addr__: { get_param: policy_ip_addr }
1735               __portal_ip_addr__: { get_param: portal_ip_addr }
1736               __robot_ip_addr__: { get_param: robot_ip_addr }
1737               __sdc_ip_addr__: { get_param: sdc_ip_addr }
1738               __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1739               __vid_ip_addr__: { get_param: vid_ip_addr }
1740               __clamp_ip_addr__: { get_param: clamp_ip_addr }
1741               __openo_ip_addr__: { get_param: openo_ip_addr }
1742               __vnfsdk_branch__: { get_param: vnfsdk_branch }
1743               __msb_docker__: { get_param: msb_docker }
1744               __mvim_docker__: { get_param: mvim_docker }
1745               __mvim_openstack_docker__: { get_param: mvim_openstack_docker }
1746               __uui_docker__: { get_param: uui_docker }
1747               __esr_docker__: { get_param: esr_docker }
1748               __vnfsdk_repo__: { get_param: vnfsdk_repo }
1749               __vfc_nokia_docker__: { get_param: vfc_nokia_docker }
1750               __vfc_nokiav2_docker__: { get_param: vfc_nokiav2_docker }
1751               __vfc_ztevnfmdriver_docker__: { get_param: vfc_ztevnfmdriver_docker }
1752               __vfc_multivimproxy_docker__: { get_param: vfc_multivimproxy_docker }
1753               __vfc_ztesdncdriver_docker__: { get_param: vfc_ztesdncdriver_docker }
1754               __vfc_vnfres_docker__: { get_param: vfc_vnfres_docker }
1755               __vfc_vnfmgr_docker__: { get_param: vfc_vnfmgr_docker }
1756               __vfc_vnflcm_docker__: { get_param: vfc_vnflcm_docker }
1757               __vfc_resmanagement_docker__: { get_param: vfc_resmanagement_docker }
1758               __vfc_nslcm_docker__: { get_param: vfc_nslcm_docker }
1759               __vfc_huawei_docker__: { get_param: vfc_huawei_docker }
1760               __vfc_jujudriver_docker__: { get_param: vfc_jujudriver_docker }
1761               __vfc_gvnfmdriver_docker__: { get_param: vfc_gvnfmdriver_docker }
1762               __vfc_emsdriver_docker__: { get_param: vfc_emsdriver_docker }
1763               __vfc_catalog_docker__: { get_param: vfc_catalog_docker }
1764               __vfc_wfengine_mgrservice_docker__: { get_param: vfc_wfengine_mgrservice_docker }
1765               __vfc_wfengine_activiti_docker__: { get_param: vfc_wfengine_activiti_docker }
1766             template: |
1767               #!/bin/bash
1768
1769               # Create configuration files
1770               echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1771               echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
1772               echo "__msb_docker__" > /opt/config/msb_docker.txt
1773               echo "__mvim_docker__" > /opt/config/mvim_docker.txt
1774               echo "__mvim_openstack_docker__" > /opt/config/mvim_openstack_docker.txt
1775               echo "__uui_docker__" > /opt/config/uui_docker.txt
1776               echo "__esr_docker__" > /opt/config/esr_docker.txt
1777               echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
1778
1779               echo "export NOKIA_DOCKER_VER=__vfc_nokia_docker__" >> /opt/config/vfc_docker.txt
1780               echo "export NOKIAV2_DOCKER_VER=__vfc_nokiav2_docker__" >> /opt/config/vfc_docker.txt
1781               echo "export MULTIVIMPROXY_DOCKER_VER=__vfc_multivimproxy_docker__" >> /opt/config/vfc_docker.txt
1782               echo "export ZTEVNFMDRIVER_DOCKER_VER=__vfc_ztevnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1783               echo "export ZTESDNCDRIVER_DOCKER_VER=__vfc_ztesdncdriver_docker__" >> /opt/config/vfc_docker.txt
1784               echo "export VNFRES_DOCKER_VER=__vfc_vnfres_docker__" >> /opt/config/vfc_docker.txt
1785               echo "export VNFMGR_DOCKER_VER=__vfc_vnfmgr_docker__" >> /opt/config/vfc_docker.txt
1786               echo "export VNFLCM_DOCKER_VER=__vfc_vnflcm_docker__" >> /opt/config/vfc_docker.txt
1787               echo "export RESMANAGEMENT_DOCKER_VER=__vfc_resmanagement_docker__" >> /opt/config/vfc_docker.txt
1788               echo "export NSLCM_DOCKER_VER=__vfc_nslcm_docker__" >> /opt/config/vfc_docker.txt
1789               echo "export HUAWEI_DOCKER_VER=__vfc_huawei_docker__" >> /opt/config/vfc_docker.txt
1790               echo "export JUJUDRIVER_DOCKER_VER=__vfc_jujudriver_docker__" >> /opt/config/vfc_docker.txt
1791               echo "export GVNFMDRIVER_DOCKER_VER=__vfc_gvnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1792               echo "export EMSDRIVER_DOCKER_VER=__vfc_emsdriver_docker__" >> /opt/config/vfc_docker.txt
1793               echo "export CATALOG_DOCKER_VER=__vfc_catalog_docker__" >> /opt/config/vfc_docker.txt
1794               echo "export MGRSERVICE_DOCKER_VER=__vfc_wfengine_mgrservice_docker__" >> /opt/config/vfc_docker.txt
1795               echo "export ACTIVITI_DOCKER_VER=__vfc_wfengine_activiti_docker__" >> /opt/config/vfc_docker.txt
1796
1797               # Create env file with the IP address of all ONAP components
1798               echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
1799               echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
1800               echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
1801               echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
1802               echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
1803               echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
1804               echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
1805               echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
1806               echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
1807               echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
1808               echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
1809               echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
1810               echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
1811               echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
1812
1813               cd /opt
1814               ./openo_install.sh
1815
1816
1817   # DCAE GEN 2 Controller instantiation
1818   dcae_c_private_port:
1819     type: OS::Neutron::Port
1820     properties:
1821       network: { get_resource: oam_onap }
1822       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1823       security_groups:
1824       - { get_resource: onap_sg }
1825
1826   dcae_c_floating_ip:
1827     type: OS::Neutron::FloatingIP
1828     properties:
1829       floating_network_id: { get_param: public_net_id }
1830       port_id: { get_resource: dcae_c_private_port }
1831
1832   dcae_c_vm:
1833     type: OS::Nova::Server
1834     properties:
1835       image: { get_param: ubuntu_1604_image }
1836       flavor: { get_param: flavor_xlarge }
1837       name:
1838         str_replace:
1839           template: base-dcae
1840           params:
1841             base: { get_param: vm_base_name }
1842       key_name: { get_resource: vm_key }
1843       networks:
1844         - port: { get_resource: dcae_c_private_port }
1845       #security_groups:
1846       #  - { get_resource: onap_sg }
1847       user_data_format: SOFTWARE_CONFIG
1848       user_data: { get_resource: dcae_c_vm_config }
1849
1850   dcae_c_vm_scripts:
1851     type: OS::Heat::CloudConfig
1852     properties:
1853       cloud_config:
1854         write_files:
1855         - path: /opt/dcae2_install.sh
1856           permissions: '0755'
1857           content: { get_file: cloud-config/dcae2_install.sh }
1858
1859   dcae_c_vm_config:
1860     type: OS::Heat::MultipartMime
1861     properties:
1862       parts:
1863       - config: { get_resource: common_config_script }
1864       - config: { get_resource: dcae_c_vm_scripts }
1865       - config:
1866           str_replace:
1867             params:
1868               __rand_str__: { get_resource: random-str }
1869               # repo related
1870               __docker_version__: { get_param: dcae_docker }
1871               # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1872               __dcae_deployment_profile__: { get_param: dcae_deployment_profile }
1873               __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
1874               __dcae_ip_addr__: { get_param: dcae_ip_addr }
1875               __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1876               __dns_forwarder__: { get_param: dns_forwarder }
1877               __dcae_domain__: { get_param: dcae_domain }
1878               # conf for VMs DCAE is to bringup
1879               __openstack_keystone_url__: { get_param: keystone_url }
1880               __dcae_keystone_url__: { get_param: dcae_keystone_url }
1881               __dcaeos_cloud_env__: { get_param: cloud_env }
1882               __dcaeos_keystone_url__: { get_param: dcae_keystone_url }
1883               __dcaeos_region__: { get_param: openstack_region }
1884               __dcaeos_tenant_id__: { get_param: openstack_tenant_id }
1885               __dcaeos_tenant_name__: { get_param: openstack_tenant_name }
1886               __dcaeos_security_group__:
1887                 str_replace:
1888                   template: 'onap_sg_rand'
1889                   params:
1890                     rand: { get_resource: random-str }
1891               #__dcaeos_security_group__: { get_attr: [onap_sg, name] }
1892               __dcaeos_username__: { get_param: openstack_username }
1893               __dcaeos_password__: { get_param: openstack_api_key }
1894               __dcaeos_key_name__: { get_resource: vm_key }
1895               __dcaeos_public_key__: { get_param: dcae_public_key }
1896               __dcaeos_private_key__: { get_param: dcae_private_key }
1897               __dcaeos_private_network_name__: { get_attr: [oam_onap, name] }
1898               __dcaeos_public_network_name__: { get_param: public_net_name }
1899               __dcaeos_ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1900               __dcaeos_centos_7_image__: { get_param: dcae_centos_7_image }
1901               __dcaeos_flavor_id__: { get_param: flavor_medium }
1902               __dcaeos_flavor_id_cdap__: { get_param: flavor_large }
1903               __dcaeos_dnsaas_config_enabled__: { get_param: dnsaas_config_enabled }
1904               __dcaeos_dnsaas_region__: { get_param: dnsaas_region }
1905               __dcaeos_dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
1906               __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
1907               __dcaeos_dnsaas_username__: { get_param: dnsaas_username }
1908               __dcaeos_dnsaas_password__: { get_param: dnsaas_password }
1909               # fixed private IPs
1910               __mr_ip_addr__: { get_param: mr_ip_addr }
1911               __policy_ip_addr__: { get_param: policy_ip_addr }
1912               __sdc_ip_addr__: { get_param: sdc_ip_addr }
1913               __openo_ip_addr__: { get_param: openo_ip_addr }
1914               __aai1_ip_addr__: { get_param: aai1_ip_addr }
1915               __aai2_ip_addr__: { get_param: aai2_ip_addr }
1916               # floating IPs
1917               __dns_floating_ip_addr__: { get_attr: [dns_floating_ip, floating_ip_address] }
1918               __aai1_floating_ip_addr__: { get_attr: [aai1_floating_ip, floating_ip_address] }
1919               __aai2_floating_ip_addr__: { get_attr: [aai2_floating_ip, floating_ip_address] }
1920               __mrouter_floating_ip_addr__: { get_attr: [mrouter_floating_ip, floating_ip_address] }
1921               __sdc_floating_ip_addr__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1922               __policy_floating_ip_addr__: { get_attr: [policy_floating_ip, floating_ip_address] }
1923               __openo_floating_ip_addr__: { get_attr: [openo_floating_ip, floating_ip_address] }
1924               __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1925               # container versions
1926               __dcae_docker__:  { get_param: dcae_docker }
1927               __dcae_snmptrap_docker__:  { get_param: dcae_snmptrap_docker }
1928               __dcae_ves_docker__:  { get_param: dcae_ves_docker }
1929               __dcae_bootstrap_docker__:  { get_param: dcae_bootstrap_docker }
1930               __dcae_cm_docker__:  { get_param: dcae_cm_docker }
1931               __dcae_k8sbootstrap_docker__:  { get_param: dcae_k8sbootstrap_docker }
1932               __dcae_redisc_docker__:  { get_param: dcae_redisc_docker }
1933               __dcae_tca_docker__:  { get_param: dcae_tca_docker }
1934               __dcae_cb_docker__:  { get_param: dcae_cb_docker }
1935               __dcae_cbs_docker__:  { get_param: dcae_cbs_docker }
1936               __dcae_dh_docker__:  { get_param: dcae_dh_docker }
1937               __dcae_inv_docker__:  { get_param: dcae_inv_docker }
1938               __dcae_ph_docker__:  { get_param: dcae_ph_docker }
1939               __dcae_sch_docker__:  { get_param: dcae_sch_docker }
1940               __dcae_heartbeat_docker__:  { get_param: dcae_heartbeat_docker }
1941               __dcae_prh_docker__:  { get_param: dcae_prh_docker }
1942               __holmes_em_docker__:  { get_param: holmes_em_docker }
1943               __holmes_rm_docker__:  { get_param: holmes_rm_docker }
1944
1945
1946             template: |
1947               #!/bin/bash
1948
1949               # Create configuration files
1950               echo "__rand_str__" > /opt/config/dcae_zone.txt
1951               echo "__rand_str__" > /opt/config/rand_str.txt
1952               # repo related
1953               echo "__docker_version__" > /opt/config/docker_version.txt
1954               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1955               # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1956               echo "__dcae_deployment_profile__" > /opt/config/dcae_deployment_profile.txt
1957               echo "__mac_addr__" > /opt/config/mac_addr.txt
1958               echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1959               echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1960               echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
1961               echo "__dcae_domain__" > /opt/config/dcae_domain.txt
1962               # conf for the OpenStack env where DCAE is deployed
1963               echo "__openstack_keystone_url__" > /opt/config/openstack_keystone_url.txt
1964               echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
1965               echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
1966               echo "__dcaeos_region__" > /opt/config/openstack_region.txt
1967               echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
1968               echo "__dcaeos_tenant_name__" > /opt/config/tenant_name.txt
1969               echo "__dcaeos_username__" > /opt/config/openstack_user.txt
1970               echo "__dcaeos_password__" > /opt/config/openstack_password.txt
1971               echo "__dcaeos_key_name__" > /opt/config/key_name.txt
1972               echo "__dcaeos_public_key__" > /opt/config/pub_key.txt
1973               echo "__dcaeos_private_key__" > /opt/config/priv_key
1974               echo "__dcaeos_private_network_name__" > /opt/config/openstack_private_network_name.txt
1975               echo "__dcaeos_public_network_name__" > /opt/config/public_net_name.txt
1976               echo "__dcaeos_public_network_name__" > /opt/config/public_net_id.txt
1977               echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1978               echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
1979               echo "__dcaeos_security_group__" > /opt/config/security_group.txt
1980               echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
1981               echo "__dcaeos_flavor_id_cdap__" > /opt/config/flavor_id_cdap.txt
1982               echo "__dcaeos_dnsaas_config_enabled__" > /opt/config/dnsaas_config_enabled.txt
1983               echo "__dcaeos_dnsaas_region__" > /opt/config/dnsaas_region.txt
1984               echo "__dcaeos_dnsaas_keystone_url__" > /opt/config/dnsaas_keystone_url.txt
1985               echo "__dnsaas_tenant_name__" > /opt/config/dnsaas_tenant_name.txt
1986               echo "__dcaeos_dnsaas_username__" > /opt/config/dnsaas_username.txt
1987               echo "__dcaeos_dnsaas_password__" > /opt/config/dnsaas_password.txt
1988               # fixed private IP addresses of other ONAP components
1989               echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1990               echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1991               echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1992               echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
1993               echo "__openo_ip_addr__" > /opt/config/msb_ip_addr.txt
1994               echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
1995               echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
1996               # floating IPs
1997               echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
1998               echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
1999               echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
2000               echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
2001               echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
2002               echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
2003               echo "__openo_floating_ip_addr__" > /opt/config/openo_floating_ip_addr.txt
2004               echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
2005               # container versions
2006               echo "__dcae_docker__" > /opt/config/dcae_docker.txt
2007               echo "__dcae_snmptrap_docker__" > /opt/config/dcae_docker_snmptrap.txt
2008               echo "__dcae_ves_docker__" > /opt/config/dcae_docker_ves.txt
2009               echo "__dcae_bootstrap_docker__" > /opt/config/dcae_docker_bootstrap.txt
2010               echo "__dcae_cm_docker__" > /opt/config/dcae_docker_cm.txt
2011               echo "__dcae_k8sbootstrap_docker__" > /opt/config/dcae_docker_k8sbootstrap.txt
2012               echo "__dcae_redisc_docker__" > /opt/config/dcae_docker_redisc.txt
2013               echo "__dcae_tca_docker__" > /opt/config/dcae_docker_tca.txt
2014               echo "__dcae_cb_docker__" > /opt/config/dcae_docker_cb.txt
2015               echo "__dcae_cbs_docker__" > /opt/config/dcae_docker_cbs.txt
2016               echo "__dcae_dh_docker__" > /opt/config/dcae_docker_dh.txt
2017               echo "__dcae_inv_docker__" > /opt/config/dcae_docker_inv.txt
2018               echo "__dcae_ph_docker__" > /opt/config/dcae_docker_ph.txt
2019               echo "__dcae_sch_docker__" > /opt/config/dcae_docker_sch.txt
2020               echo "__dcae_heartbeat_docker__" > /opt/config/dcae_docker_heartbeat.txt
2021               echo "__dcae_prh_docker__" > /opt/config/dcae_docker_prh.txt
2022               echo "__holmes_em_docker__" > /opt/config/holmes_docker_em.txt
2023               echo "__holmes_rm_docker__" > /opt/config/holmes_docker_rm.txt
2024
2025               cd /opt
2026               ./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
2027
2028
2029   # MUSIC instantiation
2030   music_private_port:
2031     type: OS::Neutron::Port
2032     properties:
2033       network: { get_resource: oam_onap }
2034       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
2035       security_groups:
2036       - { get_resource: onap_sg }
2037
2038   music_floating_ip:
2039     type: OS::Neutron::FloatingIP
2040     properties:
2041       floating_network_id: { get_param: public_net_id }
2042       port_id: { get_resource: music_private_port }
2043
2044   music_vm:
2045     type: OS::Nova::Server
2046     properties:
2047       image: { get_param: ubuntu_1604_image }
2048       flavor: { get_param: flavor_large }
2049       name:
2050         str_replace:
2051           template: base-music
2052           params:
2053             base: { get_param: vm_base_name }
2054       key_name: { get_resource: vm_key }
2055       networks:
2056         - port: { get_resource: music_private_port }
2057       user_data_format: SOFTWARE_CONFIG
2058       user_data: { get_resource: music_vm_config }
2059
2060   music_vm_scripts:
2061     type: OS::Heat::CloudConfig
2062     properties:
2063       cloud_config:
2064         write_files:
2065         - path: /opt/music_install.sh
2066           permissions: '0755'
2067           content: { get_file: cloud-config/music_install.sh }
2068
2069   music_vm_config:
2070     type: OS::Heat::MultipartMime
2071     properties:
2072       parts:
2073       - config: { get_resource: common_config_script }
2074       - config: { get_resource: music_vm_scripts }
2075       - config:
2076           str_replace:
2077             params:
2078               __docker_version__: { get_param: music_docker }
2079               __music_repo__: { get_param: music_repo }
2080               __gerrit_branch__: { get_param: music_branch }
2081             template: |
2082               #!/bin/bash
2083
2084               # Create configuration files
2085               echo "__docker_version__" > /opt/config/docker_version.txt
2086               echo "__music_repo__" > /opt/config/remote_repo.txt
2087               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2088
2089               cd /opt
2090               ./music_install.sh
2091
2092
2093   # OOF instantiation
2094   oof_private_port:
2095     type: OS::Neutron::Port
2096     properties:
2097       network: { get_resource: oam_onap }
2098       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
2099       security_groups:
2100       - { get_resource: onap_sg }
2101
2102   oof_floating_ip:
2103     type: OS::Neutron::FloatingIP
2104     properties:
2105       floating_network_id: { get_param: public_net_id }
2106       port_id: { get_resource: oof_private_port }
2107
2108   oof_vm:
2109     type: OS::Nova::Server
2110     properties:
2111       image: { get_param: ubuntu_1604_image }
2112       flavor: { get_param: flavor_large }
2113       name:
2114         str_replace:
2115           template: base-oof
2116           params:
2117             base: { get_param: vm_base_name }
2118       key_name: { get_resource: vm_key }
2119       networks:
2120         - port: { get_resource: oof_private_port }
2121       user_data_format: SOFTWARE_CONFIG
2122       user_data: { get_resource: oof_vm_config }
2123
2124   oof_vm_scripts:
2125     type: OS::Heat::CloudConfig
2126     properties:
2127       cloud_config:
2128         write_files:
2129         - path: /opt/oof_install.sh
2130           permissions: '0755'
2131           content: { get_file: cloud-config/oof_install.sh }
2132
2133   oof_vm_config:
2134     type: OS::Heat::MultipartMime
2135     properties:
2136       parts:
2137       - config: { get_resource: common_config_script }
2138       - config: { get_resource: oof_vm_scripts }
2139       - config:
2140           str_replace:
2141             params:
2142               __has_docker_version__: { get_param: optf_has_docker }
2143               __osdf_docker_version__: { get_param: optf_osdf_docker }
2144               __music_docker_version__: { get_param: music_docker }
2145               __cass_music_docker_version__: { get_param: cassandra_music_docker }
2146               __oof_repo__: { get_param: oof_repo }
2147               __gerrit_branch__: { get_param: oof_branch }
2148             template: |
2149               #!/bin/bash
2150
2151               # Create configuration files
2152               echo "__has_docker_version__" > /opt/config/has_docker_version.txt
2153               echo "__osdf_docker_version__" > /opt/config/osdf_docker_version.txt
2154               echo "__music_docker_version__" > /opt/config/music_version.txt
2155               echo "__cass_music_docker_version__" > /opt/config/cass_version.txt
2156               echo "__oof_repo__" > /opt/config/remote_repo.txt
2157               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2158
2159               cd /opt
2160               ./oof_install.sh
2161
2162
2163   # AAF instantiation
2164   aaf_private_port:
2165     type: OS::Neutron::Port
2166     properties:
2167       network: { get_resource: oam_onap }
2168       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
2169       security_groups:
2170       - { get_resource: onap_sg }
2171
2172   aaf_floating_ip:
2173     type: OS::Neutron::FloatingIP
2174     properties:
2175       floating_network_id: { get_param: public_net_id }
2176       port_id: { get_resource: aaf_private_port }
2177
2178   aaf_vm:
2179     type: OS::Nova::Server
2180     properties:
2181       image: { get_param: ubuntu_1604_image }
2182       flavor: { get_param: flavor_medium }
2183       name:
2184         str_replace:
2185           template: base-aaf
2186           params:
2187             base: { get_param: vm_base_name }
2188       key_name: { get_resource: vm_key }
2189       networks:
2190         - port: { get_resource: aaf_private_port }
2191       user_data_format: SOFTWARE_CONFIG
2192       user_data: { get_resource: aaf_vm_config }
2193
2194   aaf_vm_scripts:
2195     type: OS::Heat::CloudConfig
2196     properties:
2197       cloud_config:
2198         write_files:
2199         - path: /opt/aaf_install.sh
2200           permissions: '0755'
2201           content: { get_file: cloud-config/aaf_install.sh }
2202
2203   aaf_vm_config:
2204     type: OS::Heat::MultipartMime
2205     properties:
2206       parts:
2207       - config: { get_resource: common_config_script }
2208       - config: { get_resource: aaf_vm_scripts }
2209       - config:
2210           str_replace:
2211             params:
2212               __docker_version__: { get_param: aaf_docker }
2213               __aaf_repo__: { get_param: aaf_repo }
2214               __gerrit_branch__: { get_param: aaf_branch }
2215               __local_ip__: { get_param: aaf_ip_addr }
2216             template: |
2217               #!/bin/bash
2218
2219               # Create configuration files
2220               echo "__docker_version__" > /opt/config/docker_version.txt
2221               echo "__aaf_repo__" > /opt/config/remote_repo.txt
2222               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2223               echo "__local_ip__" > /opt/config/local_ip.txt
2224
2225               cd /opt
2226               ./aaf_install.sh
2227
2228
2229   # SMS instantiation
2230   sms_private_port:
2231     type: OS::Neutron::Port
2232     properties:
2233       network: { get_resource: oam_onap }
2234       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sms_ip_addr }}]
2235       security_groups:
2236       - { get_resource: onap_sg }
2237
2238   sms_floating_ip:
2239     type: OS::Neutron::FloatingIP
2240     properties:
2241       floating_network_id: { get_param: public_net_id }
2242       port_id: { get_resource: sms_private_port }
2243
2244   sms_vm:
2245     type: OS::Nova::Server
2246     properties:
2247       image: { get_param: ubuntu_1604_image }
2248       flavor: { get_param: flavor_medium }
2249       name:
2250         str_replace:
2251           template: base-sms
2252           params:
2253             base: { get_param: vm_base_name }
2254       key_name: { get_resource: vm_key }
2255       networks:
2256         - port: { get_resource: sms_private_port }
2257       user_data_format: SOFTWARE_CONFIG
2258       user_data: { get_resource: sms_vm_config }
2259
2260   sms_vm_scripts:
2261     type: OS::Heat::CloudConfig
2262     properties:
2263       cloud_config:
2264         write_files:
2265         - path: /opt/sms_install.sh
2266           permissions: '0755'
2267           content: { get_file: cloud-config/sms_install.sh }
2268
2269   sms_vm_config:
2270     type: OS::Heat::MultipartMime
2271     properties:
2272       parts:
2273       - config: { get_resource: common_config_script }
2274       - config: { get_resource: sms_vm_scripts }
2275       - config:
2276           str_replace:
2277             params:
2278               __docker_version__: { get_param: sms_docker }
2279               __sms_repo__: { get_param: sms_repo }
2280               __gerrit_branch__: { get_param: sms_branch }
2281               __local_ip__: { get_param: sms_ip_addr }
2282             template: |
2283               #!/bin/bash
2284
2285               # Create configuration files
2286               echo "__docker_version__" > /opt/config/docker_version.txt
2287               echo "__sms_repo__" > /opt/config/remote_repo.txt
2288               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2289               echo "__local_ip__" > /opt/config/local_ip.txt
2290
2291               cd /opt
2292               ./sms_install.sh
2293
2294
2295   # NBI instantiation
2296   nbi_private_port:
2297     type: OS::Neutron::Port
2298     properties:
2299       network: { get_resource: oam_onap }
2300       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: nbi_ip_addr }}]
2301       security_groups:
2302       - { get_resource: onap_sg }
2303
2304   nbi_floating_ip:
2305     type: OS::Neutron::FloatingIP
2306     properties:
2307       floating_network_id: { get_param: public_net_id }
2308       port_id: { get_resource: nbi_private_port }
2309
2310   nbi_vm:
2311     type: OS::Nova::Server
2312     properties:
2313       image: { get_param: ubuntu_1604_image }
2314       flavor: { get_param: flavor_small }
2315       name:
2316         str_replace:
2317           template: base-nbi
2318           params:
2319             base: { get_param: vm_base_name }
2320       key_name: { get_resource: vm_key }
2321       networks:
2322         - port: { get_resource: nbi_private_port }
2323       user_data_format: SOFTWARE_CONFIG
2324       user_data: { get_resource: nbi_vm_config }
2325
2326   nbi_vm_scripts:
2327     type: OS::Heat::CloudConfig
2328     properties:
2329       cloud_config:
2330         write_files:
2331         - path: /opt/nbi_install.sh
2332           permissions: '0755'
2333           content: { get_file: cloud-config/nbi_install.sh }
2334
2335   nbi_vm_config:
2336     type: OS::Heat::MultipartMime
2337     properties:
2338       parts:
2339       - config: { get_resource: common_config_script }
2340       - config: { get_resource: nbi_vm_scripts }
2341       - config:
2342           str_replace:
2343             params:
2344               __docker_version__: { get_param: nbi_docker }
2345               __nbi_repo__: { get_param: nbi_repo }
2346               __gerrit_branch__: { get_param: nbi_branch }
2347               __sdc_ip_addr__: { get_param: sdc_ip_addr }
2348               __aai1_ip_addr__: { get_param: aai1_ip_addr }
2349               __so_ip_addr__: { get_param: so_ip_addr }
2350             template: |
2351               #!/bin/bash
2352
2353               # Create configuration files
2354               echo "__docker_version__" > /opt/config/docker_version.txt
2355               echo "__nbi_repo__" > /opt/config/remote_repo.txt
2356               echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2357               echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
2358               echo "__aai1_ip_addr__" > /opt/config/aai_ip_addr.txt
2359               echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
2360
2361               cd /opt
2362               ./nbi_install.sh