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