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