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