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