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