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