Add NBI configuration to DNS
[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   flavor_xxlarge:
76     type: string
77     description: Name of the Extra Extra Large Flavor supported by the cloud provider
78
79   vm_base_name:
80     type: string
81     description: Base name of ONAP VMs
82
83   key_name:
84     type: string
85     description: Public/Private key pair name
86
87   pub_key:
88     type: string
89     description: Public key to be installed on the compute instance
90
91   nexus_repo:
92     type: string
93     description: Complete URL for the Nexus repository.
94
95   nexus_docker_repo:
96     type: string
97     description: Complete URL for the Nexus repository for docker images.
98
99   nexus_username:
100     type: string
101     description: Nexus Repository username
102
103   nexus_password:
104     type: string
105     description: Nexus Repository Password
106
107   artifacts_version:
108     type: string
109     description: Artifacts version of ONAP components
110
111   dmaap_topic:
112     type: string
113     description: DMaaP Topic name
114
115   openstack_tenant_id:
116     type: string
117     description: OpenStack tenant ID
118
119   openstack_tenant_name:
120     type: string
121     description: OpenStack tenant name (matching with the openstack_tenant_id)
122
123   openstack_username:
124     type: string
125     description: OpenStack username
126
127   openstack_auth_method:
128     type: string
129     description: OpenStack authentication method (password VS. api-key)
130
131   openstack_api_key:
132     type: string
133     description: OpenStack password or API Key
134
135   horizon_url:
136     type: string
137     description: URL of OpenStack Horizon
138
139   keystone_url:
140     type: string
141     description: URL of OpenStack Keystone
142
143   cloud_env:
144     type: string
145     description: Cloud Provider Name in lower case
146
147   openstack_region:
148     type: string
149     description: Region where the DCAE controller will spin the VMs
150
151   ######################
152   #                    #
153   # Network parameters #
154   #                    #
155   ######################
156
157   dns_list:
158     type: comma_delimited_list
159     description: List of External DNS for OAM ONAP network
160
161   external_dns:
162     type: string
163     description: Public IP of the external DNS for ONAP network
164
165   dns_forwarder:
166     type: string
167     description: the forwarder address for setting up ONAP's private DNS server
168
169   oam_network_cidr:
170     type: string
171     description: CIDR of the OAM ONAP network
172
173   ### Private IP addresses ###
174   aai1_ip_addr:
175     type: string
176   aai2_ip_addr:
177     type: string
178   appc_ip_addr:
179     type: string
180   dcae_ip_addr:
181     type: string
182   dns_ip_addr:
183     type: string
184   so_ip_addr:
185     type: string
186   mr_ip_addr:
187     type: string
188   policy_ip_addr:
189     type: string
190   portal_ip_addr:
191     type: string
192   robot_ip_addr:
193     type: string
194   sdc_ip_addr:
195     type: string
196   sdnc_ip_addr:
197     type: string
198   vid_ip_addr:
199     type: string
200   clamp_ip_addr:
201     type: string
202   openo_ip_addr:
203     type: string
204   music_ip_addr:
205     type: string
206   oof_ip_addr:
207     type: string
208   aaf_ip_addr:
209     type: string
210   nbi_ip_addr:
211     type: string
212
213   ###########################
214   #                         #
215   # Parameters used by DCAE #
216   #                         #
217   ###########################
218
219   dnsaas_config_enabled:
220     type: string
221     description: whether the DNSaaS configuration section is enabled
222
223   dnsaas_region:
224     type: string
225     description: the region of the cloud instance providing the Designate DNS as a Service
226
227   dnsaas_keystone_url:
228     type: string
229     description: the keystone URL of the cloud instance providing the Designate DNS as a Service
230
231   dnsaas_username:
232     type: string
233     description: the username of the cloud instance providing the Designate DNS as a Service
234
235   dnsaas_password:
236     type: string
237     description: the password of the cloud instance providing the Designate DNS as a Service
238
239   dnsaas_tenant_name:
240     type: string
241     description: the name of the tenant in the cloud instance providing the Designate DNS as a Service
242
243   dcae_keystone_url:
244     type: string
245     description: the keystone URL for DCAE to use (via MultiCloud)
246
247   dcae_private_key:
248     type: string
249     description: the private key of the key-apir used between the DCAE bootstrap container and DCAE VMs
250
251   dcae_public_key:
252     type: string
253     description: the prublic key of the key-apir used between the DCAE bootstrap container and DCAE VMs
254
255   dcae_centos_7_image:
256     type: string
257     description: the id/name of the CentOS 7 VM imange
258
259   dcae_domain:
260     type: string
261     description: the top level domain to register DCAE VMs (the zone will be random-str.dcae_domain)
262
263   #####################
264   #                   #
265   # ONAP repositories #
266   #                   #
267   #####################
268
269   aai_repo:
270     type: string
271   appc_repo:
272     type: string
273   mr_repo:
274     type: string
275   so_repo:
276     type: string
277   policy_repo:
278     type: string
279   portal_repo:
280     type: string
281   robot_repo:
282     type: string
283   sdc_repo:
284     type: string
285   sdnc_repo:
286     type: string
287   vid_repo:
288     type: string
289   clamp_repo:
290     type: string
291   vnfsdk_repo:
292     type: string
293
294   ################################
295   #                              #
296   # Docker versions and branches #
297   #                              #
298   ################################
299
300   aai_docker:
301     type: string
302   aai_sparky_docker:
303     type: string
304   appc_docker:
305     type: string
306   so_docker:
307     type: string
308   dcae_docker:
309     type: string
310   policy_docker:
311     type: string
312   portal_docker:
313     type: string
314   robot_docker:
315     type: string
316   sdc_docker:
317     type: string
318   sdnc_docker:
319     type: string
320   vid_docker:
321     type: string
322   clamp_docker:
323     type: string
324   msb_docker:
325     type: string
326   mvim_docker:
327     type: string
328   uui_docker:
329     type: string
330   esr_docker:
331     type: string
332   dgbuilder_docker:
333     type: string
334   cli_docker:
335     type: string
336   music_docker:
337     type: string
338   oof_docker:
339     type: string
340   aaf_docker:
341     type: string
342   nbi_docker:
343     type: string
344
345   vfc_nokia_docker:
346     type: string
347   vfc_nokiav2_docker:
348     type: string
349   vfc_ztevnfmdriver_docker:
350     type: string
351   vfc_ztesdncdriver_docker:
352     type: string
353   vfc_vnfres_docker:
354     type: string
355   vfc_vnfmgr_docker:
356     type: string
357   vfc_vnflcm_docker:
358     type: string
359   vfc_resmanagement_docker:
360     type: string
361   vfc_nslcm_docker:
362     type: string
363   vfc_huawei_docker:
364     type: string
365   vfc_jujudriver_docker:
366     type: string
367   vfc_gvnfmdriver_docker:
368     type: string
369   vfc_emsdriver_docker:
370     type: string
371   vfc_catalog_docker:
372     type: string
373   vfc_wfengine_mgrservice_docker:
374     type: string
375   vfc_wfengine_activiti_docker:
376     type: string
377
378   cbam_username:
379     type: string
380   cbam_password:
381     type: string
382   cbam_ip:
383     type: string
384
385   aai_branch:
386     type: string
387   appc_branch:
388     type: string
389   so_branch:
390     type: string
391   mr_branch:
392     type: string
393   policy_branch:
394     type: string
395   portal_branch:
396     type: string
397   robot_branch:
398     type: string
399   sdc_branch:
400     type: string
401   sdnc_branch:
402     type: string
403   vid_branch:
404     type: string
405   clamp_branch:
406     type: string
407   vnfsdk_branch:
408     type: string
409
410
411 #############
412 #           #
413 # RESOURCES #
414 #           #
415 #############
416
417 resources:
418   random-str:
419     type: OS::Heat::RandomString
420     properties:
421       length: 4
422
423   # Public key used to access ONAP components
424   vm_key:
425     type: OS::Nova::KeyPair
426     properties:
427       name:
428         str_replace:
429           template: base_rand
430           params:
431             base: { get_param: key_name }
432             rand: { get_resource: random-str }
433       public_key: { get_param: pub_key }
434       save_private_key: false
435
436
437   # ONAP security group
438   onap_sg:
439     type: OS::Neutron::SecurityGroup
440     properties:
441       name:
442         str_replace:
443           template: base_rand
444           params:
445             base: onap_sg
446             rand: { get_resource: random-str }
447       description: security group used by ONAP
448       rules:
449         # All egress traffic
450         - direction: egress
451           ethertype: IPv4
452         - direction: egress
453           ethertype: IPv6
454         # ingress traffic
455         # ICMP
456         - protocol: icmp
457         - protocol: udp
458           port_range_min: 1
459           port_range_max: 65535
460         - protocol: tcp
461           port_range_min: 1
462           port_range_max: 65535
463
464
465
466   # ONAP management private network
467   oam_onap:
468     type: OS::Neutron::Net
469     properties:
470       name:
471         str_replace:
472           template: oam_onap_rand
473           params:
474             rand: { get_resource: random-str }
475
476   oam_onap_subnet:
477     type: OS::Neutron::Subnet
478     properties:
479       name:
480         str_replace:
481           template: oam_onap_rand
482           params:
483             rand: { get_resource: random-str }
484       network_id: { get_resource: oam_onap }
485       cidr: { get_param: oam_network_cidr }
486       dns_nameservers: { get_param: dns_list }
487
488   router:
489     type: OS::Neutron::Router
490     properties:
491       external_gateway_info:
492         network: { get_param: public_net_id }
493
494   router_interface:
495     type: OS::Neutron::RouterInterface
496     properties:
497       router_id: { get_resource: router }
498       subnet_id: { get_resource: oam_onap_subnet }
499
500
501   # DNS Server instantiation
502   dns_private_port:
503     type: OS::Neutron::Port
504     properties:
505       network: { get_resource: oam_onap }
506       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
507       security_groups:
508       - { get_resource: onap_sg }
509
510   dns_floating_ip:
511     type: OS::Neutron::FloatingIP
512     properties:
513       floating_network_id: { get_param: public_net_id }
514       port_id: { get_resource: dns_private_port }
515
516   dns_vm:
517     type: OS::Nova::Server
518     properties:
519       image: { get_param: ubuntu_1404_image }
520       flavor: { get_param: flavor_small }
521       name:
522         str_replace:
523           template: base-dns-server
524           params:
525             base: { get_param: vm_base_name }
526       key_name: { get_resource: vm_key }
527       networks:
528         - port: { get_resource: dns_private_port }
529       user_data_format: RAW
530       user_data:
531         str_replace:
532           params:
533             __nexus_repo__: { get_param: nexus_repo }
534             __artifacts_version__: { get_param: artifacts_version }
535             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
536             __dns_ip_addr__: { get_param: dns_ip_addr }
537             __aai1_ip_addr__: { get_param: aai1_ip_addr }
538             __aai2_ip_addr__: { get_param: aai2_ip_addr }
539             __appc_ip_addr__: { get_param: appc_ip_addr }
540             __dcae_ip_addr__: { get_param: dcae_ip_addr }
541             __so_ip_addr__: { get_param: so_ip_addr }
542             __mr_ip_addr__: { get_param: mr_ip_addr }
543             __policy_ip_addr__: { get_param: policy_ip_addr }
544             __portal_ip_addr__: { get_param: portal_ip_addr }
545             __robot_ip_addr__: { get_param: robot_ip_addr }
546             __sdc_ip_addr__: { get_param: sdc_ip_addr }
547             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
548             __vid_ip_addr__: { get_param: vid_ip_addr }
549             __clamp_ip_addr__: { get_param: clamp_ip_addr }
550             __openo_ip_addr__: { get_param: openo_ip_addr }
551             __music_ip_addr__: { get_param: music_ip_addr }
552             __oof_ip_addr__: { get_param: oof_ip_addr }
553             __aaf_ip_addr__: { get_param: aaf_ip_addr }
554             __nbi_ip_addr__: { get_param: nbi_ip_addr }
555             __cloud_env__: { get_param: cloud_env }
556             __external_dns__: { get_param: external_dns }
557             __dns_forwarder__: { get_param: dns_forwarder }
558           template: |
559             #!/bin/bash
560
561             # Create configuration files
562             mkdir -p /opt/config
563             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
564             echo "__cloud_env__" > /opt/config/cloud_env.txt
565             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
566             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
567             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
568             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
569             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
570             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
571             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
572             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
573             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
574             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
575             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
576             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
577             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
578             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
579             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
580             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
581             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
582             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
583             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
584             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
585             echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
586             echo "__external_dns__" > /opt/config/external_dns.txt
587             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
588
589             # Download and run install script
590             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
591             cd /opt
592             chmod +x dns_install.sh
593             ./dns_install.sh
594
595
596   # A&AI instantiation (2 VMs)
597   aai1_private_port:
598     type: OS::Neutron::Port
599     properties:
600       network: { get_resource: oam_onap }
601       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
602       security_groups:
603       - { get_resource: onap_sg }
604
605   aai1_floating_ip:
606     type: OS::Neutron::FloatingIP
607     properties:
608       floating_network_id: { get_param: public_net_id }
609       port_id: { get_resource: aai1_private_port }
610
611   aai1_vm:
612     type: OS::Nova::Server
613     depends_on: aai2_vm
614     properties:
615       image: { get_param: ubuntu_1404_image }
616       flavor: { get_param: flavor_xlarge }
617       name:
618         str_replace:
619           template: base-aai-inst1
620           params:
621             base: { get_param: vm_base_name }
622       key_name: { get_resource: vm_key }
623       networks:
624         - port: { get_resource: aai1_private_port }
625       user_data_format: RAW
626       user_data:
627         str_replace:
628           params:
629             __nexus_repo__: { get_param: nexus_repo }
630             __nexus_docker_repo__: { get_param: nexus_docker_repo }
631             __nexus_username__: { get_param: nexus_username }
632             __nexus_password__: { get_param: nexus_password }
633             __dmaap_topic__: { get_param: dmaap_topic }
634             __artifacts_version__: { get_param: artifacts_version }
635             __dns_ip_addr__: { get_param: dns_ip_addr }
636             __docker_version__: { get_param: aai_docker }
637             __aai_sparky_docker__ : { get_param: aai_sparky_docker }
638             __gerrit_branch__: { get_param: aai_branch }
639             __cloud_env__: { get_param: cloud_env }
640             __external_dns__: { get_param: external_dns }
641             __aai_repo__: { get_param: aai_repo }
642           template: |
643             #!/bin/bash
644
645             # Create configuration files
646             mkdir -p /opt/config
647             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
648             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
649             echo "__nexus_username__" > /opt/config/nexus_username.txt
650             echo "__nexus_password__" > /opt/config/nexus_password.txt
651             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
652             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
653             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
654             echo "__docker_version__" > /opt/config/docker_version.txt
655             echo "__aai_sparky_docker__" > /opt/config/sparky_version.txt
656             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
657             echo "aai_instance_1" > /opt/config/aai_instance.txt
658             echo "__cloud_env__" > /opt/config/cloud_env.txt
659             echo "__external_dns__" > /opt/config/external_dns.txt
660             echo "__aai_repo__" > /opt/config/remote_repo.txt
661
662             # Download and run install script
663             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
664             cd /opt
665             chmod +x aai_install.sh
666             ./aai_install.sh
667
668
669   aai2_private_port:
670     type: OS::Neutron::Port
671     properties:
672       network: { get_resource: oam_onap }
673       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
674       security_groups:
675       - { get_resource: onap_sg }
676
677   aai2_floating_ip:
678     type: OS::Neutron::FloatingIP
679     properties:
680       floating_network_id: { get_param: public_net_id }
681       port_id: { get_resource: aai2_private_port }
682
683   aai2_vm:
684     type: OS::Nova::Server
685     properties:
686       image: { get_param: ubuntu_1404_image }
687       flavor: { get_param: flavor_xlarge }
688       name:
689         str_replace:
690           template: base-aai-inst2
691           params:
692             base: { get_param: vm_base_name }
693       key_name: { get_resource: vm_key }
694       networks:
695         - port: { get_resource: aai2_private_port }
696       user_data_format: RAW
697       user_data:
698         str_replace:
699           params:
700             __nexus_repo__: { get_param: nexus_repo }
701             __nexus_docker_repo__: { get_param: nexus_docker_repo }
702             __nexus_username__: { get_param: nexus_username }
703             __nexus_password__: { get_param: nexus_password }
704             __dmaap_topic__: { get_param: dmaap_topic }
705             __artifacts_version__: { get_param: artifacts_version }
706             __dns_ip_addr__: { get_param: dns_ip_addr }
707             __docker_version__: { get_param: aai_docker }
708             __gerrit_branch__: { get_param: aai_branch }
709             __cloud_env__: { get_param: cloud_env }
710             __external_dns__: { get_param: external_dns }
711             __aai_repo__: { get_param: aai_repo }
712           template: |
713             #!/bin/bash
714
715             # Create configuration files
716             mkdir -p /opt/config
717             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
718             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
719             echo "__nexus_username__" > /opt/config/nexus_username.txt
720             echo "__nexus_password__" > /opt/config/nexus_password.txt
721             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
722             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
723             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
724             echo "__docker_version__" > /opt/config/docker_version.txt
725             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
726             echo "aai_instance_2" > /opt/config/aai_instance.txt
727             echo "__cloud_env__" > /opt/config/cloud_env.txt
728             echo "__external_dns__" > /opt/config/external_dns.txt
729             echo "__aai_repo__" > /opt/config/remote_repo.txt
730
731             # Download and run install script
732             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
733             cd /opt
734             chmod +x aai_install.sh
735             ./aai_install.sh
736
737
738   # SO instantiation
739   so_private_port:
740     type: OS::Neutron::Port
741     properties:
742       network: { get_resource: oam_onap }
743       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: so_ip_addr }}]
744       security_groups:
745       - { get_resource: onap_sg }
746
747   so_floating_ip:
748     type: OS::Neutron::FloatingIP
749     properties:
750       floating_network_id: { get_param: public_net_id }
751       port_id: { get_resource: so_private_port }
752
753   so_vm:
754     type: OS::Nova::Server
755     properties:
756       image: { get_param: ubuntu_1604_image }
757       flavor: { get_param: flavor_large }
758       name:
759         str_replace:
760           template: base-so
761           params:
762             base: { get_param: vm_base_name }
763       key_name: { get_resource: vm_key }
764       networks:
765         - port: { get_resource: so_private_port }
766       user_data_format: RAW
767       user_data:
768         str_replace:
769           params:
770             __nexus_repo__: { get_param: nexus_repo }
771             __nexus_docker_repo__: { get_param: nexus_docker_repo }
772             __nexus_username__: { get_param: nexus_username }
773             __nexus_password__: { get_param: nexus_password }
774             __openstack_username__: { get_param: openstack_username }
775             __openstack_tenant_id__: { get_param: openstack_tenant_id }
776             __openstack_api_key__: { get_param: openstack_api_key }
777             __openstack_region__: { get_param: openstack_region }
778             __keystone_url__: { get_param: keystone_url }
779             __dmaap_topic__: { get_param: dmaap_topic }
780             __artifacts_version__: { get_param: artifacts_version }
781             __dns_ip_addr__: { get_param: dns_ip_addr }
782             __openo_ip__: { get_param: openo_ip_addr }
783             __docker_version__: { get_param: so_docker }
784             __gerrit_branch__: { get_param: so_branch }
785             __cloud_env__: { get_param: cloud_env }
786             __external_dns__: { get_param: external_dns }
787             __so_repo__: { get_param: so_repo }
788           template: |
789             #!/bin/bash
790
791             # Create configuration files
792             mkdir -p /opt/config
793             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
794             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
795             echo "__nexus_username__" > /opt/config/nexus_username.txt
796             echo "__nexus_password__" > /opt/config/nexus_password.txt
797             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
798             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
799             echo "__openo_ip__" > /opt/config/openo_ip.txt
800             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
801             echo "__openstack_username__" > /opt/config/openstack_username.txt
802             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
803             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
804             echo "__openstack_region__" > /opt/config/openstack_region.txt
805             echo "__keystone_url__" > /opt/config/keystone.txt
806             echo "__docker_version__" > /opt/config/docker_version.txt
807             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
808             echo "__cloud_env__" > /opt/config/cloud_env.txt
809             echo "__external_dns__" > /opt/config/external_dns.txt
810             echo "__so_repo__" > /opt/config/remote_repo.txt
811
812             # Download and run install script
813             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/so_install.sh -o /opt/so_install.sh
814             cd /opt
815             chmod +x so_install.sh
816             ./so_install.sh
817
818
819   # Message Router instantiation
820   mrouter_private_port:
821     type: OS::Neutron::Port
822     properties:
823       network: { get_resource: oam_onap }
824       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
825       security_groups:
826       - { get_resource: onap_sg }
827
828   mrouter_floating_ip:
829     type: OS::Neutron::FloatingIP
830     properties:
831       floating_network_id: { get_param: public_net_id }
832       port_id: { get_resource: mrouter_private_port }
833
834   mrouter_vm:
835     type: OS::Nova::Server
836     properties:
837       image: { get_param: ubuntu_1404_image }
838       flavor: { get_param: flavor_large }
839       name:
840         str_replace:
841           template: base-message-router
842           params:
843             base: { get_param: vm_base_name }
844       key_name: { get_resource: vm_key }
845       networks:
846         - port: { get_resource: mrouter_private_port }
847       user_data_format: RAW
848       user_data:
849         str_replace:
850           params:
851             __nexus_repo__: { get_param: nexus_repo }
852             __nexus_docker_repo__: { get_param: nexus_docker_repo }
853             __nexus_username__: { get_param: nexus_username }
854             __nexus_password__: { get_param: nexus_password }
855             __artifacts_version__: { get_param: artifacts_version }
856             __dns_ip_addr__: { get_param: dns_ip_addr }
857             __gerrit_branch__: { get_param: mr_branch }
858             __cloud_env__: { get_param: cloud_env }
859             __external_dns__: { get_param: external_dns }
860             __mr_repo__: { get_param: mr_repo }
861           template: |
862             #!/bin/bash
863
864             # Create configuration files
865             mkdir -p /opt/config
866             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
867             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
868             echo "__nexus_username__" > /opt/config/nexus_username.txt
869             echo "__nexus_password__" > /opt/config/nexus_password.txt
870             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
871             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
872             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
873             echo "__cloud_env__" > /opt/config/cloud_env.txt
874             echo "__external_dns__" > /opt/config/external_dns.txt
875             echo "__mr_repo__" > /opt/config/remote_repo.txt
876
877             # Download and run install script
878             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
879             cd /opt
880             chmod +x mr_install.sh
881             ./mr_install.sh
882
883
884   # Robot Framework instantiation
885   robot_private_port:
886     type: OS::Neutron::Port
887     properties:
888       network: { get_resource: oam_onap }
889       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
890       security_groups:
891       - { get_resource: onap_sg }
892
893   robot_floating_ip:
894     type: OS::Neutron::FloatingIP
895     properties:
896       floating_network_id: { get_param: public_net_id }
897       port_id: { get_resource: robot_private_port }
898
899   robot_vm:
900     type: OS::Nova::Server
901     properties:
902       image: { get_param: ubuntu_1604_image }
903       flavor: { get_param: flavor_medium }
904       name:
905         str_replace:
906           template: base-robot
907           params:
908             base: { get_param: vm_base_name }
909       key_name: { get_resource: vm_key }
910       networks:
911         - port: { get_resource: robot_private_port }
912       user_data_format: RAW
913       user_data:
914         str_replace:
915           params:
916             __nexus_repo__: { get_param: nexus_repo }
917             __nexus_docker_repo__: { get_param: nexus_docker_repo }
918             __nexus_username__: { get_param: nexus_username }
919             __nexus_password__: { get_param: nexus_password }
920             __network_name__: { get_attr: [oam_onap, name] }
921             __openstack_username__: { get_param: openstack_username }
922             __openstack_api_key__: { get_param : openstack_api_key }
923             __openstack_tenant_id__: { get_param: openstack_tenant_id }
924             __artifacts_version__: { get_param: artifacts_version }
925             __openstack_region__: { get_param: openstack_region }
926             __dns_ip_addr__: { get_param: dns_ip_addr }
927             __gerrit_branch__: { get_param: robot_branch }
928             __cloud_env__: { get_param: cloud_env }
929             __keystone_url__: { get_param: keystone_url }
930             __aai1_ip_addr__: { get_param: aai1_ip_addr }
931             __aai2_ip_addr__: { get_param: aai2_ip_addr }
932             __appc_ip_addr__: { get_param: appc_ip_addr }
933             __dcae_ip_addr__: { get_param: dcae_ip_addr }
934             __so_ip_addr__: { get_param: so_ip_addr }
935             __mr_ip_addr__: { get_param: mr_ip_addr }
936             __policy_ip_addr__: { get_param: policy_ip_addr }
937             __portal_ip_addr__: { get_param: portal_ip_addr }
938             __sdc_ip_addr__: { get_param: sdc_ip_addr }
939             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
940             __vid_ip_addr__: { get_param: vid_ip_addr }
941             __clamp_ip_addr__: { get_param: clamp_ip_addr }
942             __openo_ip_addr__: { get_param: openo_ip_addr }
943             __music_ip_addr__: { get_param: music_ip_addr }
944             __oof_ip_addr__: { get_param: oof_ip_addr }
945             __aaf_ip_addr__: { get_param: aaf_ip_addr }
946             __external_dns__: { get_param: external_dns }
947             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
948             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
949             __vm_flavor__: { get_param: flavor_medium }
950             __public_net_id__: { get_param: public_net_id }
951             __script_version__: { get_param: artifacts_version }
952             __robot_repo__: { get_param: robot_repo }
953             __docker_version__: { get_param: robot_docker }
954           template: |
955             #!/bin/bash
956
957             # Create configuration files
958             mkdir -p /opt/config
959             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
960             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
961             echo "__nexus_username__" > /opt/config/nexus_username.txt
962             echo "__nexus_password__" > /opt/config/nexus_password.txt
963             echo "__network_name__" > /opt/config/network.txt
964             echo "__openstack_username__" > /opt/config/openstack_username.txt
965             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
966             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
967             echo "__openstack_region__" > /opt/config/region.txt
968             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
969             echo "__docker_version__" > /opt/config/docker_version.txt
970             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
971             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
972             echo "__keystone_url__" > /opt/config/keystone.txt
973             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
974             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
975             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
976             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
977             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
978             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
979             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
980             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
981             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
982             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
983             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
984             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
985             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
986             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
987             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
988             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
989             echo "__cloud_env__" > /opt/config/cloud_env.txt
990             echo "__external_dns__" > /opt/config/external_dns.txt
991             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
992             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
993             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
994             echo "__script_version__" > /opt/config/script_version.txt
995             echo "__public_net_id__" > /opt/config/public_net_id.txt
996             echo "__robot_repo__" > /opt/config/remote_repo.txt
997
998             # Download and run install script
999             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
1000             cd /opt
1001             chmod +x robot_install.sh
1002             ./robot_install.sh
1003
1004
1005   # VID instantiation
1006   vid_private_port:
1007     type: OS::Neutron::Port
1008     properties:
1009       network: { get_resource: oam_onap }
1010       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
1011       security_groups:
1012       - { get_resource: onap_sg }
1013
1014   vid_floating_ip:
1015     type: OS::Neutron::FloatingIP
1016     properties:
1017       floating_network_id: { get_param: public_net_id }
1018       port_id: { get_resource: vid_private_port }
1019
1020   vid_vm:
1021     type: OS::Nova::Server
1022     properties:
1023       image: { get_param: ubuntu_1404_image }
1024       flavor: { get_param: flavor_medium }
1025       name:
1026         str_replace:
1027           template: base-vid
1028           params:
1029             base: { get_param: vm_base_name }
1030       key_name: { get_resource: vm_key }
1031       networks:
1032         - port: { get_resource: vid_private_port }
1033       user_data_format: RAW
1034       user_data:
1035         str_replace:
1036           params:
1037             __nexus_repo__: { get_param: nexus_repo }
1038             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1039             __nexus_username__: { get_param: nexus_username }
1040             __nexus_password__: { get_param: nexus_password }
1041             __artifacts_version__: { get_param: artifacts_version }
1042             __dns_ip_addr__: { get_param: dns_ip_addr }
1043             __docker_version__: { get_param: vid_docker }
1044             __gerrit_branch__: { get_param: vid_branch }
1045             __cloud_env__: { get_param: cloud_env }
1046             __external_dns__: { get_param: external_dns }
1047             __vid_repo__: { get_param: vid_repo }
1048           template: |
1049             #!/bin/bash
1050
1051             # Create configuration files
1052             mkdir -p /opt/config
1053             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1054             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1055             echo "__nexus_username__" > /opt/config/nexus_username.txt
1056             echo "__nexus_password__" > /opt/config/nexus_password.txt
1057             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1058             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1059             echo "__docker_version__" > /opt/config/docker_version.txt
1060             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1061             echo "__cloud_env__" > /opt/config/cloud_env.txt
1062             echo "__external_dns__" > /opt/config/external_dns.txt
1063             echo "__vid_repo__" > /opt/config/remote_repo.txt
1064
1065             # Download and run install script
1066             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
1067             cd /opt
1068             chmod +x vid_install.sh
1069             ./vid_install.sh
1070
1071
1072   # SDN-C instantiation
1073   sdnc_private_port:
1074     type: OS::Neutron::Port
1075     properties:
1076       network: { get_resource: oam_onap }
1077       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
1078       security_groups:
1079       - { get_resource: onap_sg }
1080
1081   sdnc_floating_ip:
1082     type: OS::Neutron::FloatingIP
1083     properties:
1084       floating_network_id: { get_param: public_net_id }
1085       port_id: { get_resource: sdnc_private_port }
1086
1087   sdnc_vm:
1088     type: OS::Nova::Server
1089     properties:
1090       image: { get_param: ubuntu_1404_image }
1091       flavor: { get_param: flavor_large }
1092       name:
1093         str_replace:
1094           template: base-sdnc
1095           params:
1096             base: { get_param: vm_base_name }
1097       key_name: { get_resource: vm_key }
1098       networks:
1099         - port: { get_resource: sdnc_private_port }
1100       user_data_format: RAW
1101       user_data:
1102         str_replace:
1103           params:
1104             __nexus_repo__: { get_param: nexus_repo }
1105             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1106             __nexus_username__: { get_param: nexus_username }
1107             __nexus_password__: { get_param: nexus_password }
1108             __artifacts_version__: { get_param: artifacts_version }
1109             __dns_ip_addr__: { get_param: dns_ip_addr }
1110             __docker_version__: { get_param: sdnc_docker }
1111             __gerrit_branch__: { get_param: sdnc_branch }
1112             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1113             __cloud_env__: { get_param: cloud_env }
1114             __external_dns__: { get_param: external_dns }
1115             __sdnc_repo__: { get_param: sdnc_repo }
1116           template: |
1117             #!/bin/bash
1118
1119             # Create configuration files
1120             mkdir -p /opt/config
1121             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1122             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1123             echo "__nexus_username__" > /opt/config/nexus_username.txt
1124             echo "__nexus_password__" > /opt/config/nexus_password.txt
1125             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1126             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1127             echo "__docker_version__" > /opt/config/docker_version.txt
1128             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1129             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1130             echo "__cloud_env__" > /opt/config/cloud_env.txt
1131             echo "__external_dns__" > /opt/config/external_dns.txt
1132             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1133
1134             # Download and run install script
1135             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
1136             cd /opt
1137             chmod +x sdnc_install.sh
1138             ./sdnc_install.sh
1139
1140
1141   # SDC instantiation
1142   sdc_private_port:
1143     type: OS::Neutron::Port
1144     properties:
1145       network: { get_resource: oam_onap }
1146       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1147       security_groups:
1148       - { get_resource: onap_sg }
1149
1150   sdc_floating_ip:
1151     type: OS::Neutron::FloatingIP
1152     properties:
1153       floating_network_id: { get_param: public_net_id }
1154       port_id: { get_resource: sdc_private_port }
1155
1156   sdc_volume_data:
1157     type: OS::Cinder::Volume
1158     properties:
1159       name: vol1-sdc-data
1160       size: 100
1161
1162   sdc_vm:
1163     type: OS::Nova::Server
1164     properties:
1165       image: { get_param: ubuntu_1604_image }
1166       flavor: { get_param: flavor_xlarge }
1167       name:
1168         str_replace:
1169           template: base-sdc
1170           params:
1171             base: { get_param: vm_base_name }
1172       key_name: { get_resource: vm_key }
1173       networks:
1174         - port: { get_resource: sdc_private_port }
1175       block_device_mapping:
1176         - device_name: /dev/vdb
1177           volume_id: {get_resource: sdc_volume_data}
1178       user_data_format: RAW
1179       user_data:
1180         str_replace:
1181           params:
1182             __nexus_repo__: { get_param: nexus_repo }
1183             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1184             __nexus_username__: { get_param: nexus_username }
1185             __nexus_password__: { get_param: nexus_password }
1186             __env_name__: { get_param: dmaap_topic }
1187             __artifacts_version__: { get_param: artifacts_version }
1188             __dns_ip_addr__: { get_param: dns_ip_addr }
1189             __mr_ip_addr__: { get_param: mr_ip_addr }
1190             __private_ip__: { get_param: sdc_ip_addr }
1191             __docker_version__: { get_param: sdc_docker }
1192             __gerrit_branch__: { get_param: sdc_branch }
1193             __cloud_env__: { get_param: cloud_env }
1194             __external_dns__: { get_param: external_dns }
1195             __sdc_repo__: { get_param: sdc_repo }
1196           template: |
1197             #!/bin/bash
1198
1199             # Create configuration files
1200             mkdir -p /opt/config
1201             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1202             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1203             echo "__nexus_username__" > /opt/config/nexus_username.txt
1204             echo "__nexus_password__" > /opt/config/nexus_password.txt
1205             echo "__env_name__" > /opt/config/env_name.txt
1206             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1207             echo "__private_ip__" > /opt/config/private_ip.txt
1208             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1209             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1210             echo "__docker_version__" > /opt/config/docker_version.txt
1211             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1212             echo "__cloud_env__" > /opt/config/cloud_env.txt
1213             echo "__external_dns__" > /opt/config/external_dns.txt
1214             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1215
1216             # Download and run install script
1217             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
1218             cd /opt
1219             chmod +x sdc_install.sh
1220             ./sdc_install.sh
1221
1222
1223   # PORTAL instantiation
1224   portal_private_port:
1225     type: OS::Neutron::Port
1226     properties:
1227       network: { get_resource: oam_onap }
1228       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1229       security_groups:
1230       - { get_resource: onap_sg }
1231
1232   portal_floating_ip:
1233     type: OS::Neutron::FloatingIP
1234     properties:
1235       floating_network_id: { get_param: public_net_id }
1236       port_id: { get_resource: portal_private_port }
1237
1238   portal_vm:
1239     type: OS::Nova::Server
1240     properties:
1241       image: { get_param: ubuntu_1404_image }
1242       flavor: { get_param: flavor_large }
1243       name:
1244         str_replace:
1245           template: base-portal
1246           params:
1247             base: { get_param: vm_base_name }
1248       key_name: { get_resource: vm_key }
1249       networks:
1250         - port: { get_resource: portal_private_port }
1251       user_data_format: RAW
1252       user_data:
1253         str_replace:
1254           params:
1255             __nexus_repo__: { get_param: nexus_repo }
1256             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1257             __nexus_username__: { get_param: nexus_username }
1258             __nexus_password__: { get_param: nexus_password }
1259             __artifacts_version__: { get_param: artifacts_version }
1260             __dns_ip_addr__: { get_param: dns_ip_addr }
1261             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1262             __docker_version__: { get_param: portal_docker }
1263             __gerrit_branch__: { get_param: portal_branch }
1264             __cli_docker__: { get_param: cli_docker }
1265             __cloud_env__: { get_param: cloud_env }
1266             __external_dns__: { get_param: external_dns }
1267             __portal_repo__: { get_param: portal_repo }
1268           template: |
1269             #!/bin/bash
1270
1271             # Create configuration files
1272             mkdir -p /opt/config
1273             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1274             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1275             echo "__nexus_username__" > /opt/config/nexus_username.txt
1276             echo "__nexus_password__" > /opt/config/nexus_password.txt
1277             echo "__public_ip__" > /opt/config/public_ip.txt
1278             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1279             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1280             echo "__docker_version__" > /opt/config/docker_version.txt
1281             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1282             echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1283             echo "__cloud_env__" > /opt/config/cloud_env.txt
1284             echo "__external_dns__" > /opt/config/external_dns.txt
1285             echo "__portal_repo__" > /opt/config/remote_repo.txt
1286
1287             # Download and run install script
1288             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1289             cd /opt
1290             chmod +x portal_install.sh
1291             ./portal_install.sh
1292
1293
1294   # Policy Engine instantiation
1295   policy_private_port:
1296     type: OS::Neutron::Port
1297     properties:
1298       network: { get_resource: oam_onap }
1299       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1300       security_groups:
1301       - { get_resource: onap_sg }
1302
1303   policy_floating_ip:
1304     type: OS::Neutron::FloatingIP
1305     properties:
1306       floating_network_id: { get_param: public_net_id }
1307       port_id: { get_resource: policy_private_port }
1308
1309   policy_vm:
1310     type: OS::Nova::Server
1311     properties:
1312       image: { get_param: ubuntu_1404_image }
1313       flavor: { get_param: flavor_xlarge }
1314       name:
1315         str_replace:
1316           template: base-policy
1317           params:
1318             base: { get_param: vm_base_name }
1319       key_name: { get_resource: vm_key }
1320       networks:
1321         - port: { get_resource: policy_private_port }
1322       user_data_format: RAW
1323       user_data:
1324         str_replace:
1325           params:
1326             __nexus_repo__: { get_param: nexus_repo }
1327             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1328             __nexus_username__: { get_param: nexus_username }
1329             __nexus_password__: { get_param: nexus_password }
1330             __artifacts_version__: { get_param: artifacts_version }
1331             __dns_ip_addr__: { get_param: dns_ip_addr }
1332             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1333             __docker_version__: { get_param: policy_docker }
1334             __gerrit_branch__: { get_param: policy_branch }
1335             __cloud_env__: { get_param: cloud_env }
1336             __external_dns__: { get_param: external_dns }
1337             __policy_repo__: { get_param: policy_repo }
1338           template: |
1339             #!/bin/bash
1340
1341             # Create configuration files
1342             mkdir -p /opt/config
1343             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1344             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1345             echo "__nexus_username__" > /opt/config/nexus_username.txt
1346             echo "__nexus_password__" > /opt/config/nexus_password.txt
1347             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1348             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1349             echo "__public_ip__" > /opt/config/public_ip.txt
1350             echo "__docker_version__" > /opt/config/docker_version.txt
1351             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1352             echo "__cloud_env__" > /opt/config/cloud_env.txt
1353             echo "__external_dns__" > /opt/config/external_dns.txt
1354             echo "__policy_repo__" > /opt/config/remote_repo.txt
1355
1356             # Download and run install script
1357             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1358             cd /opt
1359             chmod +x policy_install.sh
1360             ./policy_install.sh
1361
1362
1363   # APP-C instantiation
1364   appc_private_port:
1365     type: OS::Neutron::Port
1366     properties:
1367       network: { get_resource: oam_onap }
1368       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1369       security_groups:
1370       - { get_resource: onap_sg }
1371
1372   appc_floating_ip:
1373     type: OS::Neutron::FloatingIP
1374     properties:
1375       floating_network_id: { get_param: public_net_id }
1376       port_id: { get_resource: appc_private_port }
1377
1378   appc_vm:
1379     type: OS::Nova::Server
1380     properties:
1381       image: { get_param: ubuntu_1404_image }
1382       flavor: { get_param: flavor_large }
1383       name:
1384         str_replace:
1385           template: base-appc
1386           params:
1387             base: { get_param: vm_base_name }
1388       key_name: { get_resource: vm_key }
1389       networks:
1390         - port: { get_resource: appc_private_port }
1391       user_data_format: RAW
1392       user_data:
1393         str_replace:
1394           params:
1395             __nexus_repo__: { get_param: nexus_repo }
1396             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1397             __nexus_username__: { get_param: nexus_username }
1398             __nexus_password__: { get_param: nexus_password }
1399             __dmaap_topic__: { get_param: dmaap_topic }
1400             __artifacts_version__: { get_param: artifacts_version }
1401             __dns_ip_addr__: { get_param: dns_ip_addr }
1402             __docker_version__: { get_param: appc_docker }
1403             __gerrit_branch__: { get_param: appc_branch }
1404             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1405             __cloud_env__: { get_param: cloud_env }
1406             __external_dns__: { get_param: external_dns }
1407             __appc_repo__: { get_param: appc_repo }
1408           template: |
1409             #!/bin/bash
1410
1411             # Create configuration files
1412             mkdir -p /opt/config
1413             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1414             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1415             echo "__nexus_username__" > /opt/config/nexus_username.txt
1416             echo "__nexus_password__" > /opt/config/nexus_password.txt
1417             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1418             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1419             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1420             echo "__docker_version__" > /opt/config/docker_version.txt
1421             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1422             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1423             echo "__cloud_env__" > /opt/config/cloud_env.txt
1424             echo "__external_dns__" > /opt/config/external_dns.txt
1425             echo "__appc_repo__" > /opt/config/remote_repo.txt
1426
1427             # Download and run install script
1428             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1429             cd /opt
1430             chmod +x appc_install.sh
1431             ./appc_install.sh
1432
1433
1434   # CLAMP instantiation
1435   clamp_private_port:
1436     type: OS::Neutron::Port
1437     properties:
1438       network: { get_resource: oam_onap }
1439       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1440       security_groups:
1441       - { get_resource: onap_sg }
1442
1443   clamp_floating_ip:
1444     type: OS::Neutron::FloatingIP
1445     properties:
1446       floating_network_id: { get_param: public_net_id }
1447       port_id: { get_resource: clamp_private_port }
1448
1449   clamp_vm:
1450     type: OS::Nova::Server
1451     properties:
1452       image: { get_param: ubuntu_1604_image }
1453       flavor: { get_param: flavor_medium }
1454       name:
1455         str_replace:
1456           template: base-clamp
1457           params:
1458             base: { get_param: vm_base_name }
1459       key_name: { get_resource: vm_key }
1460       networks:
1461         - port: { get_resource: clamp_private_port }
1462       user_data_format: RAW
1463       user_data:
1464         str_replace:
1465           params:
1466             __nexus_repo__: { get_param: nexus_repo }
1467             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1468             __nexus_username__: { get_param: nexus_username }
1469             __nexus_password__: { get_param: nexus_password }
1470             __openstack_username__: { get_param: openstack_username }
1471             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1472             __openstack_api_key__: { get_param: openstack_api_key }
1473             __openstack_region__: { get_param: openstack_region }
1474             __keystone_url__: { get_param: keystone_url }
1475             __dmaap_topic__: { get_param: dmaap_topic }
1476             __artifacts_version__: { get_param: artifacts_version }
1477             __dns_ip_addr__: { get_param: dns_ip_addr }
1478             __docker_version__: { get_param: clamp_docker }
1479             __gerrit_branch__: { get_param: clamp_branch }
1480             __cloud_env__: { get_param: cloud_env }
1481             __external_dns__: { get_param: external_dns }
1482             __clamp_repo__: { get_param: clamp_repo }
1483           template: |
1484             #!/bin/bash
1485
1486             # Create configuration files
1487             mkdir -p /opt/config
1488             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1489             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1490             echo "__nexus_username__" > /opt/config/nexus_username.txt
1491             echo "__nexus_password__" > /opt/config/nexus_password.txt
1492             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1493             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1494             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1495             echo "__openstack_username__" > /opt/config/openstack_username.txt
1496             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1497             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1498             echo "__openstack_region__" > /opt/config/openstack_region.txt
1499             echo "__keystone_url__" > /opt/config/keystone.txt
1500             echo "__docker_version__" > /opt/config/docker_version.txt
1501             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1502             echo "__cloud_env__" > /opt/config/cloud_env.txt
1503             echo "__external_dns__" > /opt/config/external_dns.txt
1504             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1505
1506             # Download and run install script
1507             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1508             cd /opt
1509             chmod +x clamp_install.sh
1510             ./clamp_install.sh
1511
1512
1513   # OPEN-O VM instantiation
1514   openo_private_port:
1515     type: OS::Neutron::Port
1516     properties:
1517       network: { get_resource: oam_onap }
1518       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1519       security_groups:
1520       - { get_resource: onap_sg }
1521
1522   openo_floating_ip:
1523     type: OS::Neutron::FloatingIP
1524     properties:
1525       floating_network_id: { get_param: public_net_id }
1526       port_id: { get_resource: openo_private_port }
1527
1528   openo_vm:
1529     type: OS::Nova::Server
1530     properties:
1531       image: { get_param: ubuntu_1604_image }
1532       flavor: { get_param: flavor_xxlarge }
1533       name:
1534         str_replace:
1535           template: base-multi-service
1536           params:
1537             base: { get_param: vm_base_name }
1538       key_name: { get_resource: vm_key }
1539       networks:
1540         - port: { get_resource: openo_private_port }
1541       user_data_format: RAW
1542       user_data:
1543         str_replace:
1544           params:
1545             __nexus_repo__: { get_param: nexus_repo }
1546             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1547             __nexus_username__: { get_param: nexus_username }
1548             __nexus_password__: { get_param: nexus_password }
1549             __artifacts_version__: { get_param: artifacts_version }
1550             __dns_ip_addr__: { get_param: dns_ip_addr }
1551             __oam_network_cidr__: { get_param: oam_network_cidr }
1552             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1553             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1554             __appc_ip_addr__: { get_param: appc_ip_addr }
1555             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1556             __so_ip_addr__: { get_param: so_ip_addr }
1557             __mr_ip_addr__: { get_param: mr_ip_addr }
1558             __policy_ip_addr__: { get_param: policy_ip_addr }
1559             __portal_ip_addr__: { get_param: portal_ip_addr }
1560             __robot_ip_addr__: { get_param: robot_ip_addr }
1561             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1562             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1563             __vid_ip_addr__: { get_param: vid_ip_addr }
1564             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1565             __openo_ip_addr__: { get_param: openo_ip_addr }
1566             __cloud_env__: { get_param: cloud_env }
1567             __external_dns__: { get_param: external_dns }
1568             __vnfsdk_branch__: { get_param: vnfsdk_branch }
1569             __msb_docker__: { get_param: msb_docker }
1570             __mvim_docker__: { get_param: mvim_docker }
1571             __uui_docker__: { get_param: uui_docker }
1572             __esr_docker__: { get_param: esr_docker }
1573             __vnfsdk_repo__: { get_param: vnfsdk_repo }
1574             __vfc_nokia_docker__: { get_param: vfc_nokia_docker }
1575             __vfc_nokiav2_docker__: { get_param: vfc_nokiav2_docker }
1576             __cbam_ip__: { get_param: cbam_ip }
1577             __cbam_username__: { get_param: cbam_username }
1578             __cbam_password__: { get_param: cbam_password }
1579             __vfc_ztevnfmdriver_docker__: { get_param: vfc_ztevnfmdriver_docker }
1580             __vfc_ztesdncdriver_docker__: { get_param: vfc_ztesdncdriver_docker }
1581             __vfc_vnfres_docker__: { get_param: vfc_vnfres_docker }
1582             __vfc_vnfmgr_docker__: { get_param: vfc_vnfmgr_docker }
1583             __vfc_vnflcm_docker__: { get_param: vfc_vnflcm_docker }
1584             __vfc_resmanagement_docker__: { get_param: vfc_resmanagement_docker }
1585             __vfc_nslcm_docker__: { get_param: vfc_nslcm_docker }
1586             __vfc_huawei_docker__: { get_param: vfc_huawei_docker }
1587             __vfc_jujudriver_docker__: { get_param: vfc_jujudriver_docker }
1588             __vfc_gvnfmdriver_docker__: { get_param: vfc_gvnfmdriver_docker }
1589             __vfc_emsdriver_docker__: { get_param: vfc_emsdriver_docker }
1590             __vfc_catalog_docker__: { get_param: vfc_catalog_docker }
1591             __vfc_wfengine_mgrservice_docker__: { get_param: vfc_wfengine_mgrservice_docker }
1592             __vfc_wfengine_activiti_docker__: { get_param: vfc_wfengine_activiti_docker }
1593           template: |
1594             #!/bin/bash
1595
1596             # Create configuration files
1597             mkdir -p /opt/config
1598             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1599             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1600             echo "__nexus_username__" > /opt/config/nexus_username.txt
1601             echo "__nexus_password__" > /opt/config/nexus_password.txt
1602             echo "__cloud_env__" > /opt/config/cloud_env.txt
1603             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1604             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1605             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1606             echo "__external_dns__" > /opt/config/external_dns.txt
1607             echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
1608             echo "__msb_docker__" > /opt/config/msb_docker.txt
1609             echo "__mvim_docker__" > /opt/config/mvim_docker.txt
1610             echo "__uui_docker__" > /opt/config/uui_docker.txt
1611             echo "__esr_docker__" > /opt/config/esr_docker.txt
1612             echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
1613             echo "__cbam_ip__" > /opt/config/cbam_ip.txt
1614             echo "__cbam_username__" > /opt/config/cbam_username.txt
1615             echo "__cbam_password__" > /opt/config/cbam_password.txt
1616
1617             echo "export NOKIA_DOCKER_VER=__vfc_nokia_docker__" >> /opt/config/vfc_docker.txt
1618             echo "export NOKIAV2_DOCKER_VER=__vfc_nokiav2_docker__" >> /opt/config/vfc_docker.txt
1619             echo "export ZTEVNFMDRIVER_DOCKER_VER=__vfc_ztevnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1620             echo "export ZTESDNCDRIVER_DOCKER_VER=__vfc_ztesdncdriver_docker__" >> /opt/config/vfc_docker.txt
1621             echo "export VNFRES_DOCKER_VER=__vfc_vnfres_docker__" >> /opt/config/vfc_docker.txt
1622             echo "export VNFMGR_DOCKER_VER=__vfc_vnfmgr_docker__" >> /opt/config/vfc_docker.txt
1623             echo "export VNFLCM_DOCKER_VER=__vfc_vnflcm_docker__" >> /opt/config/vfc_docker.txt
1624             echo "export RESMANAGEMENT_DOCKER_VER=__vfc_resmanagement_docker__" >> /opt/config/vfc_docker.txt
1625             echo "export NSLCM_DOCKER_VER=__vfc_nslcm_docker__" >> /opt/config/vfc_docker.txt
1626             echo "export HUAWEI_DOCKER_VER=__vfc_huawei_docker__" >> /opt/config/vfc_docker.txt
1627             echo "export JUJUDRIVER_DOCKER_VER=__vfc_jujudriver_docker__" >> /opt/config/vfc_docker.txt
1628             echo "export GVNFMDRIVER_DOCKER_VER=__vfc_gvnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1629             echo "export EMSDRIVER_DOCKER_VER=__vfc_emsdriver_docker__" >> /opt/config/vfc_docker.txt
1630             echo "export CATALOG_DOCKER_VER=__vfc_catalog_docker__" >> /opt/config/vfc_docker.txt
1631             echo "export MGRSERVICE_DOCKER_VER=__vfc_wfengine_mgrservice_docker__" >> /opt/config/vfc_docker.txt
1632             echo "export ACTIVITI_DOCKER_VER=__vfc_wfengine_activiti_docker__" >> /opt/config/vfc_docker.txt
1633
1634             # Create env file with the IP address of all ONAP components
1635             echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
1636             echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
1637             echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
1638             echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
1639             echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
1640             echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
1641             echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
1642             echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
1643             echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
1644             echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
1645             echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
1646             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
1647             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
1648             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
1649
1650             # Download and run install script
1651             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/openo_install.sh -o /opt/openo_install.sh
1652             cd /opt
1653             chmod +x openo_install.sh
1654             ./openo_install.sh
1655
1656
1657   # DCAE GEN 2 Controller instantiation
1658   dcae_c_private_port:
1659     type: OS::Neutron::Port
1660     properties:
1661       network: { get_resource: oam_onap }
1662       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1663       security_groups:
1664       - { get_resource: onap_sg }
1665
1666   dcae_c_floating_ip:
1667     type: OS::Neutron::FloatingIP
1668     properties:
1669       floating_network_id: { get_param: public_net_id }
1670       port_id: { get_resource: dcae_c_private_port }
1671
1672   dcae_c_vm:
1673     type: OS::Nova::Server
1674     properties:
1675       image: { get_param: ubuntu_1604_image }
1676       flavor: { get_param: flavor_small }
1677       name:
1678         str_replace:
1679           template: base-dcae-bootstrap
1680           params:
1681             base: { get_param: vm_base_name }
1682       key_name: { get_resource: vm_key }
1683       networks:
1684         - port: { get_resource: dcae_c_private_port }
1685       #security_groups:
1686       #  - { get_resource: onap_sg }
1687       user_data_format: RAW
1688       user_data:
1689         str_replace:
1690           params:
1691             __rand_str__: { get_resource: random-str }
1692             # repo related
1693             __artifacts_version__: { get_param: artifacts_version }
1694             __docker_version__: { get_param: dcae_docker }
1695             __nexus_repo__: { get_param: nexus_repo }
1696             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1697             __nexus_username__: { get_param: nexus_username }
1698             __nexus_password__: { get_param: nexus_password }
1699             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1700             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
1701             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1702             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1703             __dns_ip_addr__: { get_param: dns_ip_addr }
1704             __external_dns__: { get_param: external_dns }
1705             __dns_forwarder__: { get_param: dns_forwarder }
1706             __dcae_domain__: { get_param: dcae_domain }
1707             # conf for VMs DCAE is to bringup
1708             __openstack_keystone_url__: { get_param: keystone_url }
1709             __dcae_keystone_url__: { get_param: dcae_keystone_url }
1710             __dcaeos_cloud_env__: { get_param: cloud_env }
1711             __dcaeos_keystone_url__: { get_param: dcae_keystone_url }
1712             __dcaeos_region__: { get_param: openstack_region }
1713             __dcaeos_tenant_id__: { get_param: openstack_tenant_id }
1714             __dcaeos_tenant_name__: { get_param: openstack_tenant_name }
1715             __dcaeos_security_group__:
1716               str_replace:
1717                 template: 'onap_sg_rand'
1718                 params:
1719                   rand: { get_resource: random-str }
1720             #__dcaeos_security_group__: { get_attr: [onap_sg, name] }
1721             __dcaeos_username__: { get_param: openstack_username }
1722             __dcaeos_password__: { get_param: openstack_api_key }
1723             __dcaeos_key_name__: { get_resource: vm_key }
1724             __dcaeos_public_key__: { get_param: dcae_public_key }
1725             __dcaeos_private_key__: { get_param: dcae_private_key }
1726             __dcaeos_private_network_name__: { get_attr: [oam_onap, name] }
1727             __dcaeos_public_network_name__: { get_param: public_net_name }
1728             __dcaeos_ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1729             __dcaeos_centos_7_image__: { get_param: dcae_centos_7_image }
1730             __dcaeos_flavor_id__: { get_param: flavor_medium }
1731             __dcaeos_flavor_id_cdap__: { get_param: flavor_large }
1732             __dcaeos_dnsaas_config_enabled__: { get_param: dnsaas_config_enabled }
1733             __dcaeos_dnsaas_region__: { get_param: dnsaas_region }
1734             __dcaeos_dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
1735             __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
1736             __dcaeos_dnsaas_username__: { get_param: dnsaas_username }
1737             __dcaeos_dnsaas_password__: { get_param: dnsaas_password }
1738             # fixed private IPs
1739             __mr_ip_addr__: { get_param: mr_ip_addr }
1740             __policy_ip_addr__: { get_param: policy_ip_addr }
1741             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1742             __openo_ip_addr__: { get_param: openo_ip_addr }
1743             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1744             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1745             # floating IPs
1746             __dns_floating_ip_addr__: { get_attr: [dns_floating_ip, floating_ip_address] }
1747             __aai1_floating_ip_addr__: { get_attr: [aai1_floating_ip, floating_ip_address] }
1748             __aai2_floating_ip_addr__: { get_attr: [aai2_floating_ip, floating_ip_address] }
1749             __mrouter_floating_ip_addr__: { get_attr: [mrouter_floating_ip, floating_ip_address] }
1750             __sdc_floating_ip_addr__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1751             __policy_floating_ip_addr__: { get_attr: [policy_floating_ip, floating_ip_address] }
1752             __openo_floating_ip_addr__: { get_attr: [openo_floating_ip, floating_ip_address] }
1753             __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1754
1755           template: |
1756             #!/bin/bash
1757
1758             # Create configuration files
1759             mkdir -p /opt/config
1760             echo "__rand_str__" > /opt/config/dcae_zone.txt
1761             echo "__rand_str__" > /opt/config/rand_str.txt
1762             # repo related
1763             echo "__docker_version__" > /opt/config/docker_version.txt
1764             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1765             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1766             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1767             echo "__nexus_username__" > /opt/config/nexus_username.txt
1768             echo "__nexus_password__" > /opt/config/nexus_password.txt
1769             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1770             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1771             echo "__mac_addr__" > /opt/config/mac_addr.txt
1772             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1773             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1774             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1775             echo "__external_dns__" > /opt/config/external_dns.txt
1776             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
1777             echo "__dcae_domain__" > /opt/config/dcae_domain.txt
1778             # conf for the OpenStack env where DCAE is deployed
1779             echo "__openstack_keystone_url__" > /opt/config/openstack_keystone_url.txt
1780             echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
1781             echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
1782             echo "__dcaeos_region__" > /opt/config/openstack_region.txt
1783             echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
1784             echo "__dcaeos_tenant_name__" > /opt/config/tenant_name.txt
1785             echo "__dcaeos_username__" > /opt/config/openstack_user.txt
1786             echo "__dcaeos_password__" > /opt/config/openstack_password.txt
1787             echo "__dcaeos_key_name__" > /opt/config/key_name.txt
1788             echo "__dcaeos_public_key__" > /opt/config/pub_key.txt
1789             echo "__dcaeos_private_key__" > /opt/config/priv_key
1790             echo "__dcaeos_private_network_name__" > /opt/config/openstack_private_network_name.txt
1791             echo "__dcaeos_public_network_name__" > /opt/config/public_net_name.txt
1792             echo "__dcaeos_public_network_name__" > /opt/config/public_net_id.txt
1793             echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1794             echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
1795             echo "__dcaeos_security_group__" > /opt/config/security_group.txt
1796             echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
1797             echo "__dcaeos_flavor_id_cdap__" > /opt/config/flavor_id_cdap.txt
1798             echo "__dcaeos_dnsaas_config_enabled__" > /opt/config/dnsaas_config_enabled.txt
1799             echo "__dcaeos_dnsaas_region__" > /opt/config/dnsaas_region.txt
1800             echo "__dcaeos_dnsaas_keystone_url__" > /opt/config/dnsaas_keystone_url.txt
1801             echo "__dnsaas_tenant_name__" > /opt/config/dnsaas_tenant_name.txt
1802             echo "__dcaeos_dnsaas_username__" > /opt/config/dnsaas_username.txt
1803             echo "__dcaeos_dnsaas_password__" > /opt/config/dnsaas_password.txt
1804             # fixed private IP addresses of other ONAP components
1805             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1806             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1807             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1808             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
1809             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
1810             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
1811             # floating IPs
1812             echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
1813             echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
1814             echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
1815             echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
1816             echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
1817             echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
1818             echo "__openo_floating_ip_addr__" > /opt/config/openo_floating_ip_addr.txt
1819             echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
1820
1821             # Download and run install script
1822             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae2_install.sh -o /opt/dcae2_install.sh
1823             cd /opt
1824             chmod +x dcae2_install.sh
1825             ./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
1826
1827
1828   # MUSIC instantiation
1829   music_private_port:
1830     type: OS::Neutron::Port
1831     properties:
1832       network: { get_resource: oam_onap }
1833       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
1834       security_groups:
1835       - { get_resource: onap_sg }
1836
1837   music_floating_ip:
1838     type: OS::Neutron::FloatingIP
1839     properties:
1840       floating_network_id: { get_param: public_net_id }
1841       port_id: { get_resource: music_private_port }
1842
1843   music_vm:
1844     type: OS::Nova::Server
1845     properties:
1846       image: { get_param: ubuntu_1404_image }
1847       flavor: { get_param: flavor_large }
1848       name:
1849         str_replace:
1850           template: base-music
1851           params:
1852             base: { get_param: vm_base_name }
1853       key_name: { get_resource: vm_key }
1854       networks:
1855         - port: { get_resource: music_private_port }
1856       user_data_format: RAW
1857       user_data:
1858         str_replace:
1859           params:
1860             __nexus_repo__: { get_param: nexus_repo }
1861             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1862             __nexus_username__: { get_param: nexus_username }
1863             __nexus_password__: { get_param: nexus_password }
1864             __artifacts_version__: { get_param: artifacts_version }
1865             __dns_ip_addr__: { get_param: dns_ip_addr }
1866             __docker_version__: { get_param: music_docker }
1867             __cloud_env__: { get_param: cloud_env }
1868             __external_dns__: { get_param: external_dns }
1869           template: |
1870             #!/bin/bash
1871
1872             # Create configuration files
1873             mkdir -p /opt/config
1874             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1875             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1876             echo "__nexus_username__" > /opt/config/nexus_username.txt
1877             echo "__nexus_password__" > /opt/config/nexus_password.txt
1878             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1879             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1880             echo "__docker_version__" > /opt/config/docker_version.txt
1881             echo "__cloud_env__" > /opt/config/cloud_env.txt
1882             echo "__external_dns__" > /opt/config/external_dns.txt
1883
1884             # Download and run install script
1885             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/music_install.sh -o /opt/music_install.sh
1886             cd /opt
1887             chmod +x music_install.sh
1888             ./music_install.sh
1889
1890
1891   # OOF instantiation
1892   oof_private_port:
1893     type: OS::Neutron::Port
1894     properties:
1895       network: { get_resource: oam_onap }
1896       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
1897       security_groups:
1898       - { get_resource: onap_sg }
1899
1900   oof_floating_ip:
1901     type: OS::Neutron::FloatingIP
1902     properties:
1903       floating_network_id: { get_param: public_net_id }
1904       port_id: { get_resource: oof_private_port }
1905
1906   oof_vm:
1907     type: OS::Nova::Server
1908     properties:
1909       image: { get_param: ubuntu_1404_image }
1910       flavor: { get_param: flavor_medium }
1911       name:
1912         str_replace:
1913           template: base-oof
1914           params:
1915             base: { get_param: vm_base_name }
1916       key_name: { get_resource: vm_key }
1917       networks:
1918         - port: { get_resource: oof_private_port }
1919       user_data_format: RAW
1920       user_data:
1921         str_replace:
1922           params:
1923             __nexus_repo__: { get_param: nexus_repo }
1924             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1925             __nexus_username__: { get_param: nexus_username }
1926             __nexus_password__: { get_param: nexus_password }
1927             __artifacts_version__: { get_param: artifacts_version }
1928             __dns_ip_addr__: { get_param: dns_ip_addr }
1929             __docker_version__: { get_param: oof_docker }
1930             __cloud_env__: { get_param: cloud_env }
1931             __external_dns__: { get_param: external_dns }
1932           template: |
1933             #!/bin/bash
1934
1935             # Create configuration files
1936             mkdir -p /opt/config
1937             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1938             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1939             echo "__nexus_username__" > /opt/config/nexus_username.txt
1940             echo "__nexus_password__" > /opt/config/nexus_password.txt
1941             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1942             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1943             echo "__docker_version__" > /opt/config/docker_version.txt
1944             echo "__cloud_env__" > /opt/config/cloud_env.txt
1945             echo "__external_dns__" > /opt/config/external_dns.txt
1946
1947             # Download and run install script
1948             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/oof_install.sh -o /opt/oof_install.sh
1949             cd /opt
1950             chmod +x oof_install.sh
1951             ./oof_install.sh
1952
1953
1954   # AAF instantiation
1955   aaf_private_port:
1956     type: OS::Neutron::Port
1957     properties:
1958       network: { get_resource: oam_onap }
1959       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
1960       security_groups:
1961       - { get_resource: onap_sg }
1962
1963   aaf_floating_ip:
1964     type: OS::Neutron::FloatingIP
1965     properties:
1966       floating_network_id: { get_param: public_net_id }
1967       port_id: { get_resource: aaf_private_port }
1968
1969   aaf_vm:
1970     type: OS::Nova::Server
1971     properties:
1972       image: { get_param: ubuntu_1404_image }
1973       flavor: { get_param: flavor_medium }
1974       name:
1975         str_replace:
1976           template: base-aaf
1977           params:
1978             base: { get_param: vm_base_name }
1979       key_name: { get_resource: vm_key }
1980       networks:
1981         - port: { get_resource: aaf_private_port }
1982       user_data_format: RAW
1983       user_data:
1984         str_replace:
1985           params:
1986             __nexus_repo__: { get_param: nexus_repo }
1987             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1988             __nexus_username__: { get_param: nexus_username }
1989             __nexus_password__: { get_param: nexus_password }
1990             __artifacts_version__: { get_param: artifacts_version }
1991             __dns_ip_addr__: { get_param: dns_ip_addr }
1992             __docker_version__: { get_param: aaf_docker }
1993             __cloud_env__: { get_param: cloud_env }
1994             __external_dns__: { get_param: external_dns }
1995           template: |
1996             #!/bin/bash
1997
1998             # Create configuration files
1999             mkdir -p /opt/config
2000             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2001             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2002             echo "__nexus_username__" > /opt/config/nexus_username.txt
2003             echo "__nexus_password__" > /opt/config/nexus_password.txt
2004             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2005             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2006             echo "__docker_version__" > /opt/config/docker_version.txt
2007             echo "__cloud_env__" > /opt/config/cloud_env.txt
2008             echo "__external_dns__" > /opt/config/external_dns.txt
2009
2010             # Download and run install script
2011             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aaf_install.sh -o /opt/aaf_install.sh
2012             cd /opt
2013             chmod +x aaf_install.sh
2014             ./aaf_install.sh
2015
2016   # NBI instantiation
2017   nbi_private_port:
2018     type: OS::Neutron::Port
2019     properties:
2020       network: { get_resource: oam_onap }
2021       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: nbi_ip_addr }}]
2022       security_groups:
2023       - { get_resource: onap_sg }
2024
2025   nbi_floating_ip:
2026     type: OS::Neutron::FloatingIP
2027     properties:
2028       floating_network_id: { get_param: public_net_id }
2029       port_id: { get_resource: nbi_private_port }
2030
2031   nbi_vm:
2032     type: OS::Nova::Server
2033     properties:
2034       image: { get_param: ubuntu_1604_image }
2035       flavor: { get_param: flavor_small }
2036       name:
2037         str_replace:
2038           template: base-nbi
2039           params:
2040             base: { get_param: vm_base_name }
2041       key_name: { get_resource: vm_key }
2042       networks:
2043         - port: { get_resource: nbi_private_port }
2044       user_data_format: RAW
2045       user_data:
2046         str_replace:
2047           params:
2048             __nexus_repo__: { get_param: nexus_repo }
2049             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2050             __nexus_username__: { get_param: nexus_username }
2051             __nexus_password__: { get_param: nexus_password }
2052             __artifacts_version__: { get_param: artifacts_version }
2053             __dns_ip_addr__: { get_param: dns_ip_addr }
2054             __docker_version__: { get_param: nbi_docker }
2055             __cloud_env__: { get_param: cloud_env }
2056             __external_dns__: { get_param: external_dns }
2057           template: |
2058             #!/bin/bash
2059
2060             # Create configuration files
2061             mkdir -p /opt/config
2062             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2063             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2064             echo "__nexus_username__" > /opt/config/nexus_username.txt
2065             echo "__nexus_password__" > /opt/config/nexus_password.txt
2066             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2067             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2068             echo "__docker_version__" > /opt/config/docker_version.txt
2069             echo "__cloud_env__" > /opt/config/cloud_env.txt
2070             echo "__external_dns__" > /opt/config/external_dns.txt
2071
2072             # Download and run install script
2073             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/nbi_install.sh -o /opt/nbi_install.sh
2074             cd /opt
2075             chmod +x nbi_install.sh
2076             ./nbi_install.sh