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