c478497106fe6fa85f360bee90ed26cf8ca7c6b6
[demo.git] / heat / OpenECOMP / onap_rackspace.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4
5 #
6 # Copyright © 2017 AT&T Intellectual Property. All rights reserved.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #        http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 #==================LICENSE_END============================================
20 #
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 #
23 ##########################################################################
24
25 heat_template_version: 2013-05-23
26
27 description: Heat template to deploy ONAP components
28
29 parameters:
30
31   # Generic parameters used across all ONAP components
32   public_net_id:
33     type: string
34     description: Public network that enables remote connection to the compute instance
35
36   key_name:
37     type: string
38     description: Public/Private key pair name
39
40   pub_key:
41     type: string
42     description: Public key or SSL certificate to be installed on the compute instance
43
44   nexus_repo:
45     type: string
46     description: Complete URL for the Nexus repository.
47
48   nexus_docker_repo:
49     type: string
50     description: Complete URL for the Nexus repository for docker images.
51
52   nexus_username:
53     type: string
54     description: Nexus Repository username
55
56   nexus_password:
57     type: string
58     description: Nexus Repository Password
59
60   openstack_tenant_id:
61     type: string
62     description: Rackspace tenant ID
63
64   openstack_username:
65     type: string
66     description: Rackspace username
67
68   openstack_api_key:
69     type: string
70     description: Rackspace API Key
71
72   openstack_password:
73     type: string
74     description: Rackspace Password
75
76   openstack_auth_method:
77     type: string
78     description: Openstack authentication method (password VS. api-key)
79
80   dmaap_topic:
81     type: string
82     description: DMaaP topic name
83
84   artifacts_version:
85     type: string
86     description: Artifacts version of ONAP components
87
88   docker_version:
89     type: string
90     description: Docker version of ONAP docker images
91
92   gerrit_branch:
93     type: string
94     description: Gerrit branch where to download the code from
95
96   cloud_env:
97     type: string
98     description: Cloud Provider Name
99
100
101   # Parameters for DCAE instantiation
102   dcae_base_environment:
103     type: string
104     description: DCAE Base Environment configuration (RACKSPACE/2-NIC/...)
105
106   dcae_zone:
107     type: string
108     description: DCAE Zone to use in VM names created by DCAE controller
109
110   dcae_state:
111     type: string
112     description: DCAE State to use in VM names created by DCAE controller
113
114   nexus_repo_root:
115     type: string
116     description: Root URL of nexus repository
117
118   nexus_url_snapshot:
119     type: string
120     description: Snapshot of Maven repository
121
122   openstack_region:
123     type: string
124     description: Rackspace region where the DCAE controller will spin the VMs
125
126   gitlab_branch:
127     type: string
128     description: Branch of the Gitlab repository
129
130   dcae_code_version:
131     type: string
132     description: DCAE Code Version Number
133
134   dcae_ip_addr:
135     type: string
136     description: DCAE IP Address
137  
138   dcae_coll_ip_addr:
139     type: string
140     description: DCAE Collector IP Address
141
142   dcae_db_ip_addr:
143     type: string
144     description: DCAE Database IP Address
145
146   dcae_hdp1_ip_addr:
147     type: string
148     description: Hadoop VM1 IP Address
149
150   dcae_hdp2_ip_addr:
151     type: string
152     description: Hadoop VM2 IP Address
153
154   dcae_hdp3_ip_addr:
155     type: string
156     description: Hadoop VM3 IP Address
157
158
159 resources:
160   random-str:
161     type: OS::Heat::RandomString
162     properties:
163       length: 4
164
165   # Public key used to access ONAP components
166   vm_key:
167     type: OS::Nova::KeyPair
168     properties:
169       name:
170         str_replace:
171           template: base_rand
172           params:
173             base: { get_param: key_name }
174             rand: { get_resource: random-str }
175       public_key: { get_param: pub_key }
176       save_private_key: false
177
178
179   # ONAP management private network
180   oam_ecomp:
181     type: OS::Neutron::Net
182     properties:
183       name:
184         str_replace:
185           template: oam_ecomp_rand
186           params:
187             rand: { get_resource: random-str }
188
189   oam_ecomp_subnet:
190     type: OS::Neutron::Subnet
191     properties:
192       name:
193         str_replace:
194           template: oam_ecomp_rand
195           params:
196             rand: { get_resource: random-str }
197       network_id: { get_resource: oam_ecomp }
198       cidr: 10.0.0.0/8
199
200
201   # DNS Server instantiation
202   dns_private_port:
203     type: OS::Neutron::Port
204     properties:
205       network: { get_resource: oam_ecomp }
206       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.0.1}]
207
208   dns_vm:
209     type: OS::Nova::Server
210     properties:
211       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
212       flavor: 4 GB General Purpose v1
213       name: vm1-dns-server
214       key_name: { get_resource: vm_key }
215       networks:
216         - network: { get_param: public_net_id }
217         - port: { get_resource: dns_private_port }
218       user_data_format: RAW
219       user_data:
220         str_replace:
221           params:
222             __nexus_repo__: { get_param: nexus_repo }
223             __artifacts_version__: { get_param: artifacts_version }
224             __cloud_env__: { get_param: cloud_env }
225           template: |
226             #!/bin/bash
227
228             # Create configuration files
229             mkdir -p /opt/config
230             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
231             echo "__cloud_env__" > /opt/config/cloud_env.txt
232             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
233
234             # Download and run install script
235             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
236             cd /opt
237             chmod +x dns_install.sh
238             ./dns_install.sh
239
240
241   # A&AI instantiation
242   aai_private_port:
243     type: OS::Neutron::Port
244     properties:
245       network: { get_resource: oam_ecomp }
246       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.1.1}]
247
248   aai_volume:
249     type: OS::Cinder::Volume
250     properties:
251       name: vol1-aai
252       size: 50
253       volume_type: SSD
254       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
255
256   aai_vm:
257     type: OS::Nova::Server
258     properties:
259       flavor: 15 GB Compute v1
260       name: vm1-aai
261       key_name: { get_resource: vm_key }
262       block_device_mapping:
263         - volume_id: { get_resource: aai_volume }
264           device_name: vda
265       networks:
266         - network: { get_param: public_net_id }
267         - port: { get_resource: aai_private_port }
268       user_data_format: RAW
269       user_data:
270         str_replace:
271           params:
272             __nexus_repo__: { get_param: nexus_repo }
273             __nexus_docker_repo__: { get_param: nexus_docker_repo }
274             __nexus_username__: { get_param: nexus_username }
275             __nexus_password__: { get_param: nexus_password }
276             __dmaap_topic__: { get_param: dmaap_topic }
277             __artifacts_version__: { get_param: artifacts_version }
278             __docker_version__: { get_param: docker_version }
279             __cloud_env__: { get_param: cloud_env }
280           template: |
281             #!/bin/bash
282
283             # Create configuration files
284             mkdir -p /opt/config
285             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
286             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
287             echo "__nexus_username__" > /opt/config/nexus_username.txt
288             echo "__nexus_password__" > /opt/config/nexus_password.txt
289             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
290             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
291             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
292             echo "__docker_version__" > /opt/config/docker_version.txt
293             echo "__cloud_env__" > /opt/config/cloud_env.txt
294
295             # Download and run install script
296             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
297             cd /opt
298             chmod +x aai_install.sh
299             ./aai_install.sh
300
301
302   # MSO instantiation
303   mso_private_port:
304     type: OS::Neutron::Port
305     properties:
306       network: { get_resource: oam_ecomp }
307       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.5.1}]
308
309   mso_vm:
310     type: OS::Nova::Server
311     properties:
312       image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
313       flavor: 4 GB General Purpose v1
314       name: vm1-mso
315       key_name: { get_resource: vm_key }
316       networks:
317         - network: { get_param: public_net_id }
318         - port: { get_resource: mso_private_port }
319       user_data_format: RAW
320       user_data:
321         str_replace:
322           params:
323             __nexus_repo__: { get_param: nexus_repo }
324             __nexus_docker_repo__: { get_param: nexus_docker_repo }
325             __nexus_username__: { get_param: nexus_username }
326             __nexus_password__: { get_param: nexus_password }
327             __openstack_username__: { get_param: openstack_username }
328             __openstack_tenant_id__: { get_param: openstack_tenant_id }
329             __openstack_api_key__: { get_param: openstack_api_key }
330             __dmaap_topic__: { get_param: dmaap_topic }
331             __artifacts_version__: { get_param: artifacts_version }
332             __docker_version__: { get_param: docker_version }
333             __gerrit_branch__: { get_param: gerrit_branch }
334             __cloud_env__: { get_param: cloud_env }
335           template: |
336             #!/bin/bash
337
338             # Create configuration files
339             mkdir -p /opt/config
340             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
341             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
342             echo "__nexus_username__" > /opt/config/nexus_username.txt
343             echo "__nexus_password__" > /opt/config/nexus_password.txt
344             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
345             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
346             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
347             echo "__openstack_username__" > /opt/config/openstack_username.txt
348             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
349             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
350             echo "__docker_version__" > /opt/config/docker_version.txt
351             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
352             echo "__cloud_env__" > /opt/config/cloud_env.txt
353
354             # Download and run install script
355             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh
356             cd /opt
357             chmod +x mso_install.sh
358             ./mso_install.sh
359
360
361   # Message Router instantiation
362   mrouter_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": 10.0.11.1}]
367
368   mrouter_vm:
369     type: OS::Nova::Server
370     properties:
371       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
372       flavor: 15 GB I/O v1
373       name: vm1-message-router
374       key_name: { get_resource: vm_key }
375       networks:
376         - network: { get_param: public_net_id }
377         - port: { get_resource: mrouter_private_port }
378       user_data_format: RAW
379       user_data:
380         str_replace:
381           params:
382             __nexus_repo__: { get_param: nexus_repo }
383             __nexus_docker_repo__: { get_param: nexus_docker_repo }
384             __nexus_username__: { get_param: nexus_username }
385             __nexus_password__: { get_param: nexus_password }
386             __artifacts_version__: { get_param: artifacts_version }
387             __gerrit_branch__: { get_param: gerrit_branch }
388             __cloud_env__: { get_param: cloud_env }
389           template: |
390             #!/bin/bash
391
392             # Create configuration files
393             mkdir -p /opt/config
394             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
395             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
396             echo "__nexus_username__" > /opt/config/nexus_username.txt
397             echo "__nexus_password__" > /opt/config/nexus_password.txt
398             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
399             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
400             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
401             echo "__cloud_env__" > /opt/config/cloud_env.txt
402
403             # Download and run install script
404             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
405             cd /opt
406             chmod +x mr_install.sh
407             ./mr_install.sh
408
409
410   # RobotE2E instantiation
411   robot_private_port:
412     type: OS::Neutron::Port
413     properties:
414       network: { get_resource: oam_ecomp }
415       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.10.1}]
416
417   robot_vm:
418     type: OS::Nova::Server
419     properties:
420       image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
421       flavor: 2 GB General Purpose v1
422       name: vm1-robot
423       key_name: { get_resource: vm_key }
424       networks:
425         - network: { get_param: public_net_id }
426         - port: { get_resource: robot_private_port }
427       user_data_format: RAW
428       user_data:
429         str_replace:
430           params:
431             __nexus_repo__: { get_param: nexus_repo }
432             __nexus_docker_repo__: { get_param: nexus_docker_repo }
433             __nexus_username__: { get_param: nexus_username }
434             __nexus_password__: { get_param: nexus_password }
435             __network_name__: { get_attr: [oam_ecomp, name] }
436             __openstack_username__: { get_param: openstack_username }
437             __openstack_api_key__: { get_param : openstack_api_key }
438             __openstack_password__: { get_param: openstack_password }
439             __artifacts_version__: { get_param: artifacts_version }
440             __openstack_region__: { get_param: openstack_region }
441             __docker_version__: { get_param: docker_version }
442             __gerrit_branch__: { get_param: gerrit_branch }
443             __cloud_env__: { get_param: cloud_env }
444           template: |
445             #!/bin/bash
446
447             # Create configuration files
448             mkdir -p /opt/config
449             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
450             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
451             echo "__nexus_username__" > /opt/config/nexus_username.txt
452             echo "__nexus_password__" > /opt/config/nexus_password.txt
453             echo "__network_name__" > /opt/config/network.txt
454             echo "__openstack_username__" > /opt/config/openstack_username.txt
455             echo "__openstack_password__" > /opt/config/openstack_password.txt
456             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
457             echo "__openstack_region__" > /opt/config/region.txt
458             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
459             echo "__docker_version__" > /opt/config/docker_version.txt
460             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
461             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
462             echo "__cloud_env__" > /opt/config/cloud_env.txt
463
464             # Download and run install script
465             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
466             cd /opt
467             chmod +x robot_install.sh
468             ./robot_install.sh
469
470
471   # VID instantiation
472   vid_private_port:
473     type: OS::Neutron::Port
474     properties:
475       network: { get_resource: oam_ecomp }
476       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.8.1}]
477
478   vid_vm:
479     type: OS::Nova::Server
480     properties:
481       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
482       flavor: 2 GB General Purpose v1
483       name: vm1-vid
484       key_name: { get_resource: vm_key }
485       networks:
486         - network: { get_param: public_net_id }
487         - port: { get_resource: vid_private_port }
488       user_data_format: RAW
489       user_data:
490         str_replace:
491           params:
492             __nexus_repo__: { get_param: nexus_repo }
493             __nexus_docker_repo__: { get_param: nexus_docker_repo }
494             __nexus_username__: { get_param: nexus_username }
495             __nexus_password__: { get_param: nexus_password }
496             __artifacts_version__: { get_param: artifacts_version }
497             __docker_version__: { get_param: docker_version }
498             __gerrit_branch__: { get_param: gerrit_branch }
499             __cloud_env__: { get_param: cloud_env }
500           template: |
501             #!/bin/bash
502
503             # Create configuration files
504             mkdir -p /opt/config
505             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
506             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
507             echo "__nexus_username__" > /opt/config/nexus_username.txt
508             echo "__nexus_password__" > /opt/config/nexus_password.txt
509             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
510             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
511             echo "__docker_version__" > /opt/config/docker_version.txt
512             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
513             echo "__cloud_env__" > /opt/config/cloud_env.txt
514
515             # Download and run install script
516             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
517             cd /opt
518             chmod +x vid_install.sh
519             ./vid_install.sh
520
521
522   # SDN-C instantiation
523   sdnc_private_port:
524     type: OS::Neutron::Port
525     properties:
526       network: { get_resource: oam_ecomp }
527       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.7.1}]
528
529   sdnc_vm:
530     type: OS::Nova::Server
531     properties:
532       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
533       flavor: 4 GB General Purpose v1
534       name: vm1-sdnc
535       key_name: { get_resource: vm_key }
536       networks:
537         - network: { get_param: public_net_id }
538         - port: { get_resource: sdnc_private_port }
539       user_data_format: RAW
540       user_data:
541         str_replace:
542           params:
543             __nexus_repo__: { get_param: nexus_repo }
544             __nexus_docker_repo__: { get_param: nexus_docker_repo }
545             __nexus_username__: { get_param: nexus_username }
546             __nexus_password__: { get_param: nexus_password }
547             __artifacts_version__: { get_param: artifacts_version }
548             __docker_version__: { get_param: docker_version }
549             __gerrit_branch__: { get_param: gerrit_branch }
550             __cloud_env__: { get_param: cloud_env }
551           template: |
552             #!/bin/bash
553
554             # Create configuration files
555             mkdir -p /opt/config
556             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
557             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
558             echo "__nexus_username__" > /opt/config/nexus_username.txt
559             echo "__nexus_password__" > /opt/config/nexus_password.txt
560             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
561             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
562             echo "__docker_version__" > /opt/config/docker_version.txt
563             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
564             echo "__cloud_env__" > /opt/config/cloud_env.txt
565
566             # Download and run install script
567             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
568             cd /opt
569             chmod +x sdnc_install.sh
570             ./sdnc_install.sh
571
572
573   # SDC instantiation
574   sdc_private_port:
575     type: OS::Neutron::Port
576     properties:
577       network: { get_resource: oam_ecomp }
578       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.3.1}]
579
580   sdc_volume_local:
581     type: OS::Cinder::Volume
582     properties:
583       name: vol1-sdc-local
584       size: 50
585       volume_type: SSD
586       image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
587
588   sdc_volume_data:
589     type: OS::Cinder::Volume
590     properties:
591       name: vol1-sdc-data
592       size: 100
593       volume_type: SSD
594
595   sdc_volume_attachment:
596     type: OS::Cinder::VolumeAttachment
597     properties:
598       volume_id: { get_resource: sdc_volume_data }
599       instance_uuid: { get_resource: sdc_vm }
600       mountpoint: /dev/xvdb
601
602   sdc_vm:
603     type: OS::Nova::Server
604     properties:
605       flavor: 15 GB Compute v1
606       name: vm1-sdc
607       key_name: { get_resource: vm_key }
608       block_device_mapping:
609         - volume_id: { get_resource: sdc_volume_local }
610           device_name: vda
611       networks:
612         - network: { get_param: public_net_id }
613         - port: { get_resource: sdc_private_port }
614       user_data_format: RAW
615       user_data:
616         str_replace:
617           params:
618             __nexus_repo__: { get_param: nexus_repo }
619             __nexus_docker_repo__: { get_param: nexus_docker_repo }
620             __nexus_username__: { get_param: nexus_username }
621             __nexus_password__: { get_param: nexus_password }
622             __env_name__: { get_param: dmaap_topic }
623             __artifacts_version__: { get_param: artifacts_version }
624             __docker_version__: { get_param: docker_version }
625             __gerrit_branch__: { get_param: gerrit_branch }
626             __cloud_env__: { get_param: cloud_env }
627           template: |
628             #!/bin/bash
629
630             # Create configuration files
631             mkdir -p /opt/config
632             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
633             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
634             echo "__nexus_username__" > /opt/config/nexus_username.txt
635             echo "__nexus_password__" > /opt/config/nexus_password.txt
636             echo "__env_name__" > /opt/config/env_name.txt
637             echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
638             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
639             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
640             echo "__docker_version__" > /opt/config/docker_version.txt
641             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
642             echo "__cloud_env__" > /opt/config/cloud_env.txt
643
644             # Download and run install script
645             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh
646             cd /opt
647             chmod +x asdc_install.sh
648             ./asdc_install.sh
649
650
651   # PORTAL instantiation
652   portal_private_port:
653     type: OS::Neutron::Port
654     properties:
655       network: { get_resource: oam_ecomp }
656       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.9.1}]
657
658   portal_volume:
659     type: OS::Cinder::Volume
660     properties:
661       name: vol1-portal
662       size: 50
663       volume_type: SSD
664       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
665
666   portal_vm:
667     type: OS::Nova::Server
668     properties:
669       flavor: 15 GB Memory v1
670       name: vm1-portal
671       key_name: { get_resource: vm_key }
672       block_device_mapping:
673         - volume_id: { get_resource: portal_volume }
674           device_name: vda
675       networks:
676         - network: { get_param: public_net_id }
677         - port: { get_resource: portal_private_port }
678       user_data_format: RAW
679       user_data:
680         str_replace:
681           params:
682             __nexus_repo__: { get_param: nexus_repo }
683             __nexus_docker_repo__: { get_param: nexus_docker_repo }
684             __nexus_username__: { get_param: nexus_username }
685             __nexus_password__: { get_param: nexus_password }
686             __artifacts_version__: { get_param: artifacts_version }
687             __docker_version__: { get_param: docker_version }
688             __gerrit_branch__: { get_param: gerrit_branch }
689             __cloud_env__: { get_param: cloud_env }
690           template: |
691             #!/bin/bash
692
693             # Create configuration files
694             mkdir -p /opt/config
695             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
696             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
697             echo "__nexus_username__" > /opt/config/nexus_username.txt
698             echo "__nexus_password__" > /opt/config/nexus_password.txt
699             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
700             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
701             echo "__docker_version__" > /opt/config/docker_version.txt
702             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
703             echo "__cloud_env__" > /opt/config/cloud_env.txt
704
705             # Download and run install script
706             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
707             cd /opt
708             chmod +x portal_install.sh
709             ./portal_install.sh
710
711
712   # DCAE Controller instantiation
713   dcae_c_private_port:
714     type: OS::Neutron::Port
715     properties:
716       network: { get_resource: oam_ecomp }
717       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.4.1}]
718   dcae_c_vm:
719     type: OS::Nova::Server
720     properties:
721       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
722       flavor: 8 GB General Purpose v1
723       name: vm1-dcae-controller
724       key_name: { get_resource: vm_key }
725       networks:
726         - network: { get_param: public_net_id }
727         - port: { get_resource: dcae_c_private_port }
728       user_data_format: RAW
729       user_data:
730         str_replace:
731           params:
732             __nexus_repo__: { get_param: nexus_repo }
733             __nexus_docker_repo__: { get_param: nexus_docker_repo }
734             __nexus_username__: { get_param: nexus_username }
735             __nexus_password__: { get_param: nexus_password }
736             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
737             __gitlab_branch__: { get_param: gitlab_branch }
738             __dcae_zone__: { get_param: dcae_zone }
739             __dcae_state__: { get_param: dcae_state }
740             __artifacts_version__: { get_param: artifacts_version }
741             __tenant_id__: { get_param: openstack_tenant_id }
742             __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
743             __openstack_user__: { get_param: openstack_username }
744             __openstack_password__: { get_param: openstack_api_key }
745             __openstack_auth_method__: { get_param: openstack_auth_method }
746             __key_name__: { get_param: key_name }
747             __rand_str__: { get_resource: random-str }
748             __pub_key__: { get_param: pub_key }
749             __nexus_repo_root__: { get_param: nexus_repo_root }
750             __openstack_region__: { get_param: openstack_region }
751             __docker_version__: { get_param: docker_version }
752             __gerrit_branch__: { get_param: gerrit_branch }
753             __cloud_env__: { get_param: cloud_env }
754             __dcae_code_version__: { get_param: dcae_code_version }
755             __public_net_id__: { get_param: public_net_id }
756             __dcae_base_environment__: { get_param: dcae_base_environment }
757             __dcae_ip_addr__: { get_param: dcae_ip_addr }
758             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
759             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
760             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
761             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
762             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
763           template: |
764             #!/bin/bash
765
766             # Create configuration files
767             mkdir -p /opt/config
768             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
769             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
770             echo "__nexus_username__" > /opt/config/nexus_username.txt
771             echo "__nexus_password__" > /opt/config/nexus_password.txt
772             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
773             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
774             echo "__docker_version__" > /opt/config/docker_version.txt
775             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
776             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
777             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
778             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
779             echo "__dcae_state__" > /opt/config/dcae_state.txt
780             echo "__tenant_id__" > /opt/config/tenant_id.txt
781             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
782             echo "__openstack_user__" > /opt/config/openstack_user.txt
783             echo "__openstack_password__" > /opt/config/openstack_password.txt
784             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
785             echo "__key_name__" > /opt/config/key_name.txt
786             echo "__rand_str__" > /opt/config/rand_str.txt
787             echo "__pub_key__" > /opt/config/pub_key.txt
788             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
789             echo "__openstack_region__" > /opt/config/openstack_region.txt
790             echo "https://mycloud.rackspace.com/cloud" > /opt/config/horizon_url.txt
791             echo "https://identity.api.rackspacecloud.com/v2.0" > /opt/config/keystone_url.txt
792             echo "__cloud_env__" > /opt/config/cloud_env.txt
793             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
794             echo "__public_net_id__" > /opt/config/public_net_id.txt
795             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
796             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
797             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
798             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
799             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
800             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
801             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
802
803             # Download and run install script
804             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
805             cd /opt
806             chmod +x dcae_install.sh
807             ./dcae_install.sh
808
809
810   # Policy engine instantiation
811   policy_private_port:
812     type: OS::Neutron::Port
813     properties:
814       network: { get_resource: oam_ecomp }
815       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.6.1}]
816
817   policy_volume:
818     type: OS::Cinder::Volume
819     properties:
820       name: vol1-policy
821       size: 50
822       volume_type: SSD
823       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
824
825   policy_vm:
826     type: OS::Nova::Server
827     properties:
828       flavor: 15 GB Compute v1
829       name: vm1-policy
830       key_name: { get_resource: vm_key }
831       block_device_mapping:
832         - volume_id: { get_resource: policy_volume }
833           device_name: vda
834       networks:
835         - network: { get_param: public_net_id }
836         - port: { get_resource: policy_private_port }
837       user_data_format: RAW
838       user_data:
839         str_replace:
840           params:
841             __nexus_repo__: { get_param: nexus_repo }
842             __nexus_docker_repo__: { get_param: nexus_docker_repo }
843             __nexus_username__: { get_param: nexus_username }
844             __nexus_password__: { get_param: nexus_password }
845             __artifacts_version__: { get_param: artifacts_version }
846             __docker_version__: { get_param: docker_version }
847             __gerrit_branch__: { get_param: gerrit_branch }
848             __cloud_env__: { get_param: cloud_env }
849           template: |
850             #!/bin/bash
851
852             # Create configuration files
853             mkdir -p /opt/config
854             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
855             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
856             echo "__nexus_username__" > /opt/config/nexus_username.txt
857             echo "__nexus_password__" > /opt/config/nexus_password.txt
858             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
859             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
860             echo "__docker_version__" > /opt/config/docker_version.txt
861             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
862             echo "__cloud_env__" > /opt/config/cloud_env.txt
863
864             # Download and run install script
865             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
866             cd /opt
867             chmod +x policy_install.sh
868             ./policy_install.sh
869
870
871   # APP-C instantiation
872   appc_private_port:
873     type: OS::Neutron::Port
874     properties:
875       network: { get_resource: oam_ecomp }
876       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.2.1}]
877
878   appc_vm:
879     type: OS::Nova::Server
880     properties:
881       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
882       flavor: 4 GB General Purpose v1
883       name: vm1-appc
884       key_name: { get_resource: vm_key }
885       networks:
886         - network: { get_param: public_net_id }
887         - port: { get_resource: appc_private_port }
888       user_data_format: RAW
889       user_data:
890         str_replace:
891           params:
892             __nexus_repo__: { get_param: nexus_repo }
893             __nexus_docker_repo__: { get_param: nexus_docker_repo }
894             __nexus_username__: { get_param: nexus_username }
895             __nexus_password__: { get_param: nexus_password }
896             __dmaap_topic__: { get_param: dmaap_topic }
897             __artifacts_version__: { get_param: artifacts_version }
898             __docker_version__: { get_param: docker_version }
899             __gerrit_branch__: { get_param: gerrit_branch }
900             __cloud_env__: { get_param: cloud_env }
901           template: |
902             #!/bin/bash
903
904             # Create configuration files
905             mkdir -p /opt/config
906             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
907             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
908             echo "__nexus_username__" > /opt/config/nexus_username.txt
909             echo "__nexus_password__" > /opt/config/nexus_password.txt
910             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
911             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
912             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
913             echo "__docker_version__" > /opt/config/docker_version.txt
914             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
915             echo "__cloud_env__" > /opt/config/cloud_env.txt
916
917             # Download and run install script
918             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
919             cd /opt
920             chmod +x appc_install.sh
921             ./appc_install.sh