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