Update INFO.yaml with new PTL
[demo.git] / heat / OpenECOMP / onap_openstack_float.yaml
1 heat_template_version: 2015-10-15
2
3 description: Heat template to install ONAP components
4
5 ##############
6 #            #
7 # PARAMETERS #
8 #            #
9 ##############
10
11 parameters:
12
13   ##############################################
14   #                                            #
15   # Parameters used across all ONAP components #
16   #                                            #
17   ##############################################
18   
19   public_net_id:
20     type: string
21     description: Public network for floating IP address allocation
22
23   ubuntu_1404_image:
24     type: string
25     description: Name of the Ubuntu 14.04 image
26
27   ubuntu_1604_image:
28     type: string
29     description: Name of the Ubuntu 16.04 image
30
31   flavor_small:
32     type: string
33     description: Name of the Small Flavor supported by the cloud provider
34
35   flavor_medium:
36     type: string
37     description: Name of the Medium Flavor supported by the cloud provider
38
39   flavor_large:
40     type: string
41     description: Name of the Large Flavor supported by the cloud provider
42
43   flavor_xlarge:
44     type: string
45     description: Name of the Extra Large Flavor supported by the cloud provider
46
47   vm_base_name:
48     type: string
49     description: Base name of ONAP VMs
50
51   key_name:
52     type: string
53     description: Public/Private key pair name
54
55   pub_key:
56     type: string
57     description: Public key to be installed on the compute instance
58
59   nexus_repo:
60     type: string
61     description: Complete URL for the Nexus repository.
62
63   nexus_docker_repo:
64     type: string
65     description: Complete URL for the Nexus repository for docker images.
66
67   nexus_username:
68     type: string
69     description: Nexus Repository username
70
71   nexus_password:
72     type: string
73     description: Nexus Repository Password
74
75   artifacts_version:
76     type: string
77     description: Artifacts version of ONAP components
78
79   docker_version:
80     type: string
81     label: Version number of ONAP docker images
82
83   gerrit_branch:
84     type: string
85     label: Gerrit code branch
86     description: Gerrit branch where to download the code from
87
88   dmaap_topic:
89     type: string
90     description: DMaaP Topic name
91
92   openstack_tenant_id:
93     type: string
94     description: Openstack tenant ID
95
96   openstack_username:
97     type: string
98     description: Openstack username
99
100   openstack_auth_method:
101     type: string
102     description: Openstack authentication method (password VS. api-key)
103
104   openstack_api_key:
105     type: string
106     description: Openstack API Key
107
108   horizon_url:
109     type: string
110     description: URL of Openstack Horizon
111
112   keystone_url:
113     type: string
114     description: URL of Openstack Keystone
115
116   cloud_env:
117     type: string
118     description: Cloud Provider Name
119
120   ######################
121   #                    #
122   # Network parameters #
123   #                    #
124   ######################
125   
126   external_dns:
127     type: comma_delimited_list
128     description: External DNS for OAM ONAP network
129
130   ### Floating IP addresses ###
131   aai_float_ip:
132     type: string
133     description: AAI Floating IP Address
134
135   appc_float_ip:
136     type: string
137     description: APP-C Floating IP Address
138
139   dcae_float_ip:
140     type: string
141     description: DCAE Floating IP Address
142
143   dcae_coll_float_ip:
144     type: string
145     description: DCAE Collector Floating IP Address
146
147   dcae_db_float_ip:
148     type: string
149     description: DCAE Collector Database Floating IP Address
150
151   dcae_hdp1_float_ip:
152     type: string
153     description: Hadoop VM1 Floating IP Address
154
155   dcae_hdp2_float_ip:
156     type: string
157     description: Hadoop VM2 Floating IP Address
158
159   dcae_hdp3_float_ip:
160     type: string
161     description: Hadoop VM3 Floating IP Address
162
163   dns_float_ip:
164     type: string
165     description: DNS Floating IP Address
166
167   mso_float_ip:
168     type: string
169     description: MSO Floating IP Address
170
171   mr_float_ip:
172     type: string
173     description: Message Router Floating IP Address
174
175   policy_float_ip:
176     type: string
177     description: Policy Engine Floating IP Address
178
179   portal_float_ip:
180     type: string
181     description: Portal Floating IP Address
182
183   robot_float_ip:
184     type: string
185     description: Robot Framework Floating IP Address
186
187   sdc_float_ip:
188     type: string
189     description: SDC Floating IP Address
190
191   sdnc_float_ip:
192     type: string
193     description: SDN-C Floating IP Address
194
195   vid_float_ip:
196     type: string
197     description: VID Floating IP Address
198
199   ### Private IP addresses ###
200   oam_network_cidr:
201     type: string
202     description: CIDR of the OAM ONAP network
203
204   aai_ip_addr:
205     type: string
206     description: AAI IP Address
207
208   appc_ip_addr:
209     type: string
210     description: APP-C IP Address
211
212   dcae_ip_addr:
213     type: string
214     description: DCAE IP Address
215  
216   dcae_coll_ip_addr:
217     type: string
218     description: DCAE Collector IP Address
219
220   dcae_db_ip_addr:
221     type: string
222     description: DCAE Database IP Address
223
224   dcae_hdp1_ip_addr:
225     type: string
226     description: Hadoop VM1 IP Address
227
228   dcae_hdp2_ip_addr:
229     type: string
230     description: Hadoop VM2 IP Address
231
232   dcae_hdp3_ip_addr:
233     type: string
234     description: Hadoop VM3 IP Address
235
236   dns_ip_addr:
237     type: string
238     description: DNS IP Address
239
240   mso_ip_addr:
241     type: string
242     description: MSO IP Address
243
244   mr_ip_addr:
245     type: string
246     description: Message Router IP Address
247
248   policy_ip_addr:
249     type: string
250     description: Policy Engine IP Address
251
252   portal_ip_addr:
253     type: string
254     description: Portal IP Address
255
256   robot_ip_addr:
257     type: string
258     description: Robot Framework IP Address
259
260   sdc_ip_addr:
261     type: string
262     description: SDC IP Address
263
264   sdnc_ip_addr:
265     type: string
266     description: SDN-C IP Address
267
268   vid_ip_addr:
269     type: string
270     description: VID IP Address
271
272
273   ###########################
274   #                         #
275   # Parameters used by DCAE #
276   #                         #
277   ###########################
278
279   dcae_base_environment:
280     type: string
281     description: DCAE Base Environment configuration (RACKSPACE/2-NIC/...)
282
283   dcae_zone:
284     type: string
285     description: DCAE Zone to use in VM names created by DCAE controller
286
287   dcae_state:
288     type: string
289     description: DCAE State to use in VM names created by DCAE controller
290
291   nexus_repo_root:
292     type: string
293     description: Root URL of Nexus repository
294
295   nexus_url_snapshot:
296     type: string
297     description: Snapshot of Maven repository for DCAE deployment
298
299   openstack_region:
300     type: string
301     description: Region where the DCAE controller will spin the VMs
302
303   gitlab_branch:
304     type: string
305     description: Branch of the Gitlab repository
306     
307   dcae_code_version:
308     type: string
309     description: DCAE Code Version Number
310
311
312 #############
313 #           #
314 # RESOURCES #
315 #           #
316 #############
317
318 resources:
319   random-str:
320     type: OS::Heat::RandomString
321     properties:
322       length: 4
323
324
325   # Public key used to access ONAP components
326   vm_key:
327     type: OS::Nova::KeyPair
328     properties:
329       name:
330         str_replace:
331           template: base_rand
332           params:
333             base: { get_param: key_name }
334             rand: { get_resource: random-str }
335       public_key: { get_param: pub_key }
336       save_private_key: false
337
338
339   # ONAP management private network
340   oam_ecomp:
341     type: OS::Neutron::Net
342     properties:
343       name:
344         str_replace:
345           template: oam_ecomp_rand
346           params:
347             rand: { get_resource: random-str }
348
349   oam_ecomp_subnet:
350     type: OS::Neutron::Subnet
351     properties:
352       name:
353         str_replace:
354           template: oam_ecomp_rand
355           params:
356             rand: { get_resource: random-str }
357       network_id: { get_resource: oam_ecomp }
358       cidr: { get_param: oam_network_cidr }
359       dns_nameservers: { get_param: external_dns }
360
361   router:
362     type: OS::Neutron::Router
363     properties:
364       external_gateway_info:
365         network: { get_param: public_net_id }
366
367   router_interface:
368     type: OS::Neutron::RouterInterface
369     properties:
370       router_id: { get_resource: router }
371       subnet_id: { get_resource: oam_ecomp_subnet }
372
373
374   # DNS Server instantiation
375   dns_private_port:
376     type: OS::Neutron::Port
377     properties:
378       network: { get_resource: oam_ecomp }
379       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: dns_ip_addr }}]
380
381   dns_floating_ip:
382     type: OS::Neutron::FloatingIP
383     properties:
384       floating_network_id: { get_param: public_net_id }
385       port_id: { get_resource: dns_private_port }
386       floating_ip_address: { get_param: dns_float_ip }
387
388   dns_vm:
389     type: OS::Nova::Server
390     properties:
391       image: { get_param: ubuntu_1404_image }
392       flavor: { get_param: flavor_small }
393       name: 
394         str_replace:
395           template: base-dns-server
396           params:
397             base: { get_param: vm_base_name }
398       key_name: { get_resource: vm_key }
399       networks:
400         - port: { get_resource: dns_private_port }
401       user_data_format: RAW
402       user_data:
403         str_replace:
404           params:
405             __nexus_repo__: { get_param: nexus_repo }
406             __artifacts_version__: { get_param: artifacts_version }
407             __oam_network_cidr__: { get_attr: [oam_ecomp_subnet, cidr] }
408             __dns_ip_addr__: { get_param: dns_ip_addr }
409             __aai_ip_addr__: { get_param: aai_ip_addr }
410             __appc_ip_addr__: { get_param: appc_ip_addr }
411             __dcae_ip_addr__: { get_param: dcae_ip_addr }
412             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
413             __mso_ip_addr__: { get_param: mso_ip_addr }
414             __mr_ip_addr__: { get_param: mr_ip_addr }
415             __policy_ip_addr__: { get_param: policy_ip_addr }
416             __portal_ip_addr__: { get_param: portal_ip_addr }
417             __robot_ip_addr__: { get_param: robot_ip_addr }
418             __sdc_ip_addr__: { get_param: sdc_ip_addr }
419             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
420             __vid_ip_addr__: { get_param: vid_ip_addr }
421             __cloud_env__: { get_param: cloud_env }
422
423           template: |
424             #!/bin/bash
425
426             # Create configuration files
427             mkdir -p /opt/config
428             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
429             echo "__cloud_env__" > /opt/config/cloud_env.txt
430             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
431             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
432             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
433             echo "__aai_ip_addr__" > /opt/config/aai_ip_addr.txt
434             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
435             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
436             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
437             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
438             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
439             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
440             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
441             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
442             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
443             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
444             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
445
446             # Download and run install script
447             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
448             cd /opt
449             chmod +x dns_install.sh
450             ./dns_install.sh
451
452
453   # A&AI instantiation
454   aai_private_port:
455     type: OS::Neutron::Port
456     properties:
457       network: { get_resource: oam_ecomp }
458       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: aai_ip_addr }}]
459
460   aai_floating_ip:
461     type: OS::Neutron::FloatingIP
462     properties:
463       floating_network_id: { get_param: public_net_id }
464       port_id: { get_resource: aai_private_port }
465       floating_ip_address: { get_param: aai_float_ip }
466
467   aai_vm:
468     type: OS::Nova::Server
469     properties:
470       image: { get_param: ubuntu_1404_image }
471       flavor: { get_param: flavor_xlarge }
472       name: 
473         str_replace:
474           template: base-aai
475           params:
476             base: { get_param: vm_base_name }      
477       key_name: { get_resource: vm_key }
478       networks:
479         - port: { get_resource: aai_private_port }
480       user_data_format: RAW
481       user_data:
482         str_replace:
483           params:
484             __nexus_repo__: { get_param: nexus_repo }
485             __nexus_docker_repo__: { get_param: nexus_docker_repo }
486             __nexus_username__: { get_param: nexus_username }
487             __nexus_password__: { get_param: nexus_password }
488             __dmaap_topic__: { get_param: dmaap_topic }
489             __artifacts_version__: { get_param: artifacts_version }
490             __dns_ip_addr__: { get_param: dns_ip_addr }
491             __sdc_ip_addr__: { get_param: sdc_ip_addr }
492             __docker_version__: { get_param: docker_version }
493             __cloud_env__: { get_param: cloud_env }
494           template: |
495             #!/bin/bash
496
497             # Create configuration files
498             mkdir -p /opt/config
499             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
500             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
501             echo "__nexus_username__" > /opt/config/nexus_username.txt
502             echo "__nexus_password__" > /opt/config/nexus_password.txt
503             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
504             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
505             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
506             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
507             echo "__docker_version__" > /opt/config/docker_version.txt
508             echo "__cloud_env__" > /opt/config/cloud_env.txt
509
510             # Download and run install script
511             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
512             cd /opt
513             chmod +x aai_install.sh
514             ./aai_install.sh
515
516
517   # MSO instantiation
518   mso_private_port:
519     type: OS::Neutron::Port
520     properties:
521       network: { get_resource: oam_ecomp }
522       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mso_ip_addr }}]
523
524   mso_floating_ip:
525     type: OS::Neutron::FloatingIP
526     properties:
527       floating_network_id: { get_param: public_net_id }
528       port_id: { get_resource: mso_private_port }
529       floating_ip_address: { get_param: mso_float_ip }
530
531   mso_vm:
532     type: OS::Nova::Server
533     properties:
534       image: { get_param: ubuntu_1604_image }
535       flavor: { get_param: flavor_large }
536       name: 
537         str_replace:
538           template: base-mso
539           params:
540             base: { get_param: vm_base_name }      
541       key_name: { get_resource: vm_key }
542       networks:
543         - port: { get_resource: mso_private_port }
544       user_data_format: RAW
545       user_data:
546         str_replace:
547           params:
548             __nexus_repo__: { get_param: nexus_repo }
549             __nexus_docker_repo__: { get_param: nexus_docker_repo }
550             __nexus_username__: { get_param: nexus_username }
551             __nexus_password__: { get_param: nexus_password }
552             __openstack_username__: { get_param: openstack_username }
553             __openstack_tenant_id__: { get_param: openstack_tenant_id }
554             __openstack_api_key__: { get_param: openstack_api_key }
555             __keystone_url__: { get_param: keystone_url }
556             __dmaap_topic__: { get_param: dmaap_topic }
557             __artifacts_version__: { get_param: artifacts_version }
558             __dns_ip_addr__: { get_param: dns_ip_addr }
559             __docker_version__: { get_param: docker_version }
560             __gerrit_branch__: { get_param: gerrit_branch }
561             __cloud_env__: { get_param: cloud_env }
562           template: |
563             #!/bin/bash
564
565             # Create configuration files
566             mkdir -p /opt/config
567             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
568             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
569             echo "__nexus_username__" > /opt/config/nexus_username.txt
570             echo "__nexus_password__" > /opt/config/nexus_password.txt
571             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
572             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
573             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
574             echo "__openstack_username__" > /opt/config/openstack_username.txt
575             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
576             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
577             echo "__keystone_url__" > /opt/config/keystone.txt
578             echo "__docker_version__" > /opt/config/docker_version.txt
579             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
580             echo "__cloud_env__" > /opt/config/cloud_env.txt
581
582             # Download and run install script
583             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh
584             cd /opt
585             chmod +x mso_install.sh
586             ./mso_install.sh
587
588
589   # Message Router instantiation
590   mrouter_private_port:
591     type: OS::Neutron::Port
592     properties:
593       network: { get_resource: oam_ecomp }
594       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mr_ip_addr }}]
595
596   mrouter_floating_ip:
597     type: OS::Neutron::FloatingIP
598     properties:
599       floating_network_id: { get_param: public_net_id }
600       port_id: { get_resource: mrouter_private_port }
601       floating_ip_address: { get_param: mr_float_ip }
602
603   mrouter_vm:
604     type: OS::Nova::Server
605     properties:
606       image: { get_param: ubuntu_1404_image }
607       flavor: { get_param: flavor_large }
608       name: 
609         str_replace: 
610           template: base-message-router
611           params:
612             base: { get_param: vm_base_name }
613       key_name: { get_resource: vm_key }
614       networks:
615         - port: { get_resource: mrouter_private_port }
616       user_data_format: RAW
617       user_data:
618         str_replace:
619           params:
620             __nexus_repo__: { get_param: nexus_repo }
621             __nexus_docker_repo__: { get_param: nexus_docker_repo }
622             __nexus_username__: { get_param: nexus_username }
623             __nexus_password__: { get_param: nexus_password }
624             __artifacts_version__: { get_param: artifacts_version }
625             __dns_ip_addr__: { get_param: dns_ip_addr }
626             __gerrit_branch__: { get_param: gerrit_branch }
627             __cloud_env__: { get_param: cloud_env }
628           template: |
629             #!/bin/bash
630
631             # Create configuration files
632             mkdir -p /opt/config
633             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
634             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
635             echo "__nexus_username__" > /opt/config/nexus_username.txt
636             echo "__nexus_password__" > /opt/config/nexus_password.txt
637             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
638             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
639             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
640             echo "__cloud_env__" > /opt/config/cloud_env.txt
641
642             # Download and run install script
643             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
644             cd /opt
645             chmod +x mr_install.sh
646             ./mr_install.sh
647
648
649   # Robot Framework instantiation
650   robot_private_port:
651     type: OS::Neutron::Port
652     properties:
653       network: { get_resource: oam_ecomp }
654       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: robot_ip_addr }}]
655
656   robot_floating_ip:
657     type: OS::Neutron::FloatingIP
658     properties:
659       floating_network_id: { get_param: public_net_id }
660       port_id: { get_resource: robot_private_port }
661       floating_ip_address: { get_param: robot_float_ip }
662  
663   robot_vm:
664     type: OS::Nova::Server
665     properties:
666       image: { get_param: ubuntu_1604_image }
667       flavor: { get_param: flavor_small }
668       name: 
669         str_replace: 
670           template: base-robot
671           params:
672             base: { get_param: vm_base_name }
673       key_name: { get_resource: vm_key }
674       networks:
675         - port: { get_resource: robot_private_port }
676       user_data_format: RAW
677       user_data:
678         str_replace:
679           params:
680             __nexus_repo__: { get_param: nexus_repo }
681             __nexus_docker_repo__: { get_param: nexus_docker_repo }
682             __nexus_username__: { get_param: nexus_username }
683             __nexus_password__: { get_param: nexus_password }
684             __network_name__: { get_attr: [oam_ecomp, name] }
685             __openstack_username__: { get_param: openstack_username }
686             __openstack_api_key__: { get_param : openstack_api_key }
687             __artifacts_version__: { get_param: artifacts_version }
688             __openstack_region__: { get_param: openstack_region }
689             __dns_ip_addr__: { get_param: dns_ip_addr }
690             __docker_version__: { get_param: docker_version }
691             __gerrit_branch__: { get_param: gerrit_branch }
692             __cloud_env__: { get_param: cloud_env }
693           template: |
694             #!/bin/bash
695
696             # Create configuration files
697             mkdir -p /opt/config
698             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
699             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
700             echo "__nexus_username__" > /opt/config/nexus_username.txt
701             echo "__nexus_password__" > /opt/config/nexus_password.txt
702             echo "__network_name__" > /opt/config/network.txt
703             echo "__openstack_username__" > /opt/config/openstack_username.txt
704             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
705             echo "__openstack_region__" > /opt/config/region.txt
706             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
707             echo "__docker_version__" > /opt/config/docker_version.txt
708             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
709             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
710             echo "__cloud_env__" > /opt/config/cloud_env.txt
711
712             # Download and run install script
713             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
714             cd /opt
715             chmod +x robot_install.sh
716             ./robot_install.sh
717
718
719   # VID instantiation
720   vid_private_port:
721     type: OS::Neutron::Port
722     properties:
723       network: { get_resource: oam_ecomp }
724       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: vid_ip_addr }}]
725
726   vid_floating_ip:
727     type: OS::Neutron::FloatingIP
728     properties:
729       floating_network_id: { get_param: public_net_id }
730       port_id: { get_resource: vid_private_port }
731       floating_ip_address: { get_param: vid_float_ip }
732
733   vid_vm:
734     type: OS::Nova::Server
735     properties:
736       image: { get_param: ubuntu_1404_image }
737       flavor: { get_param: flavor_medium }
738       name: 
739         str_replace: 
740           template: base-vid
741           params:
742             base: { get_param: vm_base_name }
743       key_name: { get_resource: vm_key }
744       networks:
745         - port: { get_resource: vid_private_port }
746       user_data_format: RAW
747       user_data:
748         str_replace:
749           params:
750             __nexus_repo__: { get_param: nexus_repo }
751             __nexus_docker_repo__: { get_param: nexus_docker_repo }
752             __nexus_username__: { get_param: nexus_username }
753             __nexus_password__: { get_param: nexus_password }
754             __artifacts_version__: { get_param: artifacts_version }
755             __dns_ip_addr__: { get_param: dns_ip_addr }
756             __docker_version__: { get_param: docker_version }
757             __gerrit_branch__: { get_param: gerrit_branch }
758             __cloud_env__: { get_param: cloud_env }
759           template: |
760             #!/bin/bash
761
762             # Create configuration files
763             mkdir -p /opt/config
764             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
765             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
766             echo "__nexus_username__" > /opt/config/nexus_username.txt
767             echo "__nexus_password__" > /opt/config/nexus_password.txt
768             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
769             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
770             echo "__docker_version__" > /opt/config/docker_version.txt
771             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
772             echo "__cloud_env__" > /opt/config/cloud_env.txt
773
774             # Download and run install script
775             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
776             cd /opt
777             chmod +x vid_install.sh
778             ./vid_install.sh
779
780  
781   # SDN-C instantiation
782   sdnc_private_port:
783     type: OS::Neutron::Port
784     properties:
785       network: { get_resource: oam_ecomp }
786       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
787
788   sdnc_floating_ip:
789     type: OS::Neutron::FloatingIP
790     properties:
791       floating_network_id: { get_param: public_net_id }
792       port_id: { get_resource: sdnc_private_port }
793       floating_ip_address: { get_param: sdnc_float_ip }
794
795   sdnc_vm:
796     type: OS::Nova::Server
797     properties:
798       image: { get_param: ubuntu_1404_image }
799       flavor: { get_param: flavor_large }
800       name: 
801         str_replace: 
802           template: base-sdnc
803           params:
804             base: { get_param: vm_base_name }
805       key_name: { get_resource: vm_key }
806       networks:
807         - port: { get_resource: sdnc_private_port }
808       user_data_format: RAW
809       user_data:
810         str_replace:
811           params:
812             __nexus_repo__: { get_param: nexus_repo }
813             __nexus_docker_repo__: { get_param: nexus_docker_repo }
814             __nexus_username__: { get_param: nexus_username }
815             __nexus_password__: { get_param: nexus_password }
816             __artifacts_version__: { get_param: artifacts_version }
817             __dns_ip_addr__: { get_param: dns_ip_addr }
818             __docker_version__: { get_param: docker_version }
819             __gerrit_branch__: { get_param: gerrit_branch }
820             __cloud_env__: { get_param: cloud_env }
821           template: |
822             #!/bin/bash
823
824             # Create configuration files
825             mkdir -p /opt/config
826             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
827             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
828             echo "__nexus_username__" > /opt/config/nexus_username.txt
829             echo "__nexus_password__" > /opt/config/nexus_password.txt
830             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
831             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
832             echo "__docker_version__" > /opt/config/docker_version.txt
833             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
834             echo "__cloud_env__" > /opt/config/cloud_env.txt
835
836             # Download and run install script
837             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
838             cd /opt
839             chmod +x sdnc_install.sh
840             ./sdnc_install.sh
841
842
843   # SDC instantiation
844   sdc_private_port:
845     type: OS::Neutron::Port
846     properties:
847       network: { get_resource: oam_ecomp }
848       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
849
850   sdc_floating_ip:
851     type: OS::Neutron::FloatingIP
852     properties:
853       floating_network_id: { get_param: public_net_id }
854       port_id: { get_resource: sdc_private_port }
855       floating_ip_address: { get_param: sdc_float_ip }
856
857   sdc_volume_data:
858     type: OS::Cinder::Volume
859     properties:
860       name: vol1-sdc-data
861       size: 100
862
863   sdc_vm:
864     type: OS::Nova::Server
865     properties:
866       image: { get_param: ubuntu_1604_image }
867       flavor: { get_param: flavor_xlarge }
868       name: 
869         str_replace: 
870           template: base-sdc
871           params:
872             base: { get_param: vm_base_name }
873       key_name: { get_resource: vm_key }
874       networks:
875         - port: { get_resource: sdc_private_port }
876       block_device_mapping:
877         - device_name: /dev/vdb
878           volume_id: {get_resource: sdc_volume_data}
879       user_data_format: RAW
880       user_data:
881         str_replace:
882           params:
883             __nexus_repo__: { get_param: nexus_repo }
884             __nexus_docker_repo__: { get_param: nexus_docker_repo }
885             __nexus_username__: { get_param: nexus_username }
886             __nexus_password__: { get_param: nexus_password }
887             __env_name__: { get_param: dmaap_topic }
888             __artifacts_version__: { get_param: artifacts_version }
889             __dns_ip_addr__: { get_param: dns_ip_addr }
890             __mr_ip_addr__: { get_param: mr_ip_addr }
891             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
892             __docker_version__: { get_param: docker_version }
893             __gerrit_branch__: { get_param: gerrit_branch }
894             __cloud_env__: { get_param: cloud_env }
895           template: |
896             #!/bin/bash
897
898             # Create configuration files
899             mkdir -p /opt/config
900             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
901             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
902             echo "__nexus_username__" > /opt/config/nexus_username.txt
903             echo "__nexus_password__" > /opt/config/nexus_password.txt
904             echo "__env_name__" > /opt/config/env_name.txt
905             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
906             echo "__public_ip__" > /opt/config/public_ip.txt
907             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
908             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
909             echo "__docker_version__" > /opt/config/docker_version.txt
910             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
911             echo "__cloud_env__" > /opt/config/cloud_env.txt
912
913             # Download and run install script
914             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh
915             cd /opt
916             chmod +x asdc_install.sh
917             ./asdc_install.sh
918
919
920   # PORTAL instantiation
921   portal_private_port:
922     type: OS::Neutron::Port
923     properties:
924       network: { get_resource: oam_ecomp }
925       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: portal_ip_addr }}]
926
927   portal_floating_ip:
928     type: OS::Neutron::FloatingIP
929     properties:
930       floating_network_id: { get_param: public_net_id }
931       port_id: { get_resource: portal_private_port }
932       floating_ip_address: { get_param: portal_float_ip }
933
934   portal_vm:
935     type: OS::Nova::Server
936     properties:
937       image: { get_param: ubuntu_1404_image }
938       flavor: { get_param: flavor_large }
939       name: 
940         str_replace: 
941           template: base-portal
942           params:
943             base: { get_param: vm_base_name }
944       key_name: { get_resource: vm_key }
945       networks:
946         - port: { get_resource: portal_private_port }
947       user_data_format: RAW
948       user_data:
949         str_replace:
950           params:
951             __nexus_repo__: { get_param: nexus_repo }
952             __nexus_docker_repo__: { get_param: nexus_docker_repo }
953             __nexus_username__: { get_param: nexus_username }
954             __nexus_password__: { get_param: nexus_password }
955             __artifacts_version__: { get_param: artifacts_version }
956             __dns_ip_addr__: { get_param: dns_ip_addr }
957             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
958             __docker_version__: { get_param: docker_version }
959             __gerrit_branch__: { get_param: gerrit_branch }
960             __cloud_env__: { get_param: cloud_env }
961           template: |
962             #!/bin/bash
963
964             # Create configuration files
965             mkdir -p /opt/config
966             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
967             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
968             echo "__nexus_username__" > /opt/config/nexus_username.txt
969             echo "__nexus_password__" > /opt/config/nexus_password.txt
970             echo "__public_ip__" > /opt/config/public_ip.txt
971             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
972             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
973             echo "__docker_version__" > /opt/config/docker_version.txt
974             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
975             echo "__cloud_env__" > /opt/config/cloud_env.txt
976
977             # Download and run install script
978             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
979             cd /opt
980             chmod +x portal_install.sh
981             ./portal_install.sh
982
983
984   # DCAE Controller instantiation
985   dcae_c_private_port:
986     type: OS::Neutron::Port
987     properties:
988       network: { get_resource: oam_ecomp }
989       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
990
991   dcae_c_floating_ip:
992     type: OS::Neutron::FloatingIP
993     properties:
994       floating_network_id: { get_param: public_net_id }
995       port_id: { get_resource: dcae_c_private_port }
996       floating_ip_address: { get_param: dcae_float_ip }
997
998   dcae_c_vm:
999     type: OS::Nova::Server
1000     properties:
1001       image: { get_param: ubuntu_1404_image }
1002       flavor: { get_param: flavor_medium }
1003       name: 
1004         str_replace: 
1005           template: base-dcae-controller
1006           params:
1007             base: { get_param: vm_base_name }
1008       key_name: { get_resource: vm_key }
1009       networks:
1010         - port: { get_resource: dcae_c_private_port }
1011       user_data_format: RAW
1012       user_data:
1013         str_replace:
1014           params:
1015             __nexus_repo__: { get_param: nexus_repo }
1016             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1017             __nexus_username__: { get_param: nexus_username }
1018             __nexus_password__: { get_param: nexus_password }
1019             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1020             __gitlab_branch__: { get_param: gitlab_branch }
1021             __dns_ip_addr__: { get_param: dns_ip_addr }
1022             __dcae_zone__: { get_param: dcae_zone }
1023             __dcae_state__: { get_param: dcae_state }
1024             __artifacts_version__: { get_param: artifacts_version }
1025             __tenant_id__: { get_param: openstack_tenant_id }
1026             __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
1027             __openstack_user__: { get_param: openstack_username }
1028             __openstack_password__: { get_param: openstack_api_key }
1029             __openstack_auth_method__: { get_param: openstack_auth_method }
1030             __key_name__: { get_param: key_name }
1031             __rand_str__: { get_resource: random-str }
1032             __pub_key__: { get_param: pub_key }
1033             __nexus_repo_root__: { get_param: nexus_repo_root }
1034             __openstack_region__: { get_param: openstack_region }
1035             __horizon_url__: { get_param: horizon_url }
1036             __keystone_url__: { get_param: keystone_url }
1037             __docker_version__: { get_param: docker_version }
1038             __gerrit_branch__: { get_param: gerrit_branch }
1039             __dcae_code_version__: { get_param: dcae_code_version }
1040             __cloud_env__: { get_param: cloud_env }
1041             __public_net_id__: { get_param: public_net_id }
1042             __dcae_base_environment__: { get_param: dcae_base_environment }
1043             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1044             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1045             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1046             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1047             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1048             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1049             __dcae_float_ip__: { get_param: dcae_float_ip }
1050             __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1051             __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1052             __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1053             __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1054             __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1055           template: |
1056             #!/bin/bash
1057
1058             # Create configuration files
1059             mkdir -p /opt/config
1060             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1061             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1062             echo "__nexus_username__" > /opt/config/nexus_username.txt
1063             echo "__nexus_password__" > /opt/config/nexus_password.txt
1064             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1065             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1066             echo "__docker_version__" > /opt/config/docker_version.txt
1067             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1068             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1069             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1070             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1071             echo "__dcae_state__" > /opt/config/dcae_state.txt
1072             echo "__tenant_id__" > /opt/config/tenant_id.txt
1073             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1074             echo "__openstack_user__" > /opt/config/openstack_user.txt
1075             echo "__openstack_password__" > /opt/config/openstack_password.txt
1076             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1077             echo "__key_name__" > /opt/config/key_name.txt
1078             echo "__rand_str__" > /opt/config/rand_str.txt
1079             echo "__pub_key__" > /opt/config/pub_key.txt
1080             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1081             echo "__openstack_region__" > /opt/config/openstack_region.txt
1082             echo "__horizon_url__" > /opt/config/horizon_url.txt
1083             echo "__keystone_url__" > /opt/config/keystone_url.txt
1084             echo "__cloud_env__" > /opt/config/cloud_env.txt
1085             echo "__public_net_id__" > /opt/config/public_net_id.txt
1086             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1087             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1088             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1089             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1090             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1091             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1092             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1093             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1094             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1095             echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1096             echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1097             echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1098             echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1099             echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1100
1101             # Download and run install script
1102             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1103             cd /opt
1104             chmod +x dcae_install.sh
1105             ./dcae_install.sh
1106
1107
1108   # Policy Engine instantiation
1109   policy_private_port:
1110     type: OS::Neutron::Port
1111     properties:
1112       network: { get_resource: oam_ecomp }
1113       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1114
1115   policy_floating_ip:
1116     type: OS::Neutron::FloatingIP
1117     properties:
1118       floating_network_id: { get_param: public_net_id }
1119       port_id: { get_resource: policy_private_port }
1120       floating_ip_address: { get_param: policy_float_ip }
1121
1122   policy_vm:
1123     type: OS::Nova::Server
1124     properties:
1125       image: { get_param: ubuntu_1404_image }
1126       flavor: { get_param: flavor_xlarge }
1127       name: 
1128         str_replace: 
1129           template: base-policy
1130           params:
1131             base: { get_param: vm_base_name }
1132       key_name: { get_resource: vm_key }
1133       networks:
1134         - port: { get_resource: policy_private_port }
1135       user_data_format: RAW
1136       user_data:
1137         str_replace:
1138           params:
1139             __nexus_repo__: { get_param: nexus_repo }
1140             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1141             __nexus_username__: { get_param: nexus_username }
1142             __nexus_password__: { get_param: nexus_password }
1143             __artifacts_version__: { get_param: artifacts_version }
1144             __dns_ip_addr__: { get_param: dns_ip_addr }
1145             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1146             __docker_version__: { get_param: docker_version }
1147             __gerrit_branch__: { get_param: gerrit_branch }
1148             __cloud_env__: { get_param: cloud_env }
1149           template: |
1150             #!/bin/bash
1151
1152             # Create configuration files
1153             mkdir -p /opt/config
1154             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1155             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1156             echo "__nexus_username__" > /opt/config/nexus_username.txt
1157             echo "__nexus_password__" > /opt/config/nexus_password.txt
1158             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1159             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1160             echo "__public_ip__" > /opt/config/public_ip.txt
1161             echo "__docker_version__" > /opt/config/docker_version.txt
1162             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1163             echo "__cloud_env__" > /opt/config/cloud_env.txt
1164
1165             # Download and run install script
1166             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1167             cd /opt
1168             chmod +x policy_install.sh
1169             ./policy_install.sh
1170
1171
1172   # APP-C instantiation
1173   appc_private_port:
1174     type: OS::Neutron::Port
1175     properties:
1176       network: { get_resource: oam_ecomp }
1177       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1178
1179   appc_floating_ip:
1180     type: OS::Neutron::FloatingIP
1181     properties:
1182       floating_network_id: { get_param: public_net_id }
1183       port_id: { get_resource: appc_private_port }
1184       floating_ip_address: { get_param: appc_float_ip }
1185
1186   appc_vm:
1187     type: OS::Nova::Server
1188     properties:
1189       image: { get_param: ubuntu_1404_image }
1190       flavor: { get_param: flavor_large }
1191       name: 
1192         str_replace: 
1193           template: base-appc
1194           params:
1195             base: { get_param: vm_base_name }
1196       key_name: { get_resource: vm_key }
1197       networks:
1198         - port: { get_resource: appc_private_port }
1199       user_data_format: RAW
1200       user_data:
1201         str_replace:
1202           params:
1203             __nexus_repo__: { get_param: nexus_repo }
1204             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1205             __nexus_username__: { get_param: nexus_username }
1206             __nexus_password__: { get_param: nexus_password }
1207             __dmaap_topic__: { get_param: dmaap_topic }
1208             __artifacts_version__: { get_param: artifacts_version }
1209             __dns_ip_addr__: { get_param: dns_ip_addr }
1210             __docker_version__: { get_param: docker_version }
1211             __gerrit_branch__: { get_param: gerrit_branch }
1212             __cloud_env__: { get_param: cloud_env }
1213           template: |
1214             #!/bin/bash
1215
1216             # Create configuration files
1217             mkdir -p /opt/config
1218             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1219             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1220             echo "__nexus_username__" > /opt/config/nexus_username.txt
1221             echo "__nexus_password__" > /opt/config/nexus_password.txt
1222             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1223             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1224             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1225             echo "__docker_version__" > /opt/config/docker_version.txt
1226             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1227             echo "__cloud_env__" > /opt/config/cloud_env.txt
1228
1229             # Download and run install script
1230             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1231             cd /opt
1232             chmod +x appc_install.sh
1233             ./appc_install.sh