Fixed bug in vbrg vpp snat patch
[demo.git] / heat / ONAP / onap_openstack.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4
5 #
6 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #        http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 #==================LICENSE_END============================================
20 #
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 #
23 ##########################################################################
24
25 heat_template_version: 2015-10-15
26
27 description: Heat template to install ONAP components
28
29 ##############
30 #            #
31 # PARAMETERS #
32 #            #
33 ##############
34
35 parameters:
36
37   ##############################################
38   #                                            #
39   # Parameters used across all ONAP components #
40   #                                            #
41   ##############################################
42   
43   public_net_id:
44     type: string
45     description: Public network for floating IP address allocation
46
47   ubuntu_1404_image:
48     type: string
49     description: Name of the Ubuntu 14.04 image
50
51   ubuntu_1604_image:
52     type: string
53     description: Name of the Ubuntu 16.04 image
54
55   flavor_small:
56     type: string
57     description: Name of the Small Flavor supported by the cloud provider
58
59   flavor_medium:
60     type: string
61     description: Name of the Medium Flavor supported by the cloud provider
62
63   flavor_large:
64     type: string
65     description: Name of the Large Flavor supported by the cloud provider
66
67   flavor_xlarge:
68     type: string
69     description: Name of the Extra Large Flavor supported by the cloud provider
70
71   flavor_xxlarge:
72     type: string
73     description: Name of the Extra Extra Large Flavor supported by the cloud provider
74
75   vm_base_name:
76     type: string
77     description: Base name of ONAP VMs
78
79   key_name:
80     type: string
81     description: Public/Private key pair name
82
83   pub_key:
84     type: string
85     description: Public key to be installed on the compute instance
86
87   nexus_repo:
88     type: string
89     description: Complete URL for the Nexus repository.
90
91   nexus_docker_repo:
92     type: string
93     description: Complete URL for the Nexus repository for docker images.
94
95   nexus_username:
96     type: string
97     description: Nexus Repository username
98
99   nexus_password:
100     type: string
101     description: Nexus Repository Password
102
103   artifacts_version:
104     type: string
105     description: Artifacts version of ONAP components
106
107   dmaap_topic:
108     type: string
109     description: DMaaP Topic name
110
111   openstack_tenant_id:
112     type: string
113     description: OpenStack tenant ID
114
115   openstack_username:
116     type: string
117     description: OpenStack username
118
119   openstack_auth_method:
120     type: string
121     description: OpenStack authentication method (password VS. api-key)
122
123   openstack_api_key:
124     type: string
125     description: OpenStack password or API Key
126
127   horizon_url:
128     type: string
129     description: URL of OpenStack Horizon
130
131   keystone_url:
132     type: string
133     description: URL of OpenStack Keystone
134
135   cloud_env:
136     type: string
137     description: Cloud Provider Name in lower case
138
139   openstack_region:
140     type: string
141     description: Region where the DCAE controller will spin the VMs
142
143   ######################
144   #                    #
145   # Network parameters #
146   #                    #
147   ######################
148
149   dns_list:
150     type: comma_delimited_list
151     description: List of External DNS for OAM ONAP network
152
153   external_dns:
154     type: string
155     description: First element of the dns_list for ONAP network
156
157   oam_network_cidr:
158     type: string
159     description: CIDR of the OAM ONAP network
160
161   ### Private IP addresses ###
162   aai1_ip_addr:
163     type: string
164   aai2_ip_addr:
165     type: string
166   appc_ip_addr:
167     type: string
168   dcae_ip_addr:
169     type: string
170   dcae_coll_ip_addr:
171     type: string
172   dcae_db_ip_addr:
173     type: string
174   dcae_hdp1_ip_addr:
175     type: string
176   dcae_hdp2_ip_addr:
177     type: string
178   dcae_hdp3_ip_addr:
179     type: string
180   dns_ip_addr:
181     type: string
182   so_ip_addr:
183     type: string
184   mr_ip_addr:
185     type: string
186   policy_ip_addr:
187     type: string
188   portal_ip_addr:
189     type: string
190   robot_ip_addr:
191     type: string
192   sdc_ip_addr:
193     type: string
194   sdnc_ip_addr:
195     type: string
196   vid_ip_addr:
197     type: string
198   clamp_ip_addr:
199     type: string
200   openo_ip_addr:
201     type: string
202 #  dcae_coll_float_ip:
203 #    type: string
204 #  dcae_db_float_ip:
205 #    type: string
206 #  dcae_hdp1_float_ip:
207 #    type: string
208 #  dcae_hdp2_float_ip:
209 #    type: string
210 #  dcae_hdp3_float_ip:
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_tenant_id:
228     type: string
229     description: the (default) tenant id of the cloud instance providing the Designate DNS as a Service
230
231   dnsaas_keystone_url:
232     type: string
233     description: the keystone URL of the cloud instance providing the Designate DNS as a Service
234
235   dnsaas_username:
236     type: string
237     description: the username of the cloud instance providing the Designate DNS as a Service
238
239   dnsaas_password:
240     type: string
241     description: the password of 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_key_name:
248     type: string
249     description: the name of the keypair on-boarded with Cloud
250
251   dcae_private_key:
252     type: string
253     description: the private key of the key-apir used between the DCAE bootstrap container and DCAE VMs
254
255   dcae_public_key:
256     type: string
257     description: the prublic key of the key-apir used between the DCAE bootstrap container and DCAE VMs
258
259   dcae_centos_7_image:
260     type: string
261     description: the id/name of the CentOS 7 VM imange
262
263   dcae_security_group:
264     type: string
265     description: the security group to be used by DCAE VMs
266
267
268 #  dcae_base_environment:
269 #    type: string
270 #    description: DCAE Base Environment configuration (RACKSPACE/2-NIC/1-NIC-FLOATING-IPS)
271
272 #  dcae_zone:
273 #    type: string
274 #    description: DCAE Zone to use in VM names created by DCAE controller
275
276 #  dcae_state:
277 #    type: string
278 #    description: DCAE State to use in VM names created by DCAE controller
279
280 #  nexus_repo_root:
281 #    type: string
282 #    description: Root URL of Nexus repository
283
284 #  nexus_url_snapshot:
285 #    type: string
286 #    description: Snapshot of Maven repository for DCAE deployment
287
288 #  gitlab_branch:
289 #    type: string
290 #    description: Branch of the Gitlab repository
291
292 #  dcae_code_version:
293 #    type: string
294 #    description: DCAE Code Version Number
295
296   #####################
297   #                   #
298   # ONAP repositories #
299   #                   #
300   #####################
301
302   aai_repo:
303     type: string
304   appc_repo:
305     type: string
306   dcae_repo:
307     type: string
308   mr_repo:
309     type: string
310   so_repo:
311     type: string
312   policy_repo:
313     type: string
314   portal_repo:
315     type: string
316   robot_repo:
317     type: string
318   sdc_repo:
319     type: string
320   sdnc_repo:
321     type: string
322   vid_repo:
323     type: string
324   clamp_repo:
325     type: string
326   vnfsdk_repo:
327     type: string
328
329   ################################
330   #                              #
331   # Docker versions and branches #
332   #                              #
333   ################################
334
335   aai_docker:
336     type: string
337   appc_docker:
338     type: string
339   so_docker:
340     type: string
341   mr_docker:
342     type: string
343   dcae_docker:
344     type: string
345   policy_docker:
346     type: string
347   portal_docker:
348     type: string
349   robot_docker:
350     type: string
351   sdc_docker:
352     type: string
353   sdnc_docker:
354     type: string
355   vid_docker:
356     type: string
357   clamp_docker:
358     type: string
359   msb_docker:
360     type: string
361   mvim_docker:
362     type: string
363   vfc_docker:
364     type: string
365   uui_docker:
366     type: string
367   esr_docker:
368     type: string
369   dgbuilder_docker:
370     type: string
371   cli_docker:
372     type: string
373
374   aai_branch:
375     type: string
376   appc_branch:
377     type: string
378   so_branch:
379     type: string
380   mr_branch:
381     type: string
382   dcae_branch:
383     type: string
384   policy_branch:
385     type: string
386   portal_branch:
387     type: string
388   robot_branch:
389     type: string
390   sdc_branch:
391     type: string
392   sdnc_branch:
393     type: string
394   vid_branch:
395     type: string
396   clamp_branch:
397     type: string
398   vnfsdk_branch:
399     type: string
400
401
402 #############
403 #           #
404 # RESOURCES #
405 #           #
406 #############
407
408 resources:
409   random-str:
410     type: OS::Heat::RandomString
411     properties:
412       length: 4
413
414
415   # Public key used to access ONAP components
416   vm_key:
417     type: OS::Nova::KeyPair
418     properties:
419       name:
420         str_replace:
421           template: base_rand
422           params:
423             base: { get_param: key_name }
424             rand: { get_resource: random-str }
425       public_key: { get_param: pub_key }
426       save_private_key: false
427
428   # ONAP management private network
429   oam_onap:
430     type: OS::Neutron::Net
431     properties:
432       name:
433         str_replace:
434           template: oam_onap_rand
435           params:
436             rand: { get_resource: random-str }
437
438   oam_onap_subnet:
439     type: OS::Neutron::Subnet
440     properties:
441       name:
442         str_replace:
443           template: oam_onap_rand
444           params:
445             rand: { get_resource: random-str }
446       network_id: { get_resource: oam_onap }
447       cidr: { get_param: oam_network_cidr }
448       dns_nameservers: { get_param: dns_list }
449
450   router:
451     type: OS::Neutron::Router
452     properties:
453       external_gateway_info:
454         network: { get_param: public_net_id }
455
456   router_interface:
457     type: OS::Neutron::RouterInterface
458     properties:
459       router_id: { get_resource: router }
460       subnet_id: { get_resource: oam_onap_subnet }
461
462
463   # DNS Server instantiation
464   dns_private_port:
465     type: OS::Neutron::Port
466     properties:
467       network: { get_resource: oam_onap }
468       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
469
470   dns_floating_ip:
471     type: OS::Neutron::FloatingIP
472     properties:
473       floating_network_id: { get_param: public_net_id }
474       port_id: { get_resource: dns_private_port }
475
476   dns_vm:
477     type: OS::Nova::Server
478     properties:
479       image: { get_param: ubuntu_1404_image }
480       flavor: { get_param: flavor_small }
481       name:
482         str_replace:
483           template: base-dns-server
484           params:
485             base: { get_param: vm_base_name }
486       key_name: { get_resource: vm_key }
487       networks:
488         - port: { get_resource: dns_private_port }
489       user_data_format: RAW
490       user_data:
491         str_replace:
492           params:
493             __nexus_repo__: { get_param: nexus_repo }
494             __artifacts_version__: { get_param: artifacts_version }
495             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
496             __dns_ip_addr__: { get_param: dns_ip_addr }
497             __aai1_ip_addr__: { get_param: aai1_ip_addr }
498             __aai2_ip_addr__: { get_param: aai2_ip_addr }
499             __appc_ip_addr__: { get_param: appc_ip_addr }
500             __dcae_ip_addr__: { get_param: dcae_ip_addr }
501             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
502             __so_ip_addr__: { get_param: so_ip_addr }
503             __mr_ip_addr__: { get_param: mr_ip_addr }
504             __policy_ip_addr__: { get_param: policy_ip_addr }
505             __portal_ip_addr__: { get_param: portal_ip_addr }
506             __robot_ip_addr__: { get_param: robot_ip_addr }
507             __sdc_ip_addr__: { get_param: sdc_ip_addr }
508             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
509             __vid_ip_addr__: { get_param: vid_ip_addr }
510             __clamp_ip_addr__: { get_param: clamp_ip_addr }
511             __openo_ip_addr__: { get_param: openo_ip_addr }
512             __cloud_env__: { get_param: cloud_env }
513             __external_dns__: { get_param: external_dns }
514           template: |
515             #!/bin/bash
516
517             # Create configuration files
518             mkdir -p /opt/config
519             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
520             echo "__cloud_env__" > /opt/config/cloud_env.txt
521             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
522             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
523             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
524             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
525             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
526             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
527             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
528             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
529             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
530             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
531             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
532             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
533             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
534             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
535             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
536             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
537             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
538             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
539             echo "__external_dns__" > /opt/config/external_dns.txt
540
541             # Download and run install script
542             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
543             cd /opt
544             chmod +x dns_install.sh
545             ./dns_install.sh
546
547
548   # A&AI instantiation (2 VMs)
549   aai1_private_port:
550     type: OS::Neutron::Port
551     properties:
552       network: { get_resource: oam_onap }
553       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
554
555   aai1_floating_ip:
556     type: OS::Neutron::FloatingIP
557     properties:
558       floating_network_id: { get_param: public_net_id }
559       port_id: { get_resource: aai1_private_port }
560
561   aai1_vm:
562     type: OS::Nova::Server
563     depends_on: aai2_vm
564     properties:
565       image: { get_param: ubuntu_1404_image }
566       flavor: { get_param: flavor_xlarge }
567       name:
568         str_replace:
569           template: base-aai-inst1
570           params:
571             base: { get_param: vm_base_name }      
572       key_name: { get_resource: vm_key }
573       networks:
574         - port: { get_resource: aai1_private_port }
575       user_data_format: RAW
576       user_data:
577         str_replace:
578           params:
579             __nexus_repo__: { get_param: nexus_repo }
580             __nexus_docker_repo__: { get_param: nexus_docker_repo }
581             __nexus_username__: { get_param: nexus_username }
582             __nexus_password__: { get_param: nexus_password }
583             __dmaap_topic__: { get_param: dmaap_topic }
584             __artifacts_version__: { get_param: artifacts_version }
585             __dns_ip_addr__: { get_param: dns_ip_addr }
586             __docker_version__: { get_param: aai_docker }
587             __gerrit_branch__: { get_param: aai_branch }
588             __cloud_env__: { get_param: cloud_env }
589             __external_dns__: { get_param: external_dns }
590             __aai_repo__: { get_param: aai_repo }
591           template: |
592             #!/bin/bash
593
594             # Create configuration files
595             mkdir -p /opt/config
596             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
597             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
598             echo "__nexus_username__" > /opt/config/nexus_username.txt
599             echo "__nexus_password__" > /opt/config/nexus_password.txt
600             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
601             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
602             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
603             echo "__docker_version__" > /opt/config/docker_version.txt
604             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
605             echo "aai_instance_1" > /opt/config/aai_instance.txt
606             echo "__cloud_env__" > /opt/config/cloud_env.txt
607             echo "__external_dns__" > /opt/config/external_dns.txt
608             echo "__aai_repo__" > /opt/config/remote_repo.txt
609
610             # Download and run install script
611             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
612             cd /opt
613             chmod +x aai_install.sh
614             ./aai_install.sh
615
616
617   aai2_private_port:
618     type: OS::Neutron::Port
619     properties:
620       network: { get_resource: oam_onap }
621       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
622
623   aai2_floating_ip:
624     type: OS::Neutron::FloatingIP
625     properties:
626       floating_network_id: { get_param: public_net_id }
627       port_id: { get_resource: aai2_private_port }
628
629   aai2_vm:
630     type: OS::Nova::Server
631     properties:
632       image: { get_param: ubuntu_1404_image }
633       flavor: { get_param: flavor_xlarge }
634       name:
635         str_replace:
636           template: base-aai-inst2
637           params:
638             base: { get_param: vm_base_name }      
639       key_name: { get_resource: vm_key }
640       networks:
641         - port: { get_resource: aai2_private_port }
642       user_data_format: RAW
643       user_data:
644         str_replace:
645           params:
646             __nexus_repo__: { get_param: nexus_repo }
647             __nexus_docker_repo__: { get_param: nexus_docker_repo }
648             __nexus_username__: { get_param: nexus_username }
649             __nexus_password__: { get_param: nexus_password }
650             __dmaap_topic__: { get_param: dmaap_topic }
651             __artifacts_version__: { get_param: artifacts_version }
652             __dns_ip_addr__: { get_param: dns_ip_addr }
653             __docker_version__: { get_param: aai_docker }
654             __gerrit_branch__: { get_param: aai_branch }
655             __cloud_env__: { get_param: cloud_env }
656             __external_dns__: { get_param: external_dns }
657             __aai_repo__: { get_param: aai_repo }
658           template: |
659             #!/bin/bash
660
661             # Create configuration files
662             mkdir -p /opt/config
663             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
664             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
665             echo "__nexus_username__" > /opt/config/nexus_username.txt
666             echo "__nexus_password__" > /opt/config/nexus_password.txt
667             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
668             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
669             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
670             echo "__docker_version__" > /opt/config/docker_version.txt
671             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
672             echo "aai_instance_2" > /opt/config/aai_instance.txt
673             echo "__cloud_env__" > /opt/config/cloud_env.txt
674             echo "__external_dns__" > /opt/config/external_dns.txt
675             echo "__aai_repo__" > /opt/config/remote_repo.txt
676
677             # Download and run install script
678             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
679             cd /opt
680             chmod +x aai_install.sh
681             ./aai_install.sh
682
683
684   # SO instantiation
685   so_private_port:
686     type: OS::Neutron::Port
687     properties:
688       network: { get_resource: oam_onap }
689       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: so_ip_addr }}]
690
691   so_floating_ip:
692     type: OS::Neutron::FloatingIP
693     properties:
694       floating_network_id: { get_param: public_net_id }
695       port_id: { get_resource: so_private_port }
696
697   so_vm:
698     type: OS::Nova::Server
699     properties:
700       image: { get_param: ubuntu_1604_image }
701       flavor: { get_param: flavor_large }
702       name:
703         str_replace:
704           template: base-so
705           params:
706             base: { get_param: vm_base_name }      
707       key_name: { get_resource: vm_key }
708       networks:
709         - port: { get_resource: so_private_port }
710       user_data_format: RAW
711       user_data:
712         str_replace:
713           params:
714             __nexus_repo__: { get_param: nexus_repo }
715             __nexus_docker_repo__: { get_param: nexus_docker_repo }
716             __nexus_username__: { get_param: nexus_username }
717             __nexus_password__: { get_param: nexus_password }
718             __openstack_username__: { get_param: openstack_username }
719             __openstack_tenant_id__: { get_param: openstack_tenant_id }
720             __openstack_api_key__: { get_param: openstack_api_key }
721             __openstack_region__: { get_param: openstack_region }
722             __keystone_url__: { get_param: keystone_url }
723             __dmaap_topic__: { get_param: dmaap_topic }
724             __artifacts_version__: { get_param: artifacts_version }
725             __dns_ip_addr__: { get_param: dns_ip_addr }
726             __openo_ip__: { get_param: openo_ip_addr }
727             __docker_version__: { get_param: so_docker }
728             __gerrit_branch__: { get_param: so_branch }
729             __cloud_env__: { get_param: cloud_env }
730             __external_dns__: { get_param: external_dns }
731             __so_repo__: { get_param: so_repo }
732           template: |
733             #!/bin/bash
734
735             # Create configuration files
736             mkdir -p /opt/config
737             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
738             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
739             echo "__nexus_username__" > /opt/config/nexus_username.txt
740             echo "__nexus_password__" > /opt/config/nexus_password.txt
741             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
742             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
743             echo "__openo_ip__" > /opt/config/openo_ip.txt
744             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
745             echo "__openstack_username__" > /opt/config/openstack_username.txt
746             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
747             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
748             echo "__openstack_region__" > /opt/config/openstack_region.txt
749             echo "__keystone_url__" > /opt/config/keystone.txt
750             echo "__docker_version__" > /opt/config/docker_version.txt
751             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
752             echo "__cloud_env__" > /opt/config/cloud_env.txt
753             echo "__external_dns__" > /opt/config/external_dns.txt
754             echo "__so_repo__" > /opt/config/remote_repo.txt
755
756             # Download and run install script
757             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/so_install.sh -o /opt/so_install.sh
758             cd /opt
759             chmod +x so_install.sh
760             ./so_install.sh
761
762
763   # Message Router instantiation
764   mrouter_private_port:
765     type: OS::Neutron::Port
766     properties:
767       network: { get_resource: oam_onap }
768       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
769
770   mrouter_floating_ip:
771     type: OS::Neutron::FloatingIP
772     properties:
773       floating_network_id: { get_param: public_net_id }
774       port_id: { get_resource: mrouter_private_port }
775
776   mrouter_vm:
777     type: OS::Nova::Server
778     properties:
779       image: { get_param: ubuntu_1404_image }
780       flavor: { get_param: flavor_large }
781       name:
782         str_replace: 
783           template: base-message-router
784           params:
785             base: { get_param: vm_base_name }
786       key_name: { get_resource: vm_key }
787       networks:
788         - port: { get_resource: mrouter_private_port }
789       user_data_format: RAW
790       user_data:
791         str_replace:
792           params:
793             __nexus_repo__: { get_param: nexus_repo }
794             __nexus_docker_repo__: { get_param: nexus_docker_repo }
795             __nexus_username__: { get_param: nexus_username }
796             __nexus_password__: { get_param: nexus_password }
797             __artifacts_version__: { get_param: artifacts_version }
798             __dns_ip_addr__: { get_param: dns_ip_addr }
799             __gerrit_branch__: { get_param: mr_branch }
800             __cloud_env__: { get_param: cloud_env }
801             __external_dns__: { get_param: external_dns }
802             __mr_repo__: { get_param: mr_repo }
803           template: |
804             #!/bin/bash
805
806             # Create configuration files
807             mkdir -p /opt/config
808             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
809             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
810             echo "__nexus_username__" > /opt/config/nexus_username.txt
811             echo "__nexus_password__" > /opt/config/nexus_password.txt
812             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
813             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
814             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
815             echo "__cloud_env__" > /opt/config/cloud_env.txt
816             echo "__external_dns__" > /opt/config/external_dns.txt
817             echo "__mr_repo__" > /opt/config/remote_repo.txt
818
819             # Download and run install script
820             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
821             cd /opt
822             chmod +x mr_install.sh
823             ./mr_install.sh
824
825
826   # Robot Framework instantiation
827   robot_private_port:
828     type: OS::Neutron::Port
829     properties:
830       network: { get_resource: oam_onap }
831       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
832
833   robot_floating_ip:
834     type: OS::Neutron::FloatingIP
835     properties:
836       floating_network_id: { get_param: public_net_id }
837       port_id: { get_resource: robot_private_port }
838  
839   robot_vm:
840     type: OS::Nova::Server
841     properties:
842       image: { get_param: ubuntu_1604_image }
843       flavor: { get_param: flavor_medium }
844       name:
845         str_replace: 
846           template: base-robot
847           params:
848             base: { get_param: vm_base_name }
849       key_name: { get_resource: vm_key }
850       networks:
851         - port: { get_resource: robot_private_port }
852       user_data_format: RAW
853       user_data:
854         str_replace:
855           params:
856             __nexus_repo__: { get_param: nexus_repo }
857             __nexus_docker_repo__: { get_param: nexus_docker_repo }
858             __nexus_username__: { get_param: nexus_username }
859             __nexus_password__: { get_param: nexus_password }
860             __network_name__: { get_attr: [oam_onap, name] }
861             __openstack_username__: { get_param: openstack_username }
862             __openstack_api_key__: { get_param : openstack_api_key }
863             __openstack_tenant_id__: { get_param: openstack_tenant_id }
864             __artifacts_version__: { get_param: artifacts_version }
865             __openstack_region__: { get_param: openstack_region }
866             __dns_ip_addr__: { get_param: dns_ip_addr }
867             __docker_version__: { get_param: mr_docker }
868             __gerrit_branch__: { get_param: mr_branch }
869             __cloud_env__: { get_param: cloud_env }
870             __keystone_url__: { get_param: keystone_url }
871             __aai1_ip_addr__: { get_param: aai1_ip_addr }
872             __aai2_ip_addr__: { get_param: aai2_ip_addr }
873             __appc_ip_addr__: { get_param: appc_ip_addr }
874             __dcae_ip_addr__: { get_param: dcae_ip_addr }
875             __so_ip_addr__: { get_param: so_ip_addr }
876             __mr_ip_addr__: { get_param: mr_ip_addr }
877             __policy_ip_addr__: { get_param: policy_ip_addr }
878             __portal_ip_addr__: { get_param: portal_ip_addr }
879             __sdc_ip_addr__: { get_param: sdc_ip_addr }
880             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
881             __vid_ip_addr__: { get_param: vid_ip_addr }
882             __clamp_ip_addr__: { get_param: clamp_ip_addr }
883             __openo_ip_addr__: { get_param: openo_ip_addr }
884             __external_dns__: { get_param: external_dns }
885             __vm_image_name__: { get_param: ubuntu_1404_image }
886             __vm_flavor__: { get_param: flavor_medium }
887             __public_net_id__: { get_param: public_net_id }
888             __script_version__: { get_param: artifacts_version }
889             __robot_repo__: { get_param: robot_repo }
890           template: |
891             #!/bin/bash
892
893             # Create configuration files
894             mkdir -p /opt/config
895             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
896             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
897             echo "__nexus_username__" > /opt/config/nexus_username.txt
898             echo "__nexus_password__" > /opt/config/nexus_password.txt
899             echo "__network_name__" > /opt/config/network.txt
900             echo "__openstack_username__" > /opt/config/openstack_username.txt
901             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
902             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
903             echo "__openstack_region__" > /opt/config/region.txt
904             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
905             echo "__docker_version__" > /opt/config/docker_version.txt
906             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
907             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
908             echo "__keystone_url__" > /opt/config/keystone.txt
909             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
910             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
911             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
912             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
913             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
914             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
915             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
916             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
917             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
918             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
919             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
920             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
921             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
922             echo "__cloud_env__" > /opt/config/cloud_env.txt
923             echo "__external_dns__" > /opt/config/external_dns.txt
924             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
925             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
926             echo "__script_version__" > /opt/config/script_version.txt
927             echo "__public_net_id__" > /opt/config/public_net_id.txt
928             echo "__robot_repo__" > /opt/config/remote_repo.txt
929
930             # Download and run install script
931             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
932             cd /opt
933             chmod +x robot_install.sh
934             ./robot_install.sh
935
936
937   # VID instantiation
938   vid_private_port:
939     type: OS::Neutron::Port
940     properties:
941       network: { get_resource: oam_onap }
942       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
943
944   vid_floating_ip:
945     type: OS::Neutron::FloatingIP
946     properties:
947       floating_network_id: { get_param: public_net_id }
948       port_id: { get_resource: vid_private_port }
949
950   vid_vm:
951     type: OS::Nova::Server
952     properties:
953       image: { get_param: ubuntu_1404_image }
954       flavor: { get_param: flavor_medium }
955       name:
956         str_replace: 
957           template: base-vid
958           params:
959             base: { get_param: vm_base_name }
960       key_name: { get_resource: vm_key }
961       networks:
962         - port: { get_resource: vid_private_port }
963       user_data_format: RAW
964       user_data:
965         str_replace:
966           params:
967             __nexus_repo__: { get_param: nexus_repo }
968             __nexus_docker_repo__: { get_param: nexus_docker_repo }
969             __nexus_username__: { get_param: nexus_username }
970             __nexus_password__: { get_param: nexus_password }
971             __artifacts_version__: { get_param: artifacts_version }
972             __dns_ip_addr__: { get_param: dns_ip_addr }
973             __docker_version__: { get_param: vid_docker }
974             __gerrit_branch__: { get_param: vid_branch }
975             __cloud_env__: { get_param: cloud_env }
976             __external_dns__: { get_param: external_dns }
977             __vid_repo__: { get_param: vid_repo }
978           template: |
979             #!/bin/bash
980
981             # Create configuration files
982             mkdir -p /opt/config
983             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
984             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
985             echo "__nexus_username__" > /opt/config/nexus_username.txt
986             echo "__nexus_password__" > /opt/config/nexus_password.txt
987             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
988             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
989             echo "__docker_version__" > /opt/config/docker_version.txt
990             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
991             echo "__cloud_env__" > /opt/config/cloud_env.txt
992             echo "__external_dns__" > /opt/config/external_dns.txt
993             echo "__vid_repo__" > /opt/config/remote_repo.txt
994
995             # Download and run install script
996             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
997             cd /opt
998             chmod +x vid_install.sh
999             ./vid_install.sh
1000
1001  
1002   # SDN-C instantiation
1003   sdnc_private_port:
1004     type: OS::Neutron::Port
1005     properties:
1006       network: { get_resource: oam_onap }
1007       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
1008
1009   sdnc_floating_ip:
1010     type: OS::Neutron::FloatingIP
1011     properties:
1012       floating_network_id: { get_param: public_net_id }
1013       port_id: { get_resource: sdnc_private_port }
1014
1015   sdnc_vm:
1016     type: OS::Nova::Server
1017     properties:
1018       image: { get_param: ubuntu_1404_image }
1019       flavor: { get_param: flavor_large }
1020       name:
1021         str_replace: 
1022           template: base-sdnc
1023           params:
1024             base: { get_param: vm_base_name }
1025       key_name: { get_resource: vm_key }
1026       networks:
1027         - port: { get_resource: sdnc_private_port }
1028       user_data_format: RAW
1029       user_data:
1030         str_replace:
1031           params:
1032             __nexus_repo__: { get_param: nexus_repo }
1033             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1034             __nexus_username__: { get_param: nexus_username }
1035             __nexus_password__: { get_param: nexus_password }
1036             __artifacts_version__: { get_param: artifacts_version }
1037             __dns_ip_addr__: { get_param: dns_ip_addr }
1038             __docker_version__: { get_param: sdnc_docker }
1039             __gerrit_branch__: { get_param: sdnc_branch }
1040             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1041             __cloud_env__: { get_param: cloud_env }
1042             __external_dns__: { get_param: external_dns }
1043             __sdnc_repo__: { get_param: sdnc_repo }
1044           template: |
1045             #!/bin/bash
1046
1047             # Create configuration files
1048             mkdir -p /opt/config
1049             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1050             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1051             echo "__nexus_username__" > /opt/config/nexus_username.txt
1052             echo "__nexus_password__" > /opt/config/nexus_password.txt
1053             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1054             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1055             echo "__docker_version__" > /opt/config/docker_version.txt
1056             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1057             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1058             echo "__cloud_env__" > /opt/config/cloud_env.txt
1059             echo "__external_dns__" > /opt/config/external_dns.txt
1060             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1061
1062             # Download and run install script
1063             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
1064             cd /opt
1065             chmod +x sdnc_install.sh
1066             ./sdnc_install.sh
1067
1068
1069   # SDC instantiation
1070   sdc_private_port:
1071     type: OS::Neutron::Port
1072     properties:
1073       network: { get_resource: oam_onap }
1074       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1075
1076   sdc_floating_ip:
1077     type: OS::Neutron::FloatingIP
1078     properties:
1079       floating_network_id: { get_param: public_net_id }
1080       port_id: { get_resource: sdc_private_port }
1081
1082   sdc_volume_data:
1083     type: OS::Cinder::Volume
1084     properties:
1085       name: vol1-sdc-data
1086       size: 100
1087
1088   sdc_vm:
1089     type: OS::Nova::Server
1090     properties:
1091       image: { get_param: ubuntu_1604_image }
1092       flavor: { get_param: flavor_xlarge }
1093       name:
1094         str_replace: 
1095           template: base-sdc
1096           params:
1097             base: { get_param: vm_base_name }
1098       key_name: { get_resource: vm_key }
1099       networks:
1100         - port: { get_resource: sdc_private_port }
1101       block_device_mapping:
1102         - device_name: /dev/vdb
1103           volume_id: {get_resource: sdc_volume_data}
1104       user_data_format: RAW
1105       user_data:
1106         str_replace:
1107           params:
1108             __nexus_repo__: { get_param: nexus_repo }
1109             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1110             __nexus_username__: { get_param: nexus_username }
1111             __nexus_password__: { get_param: nexus_password }
1112             __env_name__: { get_param: dmaap_topic }
1113             __artifacts_version__: { get_param: artifacts_version }
1114             __dns_ip_addr__: { get_param: dns_ip_addr }
1115             __mr_ip_addr__: { get_param: mr_ip_addr }
1116             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1117             __docker_version__: { get_param: sdc_docker }
1118             __gerrit_branch__: { get_param: sdc_branch }
1119             __cloud_env__: { get_param: cloud_env }
1120             __external_dns__: { get_param: external_dns }
1121             __sdc_repo__: { get_param: sdc_repo }
1122           template: |
1123             #!/bin/bash
1124
1125             # Create configuration files
1126             mkdir -p /opt/config
1127             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1128             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1129             echo "__nexus_username__" > /opt/config/nexus_username.txt
1130             echo "__nexus_password__" > /opt/config/nexus_password.txt
1131             echo "__env_name__" > /opt/config/env_name.txt
1132             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1133             echo "__public_ip__" > /opt/config/public_ip.txt
1134             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1135             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1136             echo "__docker_version__" > /opt/config/docker_version.txt
1137             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1138             echo "__cloud_env__" > /opt/config/cloud_env.txt
1139             echo "__external_dns__" > /opt/config/external_dns.txt
1140             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1141
1142             # Download and run install script
1143             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
1144             cd /opt
1145             chmod +x sdc_install.sh
1146             ./sdc_install.sh
1147
1148
1149   # PORTAL instantiation
1150   portal_private_port:
1151     type: OS::Neutron::Port
1152     properties:
1153       network: { get_resource: oam_onap }
1154       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1155
1156   portal_floating_ip:
1157     type: OS::Neutron::FloatingIP
1158     properties:
1159       floating_network_id: { get_param: public_net_id }
1160       port_id: { get_resource: portal_private_port }
1161
1162   portal_vm:
1163     type: OS::Nova::Server
1164     properties:
1165       image: { get_param: ubuntu_1404_image }
1166       flavor: { get_param: flavor_large }
1167       name:
1168         str_replace: 
1169           template: base-portal
1170           params:
1171             base: { get_param: vm_base_name }
1172       key_name: { get_resource: vm_key }
1173       networks:
1174         - port: { get_resource: portal_private_port }
1175       user_data_format: RAW
1176       user_data:
1177         str_replace:
1178           params:
1179             __nexus_repo__: { get_param: nexus_repo }
1180             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1181             __nexus_username__: { get_param: nexus_username }
1182             __nexus_password__: { get_param: nexus_password }
1183             __artifacts_version__: { get_param: artifacts_version }
1184             __dns_ip_addr__: { get_param: dns_ip_addr }
1185             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1186             __docker_version__: { get_param: portal_docker }
1187             __gerrit_branch__: { get_param: portal_branch }
1188             __cli_docker__: { get_param: cli_docker }
1189             __cloud_env__: { get_param: cloud_env }
1190             __external_dns__: { get_param: external_dns }
1191             __portal_repo__: { get_param: portal_repo }
1192           template: |
1193             #!/bin/bash
1194
1195             # Create configuration files
1196             mkdir -p /opt/config
1197             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1198             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1199             echo "__nexus_username__" > /opt/config/nexus_username.txt
1200             echo "__nexus_password__" > /opt/config/nexus_password.txt
1201             echo "__public_ip__" > /opt/config/public_ip.txt
1202             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1203             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1204             echo "__docker_version__" > /opt/config/docker_version.txt
1205             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1206             echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1207             echo "__cloud_env__" > /opt/config/cloud_env.txt
1208             echo "__external_dns__" > /opt/config/external_dns.txt
1209             echo "__portal_repo__" > /opt/config/remote_repo.txt
1210
1211             # Download and run install script
1212             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1213             cd /opt
1214             chmod +x portal_install.sh
1215             ./portal_install.sh
1216
1217
1218   # DCAE Controller instantiation
1219 #  dcae_c_private_port:
1220 #    type: OS::Neutron::Port
1221 #    properties:
1222 #      network: { get_resource: oam_onap }
1223 #      fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1224
1225 #  dcae_c_floating_ip:
1226 #    type: OS::Neutron::FloatingIP
1227 #    properties:
1228 #      floating_network_id: { get_param: public_net_id }
1229 #      port_id: { get_resource: dcae_c_private_port }
1230
1231 #  dcae_c_vm:
1232 #    type: OS::Nova::Server
1233 #    properties:
1234 #      image: { get_param: ubuntu_1404_image }
1235 #      flavor: { get_param: flavor_medium }
1236 #      name:
1237 #        str_replace: 
1238 #          template: base-dcae-controller
1239 #          params:
1240 #            base: { get_param: vm_base_name }
1241 #      key_name: { get_resource: vm_key }
1242 #      networks:
1243 #        - port: { get_resource: dcae_c_private_port }
1244 #      user_data_format: RAW
1245 #      user_data:
1246 #        str_replace:
1247 #          params:
1248 #            __nexus_repo__: { get_param: nexus_repo }
1249 #            __nexus_docker_repo__: { get_param: nexus_docker_repo }
1250 #            __nexus_username__: { get_param: nexus_username }
1251 #            __nexus_password__: { get_param: nexus_password }
1252 #            __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1253 #            __gitlab_branch__: { get_param: gitlab_branch }
1254 #            __dns_ip_addr__: { get_param: dns_ip_addr }
1255 #            __dcae_zone__: { get_param: dcae_zone }
1256 #            __dcae_state__: { get_param: dcae_state }
1257 #            __artifacts_version__: { get_param: artifacts_version }
1258 #            __tenant_id__: { get_param: openstack_tenant_id }
1259 #            __openstack_private_network_name__: { get_attr: [oam_onap, name] }
1260 #            __openstack_user__: { get_param: openstack_username }
1261 #            __openstack_password__: { get_param: openstack_api_key }
1262 #            __openstack_auth_method__: { get_param: openstack_auth_method }
1263 #            __key_name__: { get_param: key_name }
1264 #            __rand_str__: { get_resource: random-str }
1265 #            __pub_key__: { get_param: pub_key }
1266 #            __nexus_repo_root__: { get_param: nexus_repo_root }
1267 #            __openstack_region__: { get_param: openstack_region }
1268 #            __horizon_url__: { get_param: horizon_url }
1269 #            __keystone_url__: { get_param: keystone_url }
1270 #            __docker_version__: { get_param: dcae_docker }
1271 #            __gerrit_branch__: { get_param: dcae_branch }
1272 #            __dcae_code_version__: { get_param: dcae_code_version }
1273 #            __cloud_env__: { get_param: cloud_env }
1274 #            __public_net_id__: { get_param: public_net_id }
1275 #            __dcae_base_environment__: { get_param: dcae_base_environment }
1276 #            __dcae_ip_addr__: { get_param: dcae_ip_addr }
1277 #            __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1278 #            __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1279 #            __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1280 #            __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1281 #            __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1282 #            __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1283 #            __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1284 #            __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1285 #            __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1286 #            __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1287 #            __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1288 #            __external_dns__: { get_param: external_dns }
1289 #            __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1290 #            __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1291 #            __flavor_small__: { get_param: flavor_small }
1292 #            __flavor_medium__: { get_param: flavor_medium }
1293 #            __flavor_large__: { get_param: flavor_large }
1294 #            __flavor_xlarge__: { get_param: flavor_xlarge }
1295 #            __dcae_repo__: { get_param: dcae_repo }
1296 #            __mr_repo__: { get_param: mr_repo }
1297 #          template: |
1298             #!/bin/bash
1299
1300             # Create configuration files
1301 #            mkdir -p /opt/config
1302 #            echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1303 #            echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1304 #            echo "__nexus_username__" > /opt/config/nexus_username.txt
1305 #            echo "__nexus_password__" > /opt/config/nexus_password.txt
1306 #            echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1307 #            echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1308 #            echo "__docker_version__" > /opt/config/docker_version.txt
1309 #            echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1310 #            echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1311 #            echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1312 #            echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1313 #            echo "__dcae_state__" > /opt/config/dcae_state.txt
1314 #            echo "__tenant_id__" > /opt/config/tenant_id.txt
1315 #            echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1316 #            echo "__openstack_user__" > /opt/config/openstack_user.txt
1317 #            echo "__openstack_password__" > /opt/config/openstack_password.txt
1318 #            echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1319 #            echo "__key_name__" > /opt/config/key_name.txt
1320 #            echo "__rand_str__" > /opt/config/rand_str.txt
1321 #            echo "__pub_key__" > /opt/config/pub_key.txt
1322 #            echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1323 #            echo "__openstack_region__" > /opt/config/openstack_region.txt
1324 #            echo "__horizon_url__" > /opt/config/horizon_url.txt
1325 #            echo "__keystone_url__" > /opt/config/keystone_url.txt
1326 #            echo "__cloud_env__" > /opt/config/cloud_env.txt
1327 #            echo "__public_net_id__" > /opt/config/public_net_id.txt
1328 #            echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1329 #            echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1330 #            echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1331 #            echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1332 #            echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1333 #            echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1334 #            echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1335 #            echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1336 #            echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1337 #            echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1338 #            echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1339 #            echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1340 #            echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1341 #            echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1342 #            echo "__external_dns__" > /opt/config/external_dns.txt
1343 #            echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1344 #            echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1345 #            echo "__flavor_small__" > /opt/config/flavor_small.txt
1346 #            echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1347 #            echo "__flavor_large__" > /opt/config/flavor_large.txt
1348 #            echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1349 #            echo "__dcae_repo__" > /opt/config/remote_repo.txt
1350 #            echo "__mr_repo__" > /opt/config/mr_repo.txt
1351
1352             # Download and run install script
1353 #            curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1354 #            cd /opt
1355 #            chmod +x dcae_install.sh
1356 #            ./dcae_install.sh
1357
1358
1359   # Policy Engine instantiation
1360   policy_private_port:
1361     type: OS::Neutron::Port
1362     properties:
1363       network: { get_resource: oam_onap }
1364       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1365
1366   policy_floating_ip:
1367     type: OS::Neutron::FloatingIP
1368     properties:
1369       floating_network_id: { get_param: public_net_id }
1370       port_id: { get_resource: policy_private_port }
1371
1372   policy_vm:
1373     type: OS::Nova::Server
1374     properties:
1375       image: { get_param: ubuntu_1404_image }
1376       flavor: { get_param: flavor_xlarge }
1377       name:
1378         str_replace: 
1379           template: base-policy
1380           params:
1381             base: { get_param: vm_base_name }
1382       key_name: { get_resource: vm_key }
1383       networks:
1384         - port: { get_resource: policy_private_port }
1385       user_data_format: RAW
1386       user_data:
1387         str_replace:
1388           params:
1389             __nexus_repo__: { get_param: nexus_repo }
1390             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1391             __nexus_username__: { get_param: nexus_username }
1392             __nexus_password__: { get_param: nexus_password }
1393             __artifacts_version__: { get_param: artifacts_version }
1394             __dns_ip_addr__: { get_param: dns_ip_addr }
1395             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1396             __docker_version__: { get_param: policy_docker }
1397             __gerrit_branch__: { get_param: policy_branch }
1398             __cloud_env__: { get_param: cloud_env }
1399             __external_dns__: { get_param: external_dns }
1400             __policy_repo__: { get_param: policy_repo }
1401           template: |
1402             #!/bin/bash
1403
1404             # Create configuration files
1405             mkdir -p /opt/config
1406             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1407             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1408             echo "__nexus_username__" > /opt/config/nexus_username.txt
1409             echo "__nexus_password__" > /opt/config/nexus_password.txt
1410             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1411             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1412             echo "__public_ip__" > /opt/config/public_ip.txt
1413             echo "__docker_version__" > /opt/config/docker_version.txt
1414             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1415             echo "__cloud_env__" > /opt/config/cloud_env.txt
1416             echo "__external_dns__" > /opt/config/external_dns.txt
1417             echo "__policy_repo__" > /opt/config/remote_repo.txt
1418
1419             # Download and run install script
1420             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1421             cd /opt
1422             chmod +x policy_install.sh
1423             ./policy_install.sh
1424
1425
1426   # APP-C instantiation
1427   appc_private_port:
1428     type: OS::Neutron::Port
1429     properties:
1430       network: { get_resource: oam_onap }
1431       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1432
1433   appc_floating_ip:
1434     type: OS::Neutron::FloatingIP
1435     properties:
1436       floating_network_id: { get_param: public_net_id }
1437       port_id: { get_resource: appc_private_port }
1438
1439   appc_vm:
1440     type: OS::Nova::Server
1441     properties:
1442       image: { get_param: ubuntu_1404_image }
1443       flavor: { get_param: flavor_large }
1444       name:
1445         str_replace: 
1446           template: base-appc
1447           params:
1448             base: { get_param: vm_base_name }
1449       key_name: { get_resource: vm_key }
1450       networks:
1451         - port: { get_resource: appc_private_port }
1452       user_data_format: RAW
1453       user_data:
1454         str_replace:
1455           params:
1456             __nexus_repo__: { get_param: nexus_repo }
1457             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1458             __nexus_username__: { get_param: nexus_username }
1459             __nexus_password__: { get_param: nexus_password }
1460             __dmaap_topic__: { get_param: dmaap_topic }
1461             __artifacts_version__: { get_param: artifacts_version }
1462             __dns_ip_addr__: { get_param: dns_ip_addr }
1463             __docker_version__: { get_param: appc_docker }
1464             __gerrit_branch__: { get_param: appc_branch }
1465             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1466             __cloud_env__: { get_param: cloud_env }
1467             __external_dns__: { get_param: external_dns }
1468             __appc_repo__: { get_param: appc_repo }
1469           template: |
1470             #!/bin/bash
1471
1472             # Create configuration files
1473             mkdir -p /opt/config
1474             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1475             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1476             echo "__nexus_username__" > /opt/config/nexus_username.txt
1477             echo "__nexus_password__" > /opt/config/nexus_password.txt
1478             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1479             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1480             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1481             echo "__docker_version__" > /opt/config/docker_version.txt
1482             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1483             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1484             echo "__cloud_env__" > /opt/config/cloud_env.txt
1485             echo "__external_dns__" > /opt/config/external_dns.txt
1486             echo "__appc_repo__" > /opt/config/remote_repo.txt
1487
1488             # Download and run install script
1489             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1490             cd /opt
1491             chmod +x appc_install.sh
1492             ./appc_install.sh
1493
1494
1495   # CLAMP instantiation
1496   clamp_private_port:
1497     type: OS::Neutron::Port
1498     properties:
1499       network: { get_resource: oam_onap }
1500       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1501
1502   clamp_floating_ip:
1503     type: OS::Neutron::FloatingIP
1504     properties:
1505       floating_network_id: { get_param: public_net_id }
1506       port_id: { get_resource: clamp_private_port }
1507
1508   clamp_vm:
1509     type: OS::Nova::Server
1510     properties:
1511       image: { get_param: ubuntu_1604_image }
1512       flavor: { get_param: flavor_medium }
1513       name:
1514         str_replace:
1515           template: base-clamp
1516           params:
1517             base: { get_param: vm_base_name }      
1518       key_name: { get_resource: vm_key }
1519       networks:
1520         - port: { get_resource: clamp_private_port }
1521       user_data_format: RAW
1522       user_data:
1523         str_replace:
1524           params:
1525             __nexus_repo__: { get_param: nexus_repo }
1526             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1527             __nexus_username__: { get_param: nexus_username }
1528             __nexus_password__: { get_param: nexus_password }
1529             __openstack_username__: { get_param: openstack_username }
1530             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1531             __openstack_api_key__: { get_param: openstack_api_key }
1532             __openstack_region__: { get_param: openstack_region }
1533             __keystone_url__: { get_param: keystone_url }
1534             __dmaap_topic__: { get_param: dmaap_topic }
1535             __artifacts_version__: { get_param: artifacts_version }
1536             __dns_ip_addr__: { get_param: dns_ip_addr }
1537             __docker_version__: { get_param: clamp_docker }
1538             __gerrit_branch__: { get_param: clamp_branch }
1539             __cloud_env__: { get_param: cloud_env }
1540             __external_dns__: { get_param: external_dns }
1541             __clamp_repo__: { get_param: clamp_repo }
1542           template: |
1543             #!/bin/bash
1544
1545             # Create configuration files
1546             mkdir -p /opt/config
1547             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1548             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1549             echo "__nexus_username__" > /opt/config/nexus_username.txt
1550             echo "__nexus_password__" > /opt/config/nexus_password.txt
1551             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1552             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1553             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1554             echo "__openstack_username__" > /opt/config/openstack_username.txt
1555             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1556             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1557             echo "__openstack_region__" > /opt/config/openstack_region.txt
1558             echo "__keystone_url__" > /opt/config/keystone.txt
1559             echo "__docker_version__" > /opt/config/docker_version.txt
1560             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1561             echo "__cloud_env__" > /opt/config/cloud_env.txt
1562             echo "__external_dns__" > /opt/config/external_dns.txt
1563             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1564
1565             # Download and run install script
1566             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1567             cd /opt
1568             chmod +x clamp_install.sh
1569             ./clamp_install.sh
1570
1571
1572   # OPEN-O VM instantiation
1573   openo_private_port:
1574     type: OS::Neutron::Port
1575     properties:
1576       network: { get_resource: oam_onap }
1577       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1578
1579   openo_floating_ip:
1580     type: OS::Neutron::FloatingIP
1581     properties:
1582       floating_network_id: { get_param: public_net_id }
1583       port_id: { get_resource: openo_private_port }
1584
1585   openo_vm:
1586     type: OS::Nova::Server
1587     properties:
1588       image: { get_param: ubuntu_1604_image }
1589       flavor: { get_param: flavor_xxlarge }
1590       name:
1591         str_replace:
1592           template: base-multi-service
1593           params:
1594             base: { get_param: vm_base_name }
1595       key_name: { get_resource: vm_key }
1596       networks:
1597         - port: { get_resource: openo_private_port }
1598       user_data_format: RAW
1599       user_data:
1600         str_replace:
1601           params:
1602             __nexus_repo__: { get_param: nexus_repo }
1603             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1604             __nexus_username__: { get_param: nexus_username }
1605             __nexus_password__: { get_param: nexus_password }
1606             __artifacts_version__: { get_param: artifacts_version }
1607             __dns_ip_addr__: { get_param: dns_ip_addr }
1608             __oam_network_cidr__: { get_param: oam_network_cidr }
1609             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1610             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1611             __appc_ip_addr__: { get_param: appc_ip_addr }
1612             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1613             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1614             __so_ip_addr__: { get_param: so_ip_addr }
1615             __mr_ip_addr__: { get_param: mr_ip_addr }
1616             __policy_ip_addr__: { get_param: policy_ip_addr }
1617             __portal_ip_addr__: { get_param: portal_ip_addr }
1618             __robot_ip_addr__: { get_param: robot_ip_addr }
1619             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1620             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1621             __vid_ip_addr__: { get_param: vid_ip_addr }
1622             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1623             __openo_ip_addr__: { get_param: openo_ip_addr }
1624             __cloud_env__: { get_param: cloud_env }
1625             __external_dns__: { get_param: external_dns }
1626             __vnfsdk_branch__: { get_param: vnfsdk_branch }
1627             __msb_docker__: { get_param: msb_docker }
1628             __mvim_docker__: { get_param: mvim_docker }
1629             __vfc_docker__: { get_param: vfc_docker }
1630             __uui_docker__: { get_param: uui_docker }
1631             __esr_docker__: { get_param: esr_docker }
1632             __vnfsdk_repo__: { get_param: vnfsdk_repo }
1633           template: |
1634             #!/bin/bash
1635
1636             # Create configuration files
1637             mkdir -p /opt/config
1638             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1639             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1640             echo "__nexus_username__" > /opt/config/nexus_username.txt
1641             echo "__nexus_password__" > /opt/config/nexus_password.txt
1642             echo "__cloud_env__" > /opt/config/cloud_env.txt
1643             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1644             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1645             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1646             echo "__external_dns__" > /opt/config/external_dns.txt
1647             echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
1648             echo "__msb_docker__" > /opt/config/msb_docker.txt
1649             echo "__mvim_docker__" > /opt/config/mvim_docker.txt
1650             echo "__vfc_docker__" > /opt/config/vfc_docker.txt
1651             echo "__uui_docker__" > /opt/config/uui_docker.txt
1652             echo "__esr_docker__" > /opt/config/esr_docker.txt
1653             echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
1654
1655             # Create env file with the IP address of all ONAP components
1656             echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
1657             echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
1658             echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
1659             echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
1660             echo "export DCAE_COLL_IP=__dcae_coll_ip_addr__" >> /opt/config/onap_ips.txt
1661             echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
1662             echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
1663             echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
1664             echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
1665             echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
1666             echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
1667             echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
1668             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
1669             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
1670             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
1671
1672             # Download and run install script
1673             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/openo_install.sh -o /opt/openo_install.sh
1674             cd /opt
1675             chmod +x openo_install.sh
1676             ./openo_install.sh
1677
1678
1679   # DCAE GEN 2 Controller instantiation
1680   dcae_c_private_port:
1681     type: OS::Neutron::Port
1682     properties:
1683       network: { get_resource: oam_onap }
1684       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1685
1686   dcae_c_floating_ip:
1687     type: OS::Neutron::FloatingIP
1688     properties:
1689       floating_network_id: { get_param: public_net_id }
1690       port_id: { get_resource: dcae_c_private_port }
1691
1692   dcae_c_vm:
1693     type: OS::Nova::Server
1694     properties:
1695       image: { get_param: ubuntu_1604_image }
1696       flavor: { get_param: flavor_medium }
1697       name:
1698         str_replace:
1699           template: base-dcae-bootstrap
1700           params:
1701             base: { get_param: vm_base_name }
1702       key_name: { get_resource: vm_key }
1703       networks:
1704         - port: { get_resource: dcae_c_private_port }
1705       user_data_format: RAW
1706       user_data:
1707         str_replace:
1708           params:
1709             __rand_str__: { get_resource: random-str }
1710             # repo related
1711             __artifacts_version__: { get_param: artifacts_version }
1712             __docker_version__: { get_param: dcae_docker }
1713             __nexus_repo__: { get_param: nexus_repo }
1714             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1715             __nexus_username__: { get_param: nexus_username }
1716             __nexus_password__: { get_param: nexus_password }
1717             __dcae_repo__: { get_param: dcae_repo }
1718             __gerrit_branch__: { get_param: dcae_branch }
1719             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1720             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
1721             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1722             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1723             __dns_ip_addr__: { get_param: dns_ip_addr }
1724             __external_dns__: { get_param: external_dns }
1725             # conf for VMs DCAE is to bringup
1726             __openstack_keystone_url__: { get_param: keystone_url }
1727             __dcae_keystone_url__: { get_param: dcae_keystone_url }
1728             __dcaeos_cloud_env__: { get_param: cloud_env }
1729             __dcaeos_keystone_url__: { get_param: dcae_keystone_url }
1730             __dcaeos_region__: { get_param: openstack_region }
1731             __dcaeos_tenant_id__: { get_param: openstack_tenant_id }
1732             __dcaeos_username__: { get_param: openstack_username }
1733             __dcaeos_password__: { get_param: openstack_api_key }
1734             __dcaeos_key_name__: { get_attr: [vm_key, name] }
1735             __dcaeos_key_name__: { get_param: dcae_key_name }
1736             __dcaeos_public_key__: { get_param: dcae_public_key }
1737             __dcaeos_private_key__: { get_param: dcae_private_key }
1738             __dcaeos_private_network_name__: { get_attr: [oam_onap, name] }
1739             __dcaeos_public_network_name__: { get_param: public_net_id }
1740             __dcaeos_ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1741             __dcaeos_centos_7_image__: { get_param: dcae_centos_7_image }
1742             __dcaeos_security_group__ : { get_param: dcae_security_group }
1743             __dcaeos_flavor_id__: { get_param: flavor_medium }
1744             __dcaeos_dnsaas_config_enabled__: { get_param: dnsaas_config_enabled }
1745             __dcaeos_dnsaas_region__: { get_param: dnsaas_region }
1746             __dcaeos_dnsaas_tenant_id__: { get_param: dnsaas_tenant_id}
1747             __dcaeos_dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
1748             __dcaeos_dnsaas_username__: { get_param: dnsaas_username }
1749             __dcaeos_dnsaas_password__: { get_param: dnsaas_password }
1750             # fixed private IPs
1751             __mr_ip_addr__: { get_param: mr_ip_addr }
1752             __policy_ip_addr__: { get_param: policy_ip_addr }
1753             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1754             __openo_ip_addr__: { get_param: openo_ip_addr }
1755             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1756             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1757             # floating IPs
1758             __dns_floating_ip_addr__: { get_attr: [dns_floating_ip, floating_ip_address] }
1759             __aai1_floating_ip_addr__: { get_attr: [aai1_floating_ip, floating_ip_address] }
1760             __aai2_floating_ip_addr__: { get_attr: [aai2_floating_ip, floating_ip_address] }
1761             __mrouter_floating_ip_addr__: { get_attr: [mrouter_floating_ip, floating_ip_address] }
1762             __sdc_floating_ip_addr__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1763             __policy_floating_ip_addr__: { get_attr: [policy_floating_ip, floating_ip_address] }
1764             __openo_floating_ip_addr__: { get_attr: [openo_floating_ip, floating_ip_address] }
1765             __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1766
1767           template: |
1768             #!/bin/bash
1769
1770             # Create configuration files
1771             mkdir -p /opt/config
1772             echo "__rand_str__" > /opt/config/dcae_zone.txt
1773             echo "__rand_str__" > /opt/config/rand_str.txt
1774             # repo related
1775             echo "__docker_version__" > /opt/config/docker_version.txt
1776             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1777             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1778             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1779             echo "__nexus_username__" > /opt/config/nexus_username.txt
1780             echo "__nexus_password__" > /opt/config/nexus_password.txt
1781             echo "__dcae_repo__" > /opt/config/remote_repo.txt
1782             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1783             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1784             echo "__mac_addr__" > /opt/config/mac_addr.txt
1785             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1786             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1787             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1788             echo "__external_dns__" > /opt/config/external_dns.txt
1789             # conf for the OpenStack env where DCAE is deployed
1790             echo "__openstack_keystone_url__" > /opt/config/openstack_keystone_url.txt
1791             echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
1792             echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
1793             echo "__dcaeos_region__" > /opt/config/openstack_region.txt
1794             echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
1795             echo "__dcaeos_tenant_id__" > /opt/config/tenant_name.txt
1796             echo "__dcaeos_username__" > /opt/config/openstack_user.txt
1797             echo "__dcaeos_password__" > /opt/config/openstack_password.txt
1798             echo "__dcaeos_key_name__" > /opt/config/key_name.txt
1799             echo "__dcaeos_public_key__" > /opt/config/pub_key.txt
1800             echo "__dcaeos_private_key__" > /opt/config/priv_key
1801             echo "__dcaeos_private_network_name__" > /opt/config/openstack_private_network_name.txt
1802             echo "__dcaeos_public_network_name__" > /opt/config/public_net_id.txt
1803             echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1804             echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
1805             echo "__dcaeos_security_group__" > /opt/config/security_group.txt
1806             echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
1807             echo "__dcaeos_dnsaas_config_enabled__" > /opt/config/dnsaas_config_enabled.txt
1808             echo "__dcaeos_dnsaas_region__" > /opt/config/dnsaas_region.txt
1809             echo "__dcaeos_dnsaas_tenant_id__" > /opt/config/dnsaas_tenant_id.txt
1810             echo "__dcaeos_dnsaas_keystone_url__" > /opt/config/dnsaas_keystone_url.txt
1811             echo "__dcaeos_dnsaas_username__" > /opt/config/dnsaas_username.txt
1812             echo "__dcaeos_dnsaas_password__" > /opt/config/dnsaas_password.txt
1813             # fixed private IP addresses of other ONAP components
1814             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1815             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1816             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1817             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
1818             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
1819             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
1820             # floating IPs
1821             echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
1822             echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
1823             echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
1824             echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
1825             echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
1826             echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
1827             echo "__openo_floating_ip_addr__" > /opt/config/openo_floating_ip_addr.txt
1828             echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
1829
1830             # Download and run install script
1831             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae2_install.sh -o /opt/dcae2_install.sh
1832             cd /opt
1833             chmod +x dcae2_install.sh
1834             ./dcae2_install.sh