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