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