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