Merge "Add CLI deployment as part of portal"
[demo.git] / heat / ONAP / onap_openstack.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: 2015-10-15
26
27 description: Heat template to install ONAP components
28
29 ##############
30 #            #
31 # PARAMETERS #
32 #            #
33 ##############
34
35 parameters:
36
37   ##############################################
38   #                                            #
39   # Parameters used across all ONAP components #
40   #                                            #
41   ##############################################
42   
43   public_net_id:
44     type: string
45     description: Public network for floating IP address allocation
46
47   ubuntu_1404_image:
48     type: string
49     description: Name of the Ubuntu 14.04 image
50
51   ubuntu_1604_image:
52     type: string
53     description: Name of the Ubuntu 16.04 image
54
55   flavor_small:
56     type: string
57     description: Name of the Small Flavor supported by the cloud provider
58
59   flavor_medium:
60     type: string
61     description: Name of the Medium Flavor supported by the cloud provider
62
63   flavor_large:
64     type: string
65     description: Name of the Large Flavor supported by the cloud provider
66
67   flavor_xlarge:
68     type: string
69     description: Name of the Extra Large Flavor supported by the cloud provider
70
71   vm_base_name:
72     type: string
73     description: Base name of ONAP VMs
74
75   key_name:
76     type: string
77     description: Public/Private key pair name
78
79   pub_key:
80     type: string
81     description: Public key to be installed on the compute instance
82
83   nexus_repo:
84     type: string
85     description: Complete URL for the Nexus repository.
86
87   nexus_docker_repo:
88     type: string
89     description: Complete URL for the Nexus repository for docker images.
90
91   nexus_username:
92     type: string
93     description: Nexus Repository username
94
95   nexus_password:
96     type: string
97     description: Nexus Repository Password
98
99   artifacts_version:
100     type: string
101     description: Artifacts version of ONAP components
102
103   docker_version:
104     type: string
105     label: Version number of ONAP docker images
106
107   gerrit_branch:
108     type: string
109     label: Gerrit code branch
110     description: Gerrit branch where to download the code from
111
112   dmaap_topic:
113     type: string
114     description: DMaaP Topic name
115
116   openstack_tenant_id:
117     type: string
118     description: Openstack tenant ID
119
120   openstack_username:
121     type: string
122     description: Openstack username
123
124   openstack_auth_method:
125     type: string
126     description: Openstack authentication method (password VS. api-key)
127
128   openstack_api_key:
129     type: string
130     description: Openstack API Key
131
132   horizon_url:
133     type: string
134     description: URL of Openstack Horizon
135
136   keystone_url:
137     type: string
138     description: URL of Openstack Keystone
139
140   cloud_env:
141     type: string
142     description: Cloud Provider Name
143
144   ######################
145   #                    #
146   # Network parameters #
147   #                    #
148   ######################
149
150   dns_list:
151     type: comma_delimited_list
152     description: List of External DNS for OAM ONAP network
153
154   external_dns:
155     type: string
156     description: First element of the dns_list for ONAP network
157
158   ### Private IP addresses ###
159   oam_network_cidr:
160     type: string
161     description: CIDR of the OAM ONAP network
162
163   aai1_ip_addr:
164     type: string
165     description: AAI Instance 1 IP Address
166
167   aai2_ip_addr:
168     type: string
169     description: AAI Instance 2 IP Address
170
171   appc_ip_addr:
172     type: string
173     description: APP-C IP Address
174
175   dcae_ip_addr:
176     type: string
177     description: DCAE IP Address
178  
179   dcae_coll_ip_addr:
180     type: string
181     description: DCAE Collector IP Address
182
183   dcae_db_ip_addr:
184     type: string
185     description: DCAE Database IP Address
186
187   dcae_hdp1_ip_addr:
188     type: string
189     description: Hadoop VM1 IP Address
190
191   dcae_hdp2_ip_addr:
192     type: string
193     description: Hadoop VM2 IP Address
194
195   dcae_hdp3_ip_addr:
196     type: string
197     description: Hadoop VM3 IP Address
198
199   dns_ip_addr:
200     type: string
201     description: DNS IP Address
202
203   mso_ip_addr:
204     type: string
205     description: MSO IP Address
206
207   mr_ip_addr:
208     type: string
209     description: Message Router IP Address
210
211   policy_ip_addr:
212     type: string
213     description: Policy Engine IP Address
214
215   portal_ip_addr:
216     type: string
217     description: Portal IP Address
218
219   robot_ip_addr:
220     type: string
221     description: Robot Framework IP Address
222
223   sdc_ip_addr:
224     type: string
225     description: SDC IP Address
226
227   sdnc_ip_addr:
228     type: string
229     description: SDN-C IP Address
230
231   vid_ip_addr:
232     type: string
233     description: VID IP Address
234
235   clamp_ip_addr:
236     type: string
237     description: CLAMP IP Address
238
239   dcae_coll_float_ip:
240     type: string
241     description: DCAE Collector Floating IP Address
242
243   dcae_db_float_ip:
244     type: string
245     description: DCAE Collector Database Floating IP Address
246
247   dcae_hdp1_float_ip:
248     type: string
249     description: Hadoop VM1 Floating IP Address
250
251   dcae_hdp2_float_ip:
252     type: string
253     description: Hadoop VM2 Floating IP Address
254
255   dcae_hdp3_float_ip:
256     type: string
257     description: Hadoop VM3 Floating IP Address
258
259   ###########################
260   #                         #
261   # Parameters used by DCAE #
262   #                         #
263   ###########################
264
265   dcae_base_environment:
266     type: string
267     description: DCAE Base Environment configuration (RACKSPACE/2-NIC/1-NIC-FLOATING-IPS)
268
269   dcae_zone:
270     type: string
271     description: DCAE Zone to use in VM names created by DCAE controller
272
273   dcae_state:
274     type: string
275     description: DCAE State to use in VM names created by DCAE controller
276
277   nexus_repo_root:
278     type: string
279     description: Root URL of Nexus repository
280
281   nexus_url_snapshot:
282     type: string
283     description: Snapshot of Maven repository for DCAE deployment
284
285   openstack_region:
286     type: string
287     description: Region where the DCAE controller will spin the VMs
288
289   gitlab_branch:
290     type: string
291     description: Branch of the Gitlab repository
292     
293   dcae_code_version:
294     type: string
295     description: DCAE Code Version Number
296
297   #####################
298   #                   #
299   # ONAP repositories #
300   #                   #
301   #####################
302
303   aai_repo:
304     type: string
305     description: AAI repository
306
307   appc_repo:
308     type: string
309     description: APPC repository
310
311   dcae_repo:
312     type: string
313     description: DCAE repository
314
315   mr_repo:
316     type: string
317     description: Message Router repository
318
319   mso_repo:
320     type: string
321     description: MSO repository
322
323   policy_repo:
324     type: string
325     description: Policy repository
326
327   portal_repo:
328     type: string
329     description: Portal repository
330
331   robot_repo:
332     type: string
333     description: Robot repository
334
335   sdc_repo:
336     type: string
337     description: SDC repository
338
339   sdnc_repo:
340     type: string
341     description: SDNC repository
342
343   vid_repo:
344     type: string
345     description: VID repository
346
347   clamp_repo:
348     type: string
349     description: CLAMP repository
350
351
352 #############
353 #           #
354 # RESOURCES #
355 #           #
356 #############
357
358 resources:
359   random-str:
360     type: OS::Heat::RandomString
361     properties:
362       length: 4
363
364
365   # Public key used to access ONAP components
366   vm_key:
367     type: OS::Nova::KeyPair
368     properties:
369       name:
370         str_replace:
371           template: base_rand
372           params:
373             base: { get_param: key_name }
374             rand: { get_resource: random-str }
375       public_key: { get_param: pub_key }
376       save_private_key: false
377
378
379   # ONAP management private network
380   oam_onap:
381     type: OS::Neutron::Net
382     properties:
383       name:
384         str_replace:
385           template: oam_onap_rand
386           params:
387             rand: { get_resource: random-str }
388
389   oam_onap_subnet:
390     type: OS::Neutron::Subnet
391     properties:
392       name:
393         str_replace:
394           template: oam_onap_rand
395           params:
396             rand: { get_resource: random-str }
397       network_id: { get_resource: oam_onap }
398       cidr: { get_param: oam_network_cidr }
399       dns_nameservers: { get_param: dns_list }
400
401   router:
402     type: OS::Neutron::Router
403     properties:
404       external_gateway_info:
405         network: { get_param: public_net_id }
406
407   router_interface:
408     type: OS::Neutron::RouterInterface
409     properties:
410       router_id: { get_resource: router }
411       subnet_id: { get_resource: oam_onap_subnet }
412
413
414   # DNS Server instantiation
415   dns_private_port:
416     type: OS::Neutron::Port
417     properties:
418       network: { get_resource: oam_onap }
419       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
420
421   dns_floating_ip:
422     type: OS::Neutron::FloatingIP
423     properties:
424       floating_network_id: { get_param: public_net_id }
425       port_id: { get_resource: dns_private_port }
426
427   dns_vm:
428     type: OS::Nova::Server
429     properties:
430       image: { get_param: ubuntu_1404_image }
431       flavor: { get_param: flavor_small }
432       name:
433         str_replace:
434           template: base-dns-server
435           params:
436             base: { get_param: vm_base_name }
437       key_name: { get_resource: vm_key }
438       networks:
439         - port: { get_resource: dns_private_port }
440       user_data_format: RAW
441       user_data:
442         str_replace:
443           params:
444             __nexus_repo__: { get_param: nexus_repo }
445             __artifacts_version__: { get_param: artifacts_version }
446             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
447             __dns_ip_addr__: { get_param: dns_ip_addr }
448             __aai1_ip_addr__: { get_param: aai1_ip_addr }
449             __aai2_ip_addr__: { get_param: aai2_ip_addr }
450             __appc_ip_addr__: { get_param: appc_ip_addr }
451             __dcae_ip_addr__: { get_param: dcae_ip_addr }
452             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
453             __mso_ip_addr__: { get_param: mso_ip_addr }
454             __mr_ip_addr__: { get_param: mr_ip_addr }
455             __policy_ip_addr__: { get_param: policy_ip_addr }
456             __portal_ip_addr__: { get_param: portal_ip_addr }
457             __robot_ip_addr__: { get_param: robot_ip_addr }
458             __sdc_ip_addr__: { get_param: sdc_ip_addr }
459             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
460             __vid_ip_addr__: { get_param: vid_ip_addr }
461             __clamp_ip_addr__: { get_param: clamp_ip_addr }
462             __cloud_env__: { get_param: cloud_env }
463             __external_dns__: { get_param: external_dns }
464           template: |
465             #!/bin/bash
466
467             # Create configuration files
468             mkdir -p /opt/config
469             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
470             echo "__cloud_env__" > /opt/config/cloud_env.txt
471             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
472             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
473             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
474             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
475             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
476             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
477             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
478             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
479             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
480             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
481             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
482             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
483             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
484             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
485             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
486             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
487             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
488             echo "__external_dns__" > /opt/config/external_dns.txt
489
490             # Download and run install script
491             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
492             cd /opt
493             chmod +x dns_install.sh
494             ./dns_install.sh
495
496
497   # A&AI instantiation (2 VMs)
498   aai1_private_port:
499     type: OS::Neutron::Port
500     properties:
501       network: { get_resource: oam_onap }
502       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
503
504   aai1_floating_ip:
505     type: OS::Neutron::FloatingIP
506     properties:
507       floating_network_id: { get_param: public_net_id }
508       port_id: { get_resource: aai1_private_port }
509
510   aai1_vm:
511     type: OS::Nova::Server
512     depends_on: aai2_vm
513     properties:
514       image: { get_param: ubuntu_1404_image }
515       flavor: { get_param: flavor_xlarge }
516       name:
517         str_replace:
518           template: base-aai-inst1
519           params:
520             base: { get_param: vm_base_name }      
521       key_name: { get_resource: vm_key }
522       networks:
523         - port: { get_resource: aai1_private_port }
524       user_data_format: RAW
525       user_data:
526         str_replace:
527           params:
528             __nexus_repo__: { get_param: nexus_repo }
529             __nexus_docker_repo__: { get_param: nexus_docker_repo }
530             __nexus_username__: { get_param: nexus_username }
531             __nexus_password__: { get_param: nexus_password }
532             __dmaap_topic__: { get_param: dmaap_topic }
533             __artifacts_version__: { get_param: artifacts_version }
534             __dns_ip_addr__: { get_param: dns_ip_addr }
535             __docker_version__: { get_param: docker_version }
536             __gerrit_branch__: { get_param: gerrit_branch }
537             __cloud_env__: { get_param: cloud_env }
538             __external_dns__: { get_param: external_dns }
539             __aai_repo__: { get_param: aai_repo }
540           template: |
541             #!/bin/bash
542
543             # Create configuration files
544             mkdir -p /opt/config
545             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
546             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
547             echo "__nexus_username__" > /opt/config/nexus_username.txt
548             echo "__nexus_password__" > /opt/config/nexus_password.txt
549             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
550             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
551             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
552             echo "__docker_version__" > /opt/config/docker_version.txt
553             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
554             echo "aai_instance_1" > /opt/config/aai_instance.txt
555             echo "__cloud_env__" > /opt/config/cloud_env.txt
556             echo "__external_dns__" > /opt/config/external_dns.txt
557             echo "__aai_repo__" > /opt/config/remote_repo.txt
558
559             # Download and run install script
560             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
561             cd /opt
562             chmod +x aai_install.sh
563             ./aai_install.sh
564
565
566   aai2_private_port:
567     type: OS::Neutron::Port
568     properties:
569       network: { get_resource: oam_onap }
570       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
571
572   aai2_floating_ip:
573     type: OS::Neutron::FloatingIP
574     properties:
575       floating_network_id: { get_param: public_net_id }
576       port_id: { get_resource: aai2_private_port }
577
578   aai2_vm:
579     type: OS::Nova::Server
580     properties:
581       image: { get_param: ubuntu_1404_image }
582       flavor: { get_param: flavor_xlarge }
583       name:
584         str_replace:
585           template: base-aai-inst2
586           params:
587             base: { get_param: vm_base_name }      
588       key_name: { get_resource: vm_key }
589       networks:
590         - port: { get_resource: aai2_private_port }
591       user_data_format: RAW
592       user_data:
593         str_replace:
594           params:
595             __nexus_repo__: { get_param: nexus_repo }
596             __nexus_docker_repo__: { get_param: nexus_docker_repo }
597             __nexus_username__: { get_param: nexus_username }
598             __nexus_password__: { get_param: nexus_password }
599             __dmaap_topic__: { get_param: dmaap_topic }
600             __artifacts_version__: { get_param: artifacts_version }
601             __dns_ip_addr__: { get_param: dns_ip_addr }
602             __docker_version__: { get_param: docker_version }
603             __gerrit_branch__: { get_param: gerrit_branch }
604             __cloud_env__: { get_param: cloud_env }
605             __external_dns__: { get_param: external_dns }
606             __aai_repo__: { get_param: aai_repo }
607           template: |
608             #!/bin/bash
609
610             # Create configuration files
611             mkdir -p /opt/config
612             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
613             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
614             echo "__nexus_username__" > /opt/config/nexus_username.txt
615             echo "__nexus_password__" > /opt/config/nexus_password.txt
616             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
617             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
618             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
619             echo "__docker_version__" > /opt/config/docker_version.txt
620             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
621             echo "aai_instance_2" > /opt/config/aai_instance.txt
622             echo "__cloud_env__" > /opt/config/cloud_env.txt
623             echo "__external_dns__" > /opt/config/external_dns.txt
624             echo "__aai_repo__" > /opt/config/remote_repo.txt
625
626             # Download and run install script
627             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
628             cd /opt
629             chmod +x aai_install.sh
630             ./aai_install.sh
631
632
633   # MSO instantiation
634   mso_private_port:
635     type: OS::Neutron::Port
636     properties:
637       network: { get_resource: oam_onap }
638       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mso_ip_addr }}]
639
640   mso_floating_ip:
641     type: OS::Neutron::FloatingIP
642     properties:
643       floating_network_id: { get_param: public_net_id }
644       port_id: { get_resource: mso_private_port }
645
646   mso_vm:
647     type: OS::Nova::Server
648     properties:
649       image: { get_param: ubuntu_1604_image }
650       flavor: { get_param: flavor_large }
651       name:
652         str_replace:
653           template: base-mso
654           params:
655             base: { get_param: vm_base_name }      
656       key_name: { get_resource: vm_key }
657       networks:
658         - port: { get_resource: mso_private_port }
659       user_data_format: RAW
660       user_data:
661         str_replace:
662           params:
663             __nexus_repo__: { get_param: nexus_repo }
664             __nexus_docker_repo__: { get_param: nexus_docker_repo }
665             __nexus_username__: { get_param: nexus_username }
666             __nexus_password__: { get_param: nexus_password }
667             __openstack_username__: { get_param: openstack_username }
668             __openstack_tenant_id__: { get_param: openstack_tenant_id }
669             __openstack_api_key__: { get_param: openstack_api_key }
670             __openstack_region__: { get_param: openstack_region }
671             __keystone_url__: { get_param: keystone_url }
672             __dmaap_topic__: { get_param: dmaap_topic }
673             __artifacts_version__: { get_param: artifacts_version }
674             __dns_ip_addr__: { get_param: dns_ip_addr }
675             __docker_version__: { get_param: docker_version }
676             __gerrit_branch__: { get_param: gerrit_branch }
677             __cloud_env__: { get_param: cloud_env }
678             __external_dns__: { get_param: external_dns }
679             __mso_repo__: { get_param: mso_repo }
680           template: |
681             #!/bin/bash
682
683             # Create configuration files
684             mkdir -p /opt/config
685             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
686             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
687             echo "__nexus_username__" > /opt/config/nexus_username.txt
688             echo "__nexus_password__" > /opt/config/nexus_password.txt
689             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
690             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
691             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
692             echo "__openstack_username__" > /opt/config/openstack_username.txt
693             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
694             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
695             echo "__openstack_region__" > /opt/config/openstack_region.txt
696             echo "__keystone_url__" > /opt/config/keystone.txt
697             echo "__docker_version__" > /opt/config/docker_version.txt
698             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
699             echo "__cloud_env__" > /opt/config/cloud_env.txt
700             echo "__external_dns__" > /opt/config/external_dns.txt
701             echo "__mso_repo__" > /opt/config/remote_repo.txt
702
703             # Download and run install script
704             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh
705             cd /opt
706             chmod +x mso_install.sh
707             ./mso_install.sh
708
709
710   # Message Router instantiation
711   mrouter_private_port:
712     type: OS::Neutron::Port
713     properties:
714       network: { get_resource: oam_onap }
715       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
716
717   mrouter_floating_ip:
718     type: OS::Neutron::FloatingIP
719     properties:
720       floating_network_id: { get_param: public_net_id }
721       port_id: { get_resource: mrouter_private_port }
722
723   mrouter_vm:
724     type: OS::Nova::Server
725     properties:
726       image: { get_param: ubuntu_1404_image }
727       flavor: { get_param: flavor_large }
728       name:
729         str_replace: 
730           template: base-message-router
731           params:
732             base: { get_param: vm_base_name }
733       key_name: { get_resource: vm_key }
734       networks:
735         - port: { get_resource: mrouter_private_port }
736       user_data_format: RAW
737       user_data:
738         str_replace:
739           params:
740             __nexus_repo__: { get_param: nexus_repo }
741             __nexus_docker_repo__: { get_param: nexus_docker_repo }
742             __nexus_username__: { get_param: nexus_username }
743             __nexus_password__: { get_param: nexus_password }
744             __artifacts_version__: { get_param: artifacts_version }
745             __dns_ip_addr__: { get_param: dns_ip_addr }
746             __gerrit_branch__: { get_param: gerrit_branch }
747             __cloud_env__: { get_param: cloud_env }
748             __external_dns__: { get_param: external_dns }
749             __mr_repo__: { get_param: mr_repo }
750           template: |
751             #!/bin/bash
752
753             # Create configuration files
754             mkdir -p /opt/config
755             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
756             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
757             echo "__nexus_username__" > /opt/config/nexus_username.txt
758             echo "__nexus_password__" > /opt/config/nexus_password.txt
759             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
760             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
761             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
762             echo "__cloud_env__" > /opt/config/cloud_env.txt
763             echo "__external_dns__" > /opt/config/external_dns.txt
764             echo "__mr_repo__" > /opt/config/remote_repo.txt
765
766             # Download and run install script
767             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
768             cd /opt
769             chmod +x mr_install.sh
770             ./mr_install.sh
771
772
773   # Robot Framework instantiation
774   robot_private_port:
775     type: OS::Neutron::Port
776     properties:
777       network: { get_resource: oam_onap }
778       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
779
780   robot_floating_ip:
781     type: OS::Neutron::FloatingIP
782     properties:
783       floating_network_id: { get_param: public_net_id }
784       port_id: { get_resource: robot_private_port }
785  
786   robot_vm:
787     type: OS::Nova::Server
788     properties:
789       image: { get_param: ubuntu_1604_image }
790       flavor: { get_param: flavor_small }
791       name:
792         str_replace: 
793           template: base-robot
794           params:
795             base: { get_param: vm_base_name }
796       key_name: { get_resource: vm_key }
797       networks:
798         - port: { get_resource: robot_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             __network_name__: { get_attr: [oam_onap, name] }
808             __openstack_username__: { get_param: openstack_username }
809             __openstack_api_key__: { get_param : openstack_api_key }
810             __artifacts_version__: { get_param: artifacts_version }
811             __openstack_region__: { get_param: openstack_region }
812             __dns_ip_addr__: { get_param: dns_ip_addr }
813             __docker_version__: { get_param: docker_version }
814             __gerrit_branch__: { get_param: gerrit_branch }
815             __cloud_env__: { get_param: cloud_env }
816             __keystone_url__: { get_param: keystone_url }
817             __aai1_ip_addr__: { get_param: aai1_ip_addr }
818             __aai2_ip_addr__: { get_param: aai2_ip_addr }
819             __appc_ip_addr__: { get_param: appc_ip_addr }
820             __dcae_ip_addr__: { get_param: dcae_ip_addr }
821             __mso_ip_addr__: { get_param: mso_ip_addr }
822             __mr_ip_addr__: { get_param: mr_ip_addr }
823             __policy_ip_addr__: { get_param: policy_ip_addr }
824             __portal_ip_addr__: { get_param: portal_ip_addr }
825             __sdc_ip_addr__: { get_param: sdc_ip_addr }
826             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
827             __vid_ip_addr__: { get_param: vid_ip_addr }
828             __external_dns__: { get_param: external_dns }
829             __vm_image_name__: { get_param: ubuntu_1404_image }
830             __vm_flavor__: { get_param: flavor_medium }
831             __robot_repo__: { get_param: robot_repo }
832           template: |
833             #!/bin/bash
834
835             # Create configuration files
836             mkdir -p /opt/config
837             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
838             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
839             echo "__nexus_username__" > /opt/config/nexus_username.txt
840             echo "__nexus_password__" > /opt/config/nexus_password.txt
841             echo "__network_name__" > /opt/config/network.txt
842             echo "__openstack_username__" > /opt/config/openstack_username.txt
843             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
844             echo "__openstack_region__" > /opt/config/region.txt
845             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
846             echo "__docker_version__" > /opt/config/docker_version.txt
847             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
848             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
849             echo "__keystone_url__" > /opt/config/keystone.txt
850             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
851             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
852             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
853             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
854             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
855             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
856             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
857             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
858             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
859             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
860             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
861             echo "__cloud_env__" > /opt/config/cloud_env.txt
862             echo "__external_dns__" > /opt/config/external_dns.txt
863             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
864             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
865             echo "__robot_repo__" > /opt/config/remote_repo.txt
866
867             # Download and run install script
868             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
869             cd /opt
870             chmod +x robot_install.sh
871             ./robot_install.sh
872
873
874   # VID instantiation
875   vid_private_port:
876     type: OS::Neutron::Port
877     properties:
878       network: { get_resource: oam_onap }
879       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
880
881   vid_floating_ip:
882     type: OS::Neutron::FloatingIP
883     properties:
884       floating_network_id: { get_param: public_net_id }
885       port_id: { get_resource: vid_private_port }
886
887   vid_vm:
888     type: OS::Nova::Server
889     properties:
890       image: { get_param: ubuntu_1404_image }
891       flavor: { get_param: flavor_medium }
892       name:
893         str_replace: 
894           template: base-vid
895           params:
896             base: { get_param: vm_base_name }
897       key_name: { get_resource: vm_key }
898       networks:
899         - port: { get_resource: vid_private_port }
900       user_data_format: RAW
901       user_data:
902         str_replace:
903           params:
904             __nexus_repo__: { get_param: nexus_repo }
905             __nexus_docker_repo__: { get_param: nexus_docker_repo }
906             __nexus_username__: { get_param: nexus_username }
907             __nexus_password__: { get_param: nexus_password }
908             __artifacts_version__: { get_param: artifacts_version }
909             __dns_ip_addr__: { get_param: dns_ip_addr }
910             __docker_version__: { get_param: docker_version }
911             __gerrit_branch__: { get_param: gerrit_branch }
912             __cloud_env__: { get_param: cloud_env }
913             __external_dns__: { get_param: external_dns }
914             __vid_repo__: { get_param: vid_repo }
915           template: |
916             #!/bin/bash
917
918             # Create configuration files
919             mkdir -p /opt/config
920             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
921             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
922             echo "__nexus_username__" > /opt/config/nexus_username.txt
923             echo "__nexus_password__" > /opt/config/nexus_password.txt
924             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
925             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
926             echo "__docker_version__" > /opt/config/docker_version.txt
927             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
928             echo "__cloud_env__" > /opt/config/cloud_env.txt
929             echo "__external_dns__" > /opt/config/external_dns.txt
930             echo "__vid_repo__" > /opt/config/remote_repo.txt
931
932             # Download and run install script
933             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
934             cd /opt
935             chmod +x vid_install.sh
936             ./vid_install.sh
937
938  
939   # SDN-C instantiation
940   sdnc_private_port:
941     type: OS::Neutron::Port
942     properties:
943       network: { get_resource: oam_onap }
944       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
945
946   sdnc_floating_ip:
947     type: OS::Neutron::FloatingIP
948     properties:
949       floating_network_id: { get_param: public_net_id }
950       port_id: { get_resource: sdnc_private_port }
951
952   sdnc_vm:
953     type: OS::Nova::Server
954     properties:
955       image: { get_param: ubuntu_1404_image }
956       flavor: { get_param: flavor_large }
957       name:
958         str_replace: 
959           template: base-sdnc
960           params:
961             base: { get_param: vm_base_name }
962       key_name: { get_resource: vm_key }
963       networks:
964         - port: { get_resource: sdnc_private_port }
965       user_data_format: RAW
966       user_data:
967         str_replace:
968           params:
969             __nexus_repo__: { get_param: nexus_repo }
970             __nexus_docker_repo__: { get_param: nexus_docker_repo }
971             __nexus_username__: { get_param: nexus_username }
972             __nexus_password__: { get_param: nexus_password }
973             __artifacts_version__: { get_param: artifacts_version }
974             __dns_ip_addr__: { get_param: dns_ip_addr }
975             __docker_version__: { get_param: docker_version }
976             __gerrit_branch__: { get_param: gerrit_branch }
977             __cloud_env__: { get_param: cloud_env }
978             __external_dns__: { get_param: external_dns }
979             __sdnc_repo__: { get_param: sdnc_repo }
980           template: |
981             #!/bin/bash
982
983             # Create configuration files
984             mkdir -p /opt/config
985             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
986             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
987             echo "__nexus_username__" > /opt/config/nexus_username.txt
988             echo "__nexus_password__" > /opt/config/nexus_password.txt
989             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
990             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
991             echo "__docker_version__" > /opt/config/docker_version.txt
992             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
993             echo "__cloud_env__" > /opt/config/cloud_env.txt
994             echo "__external_dns__" > /opt/config/external_dns.txt
995             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
996
997             # Download and run install script
998             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
999             cd /opt
1000             chmod +x sdnc_install.sh
1001             ./sdnc_install.sh
1002
1003
1004   # SDC instantiation
1005   sdc_private_port:
1006     type: OS::Neutron::Port
1007     properties:
1008       network: { get_resource: oam_onap }
1009       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1010
1011   sdc_floating_ip:
1012     type: OS::Neutron::FloatingIP
1013     properties:
1014       floating_network_id: { get_param: public_net_id }
1015       port_id: { get_resource: sdc_private_port }
1016
1017   sdc_volume_data:
1018     type: OS::Cinder::Volume
1019     properties:
1020       name: vol1-sdc-data
1021       size: 100
1022
1023   sdc_vm:
1024     type: OS::Nova::Server
1025     properties:
1026       image: { get_param: ubuntu_1604_image }
1027       flavor: { get_param: flavor_xlarge }
1028       name:
1029         str_replace: 
1030           template: base-sdc
1031           params:
1032             base: { get_param: vm_base_name }
1033       key_name: { get_resource: vm_key }
1034       networks:
1035         - port: { get_resource: sdc_private_port }
1036       block_device_mapping:
1037         - device_name: /dev/vdb
1038           volume_id: {get_resource: sdc_volume_data}
1039       user_data_format: RAW
1040       user_data:
1041         str_replace:
1042           params:
1043             __nexus_repo__: { get_param: nexus_repo }
1044             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1045             __nexus_username__: { get_param: nexus_username }
1046             __nexus_password__: { get_param: nexus_password }
1047             __env_name__: { get_param: dmaap_topic }
1048             __artifacts_version__: { get_param: artifacts_version }
1049             __dns_ip_addr__: { get_param: dns_ip_addr }
1050             __mr_ip_addr__: { get_param: mr_ip_addr }
1051             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1052             __docker_version__: { get_param: docker_version }
1053             __gerrit_branch__: { get_param: gerrit_branch }
1054             __cloud_env__: { get_param: cloud_env }
1055             __external_dns__: { get_param: external_dns }
1056             __sdc_repo__: { get_param: sdc_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 "__env_name__" > /opt/config/env_name.txt
1067             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1068             echo "__public_ip__" > /opt/config/public_ip.txt
1069             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1070             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1071             echo "__docker_version__" > /opt/config/docker_version.txt
1072             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1073             echo "__cloud_env__" > /opt/config/cloud_env.txt
1074             echo "__external_dns__" > /opt/config/external_dns.txt
1075             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1076
1077             # Download and run install script
1078             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
1079             cd /opt
1080             chmod +x sdc_install.sh
1081             ./sdc_install.sh
1082
1083
1084   # PORTAL instantiation
1085   portal_private_port:
1086     type: OS::Neutron::Port
1087     properties:
1088       network: { get_resource: oam_onap }
1089       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1090
1091   portal_floating_ip:
1092     type: OS::Neutron::FloatingIP
1093     properties:
1094       floating_network_id: { get_param: public_net_id }
1095       port_id: { get_resource: portal_private_port }
1096
1097   portal_vm:
1098     type: OS::Nova::Server
1099     properties:
1100       image: { get_param: ubuntu_1404_image }
1101       flavor: { get_param: flavor_large }
1102       name:
1103         str_replace: 
1104           template: base-portal
1105           params:
1106             base: { get_param: vm_base_name }
1107       key_name: { get_resource: vm_key }
1108       networks:
1109         - port: { get_resource: portal_private_port }
1110       user_data_format: RAW
1111       user_data:
1112         str_replace:
1113           params:
1114             __nexus_repo__: { get_param: nexus_repo }
1115             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1116             __nexus_username__: { get_param: nexus_username }
1117             __nexus_password__: { get_param: nexus_password }
1118             __artifacts_version__: { get_param: artifacts_version }
1119             __dns_ip_addr__: { get_param: dns_ip_addr }
1120             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1121             __docker_version__: { get_param: docker_version }
1122             __gerrit_branch__: { get_param: gerrit_branch }
1123             __cloud_env__: { get_param: cloud_env }
1124             __external_dns__: { get_param: external_dns }
1125             __portal_repo__: { get_param: portal_repo }
1126           template: |
1127             #!/bin/bash
1128
1129             # Create configuration files
1130             mkdir -p /opt/config
1131             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1132             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1133             echo "__nexus_username__" > /opt/config/nexus_username.txt
1134             echo "__nexus_password__" > /opt/config/nexus_password.txt
1135             echo "__public_ip__" > /opt/config/public_ip.txt
1136             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1137             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1138             echo "__docker_version__" > /opt/config/docker_version.txt
1139             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1140             echo "__cloud_env__" > /opt/config/cloud_env.txt
1141             echo "__external_dns__" > /opt/config/external_dns.txt
1142             echo "__portal_repo__" > /opt/config/remote_repo.txt
1143
1144             # Download and run install script
1145             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1146             cd /opt
1147             chmod +x portal_install.sh
1148             ./portal_install.sh
1149
1150
1151   # DCAE Controller instantiation
1152   dcae_c_private_port:
1153     type: OS::Neutron::Port
1154     properties:
1155       network: { get_resource: oam_onap }
1156       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1157
1158   dcae_c_floating_ip:
1159     type: OS::Neutron::FloatingIP
1160     properties:
1161       floating_network_id: { get_param: public_net_id }
1162       port_id: { get_resource: dcae_c_private_port }
1163
1164   dcae_c_vm:
1165     type: OS::Nova::Server
1166     properties:
1167       image: { get_param: ubuntu_1404_image }
1168       flavor: { get_param: flavor_medium }
1169       name:
1170         str_replace: 
1171           template: base-dcae-controller
1172           params:
1173             base: { get_param: vm_base_name }
1174       key_name: { get_resource: vm_key }
1175       networks:
1176         - port: { get_resource: dcae_c_private_port }
1177       user_data_format: RAW
1178       user_data:
1179         str_replace:
1180           params:
1181             __nexus_repo__: { get_param: nexus_repo }
1182             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1183             __nexus_username__: { get_param: nexus_username }
1184             __nexus_password__: { get_param: nexus_password }
1185             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1186             __gitlab_branch__: { get_param: gitlab_branch }
1187             __dns_ip_addr__: { get_param: dns_ip_addr }
1188             __dcae_zone__: { get_param: dcae_zone }
1189             __dcae_state__: { get_param: dcae_state }
1190             __artifacts_version__: { get_param: artifacts_version }
1191             __tenant_id__: { get_param: openstack_tenant_id }
1192             __openstack_private_network_name__: { get_attr: [oam_onap, name] }
1193             __openstack_user__: { get_param: openstack_username }
1194             __openstack_password__: { get_param: openstack_api_key }
1195             __openstack_auth_method__: { get_param: openstack_auth_method }
1196             __key_name__: { get_param: key_name }
1197             __rand_str__: { get_resource: random-str }
1198             __pub_key__: { get_param: pub_key }
1199             __nexus_repo_root__: { get_param: nexus_repo_root }
1200             __openstack_region__: { get_param: openstack_region }
1201             __horizon_url__: { get_param: horizon_url }
1202             __keystone_url__: { get_param: keystone_url }
1203             __docker_version__: { get_param: docker_version }
1204             __gerrit_branch__: { get_param: gerrit_branch }
1205             __dcae_code_version__: { get_param: dcae_code_version }
1206             __cloud_env__: { get_param: cloud_env }
1207             __public_net_id__: { get_param: public_net_id }
1208             __dcae_base_environment__: { get_param: dcae_base_environment }
1209             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1210             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1211             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1212             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1213             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1214             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1215             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1216             __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1217             __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1218             __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1219             __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1220             __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1221             __external_dns__: { get_param: external_dns }
1222             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1223             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1224             __flavor_small__: { get_param: flavor_small }
1225             __flavor_medium__: { get_param: flavor_medium }
1226             __flavor_large__: { get_param: flavor_large }
1227             __flavor_xlarge__: { get_param: flavor_xlarge }
1228             __dcae_repo__: { get_param: dcae_repo }
1229             __mr_repo__: { get_param: mr_repo }
1230           template: |
1231             #!/bin/bash
1232
1233             # Create configuration files
1234             mkdir -p /opt/config
1235             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1236             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1237             echo "__nexus_username__" > /opt/config/nexus_username.txt
1238             echo "__nexus_password__" > /opt/config/nexus_password.txt
1239             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1240             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1241             echo "__docker_version__" > /opt/config/docker_version.txt
1242             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1243             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1244             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1245             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1246             echo "__dcae_state__" > /opt/config/dcae_state.txt
1247             echo "__tenant_id__" > /opt/config/tenant_id.txt
1248             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1249             echo "__openstack_user__" > /opt/config/openstack_user.txt
1250             echo "__openstack_password__" > /opt/config/openstack_password.txt
1251             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1252             echo "__key_name__" > /opt/config/key_name.txt
1253             echo "__rand_str__" > /opt/config/rand_str.txt
1254             echo "__pub_key__" > /opt/config/pub_key.txt
1255             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1256             echo "__openstack_region__" > /opt/config/openstack_region.txt
1257             echo "__horizon_url__" > /opt/config/horizon_url.txt
1258             echo "__keystone_url__" > /opt/config/keystone_url.txt
1259             echo "__cloud_env__" > /opt/config/cloud_env.txt
1260             echo "__public_net_id__" > /opt/config/public_net_id.txt
1261             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1262             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1263             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1264             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1265             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1266             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1267             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1268             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1269             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1270             echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1271             echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1272             echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1273             echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1274             echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1275             echo "__external_dns__" > /opt/config/external_dns.txt
1276             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1277             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1278             echo "__flavor_small__" > /opt/config/flavor_small.txt
1279             echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1280             echo "__flavor_large__" > /opt/config/flavor_large.txt
1281             echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1282             echo "__dcae_repo__" > /opt/config/remote_repo.txt
1283             echo "__mr_repo__" > /opt/config/mr_repo.txt
1284
1285             # Download and run install script
1286             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1287             cd /opt
1288             chmod +x dcae_install.sh
1289             ./dcae_install.sh
1290
1291
1292   # Policy Engine instantiation
1293   policy_private_port:
1294     type: OS::Neutron::Port
1295     properties:
1296       network: { get_resource: oam_onap }
1297       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1298
1299   policy_floating_ip:
1300     type: OS::Neutron::FloatingIP
1301     properties:
1302       floating_network_id: { get_param: public_net_id }
1303       port_id: { get_resource: policy_private_port }
1304
1305   policy_vm:
1306     type: OS::Nova::Server
1307     properties:
1308       image: { get_param: ubuntu_1404_image }
1309       flavor: { get_param: flavor_xlarge }
1310       name:
1311         str_replace: 
1312           template: base-policy
1313           params:
1314             base: { get_param: vm_base_name }
1315       key_name: { get_resource: vm_key }
1316       networks:
1317         - port: { get_resource: policy_private_port }
1318       user_data_format: RAW
1319       user_data:
1320         str_replace:
1321           params:
1322             __nexus_repo__: { get_param: nexus_repo }
1323             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1324             __nexus_username__: { get_param: nexus_username }
1325             __nexus_password__: { get_param: nexus_password }
1326             __artifacts_version__: { get_param: artifacts_version }
1327             __dns_ip_addr__: { get_param: dns_ip_addr }
1328             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1329             __docker_version__: { get_param: docker_version }
1330             __gerrit_branch__: { get_param: gerrit_branch }
1331             __cloud_env__: { get_param: cloud_env }
1332             __external_dns__: { get_param: external_dns }
1333             __policy_repo__: { get_param: policy_repo }
1334           template: |
1335             #!/bin/bash
1336
1337             # Create configuration files
1338             mkdir -p /opt/config
1339             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1340             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1341             echo "__nexus_username__" > /opt/config/nexus_username.txt
1342             echo "__nexus_password__" > /opt/config/nexus_password.txt
1343             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1344             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1345             echo "__public_ip__" > /opt/config/public_ip.txt
1346             echo "__docker_version__" > /opt/config/docker_version.txt
1347             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1348             echo "__cloud_env__" > /opt/config/cloud_env.txt
1349             echo "__external_dns__" > /opt/config/external_dns.txt
1350             echo "__policy_repo__" > /opt/config/remote_repo.txt
1351
1352             # Download and run install script
1353             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1354             cd /opt
1355             chmod +x policy_install.sh
1356             ./policy_install.sh
1357
1358
1359   # APP-C instantiation
1360   appc_private_port:
1361     type: OS::Neutron::Port
1362     properties:
1363       network: { get_resource: oam_onap }
1364       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1365
1366   appc_floating_ip:
1367     type: OS::Neutron::FloatingIP
1368     properties:
1369       floating_network_id: { get_param: public_net_id }
1370       port_id: { get_resource: appc_private_port }
1371
1372   appc_vm:
1373     type: OS::Nova::Server
1374     properties:
1375       image: { get_param: ubuntu_1404_image }
1376       flavor: { get_param: flavor_large }
1377       name:
1378         str_replace: 
1379           template: base-appc
1380           params:
1381             base: { get_param: vm_base_name }
1382       key_name: { get_resource: vm_key }
1383       networks:
1384         - port: { get_resource: appc_private_port }
1385       user_data_format: RAW
1386       user_data:
1387         str_replace:
1388           params:
1389             __nexus_repo__: { get_param: nexus_repo }
1390             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1391             __nexus_username__: { get_param: nexus_username }
1392             __nexus_password__: { get_param: nexus_password }
1393             __dmaap_topic__: { get_param: dmaap_topic }
1394             __artifacts_version__: { get_param: artifacts_version }
1395             __dns_ip_addr__: { get_param: dns_ip_addr }
1396             __docker_version__: { get_param: docker_version }
1397             __gerrit_branch__: { get_param: gerrit_branch }
1398             __cloud_env__: { get_param: cloud_env }
1399             __external_dns__: { get_param: external_dns }
1400             __appc_repo__: { get_param: appc_repo }
1401           template: |
1402             #!/bin/bash
1403
1404             # Create configuration files
1405             mkdir -p /opt/config
1406             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1407             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1408             echo "__nexus_username__" > /opt/config/nexus_username.txt
1409             echo "__nexus_password__" > /opt/config/nexus_password.txt
1410             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1411             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1412             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1413             echo "__docker_version__" > /opt/config/docker_version.txt
1414             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1415             echo "__cloud_env__" > /opt/config/cloud_env.txt
1416             echo "__external_dns__" > /opt/config/external_dns.txt
1417             echo "__appc_repo__" > /opt/config/remote_repo.txt
1418
1419             # Download and run install script
1420             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1421             cd /opt
1422             chmod +x appc_install.sh
1423             ./appc_install.sh
1424
1425
1426   # CLAMP instantiation
1427   clamp_private_port:
1428     type: OS::Neutron::Port
1429     properties:
1430       network: { get_resource: oam_onap }
1431       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1432
1433   clamp_floating_ip:
1434     type: OS::Neutron::FloatingIP
1435     properties:
1436       floating_network_id: { get_param: public_net_id }
1437       port_id: { get_resource: clamp_private_port }
1438
1439   clamp_vm:
1440     type: OS::Nova::Server
1441     properties:
1442       image: { get_param: ubuntu_1604_image }
1443       flavor: { get_param: flavor_medium }
1444       name:
1445         str_replace:
1446           template: base-clamp
1447           params:
1448             base: { get_param: vm_base_name }      
1449       key_name: { get_resource: vm_key }
1450       networks:
1451         - port: { get_resource: clamp_private_port }
1452       user_data_format: RAW
1453       user_data:
1454         str_replace:
1455           params:
1456             __nexus_repo__: { get_param: nexus_repo }
1457             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1458             __nexus_username__: { get_param: nexus_username }
1459             __nexus_password__: { get_param: nexus_password }
1460             __openstack_username__: { get_param: openstack_username }
1461             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1462             __openstack_api_key__: { get_param: openstack_api_key }
1463             __openstack_region__: { get_param: openstack_region }
1464             __keystone_url__: { get_param: keystone_url }
1465             __dmaap_topic__: { get_param: dmaap_topic }
1466             __artifacts_version__: { get_param: artifacts_version }
1467             __dns_ip_addr__: { get_param: dns_ip_addr }
1468             __docker_version__: { get_param: docker_version }
1469             __gerrit_branch__: { get_param: gerrit_branch }
1470             __cloud_env__: { get_param: cloud_env }
1471             __external_dns__: { get_param: external_dns }
1472             __clamp_repo__: { get_param: clamp_repo }
1473           template: |
1474             #!/bin/bash
1475
1476             # Create configuration files
1477             mkdir -p /opt/config
1478             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1479             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1480             echo "__nexus_username__" > /opt/config/nexus_username.txt
1481             echo "__nexus_password__" > /opt/config/nexus_password.txt
1482             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1483             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1484             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1485             echo "__openstack_username__" > /opt/config/openstack_username.txt
1486             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1487             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1488             echo "__openstack_region__" > /opt/config/openstack_region.txt
1489             echo "__keystone_url__" > /opt/config/keystone.txt
1490             echo "__docker_version__" > /opt/config/docker_version.txt
1491             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1492             echo "__cloud_env__" > /opt/config/cloud_env.txt
1493             echo "__external_dns__" > /opt/config/external_dns.txt
1494             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1495
1496             # Download and run install script
1497             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1498             cd /opt
1499             chmod +x clamp_install.sh
1500             ./clamp_install.sh