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