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