Automatically Set Tenant In Robot VM
[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             __openstack_tenant_id__: { get_param: openstack_tenant_id }
593             __artifacts_version__: { get_param: artifacts_version }
594             __openstack_region__: { get_param: openstack_region }
595             __docker_version__: { get_param: docker_version }
596             __gerrit_branch__: { get_param: gerrit_branch }
597             __cloud_env__: { get_param: cloud_env }
598             __robot_repo__: { get_param: robot_repo }
599           template: |
600             #!/bin/bash
601
602             # Create configuration files
603             mkdir -p /opt/config
604             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
605             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
606             echo "__nexus_username__" > /opt/config/nexus_username.txt
607             echo "__nexus_password__" > /opt/config/nexus_password.txt
608             echo "__network_name__" > /opt/config/network.txt
609             echo "__openstack_username__" > /opt/config/openstack_username.txt
610             echo "__openstack_password__" > /opt/config/openstack_password.txt
611             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
612             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
613             echo "__openstack_region__" > /opt/config/region.txt
614             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
615             echo "__docker_version__" > /opt/config/docker_version.txt
616             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
617             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
618             echo "https://identity.api.rackspacecloud.com/v2.0" > /opt/config/keystone.txt
619             echo "10.0.1.1" > /opt/config/aai1_ip_addr.txt
620             echo "10.0.1.2" > /opt/config/aai2_ip_addr.txt
621             echo "10.0.2.1" > /opt/config/appc_ip_addr.txt
622             echo "10.0.4.1" > /opt/config/dcae_ip_addr.txt
623             echo "10.0.5.1" > /opt/config/mso_ip_addr.txt
624             echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
625             echo "10.0.6.1" > /opt/config/policy_ip_addr.txt
626             echo "10.0.9.1" > /opt/config/portal_ip_addr.txt
627             echo "10.0.3.1" > /opt/config/sdc_ip_addr.txt
628             echo "10.0.7.1" > /opt/config/sdnc_ip_addr.txt
629             echo "10.0.8.1" > /opt/config/vid_ip_addr.txt
630             echo "Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)" > /opt/config/vm_image_name.txt
631             echo "4 GB General Purpose v1" > /opt/config/vm_flavor.txt
632             echo "__cloud_env__" > /opt/config/cloud_env.txt
633             echo "__robot_repo__" > /opt/config/remote_repo.txt
634
635             # Download and run install script
636             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
637             cd /opt
638             chmod +x robot_install.sh
639             ./robot_install.sh
640
641
642   # VID instantiation
643   vid_private_port:
644     type: OS::Neutron::Port
645     properties:
646       network: { get_resource: oam_onap }
647       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.8.1}]
648
649   vid_vm:
650     type: OS::Nova::Server
651     properties:
652       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
653       flavor: 2 GB General Purpose v1
654       name:
655         str_replace:
656           template: base-vid
657           params:
658             base: { get_param: vm_base_name }
659       key_name: { get_resource: vm_key }
660       networks:
661         - network: { get_param: public_net_id }
662         - port: { get_resource: vid_private_port }
663       user_data_format: RAW
664       user_data:
665         str_replace:
666           params:
667             __nexus_repo__: { get_param: nexus_repo }
668             __nexus_docker_repo__: { get_param: nexus_docker_repo }
669             __nexus_username__: { get_param: nexus_username }
670             __nexus_password__: { get_param: nexus_password }
671             __artifacts_version__: { get_param: artifacts_version }
672             __docker_version__: { get_param: docker_version }
673             __gerrit_branch__: { get_param: gerrit_branch }
674             __cloud_env__: { get_param: cloud_env }
675             __vid_repo__: { get_param: vid_repo }
676           template: |
677             #!/bin/bash
678
679             # Create configuration files
680             mkdir -p /opt/config
681             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
682             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
683             echo "__nexus_username__" > /opt/config/nexus_username.txt
684             echo "__nexus_password__" > /opt/config/nexus_password.txt
685             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
686             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
687             echo "__docker_version__" > /opt/config/docker_version.txt
688             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
689             echo "__cloud_env__" > /opt/config/cloud_env.txt
690             echo "__vid_repo__" > /opt/config/remote_repo.txt
691
692             # Download and run install script
693             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
694             cd /opt
695             chmod +x vid_install.sh
696             ./vid_install.sh
697
698
699   # SDN-C instantiation
700   sdnc_private_port:
701     type: OS::Neutron::Port
702     properties:
703       network: { get_resource: oam_onap }
704       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.7.1}]
705
706   sdnc_vm:
707     type: OS::Nova::Server
708     properties:
709       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
710       flavor: 4 GB General Purpose v1
711       name:
712         str_replace:
713           template: base-sdnc
714           params:
715             base: { get_param: vm_base_name }
716       key_name: { get_resource: vm_key }
717       networks:
718         - network: { get_param: public_net_id }
719         - port: { get_resource: sdnc_private_port }
720       user_data_format: RAW
721       user_data:
722         str_replace:
723           params:
724             __nexus_repo__: { get_param: nexus_repo }
725             __nexus_docker_repo__: { get_param: nexus_docker_repo }
726             __nexus_username__: { get_param: nexus_username }
727             __nexus_password__: { get_param: nexus_password }
728             __artifacts_version__: { get_param: artifacts_version }
729             __docker_version__: { get_param: docker_version }
730             __gerrit_branch__: { get_param: gerrit_branch }
731             __cloud_env__: { get_param: cloud_env }
732             __sdnc_repo__: { get_param: sdnc_repo }
733           template: |
734             #!/bin/bash
735
736             # Create configuration files
737             mkdir -p /opt/config
738             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
739             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
740             echo "__nexus_username__" > /opt/config/nexus_username.txt
741             echo "__nexus_password__" > /opt/config/nexus_password.txt
742             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
743             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
744             echo "__docker_version__" > /opt/config/docker_version.txt
745             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
746             echo "__cloud_env__" > /opt/config/cloud_env.txt
747             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
748
749             # Download and run install script
750             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
751             cd /opt
752             chmod +x sdnc_install.sh
753             ./sdnc_install.sh
754
755
756   # SDC instantiation
757   sdc_private_port:
758     type: OS::Neutron::Port
759     properties:
760       network: { get_resource: oam_onap }
761       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.3.1}]
762
763   sdc_volume_local:
764     type: OS::Cinder::Volume
765     properties:
766       name: vol1-sdc-local
767       size: 50
768       volume_type: SSD
769       image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
770
771   sdc_volume_data:
772     type: OS::Cinder::Volume
773     properties:
774       name: vol1-sdc-data
775       size: 100
776       volume_type: SSD
777
778   sdc_volume_attachment:
779     type: OS::Cinder::VolumeAttachment
780     properties:
781       volume_id: { get_resource: sdc_volume_data }
782       instance_uuid: { get_resource: sdc_vm }
783       mountpoint: /dev/xvdb
784
785   sdc_vm:
786     type: OS::Nova::Server
787     properties:
788       flavor: 15 GB Compute v1
789       name:
790         str_replace:
791           template: base-sdc
792           params:
793             base: { get_param: vm_base_name }
794       key_name: { get_resource: vm_key }
795       block_device_mapping:
796         - volume_id: { get_resource: sdc_volume_local }
797           device_name: vda
798       networks:
799         - network: { get_param: public_net_id }
800         - port: { get_resource: sdc_private_port }
801       user_data_format: RAW
802       user_data:
803         str_replace:
804           params:
805             __nexus_repo__: { get_param: nexus_repo }
806             __nexus_docker_repo__: { get_param: nexus_docker_repo }
807             __nexus_username__: { get_param: nexus_username }
808             __nexus_password__: { get_param: nexus_password }
809             __env_name__: { get_param: dmaap_topic }
810             __artifacts_version__: { get_param: artifacts_version }
811             __docker_version__: { get_param: docker_version }
812             __gerrit_branch__: { get_param: gerrit_branch }
813             __cloud_env__: { get_param: cloud_env }
814             __sdc_repo__: { get_param: sdc_repo }
815           template: |
816             #!/bin/bash
817
818             # Create configuration files
819             mkdir -p /opt/config
820             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
821             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
822             echo "__nexus_username__" > /opt/config/nexus_username.txt
823             echo "__nexus_password__" > /opt/config/nexus_password.txt
824             echo "__env_name__" > /opt/config/env_name.txt
825             echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
826             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
827             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
828             echo "__docker_version__" > /opt/config/docker_version.txt
829             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
830             echo "__cloud_env__" > /opt/config/cloud_env.txt
831             echo "__sdc_repo__" > /opt/config/remote_repo.txt
832
833             # Download and run install script
834             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
835             cd /opt
836             chmod +x sdc_install.sh
837             ./sdc_install.sh
838
839
840   # PORTAL instantiation
841   portal_private_port:
842     type: OS::Neutron::Port
843     properties:
844       network: { get_resource: oam_onap }
845       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.9.1}]
846
847   portal_volume:
848     type: OS::Cinder::Volume
849     properties:
850       name: vol1-portal
851       size: 50
852       volume_type: SSD
853       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
854
855   portal_vm:
856     type: OS::Nova::Server
857     properties:
858       flavor: 15 GB Memory v1
859       name:
860         str_replace:
861           template: base-portal
862           params:
863             base: { get_param: vm_base_name }
864       key_name: { get_resource: vm_key }
865       block_device_mapping:
866         - volume_id: { get_resource: portal_volume }
867           device_name: vda
868       networks:
869         - network: { get_param: public_net_id }
870         - port: { get_resource: portal_private_port }
871       user_data_format: RAW
872       user_data:
873         str_replace:
874           params:
875             __nexus_repo__: { get_param: nexus_repo }
876             __nexus_docker_repo__: { get_param: nexus_docker_repo }
877             __nexus_username__: { get_param: nexus_username }
878             __nexus_password__: { get_param: nexus_password }
879             __artifacts_version__: { get_param: artifacts_version }
880             __docker_version__: { get_param: docker_version }
881             __gerrit_branch__: { get_param: gerrit_branch }
882             __cloud_env__: { get_param: cloud_env }
883             __portal_repo__: { get_param: portal_repo }
884           template: |
885             #!/bin/bash
886
887             # Create configuration files
888             mkdir -p /opt/config
889             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
890             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
891             echo "__nexus_username__" > /opt/config/nexus_username.txt
892             echo "__nexus_password__" > /opt/config/nexus_password.txt
893             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
894             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
895             echo "__docker_version__" > /opt/config/docker_version.txt
896             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
897             echo "__cloud_env__" > /opt/config/cloud_env.txt
898             echo "__portal_repo__" > /opt/config/remote_repo.txt
899
900             # Download and run install script
901             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
902             cd /opt
903             chmod +x portal_install.sh
904             ./portal_install.sh
905
906
907   # DCAE Controller instantiation
908   dcae_c_private_port:
909     type: OS::Neutron::Port
910     properties:
911       network: { get_resource: oam_onap }
912       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.4.1}]
913   dcae_c_vm:
914     type: OS::Nova::Server
915     properties:
916       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
917       flavor: 8 GB General Purpose v1
918       name:
919         str_replace:
920           template: base-dcae-controller
921           params:
922             base: { get_param: vm_base_name }
923       key_name: { get_resource: vm_key }
924       networks:
925         - network: { get_param: public_net_id }
926         - port: { get_resource: dcae_c_private_port }
927       user_data_format: RAW
928       user_data:
929         str_replace:
930           params:
931             __nexus_repo__: { get_param: nexus_repo }
932             __nexus_docker_repo__: { get_param: nexus_docker_repo }
933             __nexus_username__: { get_param: nexus_username }
934             __nexus_password__: { get_param: nexus_password }
935             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
936             __gitlab_branch__: { get_param: gitlab_branch }
937             __dcae_zone__: { get_param: dcae_zone }
938             __dcae_state__: { get_param: dcae_state }
939             __artifacts_version__: { get_param: artifacts_version }
940             __tenant_id__: { get_param: openstack_tenant_id }
941             __openstack_private_network_name__: { get_attr: [oam_onap, name] }
942             __openstack_user__: { get_param: openstack_username }
943             __openstack_password__: { get_param: openstack_api_key }
944             __openstack_auth_method__: { get_param: openstack_auth_method }
945             __key_name__: { get_param: key_name }
946             __rand_str__: { get_resource: random-str }
947             __pub_key__: { get_param: pub_key }
948             __nexus_repo_root__: { get_param: nexus_repo_root }
949             __openstack_region__: { get_param: openstack_region }
950             __docker_version__: { get_param: docker_version }
951             __gerrit_branch__: { get_param: gerrit_branch }
952             __cloud_env__: { get_param: cloud_env }
953             __dcae_code_version__: { get_param: dcae_code_version }
954             __public_net_id__: { get_param: public_net_id }
955             __dcae_base_environment__: { get_param: dcae_base_environment }
956             __dcae_ip_addr__: { get_param: dcae_ip_addr }
957             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
958             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
959             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
960             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
961             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
962             __dcae_repo__: { get_param: dcae_repo }
963             __mr_repo__: { get_param: mr_repo }
964           template: |
965             #!/bin/bash
966
967             # Create configuration files
968             mkdir -p /opt/config
969             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
970             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
971             echo "__nexus_username__" > /opt/config/nexus_username.txt
972             echo "__nexus_password__" > /opt/config/nexus_password.txt
973             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
974             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
975             echo "__docker_version__" > /opt/config/docker_version.txt
976             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
977             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
978             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
979             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
980             echo "__dcae_state__" > /opt/config/dcae_state.txt
981             echo "__tenant_id__" > /opt/config/tenant_id.txt
982             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
983             echo "__openstack_user__" > /opt/config/openstack_user.txt
984             echo "__openstack_password__" > /opt/config/openstack_password.txt
985             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
986             echo "__key_name__" > /opt/config/key_name.txt
987             echo "__rand_str__" > /opt/config/rand_str.txt
988             echo "__pub_key__" > /opt/config/pub_key.txt
989             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
990             echo "__openstack_region__" > /opt/config/openstack_region.txt
991             echo "https://mycloud.rackspace.com/cloud" > /opt/config/horizon_url.txt
992             echo "https://identity.api.rackspacecloud.com/v2.0" > /opt/config/keystone_url.txt
993             echo "__cloud_env__" > /opt/config/cloud_env.txt
994             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
995             echo "__public_net_id__" > /opt/config/public_net_id.txt
996             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
997             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
998             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
999             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1000             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1001             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1002             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1003             echo "__dcae_repo__" > /opt/config/remote_repo.txt
1004             echo "__mr_repo__" > /opt/config/mr_repo.txt
1005
1006             # Download and run install script
1007             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1008             cd /opt
1009             chmod +x dcae_install.sh
1010             ./dcae_install.sh
1011
1012
1013   # Policy engine instantiation
1014   policy_private_port:
1015     type: OS::Neutron::Port
1016     properties:
1017       network: { get_resource: oam_onap }
1018       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.6.1}]
1019
1020   policy_volume:
1021     type: OS::Cinder::Volume
1022     properties:
1023       name: vol1-policy
1024       size: 50
1025       volume_type: SSD
1026       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1027
1028   policy_vm:
1029     type: OS::Nova::Server
1030     properties:
1031       flavor: 15 GB Compute v1
1032       name:
1033         str_replace:
1034           template: base-policy
1035           params:
1036             base: { get_param: vm_base_name }
1037       key_name: { get_resource: vm_key }
1038       block_device_mapping:
1039         - volume_id: { get_resource: policy_volume }
1040           device_name: vda
1041       networks:
1042         - network: { get_param: public_net_id }
1043         - port: { get_resource: policy_private_port }
1044       user_data_format: RAW
1045       user_data:
1046         str_replace:
1047           params:
1048             __nexus_repo__: { get_param: nexus_repo }
1049             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1050             __nexus_username__: { get_param: nexus_username }
1051             __nexus_password__: { get_param: nexus_password }
1052             __artifacts_version__: { get_param: artifacts_version }
1053             __docker_version__: { get_param: docker_version }
1054             __gerrit_branch__: { get_param: gerrit_branch }
1055             __cloud_env__: { get_param: cloud_env }
1056             __policy_repo__: { get_param: policy_repo }
1057           template: |
1058             #!/bin/bash
1059
1060             # Create configuration files
1061             mkdir -p /opt/config
1062             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1063             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1064             echo "__nexus_username__" > /opt/config/nexus_username.txt
1065             echo "__nexus_password__" > /opt/config/nexus_password.txt
1066             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1067             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
1068             echo "__docker_version__" > /opt/config/docker_version.txt
1069             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1070             echo "__cloud_env__" > /opt/config/cloud_env.txt
1071             echo "__policy_repo__" > /opt/config/remote_repo.txt
1072
1073             # Download and run install script
1074             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1075             cd /opt
1076             chmod +x policy_install.sh
1077             ./policy_install.sh
1078
1079
1080   # APP-C instantiation
1081   appc_private_port:
1082     type: OS::Neutron::Port
1083     properties:
1084       network: { get_resource: oam_onap }
1085       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.2.1}]
1086
1087   appc_vm:
1088     type: OS::Nova::Server
1089     properties:
1090       image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1091       flavor: 4 GB General Purpose v1
1092       name:
1093         str_replace:
1094           template: base-appc
1095           params:
1096             base: { get_param: vm_base_name }
1097       key_name: { get_resource: vm_key }
1098       networks:
1099         - network: { get_param: public_net_id }
1100         - port: { get_resource: appc_private_port }
1101       user_data_format: RAW
1102       user_data:
1103         str_replace:
1104           params:
1105             __nexus_repo__: { get_param: nexus_repo }
1106             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1107             __nexus_username__: { get_param: nexus_username }
1108             __nexus_password__: { get_param: nexus_password }
1109             __dmaap_topic__: { get_param: dmaap_topic }
1110             __artifacts_version__: { get_param: artifacts_version }
1111             __docker_version__: { get_param: docker_version }
1112             __gerrit_branch__: { get_param: gerrit_branch }
1113             __cloud_env__: { get_param: cloud_env }
1114             __appc_repo__: { get_param: appc_repo }
1115           template: |
1116             #!/bin/bash
1117
1118             # Create configuration files
1119             mkdir -p /opt/config
1120             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1121             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1122             echo "__nexus_username__" > /opt/config/nexus_username.txt
1123             echo "__nexus_password__" > /opt/config/nexus_password.txt
1124             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1125             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
1126             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1127             echo "__docker_version__" > /opt/config/docker_version.txt
1128             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1129             echo "__cloud_env__" > /opt/config/cloud_env.txt
1130             echo "__appc_repo__" > /opt/config/remote_repo.txt
1131
1132             # Download and run install script
1133             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1134             cd /opt
1135             chmod +x appc_install.sh
1136             ./appc_install.sh
1137
1138
1139   # CLAMP instantiation
1140   clamp_private_port:
1141     type: OS::Neutron::Port
1142     properties:
1143       network: { get_resource: oam_onap }
1144       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": 10.0.12.1}]
1145
1146   clamp_vm:
1147     type: OS::Nova::Server
1148     properties:
1149       image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
1150       flavor: 4 GB General Purpose v1
1151       name:
1152         str_replace:
1153           template: base-clamp
1154           params:
1155             base: { get_param: vm_base_name }
1156       key_name: { get_resource: vm_key }
1157       networks:
1158         - network: { get_param: public_net_id }
1159         - port: { get_resource: clamp_private_port }
1160       user_data_format: RAW
1161       user_data:
1162         str_replace:
1163           params:
1164             __nexus_repo__: { get_param: nexus_repo }
1165             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1166             __nexus_username__: { get_param: nexus_username }
1167             __nexus_password__: { get_param: nexus_password }
1168             __openstack_username__: { get_param: openstack_username }
1169             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1170             __openstack_api_key__: { get_param: openstack_api_key }
1171             __dmaap_topic__: { get_param: dmaap_topic }
1172             __artifacts_version__: { get_param: artifacts_version }
1173             __docker_version__: { get_param: docker_version }
1174             __gerrit_branch__: { get_param: gerrit_branch }
1175             __cloud_env__: { get_param: cloud_env }
1176             __mso_repo__: { get_param: clamp_repo }
1177           template: |
1178             #!/bin/bash
1179
1180             # Create configuration files
1181             mkdir -p /opt/config
1182             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1183             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1184             echo "__nexus_username__" > /opt/config/nexus_username.txt
1185             echo "__nexus_password__" > /opt/config/nexus_password.txt
1186             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1187             echo "10.0.0.1" > /opt/config/dns_ip_addr.txt
1188             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1189             echo "__openstack_username__" > /opt/config/openstack_username.txt
1190             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1191             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1192             echo "__docker_version__" > /opt/config/docker_version.txt
1193             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1194             echo "__cloud_env__" > /opt/config/cloud_env.txt
1195             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1196
1197             # Download and run install script
1198             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1199             cd /opt
1200             chmod +x clamp_install.sh
1201             ./clamp_install.sh