Merge "vCPE vG-MUX- fix auto ugrade disable configuration"
[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 DCAE is deployed
226
227   dcaeos_openstack_region:
228     type: string
229     description: the region of the OpenStack instance where DCAE is deployed
230
231   dcaeos_openstack_tenant_id:
232     type: string
233     description: the keystone URL of the OpenStack instance where DCAE is deployed
234
235   dcaeos_openstack_username:
236     type: string
237     description: the username of the identity API of the OpenStack instance where DCAE is deployed
238
239   dcaeos_openstack_password:
240     type: string
241     description: the password of the identity API of the OpenStack instance where DCAE is deployed
242
243   dcaeos_dcae_key_name:
244     type: string
245     description: the key-pair name uploaded to the OpenStack instance where DCAE 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 DCAE 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 DCAE 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 DCAE 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 DCAE 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 DCAE 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 DCAE is deployed
270
271   dcaeos_security_group:
272     type: string
273     description: the name/id of the security group to be used by DCAE VMs in the OpenStack instance where DCAE is deployed
274
275   dcaeos_flavor_id:
276     type: string
277     description: the name/id of the VM flavor to be used by DCAE VMs in the OpenStack instance where DCAE 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             __openo_ip__: { get_param: openo_ip_addr }
738             __docker_version__: { get_param: so_docker }
739             __gerrit_branch__: { get_param: so_branch }
740             __cloud_env__: { get_param: cloud_env }
741             __external_dns__: { get_param: external_dns }
742             __so_repo__: { get_param: so_repo }
743           template: |
744             #!/bin/bash
745
746             # Create configuration files
747             mkdir -p /opt/config
748             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
749             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
750             echo "__nexus_username__" > /opt/config/nexus_username.txt
751             echo "__nexus_password__" > /opt/config/nexus_password.txt
752             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
753             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
754             echo "__openo_ip__" > /opt/config/openo_ip.txt
755             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
756             echo "__openstack_username__" > /opt/config/openstack_username.txt
757             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
758             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
759             echo "__openstack_region__" > /opt/config/openstack_region.txt
760             echo "__keystone_url__" > /opt/config/keystone.txt
761             echo "__docker_version__" > /opt/config/docker_version.txt
762             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
763             echo "__cloud_env__" > /opt/config/cloud_env.txt
764             echo "__external_dns__" > /opt/config/external_dns.txt
765             echo "__so_repo__" > /opt/config/remote_repo.txt
766
767             # Download and run install script
768             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/so_install.sh -o /opt/so_install.sh
769             cd /opt
770             chmod +x so_install.sh
771             ./so_install.sh
772
773
774   # Message Router instantiation
775   mrouter_private_port:
776     type: OS::Neutron::Port
777     properties:
778       network: { get_resource: oam_onap }
779       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
780
781   mrouter_floating_ip:
782     type: OS::Neutron::FloatingIP
783     properties:
784       floating_network_id: { get_param: public_net_id }
785       port_id: { get_resource: mrouter_private_port }
786
787   mrouter_vm:
788     type: OS::Nova::Server
789     properties:
790       image: { get_param: ubuntu_1404_image }
791       flavor: { get_param: flavor_large }
792       name:
793         str_replace: 
794           template: base-message-router
795           params:
796             base: { get_param: vm_base_name }
797       key_name: { get_resource: vm_key }
798       networks:
799         - port: { get_resource: mrouter_private_port }
800       user_data_format: RAW
801       user_data:
802         str_replace:
803           params:
804             __nexus_repo__: { get_param: nexus_repo }
805             __nexus_docker_repo__: { get_param: nexus_docker_repo }
806             __nexus_username__: { get_param: nexus_username }
807             __nexus_password__: { get_param: nexus_password }
808             __artifacts_version__: { get_param: artifacts_version }
809             __dns_ip_addr__: { get_param: dns_ip_addr }
810             __gerrit_branch__: { get_param: mr_branch }
811             __cloud_env__: { get_param: cloud_env }
812             __external_dns__: { get_param: external_dns }
813             __mr_repo__: { get_param: mr_repo }
814           template: |
815             #!/bin/bash
816
817             # Create configuration files
818             mkdir -p /opt/config
819             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
820             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
821             echo "__nexus_username__" > /opt/config/nexus_username.txt
822             echo "__nexus_password__" > /opt/config/nexus_password.txt
823             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
824             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
825             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
826             echo "__cloud_env__" > /opt/config/cloud_env.txt
827             echo "__external_dns__" > /opt/config/external_dns.txt
828             echo "__mr_repo__" > /opt/config/remote_repo.txt
829
830             # Download and run install script
831             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
832             cd /opt
833             chmod +x mr_install.sh
834             ./mr_install.sh
835
836
837   # Robot Framework instantiation
838   robot_private_port:
839     type: OS::Neutron::Port
840     properties:
841       network: { get_resource: oam_onap }
842       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
843
844   robot_floating_ip:
845     type: OS::Neutron::FloatingIP
846     properties:
847       floating_network_id: { get_param: public_net_id }
848       port_id: { get_resource: robot_private_port }
849  
850   robot_vm:
851     type: OS::Nova::Server
852     properties:
853       image: { get_param: ubuntu_1604_image }
854       flavor: { get_param: flavor_medium }
855       name:
856         str_replace: 
857           template: base-robot
858           params:
859             base: { get_param: vm_base_name }
860       key_name: { get_resource: vm_key }
861       networks:
862         - port: { get_resource: robot_private_port }
863       user_data_format: RAW
864       user_data:
865         str_replace:
866           params:
867             __nexus_repo__: { get_param: nexus_repo }
868             __nexus_docker_repo__: { get_param: nexus_docker_repo }
869             __nexus_username__: { get_param: nexus_username }
870             __nexus_password__: { get_param: nexus_password }
871             __network_name__: { get_attr: [oam_onap, name] }
872             __openstack_username__: { get_param: openstack_username }
873             __openstack_api_key__: { get_param : openstack_api_key }
874             __openstack_tenant_id__: { get_param: openstack_tenant_id }
875             __artifacts_version__: { get_param: artifacts_version }
876             __openstack_region__: { get_param: openstack_region }
877             __dns_ip_addr__: { get_param: dns_ip_addr }
878             __docker_version__: { get_param: mr_docker }
879             __gerrit_branch__: { get_param: mr_branch }
880             __cloud_env__: { get_param: cloud_env }
881             __keystone_url__: { get_param: keystone_url }
882             __aai1_ip_addr__: { get_param: aai1_ip_addr }
883             __aai2_ip_addr__: { get_param: aai2_ip_addr }
884             __appc_ip_addr__: { get_param: appc_ip_addr }
885             __dcae_ip_addr__: { get_param: dcae_ip_addr }
886             __so_ip_addr__: { get_param: so_ip_addr }
887             __mr_ip_addr__: { get_param: mr_ip_addr }
888             __policy_ip_addr__: { get_param: policy_ip_addr }
889             __portal_ip_addr__: { get_param: portal_ip_addr }
890             __sdc_ip_addr__: { get_param: sdc_ip_addr }
891             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
892             __vid_ip_addr__: { get_param: vid_ip_addr }
893             __clamp_ip_addr__: { get_param: clamp_ip_addr }
894             __openo_ip_addr__: { get_param: openo_ip_addr }
895             __external_dns__: { get_param: external_dns }
896             __vm_image_name__: { get_param: ubuntu_1404_image }
897             __vm_flavor__: { get_param: flavor_medium }
898             __public_net_id__: { get_param: public_net_id }
899             __script_version__: { get_param: artifacts_version }
900             __robot_repo__: { get_param: robot_repo }
901           template: |
902             #!/bin/bash
903
904             # Create configuration files
905             mkdir -p /opt/config
906             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
907             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
908             echo "__nexus_username__" > /opt/config/nexus_username.txt
909             echo "__nexus_password__" > /opt/config/nexus_password.txt
910             echo "__network_name__" > /opt/config/network.txt
911             echo "__openstack_username__" > /opt/config/openstack_username.txt
912             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
913             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
914             echo "__openstack_region__" > /opt/config/region.txt
915             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
916             echo "__docker_version__" > /opt/config/docker_version.txt
917             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
918             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
919             echo "__keystone_url__" > /opt/config/keystone.txt
920             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
921             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
922             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
923             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
924             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
925             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
926             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
927             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
928             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
929             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
930             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
931             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
932             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
933             echo "__cloud_env__" > /opt/config/cloud_env.txt
934             echo "__external_dns__" > /opt/config/external_dns.txt
935             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
936             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
937             echo "__script_version__" > /opt/config/script_version.txt
938             echo "__public_net_id__" > /opt/config/public_net_id.txt
939             echo "__robot_repo__" > /opt/config/remote_repo.txt
940
941             # Download and run install script
942             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
943             cd /opt
944             chmod +x robot_install.sh
945             ./robot_install.sh
946
947
948   # VID instantiation
949   vid_private_port:
950     type: OS::Neutron::Port
951     properties:
952       network: { get_resource: oam_onap }
953       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
954
955   vid_floating_ip:
956     type: OS::Neutron::FloatingIP
957     properties:
958       floating_network_id: { get_param: public_net_id }
959       port_id: { get_resource: vid_private_port }
960
961   vid_vm:
962     type: OS::Nova::Server
963     properties:
964       image: { get_param: ubuntu_1404_image }
965       flavor: { get_param: flavor_medium }
966       name:
967         str_replace: 
968           template: base-vid
969           params:
970             base: { get_param: vm_base_name }
971       key_name: { get_resource: vm_key }
972       networks:
973         - port: { get_resource: vid_private_port }
974       user_data_format: RAW
975       user_data:
976         str_replace:
977           params:
978             __nexus_repo__: { get_param: nexus_repo }
979             __nexus_docker_repo__: { get_param: nexus_docker_repo }
980             __nexus_username__: { get_param: nexus_username }
981             __nexus_password__: { get_param: nexus_password }
982             __artifacts_version__: { get_param: artifacts_version }
983             __dns_ip_addr__: { get_param: dns_ip_addr }
984             __docker_version__: { get_param: vid_docker }
985             __gerrit_branch__: { get_param: vid_branch }
986             __cloud_env__: { get_param: cloud_env }
987             __external_dns__: { get_param: external_dns }
988             __vid_repo__: { get_param: vid_repo }
989           template: |
990             #!/bin/bash
991
992             # Create configuration files
993             mkdir -p /opt/config
994             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
995             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
996             echo "__nexus_username__" > /opt/config/nexus_username.txt
997             echo "__nexus_password__" > /opt/config/nexus_password.txt
998             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
999             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1000             echo "__docker_version__" > /opt/config/docker_version.txt
1001             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1002             echo "__cloud_env__" > /opt/config/cloud_env.txt
1003             echo "__external_dns__" > /opt/config/external_dns.txt
1004             echo "__vid_repo__" > /opt/config/remote_repo.txt
1005
1006             # Download and run install script
1007             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
1008             cd /opt
1009             chmod +x vid_install.sh
1010             ./vid_install.sh
1011
1012  
1013   # SDN-C instantiation
1014   sdnc_private_port:
1015     type: OS::Neutron::Port
1016     properties:
1017       network: { get_resource: oam_onap }
1018       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
1019
1020   sdnc_floating_ip:
1021     type: OS::Neutron::FloatingIP
1022     properties:
1023       floating_network_id: { get_param: public_net_id }
1024       port_id: { get_resource: sdnc_private_port }
1025
1026   sdnc_vm:
1027     type: OS::Nova::Server
1028     properties:
1029       image: { get_param: ubuntu_1404_image }
1030       flavor: { get_param: flavor_large }
1031       name:
1032         str_replace: 
1033           template: base-sdnc
1034           params:
1035             base: { get_param: vm_base_name }
1036       key_name: { get_resource: vm_key }
1037       networks:
1038         - port: { get_resource: sdnc_private_port }
1039       user_data_format: RAW
1040       user_data:
1041         str_replace:
1042           params:
1043             __nexus_repo__: { get_param: nexus_repo }
1044             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1045             __nexus_username__: { get_param: nexus_username }
1046             __nexus_password__: { get_param: nexus_password }
1047             __artifacts_version__: { get_param: artifacts_version }
1048             __dns_ip_addr__: { get_param: dns_ip_addr }
1049             __docker_version__: { get_param: sdnc_docker }
1050             __gerrit_branch__: { get_param: sdnc_branch }
1051             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1052             __cloud_env__: { get_param: cloud_env }
1053             __external_dns__: { get_param: external_dns }
1054             __sdnc_repo__: { get_param: sdnc_repo }
1055           template: |
1056             #!/bin/bash
1057
1058             # Create configuration files
1059             mkdir -p /opt/config
1060             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1061             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1062             echo "__nexus_username__" > /opt/config/nexus_username.txt
1063             echo "__nexus_password__" > /opt/config/nexus_password.txt
1064             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1065             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1066             echo "__docker_version__" > /opt/config/docker_version.txt
1067             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1068             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1069             echo "__cloud_env__" > /opt/config/cloud_env.txt
1070             echo "__external_dns__" > /opt/config/external_dns.txt
1071             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1072
1073             # Download and run install script
1074             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
1075             cd /opt
1076             chmod +x sdnc_install.sh
1077             ./sdnc_install.sh
1078
1079
1080   # SDC instantiation
1081   sdc_private_port:
1082     type: OS::Neutron::Port
1083     properties:
1084       network: { get_resource: oam_onap }
1085       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1086
1087   sdc_floating_ip:
1088     type: OS::Neutron::FloatingIP
1089     properties:
1090       floating_network_id: { get_param: public_net_id }
1091       port_id: { get_resource: sdc_private_port }
1092
1093   sdc_volume_data:
1094     type: OS::Cinder::Volume
1095     properties:
1096       name: vol1-sdc-data
1097       size: 100
1098
1099   sdc_vm:
1100     type: OS::Nova::Server
1101     properties:
1102       image: { get_param: ubuntu_1604_image }
1103       flavor: { get_param: flavor_xlarge }
1104       name:
1105         str_replace: 
1106           template: base-sdc
1107           params:
1108             base: { get_param: vm_base_name }
1109       key_name: { get_resource: vm_key }
1110       networks:
1111         - port: { get_resource: sdc_private_port }
1112       block_device_mapping:
1113         - device_name: /dev/vdb
1114           volume_id: {get_resource: sdc_volume_data}
1115       user_data_format: RAW
1116       user_data:
1117         str_replace:
1118           params:
1119             __nexus_repo__: { get_param: nexus_repo }
1120             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1121             __nexus_username__: { get_param: nexus_username }
1122             __nexus_password__: { get_param: nexus_password }
1123             __env_name__: { get_param: dmaap_topic }
1124             __artifacts_version__: { get_param: artifacts_version }
1125             __dns_ip_addr__: { get_param: dns_ip_addr }
1126             __mr_ip_addr__: { get_param: mr_ip_addr }
1127             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1128             __docker_version__: { get_param: sdc_docker }
1129             __gerrit_branch__: { get_param: sdc_branch }
1130             __cloud_env__: { get_param: cloud_env }
1131             __external_dns__: { get_param: external_dns }
1132             __sdc_repo__: { get_param: sdc_repo }
1133           template: |
1134             #!/bin/bash
1135
1136             # Create configuration files
1137             mkdir -p /opt/config
1138             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1139             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1140             echo "__nexus_username__" > /opt/config/nexus_username.txt
1141             echo "__nexus_password__" > /opt/config/nexus_password.txt
1142             echo "__env_name__" > /opt/config/env_name.txt
1143             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1144             echo "__public_ip__" > /opt/config/public_ip.txt
1145             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1146             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1147             echo "__docker_version__" > /opt/config/docker_version.txt
1148             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1149             echo "__cloud_env__" > /opt/config/cloud_env.txt
1150             echo "__external_dns__" > /opt/config/external_dns.txt
1151             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1152
1153             # Download and run install script
1154             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
1155             cd /opt
1156             chmod +x sdc_install.sh
1157             ./sdc_install.sh
1158
1159
1160   # PORTAL instantiation
1161   portal_private_port:
1162     type: OS::Neutron::Port
1163     properties:
1164       network: { get_resource: oam_onap }
1165       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1166
1167   portal_floating_ip:
1168     type: OS::Neutron::FloatingIP
1169     properties:
1170       floating_network_id: { get_param: public_net_id }
1171       port_id: { get_resource: portal_private_port }
1172
1173   portal_vm:
1174     type: OS::Nova::Server
1175     properties:
1176       image: { get_param: ubuntu_1404_image }
1177       flavor: { get_param: flavor_large }
1178       name:
1179         str_replace: 
1180           template: base-portal
1181           params:
1182             base: { get_param: vm_base_name }
1183       key_name: { get_resource: vm_key }
1184       networks:
1185         - port: { get_resource: portal_private_port }
1186       user_data_format: RAW
1187       user_data:
1188         str_replace:
1189           params:
1190             __nexus_repo__: { get_param: nexus_repo }
1191             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1192             __nexus_username__: { get_param: nexus_username }
1193             __nexus_password__: { get_param: nexus_password }
1194             __artifacts_version__: { get_param: artifacts_version }
1195             __dns_ip_addr__: { get_param: dns_ip_addr }
1196             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1197             __docker_version__: { get_param: portal_docker }
1198             __gerrit_branch__: { get_param: portal_branch }
1199             __cli_docker__: { get_param: cli_docker }
1200             __cloud_env__: { get_param: cloud_env }
1201             __external_dns__: { get_param: external_dns }
1202             __portal_repo__: { get_param: portal_repo }
1203           template: |
1204             #!/bin/bash
1205
1206             # Create configuration files
1207             mkdir -p /opt/config
1208             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1209             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1210             echo "__nexus_username__" > /opt/config/nexus_username.txt
1211             echo "__nexus_password__" > /opt/config/nexus_password.txt
1212             echo "__public_ip__" > /opt/config/public_ip.txt
1213             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1214             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1215             echo "__docker_version__" > /opt/config/docker_version.txt
1216             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1217             echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1218             echo "__cloud_env__" > /opt/config/cloud_env.txt
1219             echo "__external_dns__" > /opt/config/external_dns.txt
1220             echo "__portal_repo__" > /opt/config/remote_repo.txt
1221
1222             # Download and run install script
1223             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1224             cd /opt
1225             chmod +x portal_install.sh
1226             ./portal_install.sh
1227
1228
1229   # DCAE Controller instantiation
1230 #  dcae_c_private_port:
1231 #    type: OS::Neutron::Port
1232 #    properties:
1233 #      network: { get_resource: oam_onap }
1234 #      fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1235
1236 #  dcae_c_floating_ip:
1237 #    type: OS::Neutron::FloatingIP
1238 #    properties:
1239 #      floating_network_id: { get_param: public_net_id }
1240 #      port_id: { get_resource: dcae_c_private_port }
1241
1242 #  dcae_c_vm:
1243 #    type: OS::Nova::Server
1244 #    properties:
1245 #      image: { get_param: ubuntu_1404_image }
1246 #      flavor: { get_param: flavor_medium }
1247 #      name:
1248 #        str_replace: 
1249 #          template: base-dcae-controller
1250 #          params:
1251 #            base: { get_param: vm_base_name }
1252 #      key_name: { get_resource: vm_key }
1253 #      networks:
1254 #        - port: { get_resource: dcae_c_private_port }
1255 #      user_data_format: RAW
1256 #      user_data:
1257 #        str_replace:
1258 #          params:
1259 #            __nexus_repo__: { get_param: nexus_repo }
1260 #            __nexus_docker_repo__: { get_param: nexus_docker_repo }
1261 #            __nexus_username__: { get_param: nexus_username }
1262 #            __nexus_password__: { get_param: nexus_password }
1263 #            __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1264 #            __gitlab_branch__: { get_param: gitlab_branch }
1265 #            __dns_ip_addr__: { get_param: dns_ip_addr }
1266 #            __dcae_zone__: { get_param: dcae_zone }
1267 #            __dcae_state__: { get_param: dcae_state }
1268 #            __artifacts_version__: { get_param: artifacts_version }
1269 #            __tenant_id__: { get_param: openstack_tenant_id }
1270 #            __openstack_private_network_name__: { get_attr: [oam_onap, name] }
1271 #            __openstack_user__: { get_param: openstack_username }
1272 #            __openstack_password__: { get_param: openstack_api_key }
1273 #            __openstack_auth_method__: { get_param: openstack_auth_method }
1274 #            __key_name__: { get_param: key_name }
1275 #            __rand_str__: { get_resource: random-str }
1276 #            __pub_key__: { get_param: pub_key }
1277 #            __nexus_repo_root__: { get_param: nexus_repo_root }
1278 #            __openstack_region__: { get_param: openstack_region }
1279 #            __horizon_url__: { get_param: horizon_url }
1280 #            __keystone_url__: { get_param: keystone_url }
1281 #            __docker_version__: { get_param: dcae_docker }
1282 #            __gerrit_branch__: { get_param: dcae_branch }
1283 #            __dcae_code_version__: { get_param: dcae_code_version }
1284 #            __cloud_env__: { get_param: cloud_env }
1285 #            __public_net_id__: { get_param: public_net_id }
1286 #            __dcae_base_environment__: { get_param: dcae_base_environment }
1287 #            __dcae_ip_addr__: { get_param: dcae_ip_addr }
1288 #            __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1289 #            __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1290 #            __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1291 #            __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1292 #            __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1293 #            __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1294 #            __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1295 #            __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1296 #            __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1297 #            __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1298 #            __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1299 #            __external_dns__: { get_param: external_dns }
1300 #            __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1301 #            __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1302 #            __flavor_small__: { get_param: flavor_small }
1303 #            __flavor_medium__: { get_param: flavor_medium }
1304 #            __flavor_large__: { get_param: flavor_large }
1305 #            __flavor_xlarge__: { get_param: flavor_xlarge }
1306 #            __dcae_repo__: { get_param: dcae_repo }
1307 #            __mr_repo__: { get_param: mr_repo }
1308 #          template: |
1309             #!/bin/bash
1310
1311             # Create configuration files
1312 #            mkdir -p /opt/config
1313 #            echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1314 #            echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1315 #            echo "__nexus_username__" > /opt/config/nexus_username.txt
1316 #            echo "__nexus_password__" > /opt/config/nexus_password.txt
1317 #            echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1318 #            echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1319 #            echo "__docker_version__" > /opt/config/docker_version.txt
1320 #            echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1321 #            echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1322 #            echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1323 #            echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1324 #            echo "__dcae_state__" > /opt/config/dcae_state.txt
1325 #            echo "__tenant_id__" > /opt/config/tenant_id.txt
1326 #            echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1327 #            echo "__openstack_user__" > /opt/config/openstack_user.txt
1328 #            echo "__openstack_password__" > /opt/config/openstack_password.txt
1329 #            echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1330 #            echo "__key_name__" > /opt/config/key_name.txt
1331 #            echo "__rand_str__" > /opt/config/rand_str.txt
1332 #            echo "__pub_key__" > /opt/config/pub_key.txt
1333 #            echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1334 #            echo "__openstack_region__" > /opt/config/openstack_region.txt
1335 #            echo "__horizon_url__" > /opt/config/horizon_url.txt
1336 #            echo "__keystone_url__" > /opt/config/keystone_url.txt
1337 #            echo "__cloud_env__" > /opt/config/cloud_env.txt
1338 #            echo "__public_net_id__" > /opt/config/public_net_id.txt
1339 #            echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1340 #            echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1341 #            echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1342 #            echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1343 #            echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1344 #            echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1345 #            echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1346 #            echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1347 #            echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1348 #            echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1349 #            echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1350 #            echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1351 #            echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1352 #            echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1353 #            echo "__external_dns__" > /opt/config/external_dns.txt
1354 #            echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1355 #            echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1356 #            echo "__flavor_small__" > /opt/config/flavor_small.txt
1357 #            echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1358 #            echo "__flavor_large__" > /opt/config/flavor_large.txt
1359 #            echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1360 #            echo "__dcae_repo__" > /opt/config/remote_repo.txt
1361 #            echo "__mr_repo__" > /opt/config/mr_repo.txt
1362
1363             # Download and run install script
1364 #            curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1365 #            cd /opt
1366 #            chmod +x dcae_install.sh
1367 #            ./dcae_install.sh
1368
1369
1370   # Policy Engine instantiation
1371   policy_private_port:
1372     type: OS::Neutron::Port
1373     properties:
1374       network: { get_resource: oam_onap }
1375       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1376
1377   policy_floating_ip:
1378     type: OS::Neutron::FloatingIP
1379     properties:
1380       floating_network_id: { get_param: public_net_id }
1381       port_id: { get_resource: policy_private_port }
1382
1383   policy_vm:
1384     type: OS::Nova::Server
1385     properties:
1386       image: { get_param: ubuntu_1404_image }
1387       flavor: { get_param: flavor_xlarge }
1388       name:
1389         str_replace: 
1390           template: base-policy
1391           params:
1392             base: { get_param: vm_base_name }
1393       key_name: { get_resource: vm_key }
1394       networks:
1395         - port: { get_resource: policy_private_port }
1396       user_data_format: RAW
1397       user_data:
1398         str_replace:
1399           params:
1400             __nexus_repo__: { get_param: nexus_repo }
1401             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1402             __nexus_username__: { get_param: nexus_username }
1403             __nexus_password__: { get_param: nexus_password }
1404             __artifacts_version__: { get_param: artifacts_version }
1405             __dns_ip_addr__: { get_param: dns_ip_addr }
1406             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1407             __docker_version__: { get_param: policy_docker }
1408             __gerrit_branch__: { get_param: policy_branch }
1409             __cloud_env__: { get_param: cloud_env }
1410             __external_dns__: { get_param: external_dns }
1411             __policy_repo__: { get_param: policy_repo }
1412           template: |
1413             #!/bin/bash
1414
1415             # Create configuration files
1416             mkdir -p /opt/config
1417             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1418             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1419             echo "__nexus_username__" > /opt/config/nexus_username.txt
1420             echo "__nexus_password__" > /opt/config/nexus_password.txt
1421             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1422             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1423             echo "__public_ip__" > /opt/config/public_ip.txt
1424             echo "__docker_version__" > /opt/config/docker_version.txt
1425             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1426             echo "__cloud_env__" > /opt/config/cloud_env.txt
1427             echo "__external_dns__" > /opt/config/external_dns.txt
1428             echo "__policy_repo__" > /opt/config/remote_repo.txt
1429
1430             # Download and run install script
1431             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1432             cd /opt
1433             chmod +x policy_install.sh
1434             ./policy_install.sh
1435
1436
1437   # APP-C instantiation
1438   appc_private_port:
1439     type: OS::Neutron::Port
1440     properties:
1441       network: { get_resource: oam_onap }
1442       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1443
1444   appc_floating_ip:
1445     type: OS::Neutron::FloatingIP
1446     properties:
1447       floating_network_id: { get_param: public_net_id }
1448       port_id: { get_resource: appc_private_port }
1449
1450   appc_vm:
1451     type: OS::Nova::Server
1452     properties:
1453       image: { get_param: ubuntu_1404_image }
1454       flavor: { get_param: flavor_large }
1455       name:
1456         str_replace: 
1457           template: base-appc
1458           params:
1459             base: { get_param: vm_base_name }
1460       key_name: { get_resource: vm_key }
1461       networks:
1462         - port: { get_resource: appc_private_port }
1463       user_data_format: RAW
1464       user_data:
1465         str_replace:
1466           params:
1467             __nexus_repo__: { get_param: nexus_repo }
1468             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1469             __nexus_username__: { get_param: nexus_username }
1470             __nexus_password__: { get_param: nexus_password }
1471             __dmaap_topic__: { get_param: dmaap_topic }
1472             __artifacts_version__: { get_param: artifacts_version }
1473             __dns_ip_addr__: { get_param: dns_ip_addr }
1474             __docker_version__: { get_param: appc_docker }
1475             __gerrit_branch__: { get_param: appc_branch }
1476             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1477             __cloud_env__: { get_param: cloud_env }
1478             __external_dns__: { get_param: external_dns }
1479             __appc_repo__: { get_param: appc_repo }
1480           template: |
1481             #!/bin/bash
1482
1483             # Create configuration files
1484             mkdir -p /opt/config
1485             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1486             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1487             echo "__nexus_username__" > /opt/config/nexus_username.txt
1488             echo "__nexus_password__" > /opt/config/nexus_password.txt
1489             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1490             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1491             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1492             echo "__docker_version__" > /opt/config/docker_version.txt
1493             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1494             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1495             echo "__cloud_env__" > /opt/config/cloud_env.txt
1496             echo "__external_dns__" > /opt/config/external_dns.txt
1497             echo "__appc_repo__" > /opt/config/remote_repo.txt
1498
1499             # Download and run install script
1500             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1501             cd /opt
1502             chmod +x appc_install.sh
1503             ./appc_install.sh
1504
1505
1506   # CLAMP instantiation
1507   clamp_private_port:
1508     type: OS::Neutron::Port
1509     properties:
1510       network: { get_resource: oam_onap }
1511       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1512
1513   clamp_floating_ip:
1514     type: OS::Neutron::FloatingIP
1515     properties:
1516       floating_network_id: { get_param: public_net_id }
1517       port_id: { get_resource: clamp_private_port }
1518
1519   clamp_vm:
1520     type: OS::Nova::Server
1521     properties:
1522       image: { get_param: ubuntu_1604_image }
1523       flavor: { get_param: flavor_medium }
1524       name:
1525         str_replace:
1526           template: base-clamp
1527           params:
1528             base: { get_param: vm_base_name }      
1529       key_name: { get_resource: vm_key }
1530       networks:
1531         - port: { get_resource: clamp_private_port }
1532       user_data_format: RAW
1533       user_data:
1534         str_replace:
1535           params:
1536             __nexus_repo__: { get_param: nexus_repo }
1537             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1538             __nexus_username__: { get_param: nexus_username }
1539             __nexus_password__: { get_param: nexus_password }
1540             __openstack_username__: { get_param: openstack_username }
1541             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1542             __openstack_api_key__: { get_param: openstack_api_key }
1543             __openstack_region__: { get_param: openstack_region }
1544             __keystone_url__: { get_param: keystone_url }
1545             __dmaap_topic__: { get_param: dmaap_topic }
1546             __artifacts_version__: { get_param: artifacts_version }
1547             __dns_ip_addr__: { get_param: dns_ip_addr }
1548             __docker_version__: { get_param: clamp_docker }
1549             __gerrit_branch__: { get_param: clamp_branch }
1550             __cloud_env__: { get_param: cloud_env }
1551             __external_dns__: { get_param: external_dns }
1552             __clamp_repo__: { get_param: clamp_repo }
1553           template: |
1554             #!/bin/bash
1555
1556             # Create configuration files
1557             mkdir -p /opt/config
1558             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1559             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1560             echo "__nexus_username__" > /opt/config/nexus_username.txt
1561             echo "__nexus_password__" > /opt/config/nexus_password.txt
1562             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1563             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1564             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1565             echo "__openstack_username__" > /opt/config/openstack_username.txt
1566             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1567             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1568             echo "__openstack_region__" > /opt/config/openstack_region.txt
1569             echo "__keystone_url__" > /opt/config/keystone.txt
1570             echo "__docker_version__" > /opt/config/docker_version.txt
1571             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1572             echo "__cloud_env__" > /opt/config/cloud_env.txt
1573             echo "__external_dns__" > /opt/config/external_dns.txt
1574             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1575
1576             # Download and run install script
1577             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1578             cd /opt
1579             chmod +x clamp_install.sh
1580             ./clamp_install.sh
1581
1582
1583   # OPEN-O VM instantiation
1584   openo_private_port:
1585     type: OS::Neutron::Port
1586     properties:
1587       network: { get_resource: oam_onap }
1588       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1589
1590   openo_floating_ip:
1591     type: OS::Neutron::FloatingIP
1592     properties:
1593       floating_network_id: { get_param: public_net_id }
1594       port_id: { get_resource: openo_private_port }
1595
1596   openo_vm:
1597     type: OS::Nova::Server
1598     properties:
1599       image: { get_param: ubuntu_1604_image }
1600       flavor: { get_param: flavor_xxlarge }
1601       name:
1602         str_replace:
1603           template: base-multi-service
1604           params:
1605             base: { get_param: vm_base_name }
1606       key_name: { get_resource: vm_key }
1607       networks:
1608         - port: { get_resource: openo_private_port }
1609       user_data_format: RAW
1610       user_data:
1611         str_replace:
1612           params:
1613             __nexus_repo__: { get_param: nexus_repo }
1614             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1615             __nexus_username__: { get_param: nexus_username }
1616             __nexus_password__: { get_param: nexus_password }
1617             __artifacts_version__: { get_param: artifacts_version }
1618             __dns_ip_addr__: { get_param: dns_ip_addr }
1619             __oam_network_cidr__: { get_param: oam_network_cidr }
1620             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1621             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1622             __appc_ip_addr__: { get_param: appc_ip_addr }
1623             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1624             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1625             __so_ip_addr__: { get_param: so_ip_addr }
1626             __mr_ip_addr__: { get_param: mr_ip_addr }
1627             __policy_ip_addr__: { get_param: policy_ip_addr }
1628             __portal_ip_addr__: { get_param: portal_ip_addr }
1629             __robot_ip_addr__: { get_param: robot_ip_addr }
1630             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1631             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1632             __vid_ip_addr__: { get_param: vid_ip_addr }
1633             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1634             __openo_ip_addr__: { get_param: openo_ip_addr }
1635             __cloud_env__: { get_param: cloud_env }
1636             __external_dns__: { get_param: external_dns }
1637             __vnfsdk_branch__: { get_param: vnfsdk_branch }
1638             __msb_docker__: { get_param: msb_docker }
1639             __mvim_docker__: { get_param: mvim_docker }
1640             __vfc_docker__: { get_param: vfc_docker }
1641             __uui_docker__: { get_param: uui_docker }
1642             __esr_docker__: { get_param: esr_docker }
1643             __vnfsdk_repo__: { get_param: vnfsdk_repo }
1644           template: |
1645             #!/bin/bash
1646
1647             # Create configuration files
1648             mkdir -p /opt/config
1649             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1650             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1651             echo "__nexus_username__" > /opt/config/nexus_username.txt
1652             echo "__nexus_password__" > /opt/config/nexus_password.txt
1653             echo "__cloud_env__" > /opt/config/cloud_env.txt
1654             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1655             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1656             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1657             echo "__external_dns__" > /opt/config/external_dns.txt
1658             echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
1659             echo "__msb_docker__" > /opt/config/msb_docker.txt
1660             echo "__mvim_docker__" > /opt/config/mvim_docker.txt
1661             echo "__vfc_docker__" > /opt/config/vfc_docker.txt
1662             echo "__uui_docker__" > /opt/config/uui_docker.txt
1663             echo "__esr_docker__" > /opt/config/esr_docker.txt
1664             echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
1665
1666             # Create env file with the IP address of all ONAP components
1667             echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
1668             echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
1669             echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
1670             echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
1671             echo "export DCAE_COLL_IP=__dcae_coll_ip_addr__" >> /opt/config/onap_ips.txt
1672             echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
1673             echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
1674             echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
1675             echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
1676             echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
1677             echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
1678             echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
1679             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
1680             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
1681             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
1682
1683             # Download and run install script
1684             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/openo_install.sh -o /opt/openo_install.sh
1685             cd /opt
1686             chmod +x openo_install.sh
1687             ./openo_install.sh
1688
1689
1690   # DCAE GEN 2 Controller instantiation
1691   dcae_c_private_port:
1692     type: OS::Neutron::Port
1693     properties:
1694       network: { get_resource: oam_onap }
1695       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1696
1697   dcae_c_floating_ip:
1698     type: OS::Neutron::FloatingIP
1699     properties:
1700       floating_network_id: { get_param: public_net_id }
1701       port_id: { get_resource: dcae_c_private_port }
1702
1703   dcae_c_vm:
1704     type: OS::Nova::Server
1705     properties:
1706       image: { get_param: ubuntu_1604_image }
1707       flavor: { get_param: flavor_medium }
1708       name:
1709         str_replace:
1710           template: base-dcae-bootstrap
1711           params:
1712             base: { get_param: vm_base_name }
1713       key_name: { get_resource: vm_key }
1714       networks:
1715         - port: { get_resource: dcae_c_private_port }
1716       user_data_format: RAW
1717       user_data:
1718         str_replace:
1719           params:
1720             __dcae_zone__: { get_param: dcae_zone }
1721             __rand_str__: { get_resource: random-str }
1722             # repo related
1723             __artifacts_version__: { get_param: artifacts_version }
1724             __docker_version__: { get_param: dcae_docker }
1725             __nexus_repo__: { get_param: nexus_repo }
1726             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1727             __nexus_username__: { get_param: nexus_username }
1728             __nexus_password__: { get_param: nexus_password }
1729             __dcae_repo__: { get_param: dcae_repo }
1730             __gerrit_branch__: { get_param: dcae_branch }
1731             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1732             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
1733             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1734             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1735             __dns_ip_addr__: { get_param: dns_ip_addr }
1736             __external_dns__: { get_param: external_dns }
1737             # conf for the OpensStack env where DCAE is deployed
1738             __dcaeos_cloud_env__: { get_param: dcaeos_cloud_env }
1739             __dcaeos_keystone_url__: { get_param: dcaeos_keystone_url }
1740             __dcaeos_openstack_region__: { get_param: dcaeos_openstack_region }
1741             __dcaeos_tenant_id__: { get_param: dcaeos_openstack_tenant_id }
1742             __dcaeos_openstack_user__: { get_param: dcaeos_openstack_username }
1743             __dcaeos_openstack_password__: { get_param: dcaeos_openstack_password }
1744             __dcaeos_key_name__: { get_param: dcaeos_dcae_key_name }
1745             __dcaeos_pub_key__: { get_param: dcaeos_dcae_pub_key }
1746             __dcaeos_private_key__: { get_param: dcaeos_private_key }
1747             __dcaeos_openstack_private_network_name__: { get_param: dcaeos_openstack_private_network_name }
1748             __dcaeos_public_net_id__: { get_param: dcaeos_public_net_id }
1749             __dcaeos_ubuntu_1604_image__: { get_param: dcaeos_ubuntu_1604_image }
1750             __dcaeos_centos_7_image__: { get_param: dcaeos_centos_7_image }
1751             __dcaeos_security_group__ : { get_param: dcaeos_security_group }
1752             __dcaeos_flavor_id__: { get_param: dcaeos_flavor_id }
1753             # fixed private IPs
1754             __mr_ip_addr__: { get_param: mr_ip_addr }
1755             __policy_ip_addr__: { get_param: policy_ip_addr }
1756             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1757             # floating IPs
1758             __dns_floating_ip_addr__: { get_attr: [dns_floating_ip, floating_ip_address] }
1759             __aai1_floating_ip_addr__: { get_attr: [aai1_floating_ip, floating_ip_address] }
1760             __aai2_floating_ip_addr__: { get_attr: [aai2_floating_ip, floating_ip_address] }
1761             __so_floating_ip_addr__: { get_attr: [so_floating_ip, floating_ip_address] }
1762             __mrouter_floating_ip_addr__: { get_attr: [mrouter_floating_ip, floating_ip_address] }
1763             __robot_floating_ip_addr__: { get_attr: [robot_floating_ip, floating_ip_address] }
1764             __vid_floating_ip_addr__: { get_attr: [vid_floating_ip, floating_ip_address] }
1765             __sdnc_floating_ip_addr__: { get_attr: [sdnc_floating_ip, floating_ip_address] }
1766             __sdc_floating_ip_addr__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1767             __portal_floating_ip_addr__: { get_attr: [portal_floating_ip, floating_ip_address] }
1768             __policy_floating_ip_addr__: { get_attr: [policy_floating_ip, floating_ip_address] }
1769             __appc_floating_ip_addr__: { get_attr: [appc_floating_ip, floating_ip_address] }
1770             __clamp_floating_ip_addr__: { get_attr: [clamp_floating_ip, floating_ip_address] }
1771             __openo_floating_ip_addr__: { get_attr: [openo_floating_ip, floating_ip_address] }
1772             __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1773
1774           template: |
1775             #!/bin/bash
1776
1777             # Create configuration files
1778             mkdir -p /opt/config
1779             echo "__rand_str__" > /opt/config/dcae_zone.txt
1780             echo "__rand_str__" > /opt/config/rand_str.txt
1781             # repo related
1782             echo "__docker_version__" > /opt/config/docker_version.txt
1783             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1784             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1785             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1786             echo "__nexus_username__" > /opt/config/nexus_username.txt
1787             echo "__nexus_password__" > /opt/config/nexus_password.txt
1788             echo "__dcae_repo__" > /opt/config/remote_repo.txt
1789             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1790             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1791             echo "__mac_addr__" > /opt/config/mac_addr.txt
1792             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1793             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1794             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1795             echo "__external_dns__" > /opt/config/external_dns.txt
1796             # conf for the OpensStack env where DCAE is deployed
1797             echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
1798             echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
1799             echo "__dcaeos_openstack_region__" > /opt/config/openstack_region.txt
1800             echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
1801             echo "__dcaeos_tenant_id__" > /opt/config/tenant_name.txt
1802             echo "__dcaeos_openstack_user__" > /opt/config/openstack_user.txt
1803             echo "__dcaeos_openstack_password__" > /opt/config/openstack_password.txt
1804             echo "__dcaeos_key_name__" > /opt/config/key_name.txt
1805             echo "__dcaeos_pub_key__" > /opt/config/pub_key.txt
1806             echo "__dcaeos_private_key__" > /opt/config/priv_key
1807             echo "__dcaeos_openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1808             echo "__dcaeos_public_net_id__" > /opt/config/public_net_id.txt
1809             echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1810             echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
1811             echo "__dcaeos_security_group__" > /opt/config/security_group.txt
1812             echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
1813             # fixed private IP addresses of other ONAP components
1814             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1815             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1816             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1817             # floating IPs
1818             echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
1819             echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
1820             echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
1821             echo "__so_floating_ip_addr__" > /opt/config/so_floating_ip_addr.txt
1822             echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
1823             echo "__robot_floating_ip_addr__" > /opt/config/robot_floating_ip_addr.txt
1824             echo "__vid_floating_ip_addr__" > /opt/config/vid_floating_ip_addr.txt
1825             echo "__sdnc_floating_ip_addr__" > /opt/config/sdnc_floating_ip_addr.txt
1826             echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
1827             echo "__portal_floating_ip_addr__" > /opt/config/portal_floating_ip_addr.txt
1828             echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
1829             echo "__appc_floating_ip_addr__" > /opt/config/appc_floating_ip_addr.txt
1830             echo "__clamp_floating_ip_addr__" > /opt/config/clamp_floating_ip_addr.txt
1831             echo "__openo_floating_ip_addr__" > /opt/config/opoeno_floating_ip_addr.txt
1832             echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
1833
1834             # Download and run install script
1835             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae2_install.sh -o /opt/dcae2_install.sh
1836             cd /opt
1837             chmod +x dcae2_install.sh
1838             ./dcae2_install.sh