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