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