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