82ca78b0bf7ab9509887cd6902d9e81c1f1560e0
[demo.git] / heat / ONAP / onap_openstack.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4 #
5 #
6 # Copyright (c) 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: The ID of the Public network for floating IP address allocation
46
47   public_net_name:
48     type: string
49     description: The name of the Public network referred by public_net_id
50
51   ubuntu_1404_image:
52     type: string
53     description: Name of the Ubuntu 14.04 image
54
55   ubuntu_1604_image:
56     type: string
57     description: Name of the Ubuntu 16.04 image
58
59   flavor_small:
60     type: string
61     description: Name of the Small Flavor supported by the cloud provider
62
63   flavor_medium:
64     type: string
65     description: Name of the Medium Flavor supported by the cloud provider
66
67   flavor_large:
68     type: string
69     description: Name of the Large Flavor supported by the cloud provider
70
71   flavor_xlarge:
72     type: string
73     description: Name of the Extra Large Flavor supported by the cloud provider
74
75   flavor_xxlarge:
76     type: string
77     description: Name of the Extra 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   dmaap_topic:
112     type: string
113     description: DMaaP Topic name
114
115   openstack_tenant_id:
116     type: string
117     description: OpenStack tenant ID
118
119   openstack_tenant_name:
120     type: string
121     description: OpenStack tenant name (matching with the 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 in lower case
146
147   openstack_region:
148     type: string
149     description: Region where the DCAE controller will spin the VMs
150
151   ######################
152   #                    #
153   # Network parameters #
154   #                    #
155   ######################
156
157   dns_list:
158     type: comma_delimited_list
159     description: List of External DNS for OAM ONAP network
160
161   external_dns:
162     type: string
163     description: Public IP of the external DNS for ONAP network
164
165   dns_forwarder:
166     type: string
167     description: the forwarder address for setting up ONAP's private DNS server
168
169   oam_network_cidr:
170     type: string
171     description: CIDR of the OAM ONAP network
172
173   ### Private IP addresses ###
174   aai1_ip_addr:
175     type: string
176   aai2_ip_addr:
177     type: string
178   appc_ip_addr:
179     type: string
180   dcae_ip_addr:
181     type: string
182   dns_ip_addr:
183     type: string
184   so_ip_addr:
185     type: string
186   mr_ip_addr:
187     type: string
188   policy_ip_addr:
189     type: string
190   portal_ip_addr:
191     type: string
192   robot_ip_addr:
193     type: string
194   sdc_ip_addr:
195     type: string
196   sdnc_ip_addr:
197     type: string
198   vid_ip_addr:
199     type: string
200   clamp_ip_addr:
201     type: string
202   openo_ip_addr:
203     type: string
204   music_ip_addr:
205     type: string
206   oof_ip_addr:
207     type: string
208   aaf_ip_addr:
209     type: string
210   nbi_ip_addr:
211     type: string
212
213   ###########################
214   #                         #
215   # Parameters used by DCAE #
216   #                         #
217   ###########################
218
219   dnsaas_config_enabled:
220     type: string
221     description: whether the DNSaaS configuration section is enabled
222
223   dnsaas_region:
224     type: string
225     description: the region of the cloud instance providing the Designate DNS as a Service
226
227   dnsaas_keystone_url:
228     type: string
229     description: the keystone URL of the cloud instance providing the Designate DNS as a Service
230
231   dnsaas_username:
232     type: string
233     description: the username of the cloud instance providing the Designate DNS as a Service
234
235   dnsaas_password:
236     type: string
237     description: the password of the cloud instance providing the Designate DNS as a Service
238
239   dnsaas_tenant_name:
240     type: string
241     description: the name of the tenant in the cloud instance providing the Designate DNS as a Service
242
243   dcae_keystone_url:
244     type: string
245     description: the keystone URL for DCAE to use (via MultiCloud)
246
247   dcae_private_key:
248     type: string
249     description: the private key of the key-apir used between the DCAE bootstrap container and DCAE VMs
250
251   dcae_public_key:
252     type: string
253     description: the prublic key of the key-apir used between the DCAE bootstrap container and DCAE VMs
254
255   dcae_centos_7_image:
256     type: string
257     description: the id/name of the CentOS 7 VM imange
258
259   dcae_domain:
260     type: string
261     description: the top level domain to register DCAE VMs (the zone will be random-str.dcae_domain)
262
263   #####################
264   #                   #
265   # ONAP repositories #
266   #                   #
267   #####################
268
269   aai_repo:
270     type: string
271   appc_repo:
272     type: string
273   mr_repo:
274     type: string
275   so_repo:
276     type: string
277   policy_repo:
278     type: string
279   portal_repo:
280     type: string
281   robot_repo:
282     type: string
283   sdc_repo:
284     type: string
285   sdnc_repo:
286     type: string
287   vid_repo:
288     type: string
289   clamp_repo:
290     type: string
291   vnfsdk_repo:
292     type: string
293
294   ################################
295   #                              #
296   # Docker versions and branches #
297   #                              #
298   ################################
299
300   aai_docker:
301     type: string
302   aai_sparky_docker:
303     type: string
304   appc_docker:
305     type: string
306   so_docker:
307     type: string
308   dcae_docker:
309     type: string
310   policy_docker:
311     type: string
312   portal_docker:
313     type: string
314   robot_docker:
315     type: string
316   sdc_docker:
317     type: string
318   sdnc_docker:
319     type: string
320   vid_docker:
321     type: string
322   clamp_docker:
323     type: string
324   msb_docker:
325     type: string
326   mvim_docker:
327     type: string
328   uui_docker:
329     type: string
330   esr_docker:
331     type: string
332   dgbuilder_docker:
333     type: string
334   cli_docker:
335     type: string
336   music_docker:
337     type: string
338   oof_docker:
339     type: string
340   aaf_docker:
341     type: string
342   nbi_docker:
343     type: string
344
345   vfc_nokia_docker:
346     type: string
347   vfc_nokiav2_docker:
348     type: string
349   vfc_ztevnfmdriver_docker:
350     type: string
351   vfc_ztesdncdriver_docker:
352     type: string
353   vfc_vnfres_docker:
354     type: string
355   vfc_vnfmgr_docker:
356     type: string
357   vfc_vnflcm_docker:
358     type: string
359   vfc_resmanagement_docker:
360     type: string
361   vfc_nslcm_docker:
362     type: string
363   vfc_huawei_docker:
364     type: string
365   vfc_jujudriver_docker:
366     type: string
367   vfc_gvnfmdriver_docker:
368     type: string
369   vfc_emsdriver_docker:
370     type: string
371   vfc_catalog_docker:
372     type: string
373   vfc_wfengine_mgrservice_docker:
374     type: string
375   vfc_wfengine_activiti_docker:
376     type: string
377   vfc_ztevmanagerdriver_docker:
378     type: string
379   vfc_multivimproxy_docker:
380     type: string
381
382   cbam_username:
383     type: string
384   cbam_password:
385     type: string
386   cbam_ip:
387     type: string
388
389   aai_branch:
390     type: string
391   appc_branch:
392     type: string
393   so_branch:
394     type: string
395   mr_branch:
396     type: string
397   policy_branch:
398     type: string
399   portal_branch:
400     type: string
401   robot_branch:
402     type: string
403   sdc_branch:
404     type: string
405   sdnc_branch:
406     type: string
407   vid_branch:
408     type: string
409   clamp_branch:
410     type: string
411   vnfsdk_branch:
412     type: string
413
414
415 #############
416 #           #
417 # RESOURCES #
418 #           #
419 #############
420
421 resources:
422   random-str:
423     type: OS::Heat::RandomString
424     properties:
425       length: 4
426
427   # Public key used to access ONAP components
428   vm_key:
429     type: OS::Nova::KeyPair
430     properties:
431       name:
432         str_replace:
433           template: base_rand
434           params:
435             base: { get_param: key_name }
436             rand: { get_resource: random-str }
437       public_key: { get_param: pub_key }
438       save_private_key: false
439
440
441   # ONAP security group
442   onap_sg:
443     type: OS::Neutron::SecurityGroup
444     properties:
445       name:
446         str_replace:
447           template: base_rand
448           params:
449             base: onap_sg
450             rand: { get_resource: random-str }
451       description: security group used by ONAP
452       rules:
453         # All egress traffic
454         - direction: egress
455           ethertype: IPv4
456         - direction: egress
457           ethertype: IPv6
458         # ingress traffic
459         # ICMP
460         - protocol: icmp
461         - protocol: udp
462           port_range_min: 1
463           port_range_max: 65535
464         - protocol: tcp
465           port_range_min: 1
466           port_range_max: 65535
467
468
469
470   # ONAP management private network
471   oam_onap:
472     type: OS::Neutron::Net
473     properties:
474       name:
475         str_replace:
476           template: oam_onap_rand
477           params:
478             rand: { get_resource: random-str }
479
480   oam_onap_subnet:
481     type: OS::Neutron::Subnet
482     properties:
483       name:
484         str_replace:
485           template: oam_onap_rand
486           params:
487             rand: { get_resource: random-str }
488       network_id: { get_resource: oam_onap }
489       cidr: { get_param: oam_network_cidr }
490       dns_nameservers: { get_param: dns_list }
491
492   router:
493     type: OS::Neutron::Router
494     properties:
495       external_gateway_info:
496         network: { get_param: public_net_id }
497
498   router_interface:
499     type: OS::Neutron::RouterInterface
500     properties:
501       router_id: { get_resource: router }
502       subnet_id: { get_resource: oam_onap_subnet }
503
504
505   # DNS Server instantiation
506   dns_private_port:
507     type: OS::Neutron::Port
508     properties:
509       network: { get_resource: oam_onap }
510       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
511       security_groups:
512       - { get_resource: onap_sg }
513
514   dns_floating_ip:
515     type: OS::Neutron::FloatingIP
516     properties:
517       floating_network_id: { get_param: public_net_id }
518       port_id: { get_resource: dns_private_port }
519
520   dns_vm:
521     type: OS::Nova::Server
522     properties:
523       image: { get_param: ubuntu_1404_image }
524       flavor: { get_param: flavor_small }
525       name:
526         str_replace:
527           template: base-dns-server
528           params:
529             base: { get_param: vm_base_name }
530       key_name: { get_resource: vm_key }
531       networks:
532         - port: { get_resource: dns_private_port }
533       user_data_format: RAW
534       user_data:
535         str_replace:
536           params:
537             __nexus_repo__: { get_param: nexus_repo }
538             __artifacts_version__: { get_param: artifacts_version }
539             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
540             __dns_ip_addr__: { get_param: dns_ip_addr }
541             __aai1_ip_addr__: { get_param: aai1_ip_addr }
542             __aai2_ip_addr__: { get_param: aai2_ip_addr }
543             __appc_ip_addr__: { get_param: appc_ip_addr }
544             __dcae_ip_addr__: { get_param: dcae_ip_addr }
545             __so_ip_addr__: { get_param: so_ip_addr }
546             __mr_ip_addr__: { get_param: mr_ip_addr }
547             __policy_ip_addr__: { get_param: policy_ip_addr }
548             __portal_ip_addr__: { get_param: portal_ip_addr }
549             __robot_ip_addr__: { get_param: robot_ip_addr }
550             __sdc_ip_addr__: { get_param: sdc_ip_addr }
551             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
552             __vid_ip_addr__: { get_param: vid_ip_addr }
553             __clamp_ip_addr__: { get_param: clamp_ip_addr }
554             __openo_ip_addr__: { get_param: openo_ip_addr }
555             __music_ip_addr__: { get_param: music_ip_addr }
556             __oof_ip_addr__: { get_param: oof_ip_addr }
557             __aaf_ip_addr__: { get_param: aaf_ip_addr }
558             __nbi_ip_addr__: { get_param: nbi_ip_addr }
559             __cloud_env__: { get_param: cloud_env }
560             __external_dns__: { get_param: external_dns }
561             __dns_forwarder__: { get_param: dns_forwarder }
562           template: |
563             #!/bin/bash
564
565             # Create configuration files
566             mkdir -p /opt/config
567             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
568             echo "__cloud_env__" > /opt/config/cloud_env.txt
569             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
570             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
571             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
572             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
573             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
574             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
575             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
576             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
577             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
578             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
579             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
580             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
581             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
582             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
583             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
584             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
585             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
586             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
587             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
588             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
589             echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
590             echo "__external_dns__" > /opt/config/external_dns.txt
591             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
592
593             # Download and run install script
594             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
595             cd /opt
596             chmod +x dns_install.sh
597             ./dns_install.sh
598
599
600   # A&AI instantiation (2 VMs)
601   aai1_private_port:
602     type: OS::Neutron::Port
603     properties:
604       network: { get_resource: oam_onap }
605       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
606       security_groups:
607       - { get_resource: onap_sg }
608
609   aai1_floating_ip:
610     type: OS::Neutron::FloatingIP
611     properties:
612       floating_network_id: { get_param: public_net_id }
613       port_id: { get_resource: aai1_private_port }
614
615   aai1_vm:
616     type: OS::Nova::Server
617     depends_on: aai2_vm
618     properties:
619       image: { get_param: ubuntu_1404_image }
620       flavor: { get_param: flavor_xlarge }
621       name:
622         str_replace:
623           template: base-aai-inst1
624           params:
625             base: { get_param: vm_base_name }
626       key_name: { get_resource: vm_key }
627       networks:
628         - port: { get_resource: aai1_private_port }
629       user_data_format: RAW
630       user_data:
631         str_replace:
632           params:
633             __nexus_repo__: { get_param: nexus_repo }
634             __nexus_docker_repo__: { get_param: nexus_docker_repo }
635             __nexus_username__: { get_param: nexus_username }
636             __nexus_password__: { get_param: nexus_password }
637             __dmaap_topic__: { get_param: dmaap_topic }
638             __artifacts_version__: { get_param: artifacts_version }
639             __dns_ip_addr__: { get_param: dns_ip_addr }
640             __docker_version__: { get_param: aai_docker }
641             __aai_sparky_docker__ : { get_param: aai_sparky_docker }
642             __gerrit_branch__: { get_param: aai_branch }
643             __cloud_env__: { get_param: cloud_env }
644             __external_dns__: { get_param: external_dns }
645             __aai_repo__: { get_param: aai_repo }
646           template: |
647             #!/bin/bash
648
649             # Create configuration files
650             mkdir -p /opt/config
651             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
652             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
653             echo "__nexus_username__" > /opt/config/nexus_username.txt
654             echo "__nexus_password__" > /opt/config/nexus_password.txt
655             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
656             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
657             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
658             echo "__docker_version__" > /opt/config/docker_version.txt
659             echo "__aai_sparky_docker__" > /opt/config/sparky_version.txt
660             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
661             echo "aai_instance_1" > /opt/config/aai_instance.txt
662             echo "__cloud_env__" > /opt/config/cloud_env.txt
663             echo "__external_dns__" > /opt/config/external_dns.txt
664             echo "__aai_repo__" > /opt/config/remote_repo.txt
665
666             # Download and run install script
667             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
668             cd /opt
669             chmod +x aai_install.sh
670             ./aai_install.sh
671
672
673   aai2_private_port:
674     type: OS::Neutron::Port
675     properties:
676       network: { get_resource: oam_onap }
677       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
678       security_groups:
679       - { get_resource: onap_sg }
680
681   aai2_floating_ip:
682     type: OS::Neutron::FloatingIP
683     properties:
684       floating_network_id: { get_param: public_net_id }
685       port_id: { get_resource: aai2_private_port }
686
687   aai2_vm:
688     type: OS::Nova::Server
689     properties:
690       image: { get_param: ubuntu_1404_image }
691       flavor: { get_param: flavor_xlarge }
692       name:
693         str_replace:
694           template: base-aai-inst2
695           params:
696             base: { get_param: vm_base_name }
697       key_name: { get_resource: vm_key }
698       networks:
699         - port: { get_resource: aai2_private_port }
700       user_data_format: RAW
701       user_data:
702         str_replace:
703           params:
704             __nexus_repo__: { get_param: nexus_repo }
705             __nexus_docker_repo__: { get_param: nexus_docker_repo }
706             __nexus_username__: { get_param: nexus_username }
707             __nexus_password__: { get_param: nexus_password }
708             __dmaap_topic__: { get_param: dmaap_topic }
709             __artifacts_version__: { get_param: artifacts_version }
710             __dns_ip_addr__: { get_param: dns_ip_addr }
711             __docker_version__: { get_param: aai_docker }
712             __gerrit_branch__: { get_param: aai_branch }
713             __cloud_env__: { get_param: cloud_env }
714             __external_dns__: { get_param: external_dns }
715             __aai_repo__: { get_param: aai_repo }
716           template: |
717             #!/bin/bash
718
719             # Create configuration files
720             mkdir -p /opt/config
721             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
722             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
723             echo "__nexus_username__" > /opt/config/nexus_username.txt
724             echo "__nexus_password__" > /opt/config/nexus_password.txt
725             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
726             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
727             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
728             echo "__docker_version__" > /opt/config/docker_version.txt
729             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
730             echo "aai_instance_2" > /opt/config/aai_instance.txt
731             echo "__cloud_env__" > /opt/config/cloud_env.txt
732             echo "__external_dns__" > /opt/config/external_dns.txt
733             echo "__aai_repo__" > /opt/config/remote_repo.txt
734
735             # Download and run install script
736             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
737             cd /opt
738             chmod +x aai_install.sh
739             ./aai_install.sh
740
741
742   # SO instantiation
743   so_private_port:
744     type: OS::Neutron::Port
745     properties:
746       network: { get_resource: oam_onap }
747       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: so_ip_addr }}]
748       security_groups:
749       - { get_resource: onap_sg }
750
751   so_floating_ip:
752     type: OS::Neutron::FloatingIP
753     properties:
754       floating_network_id: { get_param: public_net_id }
755       port_id: { get_resource: so_private_port }
756
757   so_vm:
758     type: OS::Nova::Server
759     properties:
760       image: { get_param: ubuntu_1604_image }
761       flavor: { get_param: flavor_large }
762       name:
763         str_replace:
764           template: base-so
765           params:
766             base: { get_param: vm_base_name }
767       key_name: { get_resource: vm_key }
768       networks:
769         - port: { get_resource: so_private_port }
770       user_data_format: RAW
771       user_data:
772         str_replace:
773           params:
774             __nexus_repo__: { get_param: nexus_repo }
775             __nexus_docker_repo__: { get_param: nexus_docker_repo }
776             __nexus_username__: { get_param: nexus_username }
777             __nexus_password__: { get_param: nexus_password }
778             __openstack_username__: { get_param: openstack_username }
779             __openstack_tenant_id__: { get_param: openstack_tenant_id }
780             __openstack_api_key__: { get_param: openstack_api_key }
781             __openstack_region__: { get_param: openstack_region }
782             __keystone_url__: { get_param: keystone_url }
783             __dmaap_topic__: { get_param: dmaap_topic }
784             __artifacts_version__: { get_param: artifacts_version }
785             __dns_ip_addr__: { get_param: dns_ip_addr }
786             __openo_ip__: { get_param: openo_ip_addr }
787             __docker_version__: { get_param: so_docker }
788             __gerrit_branch__: { get_param: so_branch }
789             __cloud_env__: { get_param: cloud_env }
790             __external_dns__: { get_param: external_dns }
791             __so_repo__: { get_param: so_repo }
792           template: |
793             #!/bin/bash
794
795             # Create configuration files
796             mkdir -p /opt/config
797             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
798             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
799             echo "__nexus_username__" > /opt/config/nexus_username.txt
800             echo "__nexus_password__" > /opt/config/nexus_password.txt
801             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
802             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
803             echo "__openo_ip__" > /opt/config/openo_ip.txt
804             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
805             echo "__openstack_username__" > /opt/config/openstack_username.txt
806             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
807             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
808             echo "__openstack_region__" > /opt/config/openstack_region.txt
809             echo "__keystone_url__" > /opt/config/keystone.txt
810             echo "__docker_version__" > /opt/config/docker_version.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 "__so_repo__" > /opt/config/remote_repo.txt
815
816             # Download and run install script
817             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/so_install.sh -o /opt/so_install.sh
818             cd /opt
819             chmod +x so_install.sh
820             ./so_install.sh
821
822
823   # Message Router instantiation
824   mrouter_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: mr_ip_addr }}]
829       security_groups:
830       - { get_resource: onap_sg }
831
832   mrouter_floating_ip:
833     type: OS::Neutron::FloatingIP
834     properties:
835       floating_network_id: { get_param: public_net_id }
836       port_id: { get_resource: mrouter_private_port }
837
838   mrouter_vm:
839     type: OS::Nova::Server
840     properties:
841       image: { get_param: ubuntu_1404_image }
842       flavor: { get_param: flavor_large }
843       name:
844         str_replace:
845           template: base-message-router
846           params:
847             base: { get_param: vm_base_name }
848       key_name: { get_resource: vm_key }
849       networks:
850         - port: { get_resource: mrouter_private_port }
851       user_data_format: RAW
852       user_data:
853         str_replace:
854           params:
855             __nexus_repo__: { get_param: nexus_repo }
856             __nexus_docker_repo__: { get_param: nexus_docker_repo }
857             __nexus_username__: { get_param: nexus_username }
858             __nexus_password__: { get_param: nexus_password }
859             __artifacts_version__: { get_param: artifacts_version }
860             __dns_ip_addr__: { get_param: dns_ip_addr }
861             __gerrit_branch__: { get_param: mr_branch }
862             __cloud_env__: { get_param: cloud_env }
863             __external_dns__: { get_param: external_dns }
864             __mr_repo__: { get_param: mr_repo }
865           template: |
866             #!/bin/bash
867
868             # Create configuration files
869             mkdir -p /opt/config
870             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
871             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
872             echo "__nexus_username__" > /opt/config/nexus_username.txt
873             echo "__nexus_password__" > /opt/config/nexus_password.txt
874             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
875             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
876             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
877             echo "__cloud_env__" > /opt/config/cloud_env.txt
878             echo "__external_dns__" > /opt/config/external_dns.txt
879             echo "__mr_repo__" > /opt/config/remote_repo.txt
880
881             # Download and run install script
882             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
883             cd /opt
884             chmod +x mr_install.sh
885             ./mr_install.sh
886
887
888   # Robot Framework instantiation
889   robot_private_port:
890     type: OS::Neutron::Port
891     properties:
892       network: { get_resource: oam_onap }
893       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
894       security_groups:
895       - { get_resource: onap_sg }
896
897   robot_floating_ip:
898     type: OS::Neutron::FloatingIP
899     properties:
900       floating_network_id: { get_param: public_net_id }
901       port_id: { get_resource: robot_private_port }
902
903   robot_vm:
904     type: OS::Nova::Server
905     properties:
906       image: { get_param: ubuntu_1604_image }
907       flavor: { get_param: flavor_medium }
908       name:
909         str_replace:
910           template: base-robot
911           params:
912             base: { get_param: vm_base_name }
913       key_name: { get_resource: vm_key }
914       networks:
915         - port: { get_resource: robot_private_port }
916       user_data_format: RAW
917       user_data:
918         str_replace:
919           params:
920             __nexus_repo__: { get_param: nexus_repo }
921             __nexus_docker_repo__: { get_param: nexus_docker_repo }
922             __nexus_username__: { get_param: nexus_username }
923             __nexus_password__: { get_param: nexus_password }
924             __network_name__: { get_attr: [oam_onap, name] }
925             __openstack_username__: { get_param: openstack_username }
926             __openstack_api_key__: { get_param : openstack_api_key }
927             __openstack_tenant_id__: { get_param: openstack_tenant_id }
928             __artifacts_version__: { get_param: artifacts_version }
929             __openstack_region__: { get_param: openstack_region }
930             __dns_ip_addr__: { get_param: dns_ip_addr }
931             __gerrit_branch__: { get_param: robot_branch }
932             __cloud_env__: { get_param: cloud_env }
933             __keystone_url__: { get_param: keystone_url }
934             __aai1_ip_addr__: { get_param: aai1_ip_addr }
935             __aai2_ip_addr__: { get_param: aai2_ip_addr }
936             __appc_ip_addr__: { get_param: appc_ip_addr }
937             __dcae_ip_addr__: { get_param: dcae_ip_addr }
938             __so_ip_addr__: { get_param: so_ip_addr }
939             __mr_ip_addr__: { get_param: mr_ip_addr }
940             __policy_ip_addr__: { get_param: policy_ip_addr }
941             __portal_ip_addr__: { get_param: portal_ip_addr }
942             __sdc_ip_addr__: { get_param: sdc_ip_addr }
943             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
944             __vid_ip_addr__: { get_param: vid_ip_addr }
945             __clamp_ip_addr__: { get_param: clamp_ip_addr }
946             __openo_ip_addr__: { get_param: openo_ip_addr }
947             __music_ip_addr__: { get_param: music_ip_addr }
948             __oof_ip_addr__: { get_param: oof_ip_addr }
949             __aaf_ip_addr__: { get_param: aaf_ip_addr }
950             __external_dns__: { get_param: external_dns }
951             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
952             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
953             __vm_flavor__: { get_param: flavor_medium }
954             __public_net_id__: { get_param: public_net_id }
955             __script_version__: { get_param: artifacts_version }
956             __robot_repo__: { get_param: robot_repo }
957             __docker_version__: { get_param: robot_docker }
958           template: |
959             #!/bin/bash
960
961             # Create configuration files
962             mkdir -p /opt/config
963             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
964             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
965             echo "__nexus_username__" > /opt/config/nexus_username.txt
966             echo "__nexus_password__" > /opt/config/nexus_password.txt
967             echo "__network_name__" > /opt/config/network.txt
968             echo "__openstack_username__" > /opt/config/openstack_username.txt
969             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
970             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
971             echo "__openstack_region__" > /opt/config/region.txt
972             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
973             echo "__docker_version__" > /opt/config/docker_version.txt
974             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
975             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
976             echo "__keystone_url__" > /opt/config/keystone.txt
977             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
978             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
979             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
980             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
981             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
982             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
983             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
984             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
985             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
986             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
987             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
988             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
989             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
990             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
991             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
992             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
993             echo "__cloud_env__" > /opt/config/cloud_env.txt
994             echo "__external_dns__" > /opt/config/external_dns.txt
995             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
996             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
997             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
998             echo "__script_version__" > /opt/config/script_version.txt
999             echo "__public_net_id__" > /opt/config/public_net_id.txt
1000             echo "__robot_repo__" > /opt/config/remote_repo.txt
1001
1002             # Download and run install script
1003             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
1004             cd /opt
1005             chmod +x robot_install.sh
1006             ./robot_install.sh
1007
1008
1009   # VID instantiation
1010   vid_private_port:
1011     type: OS::Neutron::Port
1012     properties:
1013       network: { get_resource: oam_onap }
1014       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
1015       security_groups:
1016       - { get_resource: onap_sg }
1017
1018   vid_floating_ip:
1019     type: OS::Neutron::FloatingIP
1020     properties:
1021       floating_network_id: { get_param: public_net_id }
1022       port_id: { get_resource: vid_private_port }
1023
1024   vid_vm:
1025     type: OS::Nova::Server
1026     properties:
1027       image: { get_param: ubuntu_1404_image }
1028       flavor: { get_param: flavor_medium }
1029       name:
1030         str_replace:
1031           template: base-vid
1032           params:
1033             base: { get_param: vm_base_name }
1034       key_name: { get_resource: vm_key }
1035       networks:
1036         - port: { get_resource: vid_private_port }
1037       user_data_format: RAW
1038       user_data:
1039         str_replace:
1040           params:
1041             __nexus_repo__: { get_param: nexus_repo }
1042             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1043             __nexus_username__: { get_param: nexus_username }
1044             __nexus_password__: { get_param: nexus_password }
1045             __artifacts_version__: { get_param: artifacts_version }
1046             __dns_ip_addr__: { get_param: dns_ip_addr }
1047             __docker_version__: { get_param: vid_docker }
1048             __gerrit_branch__: { get_param: vid_branch }
1049             __cloud_env__: { get_param: cloud_env }
1050             __external_dns__: { get_param: external_dns }
1051             __vid_repo__: { get_param: vid_repo }
1052           template: |
1053             #!/bin/bash
1054
1055             # Create configuration files
1056             mkdir -p /opt/config
1057             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1058             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1059             echo "__nexus_username__" > /opt/config/nexus_username.txt
1060             echo "__nexus_password__" > /opt/config/nexus_password.txt
1061             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1062             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1063             echo "__docker_version__" > /opt/config/docker_version.txt
1064             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1065             echo "__cloud_env__" > /opt/config/cloud_env.txt
1066             echo "__external_dns__" > /opt/config/external_dns.txt
1067             echo "__vid_repo__" > /opt/config/remote_repo.txt
1068
1069             # Download and run install script
1070             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
1071             cd /opt
1072             chmod +x vid_install.sh
1073             ./vid_install.sh
1074
1075
1076   # SDN-C instantiation
1077   sdnc_private_port:
1078     type: OS::Neutron::Port
1079     properties:
1080       network: { get_resource: oam_onap }
1081       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
1082       security_groups:
1083       - { get_resource: onap_sg }
1084
1085   sdnc_floating_ip:
1086     type: OS::Neutron::FloatingIP
1087     properties:
1088       floating_network_id: { get_param: public_net_id }
1089       port_id: { get_resource: sdnc_private_port }
1090
1091   sdnc_vm:
1092     type: OS::Nova::Server
1093     properties:
1094       image: { get_param: ubuntu_1404_image }
1095       flavor: { get_param: flavor_large }
1096       name:
1097         str_replace:
1098           template: base-sdnc
1099           params:
1100             base: { get_param: vm_base_name }
1101       key_name: { get_resource: vm_key }
1102       networks:
1103         - port: { get_resource: sdnc_private_port }
1104       user_data_format: RAW
1105       user_data:
1106         str_replace:
1107           params:
1108             __nexus_repo__: { get_param: nexus_repo }
1109             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1110             __nexus_username__: { get_param: nexus_username }
1111             __nexus_password__: { get_param: nexus_password }
1112             __artifacts_version__: { get_param: artifacts_version }
1113             __dns_ip_addr__: { get_param: dns_ip_addr }
1114             __docker_version__: { get_param: sdnc_docker }
1115             __gerrit_branch__: { get_param: sdnc_branch }
1116             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1117             __cloud_env__: { get_param: cloud_env }
1118             __external_dns__: { get_param: external_dns }
1119             __sdnc_repo__: { get_param: sdnc_repo }
1120           template: |
1121             #!/bin/bash
1122
1123             # Create configuration files
1124             mkdir -p /opt/config
1125             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1126             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1127             echo "__nexus_username__" > /opt/config/nexus_username.txt
1128             echo "__nexus_password__" > /opt/config/nexus_password.txt
1129             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1130             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1131             echo "__docker_version__" > /opt/config/docker_version.txt
1132             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1133             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1134             echo "__cloud_env__" > /opt/config/cloud_env.txt
1135             echo "__external_dns__" > /opt/config/external_dns.txt
1136             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1137
1138             # Download and run install script
1139             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
1140             cd /opt
1141             chmod +x sdnc_install.sh
1142             ./sdnc_install.sh
1143
1144
1145   # SDC instantiation
1146   sdc_private_port:
1147     type: OS::Neutron::Port
1148     properties:
1149       network: { get_resource: oam_onap }
1150       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1151       security_groups:
1152       - { get_resource: onap_sg }
1153
1154   sdc_floating_ip:
1155     type: OS::Neutron::FloatingIP
1156     properties:
1157       floating_network_id: { get_param: public_net_id }
1158       port_id: { get_resource: sdc_private_port }
1159
1160   sdc_volume_data:
1161     type: OS::Cinder::Volume
1162     properties:
1163       name: vol1-sdc-data
1164       size: 100
1165
1166   sdc_vm:
1167     type: OS::Nova::Server
1168     properties:
1169       image: { get_param: ubuntu_1604_image }
1170       flavor: { get_param: flavor_xlarge }
1171       name:
1172         str_replace:
1173           template: base-sdc
1174           params:
1175             base: { get_param: vm_base_name }
1176       key_name: { get_resource: vm_key }
1177       networks:
1178         - port: { get_resource: sdc_private_port }
1179       block_device_mapping:
1180         - device_name: /dev/vdb
1181           volume_id: {get_resource: sdc_volume_data}
1182       user_data_format: RAW
1183       user_data:
1184         str_replace:
1185           params:
1186             __nexus_repo__: { get_param: nexus_repo }
1187             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1188             __nexus_username__: { get_param: nexus_username }
1189             __nexus_password__: { get_param: nexus_password }
1190             __env_name__: { get_param: dmaap_topic }
1191             __artifacts_version__: { get_param: artifacts_version }
1192             __dns_ip_addr__: { get_param: dns_ip_addr }
1193             __mr_ip_addr__: { get_param: mr_ip_addr }
1194             __private_ip__: { get_param: sdc_ip_addr }
1195             __docker_version__: { get_param: sdc_docker }
1196             __gerrit_branch__: { get_param: sdc_branch }
1197             __cloud_env__: { get_param: cloud_env }
1198             __external_dns__: { get_param: external_dns }
1199             __sdc_repo__: { get_param: sdc_repo }
1200           template: |
1201             #!/bin/bash
1202
1203             # Create configuration files
1204             mkdir -p /opt/config
1205             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1206             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1207             echo "__nexus_username__" > /opt/config/nexus_username.txt
1208             echo "__nexus_password__" > /opt/config/nexus_password.txt
1209             echo "__env_name__" > /opt/config/env_name.txt
1210             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1211             echo "__private_ip__" > /opt/config/private_ip.txt
1212             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1213             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1214             echo "__docker_version__" > /opt/config/docker_version.txt
1215             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1216             echo "__cloud_env__" > /opt/config/cloud_env.txt
1217             echo "__external_dns__" > /opt/config/external_dns.txt
1218             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1219
1220             # Download and run install script
1221             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
1222             cd /opt
1223             chmod +x sdc_install.sh
1224             ./sdc_install.sh
1225
1226
1227   # PORTAL instantiation
1228   portal_private_port:
1229     type: OS::Neutron::Port
1230     properties:
1231       network: { get_resource: oam_onap }
1232       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1233       security_groups:
1234       - { get_resource: onap_sg }
1235
1236   portal_floating_ip:
1237     type: OS::Neutron::FloatingIP
1238     properties:
1239       floating_network_id: { get_param: public_net_id }
1240       port_id: { get_resource: portal_private_port }
1241
1242   portal_vm:
1243     type: OS::Nova::Server
1244     properties:
1245       image: { get_param: ubuntu_1404_image }
1246       flavor: { get_param: flavor_large }
1247       name:
1248         str_replace:
1249           template: base-portal
1250           params:
1251             base: { get_param: vm_base_name }
1252       key_name: { get_resource: vm_key }
1253       networks:
1254         - port: { get_resource: portal_private_port }
1255       user_data_format: RAW
1256       user_data:
1257         str_replace:
1258           params:
1259             __nexus_repo__: { get_param: nexus_repo }
1260             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1261             __nexus_username__: { get_param: nexus_username }
1262             __nexus_password__: { get_param: nexus_password }
1263             __artifacts_version__: { get_param: artifacts_version }
1264             __dns_ip_addr__: { get_param: dns_ip_addr }
1265             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1266             __docker_version__: { get_param: portal_docker }
1267             __gerrit_branch__: { get_param: portal_branch }
1268             __cli_docker__: { get_param: cli_docker }
1269             __cloud_env__: { get_param: cloud_env }
1270             __external_dns__: { get_param: external_dns }
1271             __portal_repo__: { get_param: portal_repo }
1272           template: |
1273             #!/bin/bash
1274
1275             # Create configuration files
1276             mkdir -p /opt/config
1277             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1278             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1279             echo "__nexus_username__" > /opt/config/nexus_username.txt
1280             echo "__nexus_password__" > /opt/config/nexus_password.txt
1281             echo "__public_ip__" > /opt/config/public_ip.txt
1282             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1283             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1284             echo "__docker_version__" > /opt/config/docker_version.txt
1285             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1286             echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1287             echo "__cloud_env__" > /opt/config/cloud_env.txt
1288             echo "__external_dns__" > /opt/config/external_dns.txt
1289             echo "__portal_repo__" > /opt/config/remote_repo.txt
1290
1291             # Download and run install script
1292             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1293             cd /opt
1294             chmod +x portal_install.sh
1295             ./portal_install.sh
1296
1297
1298   # Policy Engine instantiation
1299   policy_private_port:
1300     type: OS::Neutron::Port
1301     properties:
1302       network: { get_resource: oam_onap }
1303       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1304       security_groups:
1305       - { get_resource: onap_sg }
1306
1307   policy_floating_ip:
1308     type: OS::Neutron::FloatingIP
1309     properties:
1310       floating_network_id: { get_param: public_net_id }
1311       port_id: { get_resource: policy_private_port }
1312
1313   policy_vm:
1314     type: OS::Nova::Server
1315     properties:
1316       image: { get_param: ubuntu_1404_image }
1317       flavor: { get_param: flavor_xlarge }
1318       name:
1319         str_replace:
1320           template: base-policy
1321           params:
1322             base: { get_param: vm_base_name }
1323       key_name: { get_resource: vm_key }
1324       networks:
1325         - port: { get_resource: policy_private_port }
1326       user_data_format: RAW
1327       user_data:
1328         str_replace:
1329           params:
1330             __nexus_repo__: { get_param: nexus_repo }
1331             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1332             __nexus_username__: { get_param: nexus_username }
1333             __nexus_password__: { get_param: nexus_password }
1334             __artifacts_version__: { get_param: artifacts_version }
1335             __dns_ip_addr__: { get_param: dns_ip_addr }
1336             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1337             __docker_version__: { get_param: policy_docker }
1338             __gerrit_branch__: { get_param: policy_branch }
1339             __cloud_env__: { get_param: cloud_env }
1340             __external_dns__: { get_param: external_dns }
1341             __policy_repo__: { get_param: policy_repo }
1342           template: |
1343             #!/bin/bash
1344
1345             # Create configuration files
1346             mkdir -p /opt/config
1347             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1348             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1349             echo "__nexus_username__" > /opt/config/nexus_username.txt
1350             echo "__nexus_password__" > /opt/config/nexus_password.txt
1351             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1352             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1353             echo "__public_ip__" > /opt/config/public_ip.txt
1354             echo "__docker_version__" > /opt/config/docker_version.txt
1355             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1356             echo "__cloud_env__" > /opt/config/cloud_env.txt
1357             echo "__external_dns__" > /opt/config/external_dns.txt
1358             echo "__policy_repo__" > /opt/config/remote_repo.txt
1359
1360             # Download and run install script
1361             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1362             cd /opt
1363             chmod +x policy_install.sh
1364             ./policy_install.sh
1365
1366
1367   # APP-C instantiation
1368   appc_private_port:
1369     type: OS::Neutron::Port
1370     properties:
1371       network: { get_resource: oam_onap }
1372       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1373       security_groups:
1374       - { get_resource: onap_sg }
1375
1376   appc_floating_ip:
1377     type: OS::Neutron::FloatingIP
1378     properties:
1379       floating_network_id: { get_param: public_net_id }
1380       port_id: { get_resource: appc_private_port }
1381
1382   appc_vm:
1383     type: OS::Nova::Server
1384     properties:
1385       image: { get_param: ubuntu_1404_image }
1386       flavor: { get_param: flavor_large }
1387       name:
1388         str_replace:
1389           template: base-appc
1390           params:
1391             base: { get_param: vm_base_name }
1392       key_name: { get_resource: vm_key }
1393       networks:
1394         - port: { get_resource: appc_private_port }
1395       user_data_format: RAW
1396       user_data:
1397         str_replace:
1398           params:
1399             __nexus_repo__: { get_param: nexus_repo }
1400             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1401             __nexus_username__: { get_param: nexus_username }
1402             __nexus_password__: { get_param: nexus_password }
1403             __dmaap_topic__: { get_param: dmaap_topic }
1404             __artifacts_version__: { get_param: artifacts_version }
1405             __dns_ip_addr__: { get_param: dns_ip_addr }
1406             __docker_version__: { get_param: appc_docker }
1407             __gerrit_branch__: { get_param: appc_branch }
1408             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1409             __cloud_env__: { get_param: cloud_env }
1410             __external_dns__: { get_param: external_dns }
1411             __appc_repo__: { get_param: appc_repo }
1412           template: |
1413             #!/bin/bash
1414
1415             # Create configuration files
1416             mkdir -p /opt/config
1417             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1418             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1419             echo "__nexus_username__" > /opt/config/nexus_username.txt
1420             echo "__nexus_password__" > /opt/config/nexus_password.txt
1421             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1422             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1423             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1424             echo "__docker_version__" > /opt/config/docker_version.txt
1425             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1426             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1427             echo "__cloud_env__" > /opt/config/cloud_env.txt
1428             echo "__external_dns__" > /opt/config/external_dns.txt
1429             echo "__appc_repo__" > /opt/config/remote_repo.txt
1430
1431             # Download and run install script
1432             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1433             cd /opt
1434             chmod +x appc_install.sh
1435             ./appc_install.sh
1436
1437
1438   # CLAMP instantiation
1439   clamp_private_port:
1440     type: OS::Neutron::Port
1441     properties:
1442       network: { get_resource: oam_onap }
1443       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1444       security_groups:
1445       - { get_resource: onap_sg }
1446
1447   clamp_floating_ip:
1448     type: OS::Neutron::FloatingIP
1449     properties:
1450       floating_network_id: { get_param: public_net_id }
1451       port_id: { get_resource: clamp_private_port }
1452
1453   clamp_vm:
1454     type: OS::Nova::Server
1455     properties:
1456       image: { get_param: ubuntu_1604_image }
1457       flavor: { get_param: flavor_medium }
1458       name:
1459         str_replace:
1460           template: base-clamp
1461           params:
1462             base: { get_param: vm_base_name }
1463       key_name: { get_resource: vm_key }
1464       networks:
1465         - port: { get_resource: clamp_private_port }
1466       user_data_format: RAW
1467       user_data:
1468         str_replace:
1469           params:
1470             __nexus_repo__: { get_param: nexus_repo }
1471             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1472             __nexus_username__: { get_param: nexus_username }
1473             __nexus_password__: { get_param: nexus_password }
1474             __openstack_username__: { get_param: openstack_username }
1475             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1476             __openstack_api_key__: { get_param: openstack_api_key }
1477             __openstack_region__: { get_param: openstack_region }
1478             __keystone_url__: { get_param: keystone_url }
1479             __dmaap_topic__: { get_param: dmaap_topic }
1480             __artifacts_version__: { get_param: artifacts_version }
1481             __dns_ip_addr__: { get_param: dns_ip_addr }
1482             __docker_version__: { get_param: clamp_docker }
1483             __gerrit_branch__: { get_param: clamp_branch }
1484             __cloud_env__: { get_param: cloud_env }
1485             __external_dns__: { get_param: external_dns }
1486             __clamp_repo__: { get_param: clamp_repo }
1487           template: |
1488             #!/bin/bash
1489
1490             # Create configuration files
1491             mkdir -p /opt/config
1492             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1493             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1494             echo "__nexus_username__" > /opt/config/nexus_username.txt
1495             echo "__nexus_password__" > /opt/config/nexus_password.txt
1496             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1497             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1498             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1499             echo "__openstack_username__" > /opt/config/openstack_username.txt
1500             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1501             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1502             echo "__openstack_region__" > /opt/config/openstack_region.txt
1503             echo "__keystone_url__" > /opt/config/keystone.txt
1504             echo "__docker_version__" > /opt/config/docker_version.txt
1505             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1506             echo "__cloud_env__" > /opt/config/cloud_env.txt
1507             echo "__external_dns__" > /opt/config/external_dns.txt
1508             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1509
1510             # Download and run install script
1511             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1512             cd /opt
1513             chmod +x clamp_install.sh
1514             ./clamp_install.sh
1515
1516
1517   # OPEN-O VM instantiation
1518   openo_private_port:
1519     type: OS::Neutron::Port
1520     properties:
1521       network: { get_resource: oam_onap }
1522       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1523       security_groups:
1524       - { get_resource: onap_sg }
1525
1526   openo_floating_ip:
1527     type: OS::Neutron::FloatingIP
1528     properties:
1529       floating_network_id: { get_param: public_net_id }
1530       port_id: { get_resource: openo_private_port }
1531
1532   openo_vm:
1533     type: OS::Nova::Server
1534     properties:
1535       image: { get_param: ubuntu_1604_image }
1536       flavor: { get_param: flavor_xxlarge }
1537       name:
1538         str_replace:
1539           template: base-multi-service
1540           params:
1541             base: { get_param: vm_base_name }
1542       key_name: { get_resource: vm_key }
1543       networks:
1544         - port: { get_resource: openo_private_port }
1545       user_data_format: RAW
1546       user_data:
1547         str_replace:
1548           params:
1549             __nexus_repo__: { get_param: nexus_repo }
1550             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1551             __nexus_username__: { get_param: nexus_username }
1552             __nexus_password__: { get_param: nexus_password }
1553             __artifacts_version__: { get_param: artifacts_version }
1554             __dns_ip_addr__: { get_param: dns_ip_addr }
1555             __oam_network_cidr__: { get_param: oam_network_cidr }
1556             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1557             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1558             __appc_ip_addr__: { get_param: appc_ip_addr }
1559             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1560             __so_ip_addr__: { get_param: so_ip_addr }
1561             __mr_ip_addr__: { get_param: mr_ip_addr }
1562             __policy_ip_addr__: { get_param: policy_ip_addr }
1563             __portal_ip_addr__: { get_param: portal_ip_addr }
1564             __robot_ip_addr__: { get_param: robot_ip_addr }
1565             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1566             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1567             __vid_ip_addr__: { get_param: vid_ip_addr }
1568             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1569             __openo_ip_addr__: { get_param: openo_ip_addr }
1570             __cloud_env__: { get_param: cloud_env }
1571             __external_dns__: { get_param: external_dns }
1572             __vnfsdk_branch__: { get_param: vnfsdk_branch }
1573             __msb_docker__: { get_param: msb_docker }
1574             __mvim_docker__: { get_param: mvim_docker }
1575             __uui_docker__: { get_param: uui_docker }
1576             __esr_docker__: { get_param: esr_docker }
1577             __vnfsdk_repo__: { get_param: vnfsdk_repo }
1578             __vfc_nokia_docker__: { get_param: vfc_nokia_docker }
1579             __vfc_nokiav2_docker__: { get_param: vfc_nokiav2_docker }
1580             __cbam_ip__: { get_param: cbam_ip }
1581             __cbam_username__: { get_param: cbam_username }
1582             __cbam_password__: { get_param: cbam_password }
1583             __vfc_ztevnfmdriver_docker__: { get_param: vfc_ztevnfmdriver_docker }
1584             __vfc_ztesdncdriver_docker__: { get_param: vfc_ztesdncdriver_docker }
1585             __vfc_vnfres_docker__: { get_param: vfc_vnfres_docker }
1586             __vfc_vnfmgr_docker__: { get_param: vfc_vnfmgr_docker }
1587             __vfc_vnflcm_docker__: { get_param: vfc_vnflcm_docker }
1588             __vfc_resmanagement_docker__: { get_param: vfc_resmanagement_docker }
1589             __vfc_nslcm_docker__: { get_param: vfc_nslcm_docker }
1590             __vfc_huawei_docker__: { get_param: vfc_huawei_docker }
1591             __vfc_jujudriver_docker__: { get_param: vfc_jujudriver_docker }
1592             __vfc_gvnfmdriver_docker__: { get_param: vfc_gvnfmdriver_docker }
1593             __vfc_emsdriver_docker__: { get_param: vfc_emsdriver_docker }
1594             __vfc_catalog_docker__: { get_param: vfc_catalog_docker }
1595             __vfc_wfengine_mgrservice_docker__: { get_param: vfc_wfengine_mgrservice_docker }
1596             __vfc_wfengine_activiti_docker__: { get_param: vfc_wfengine_activiti_docker }
1597           template: |
1598             #!/bin/bash
1599
1600             # Create configuration files
1601             mkdir -p /opt/config
1602             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1603             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1604             echo "__nexus_username__" > /opt/config/nexus_username.txt
1605             echo "__nexus_password__" > /opt/config/nexus_password.txt
1606             echo "__cloud_env__" > /opt/config/cloud_env.txt
1607             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1608             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1609             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1610             echo "__external_dns__" > /opt/config/external_dns.txt
1611             echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
1612             echo "__msb_docker__" > /opt/config/msb_docker.txt
1613             echo "__mvim_docker__" > /opt/config/mvim_docker.txt
1614             echo "__uui_docker__" > /opt/config/uui_docker.txt
1615             echo "__esr_docker__" > /opt/config/esr_docker.txt
1616             echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
1617             echo "__cbam_ip__" > /opt/config/cbam_ip.txt
1618             echo "__cbam_username__" > /opt/config/cbam_username.txt
1619             echo "__cbam_password__" > /opt/config/cbam_password.txt
1620
1621             echo "export NOKIA_DOCKER_VER=__vfc_nokia_docker__" >> /opt/config/vfc_docker.txt
1622             echo "export NOKIAV2_DOCKER_VER=__vfc_nokiav2_docker__" >> /opt/config/vfc_docker.txt
1623             echo "export ZTEVNFMDRIVER_DOCKER_VER=__vfc_ztevnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1624             echo "export ZTESDNCDRIVER_DOCKER_VER=__vfc_ztesdncdriver_docker__" >> /opt/config/vfc_docker.txt
1625             echo "export VNFRES_DOCKER_VER=__vfc_vnfres_docker__" >> /opt/config/vfc_docker.txt
1626             echo "export VNFMGR_DOCKER_VER=__vfc_vnfmgr_docker__" >> /opt/config/vfc_docker.txt
1627             echo "export VNFLCM_DOCKER_VER=__vfc_vnflcm_docker__" >> /opt/config/vfc_docker.txt
1628             echo "export RESMANAGEMENT_DOCKER_VER=__vfc_resmanagement_docker__" >> /opt/config/vfc_docker.txt
1629             echo "export NSLCM_DOCKER_VER=__vfc_nslcm_docker__" >> /opt/config/vfc_docker.txt
1630             echo "export HUAWEI_DOCKER_VER=__vfc_huawei_docker__" >> /opt/config/vfc_docker.txt
1631             echo "export JUJUDRIVER_DOCKER_VER=__vfc_jujudriver_docker__" >> /opt/config/vfc_docker.txt
1632             echo "export GVNFMDRIVER_DOCKER_VER=__vfc_gvnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1633             echo "export EMSDRIVER_DOCKER_VER=__vfc_emsdriver_docker__" >> /opt/config/vfc_docker.txt
1634             echo "export CATALOG_DOCKER_VER=__vfc_catalog_docker__" >> /opt/config/vfc_docker.txt
1635             echo "export MGRSERVICE_DOCKER_VER=__vfc_wfengine_mgrservice_docker__" >> /opt/config/vfc_docker.txt
1636             echo "export ACTIVITI_DOCKER_VER=__vfc_wfengine_activiti_docker__" >> /opt/config/vfc_docker.txt
1637
1638             # Create env file with the IP address of all ONAP components
1639             echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
1640             echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
1641             echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
1642             echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
1643             echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
1644             echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
1645             echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
1646             echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
1647             echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
1648             echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
1649             echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
1650             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
1651             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
1652             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
1653
1654             # Download and run install script
1655             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/openo_install.sh -o /opt/openo_install.sh
1656             cd /opt
1657             chmod +x openo_install.sh
1658             ./openo_install.sh
1659
1660
1661   # DCAE GEN 2 Controller instantiation
1662   dcae_c_private_port:
1663     type: OS::Neutron::Port
1664     properties:
1665       network: { get_resource: oam_onap }
1666       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1667       security_groups:
1668       - { get_resource: onap_sg }
1669
1670   dcae_c_floating_ip:
1671     type: OS::Neutron::FloatingIP
1672     properties:
1673       floating_network_id: { get_param: public_net_id }
1674       port_id: { get_resource: dcae_c_private_port }
1675
1676   dcae_c_vm:
1677     type: OS::Nova::Server
1678     properties:
1679       image: { get_param: ubuntu_1604_image }
1680       flavor: { get_param: flavor_small }
1681       name:
1682         str_replace:
1683           template: base-dcae-bootstrap
1684           params:
1685             base: { get_param: vm_base_name }
1686       key_name: { get_resource: vm_key }
1687       networks:
1688         - port: { get_resource: dcae_c_private_port }
1689       #security_groups:
1690       #  - { get_resource: onap_sg }
1691       user_data_format: RAW
1692       user_data:
1693         str_replace:
1694           params:
1695             __rand_str__: { get_resource: random-str }
1696             # repo related
1697             __artifacts_version__: { get_param: artifacts_version }
1698             __docker_version__: { get_param: dcae_docker }
1699             __nexus_repo__: { get_param: nexus_repo }
1700             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1701             __nexus_username__: { get_param: nexus_username }
1702             __nexus_password__: { get_param: nexus_password }
1703             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1704             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
1705             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1706             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1707             __dns_ip_addr__: { get_param: dns_ip_addr }
1708             __external_dns__: { get_param: external_dns }
1709             __dns_forwarder__: { get_param: dns_forwarder }
1710             __dcae_domain__: { get_param: dcae_domain }
1711             # conf for VMs DCAE is to bringup
1712             __openstack_keystone_url__: { get_param: keystone_url }
1713             __dcae_keystone_url__: { get_param: dcae_keystone_url }
1714             __dcaeos_cloud_env__: { get_param: cloud_env }
1715             __dcaeos_keystone_url__: { get_param: dcae_keystone_url }
1716             __dcaeos_region__: { get_param: openstack_region }
1717             __dcaeos_tenant_id__: { get_param: openstack_tenant_id }
1718             __dcaeos_tenant_name__: { get_param: openstack_tenant_name }
1719             __dcaeos_security_group__:
1720               str_replace:
1721                 template: 'onap_sg_rand'
1722                 params:
1723                   rand: { get_resource: random-str }
1724             #__dcaeos_security_group__: { get_attr: [onap_sg, name] }
1725             __dcaeos_username__: { get_param: openstack_username }
1726             __dcaeos_password__: { get_param: openstack_api_key }
1727             __dcaeos_key_name__: { get_resource: vm_key }
1728             __dcaeos_public_key__: { get_param: dcae_public_key }
1729             __dcaeos_private_key__: { get_param: dcae_private_key }
1730             __dcaeos_private_network_name__: { get_attr: [oam_onap, name] }
1731             __dcaeos_public_network_name__: { get_param: public_net_name }
1732             __dcaeos_ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1733             __dcaeos_centos_7_image__: { get_param: dcae_centos_7_image }
1734             __dcaeos_flavor_id__: { get_param: flavor_medium }
1735             __dcaeos_flavor_id_cdap__: { get_param: flavor_large }
1736             __dcaeos_dnsaas_config_enabled__: { get_param: dnsaas_config_enabled }
1737             __dcaeos_dnsaas_region__: { get_param: dnsaas_region }
1738             __dcaeos_dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
1739             __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
1740             __dcaeos_dnsaas_username__: { get_param: dnsaas_username }
1741             __dcaeos_dnsaas_password__: { get_param: dnsaas_password }
1742             # fixed private IPs
1743             __mr_ip_addr__: { get_param: mr_ip_addr }
1744             __policy_ip_addr__: { get_param: policy_ip_addr }
1745             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1746             __openo_ip_addr__: { get_param: openo_ip_addr }
1747             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1748             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1749             # floating IPs
1750             __dns_floating_ip_addr__: { get_attr: [dns_floating_ip, floating_ip_address] }
1751             __aai1_floating_ip_addr__: { get_attr: [aai1_floating_ip, floating_ip_address] }
1752             __aai2_floating_ip_addr__: { get_attr: [aai2_floating_ip, floating_ip_address] }
1753             __mrouter_floating_ip_addr__: { get_attr: [mrouter_floating_ip, floating_ip_address] }
1754             __sdc_floating_ip_addr__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1755             __policy_floating_ip_addr__: { get_attr: [policy_floating_ip, floating_ip_address] }
1756             __openo_floating_ip_addr__: { get_attr: [openo_floating_ip, floating_ip_address] }
1757             __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1758
1759           template: |
1760             #!/bin/bash
1761
1762             # Create configuration files
1763             mkdir -p /opt/config
1764             echo "__rand_str__" > /opt/config/dcae_zone.txt
1765             echo "__rand_str__" > /opt/config/rand_str.txt
1766             # repo related
1767             echo "__docker_version__" > /opt/config/docker_version.txt
1768             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1769             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1770             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1771             echo "__nexus_username__" > /opt/config/nexus_username.txt
1772             echo "__nexus_password__" > /opt/config/nexus_password.txt
1773             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1774             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1775             echo "__mac_addr__" > /opt/config/mac_addr.txt
1776             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1777             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1778             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1779             echo "__external_dns__" > /opt/config/external_dns.txt
1780             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
1781             echo "__dcae_domain__" > /opt/config/dcae_domain.txt
1782             # conf for the OpenStack env where DCAE is deployed
1783             echo "__openstack_keystone_url__" > /opt/config/openstack_keystone_url.txt
1784             echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
1785             echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
1786             echo "__dcaeos_region__" > /opt/config/openstack_region.txt
1787             echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
1788             echo "__dcaeos_tenant_name__" > /opt/config/tenant_name.txt
1789             echo "__dcaeos_username__" > /opt/config/openstack_user.txt
1790             echo "__dcaeos_password__" > /opt/config/openstack_password.txt
1791             echo "__dcaeos_key_name__" > /opt/config/key_name.txt
1792             echo "__dcaeos_public_key__" > /opt/config/pub_key.txt
1793             echo "__dcaeos_private_key__" > /opt/config/priv_key
1794             echo "__dcaeos_private_network_name__" > /opt/config/openstack_private_network_name.txt
1795             echo "__dcaeos_public_network_name__" > /opt/config/public_net_name.txt
1796             echo "__dcaeos_public_network_name__" > /opt/config/public_net_id.txt
1797             echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1798             echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
1799             echo "__dcaeos_security_group__" > /opt/config/security_group.txt
1800             echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
1801             echo "__dcaeos_flavor_id_cdap__" > /opt/config/flavor_id_cdap.txt
1802             echo "__dcaeos_dnsaas_config_enabled__" > /opt/config/dnsaas_config_enabled.txt
1803             echo "__dcaeos_dnsaas_region__" > /opt/config/dnsaas_region.txt
1804             echo "__dcaeos_dnsaas_keystone_url__" > /opt/config/dnsaas_keystone_url.txt
1805             echo "__dnsaas_tenant_name__" > /opt/config/dnsaas_tenant_name.txt
1806             echo "__dcaeos_dnsaas_username__" > /opt/config/dnsaas_username.txt
1807             echo "__dcaeos_dnsaas_password__" > /opt/config/dnsaas_password.txt
1808             # fixed private IP addresses of other ONAP components
1809             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1810             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1811             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1812             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
1813             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
1814             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
1815             # floating IPs
1816             echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
1817             echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
1818             echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
1819             echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
1820             echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
1821             echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
1822             echo "__openo_floating_ip_addr__" > /opt/config/openo_floating_ip_addr.txt
1823             echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
1824
1825             # Download and run install script
1826             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae2_install.sh -o /opt/dcae2_install.sh
1827             cd /opt
1828             chmod +x dcae2_install.sh
1829             ./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
1830
1831
1832   # MUSIC instantiation
1833   music_private_port:
1834     type: OS::Neutron::Port
1835     properties:
1836       network: { get_resource: oam_onap }
1837       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
1838       security_groups:
1839       - { get_resource: onap_sg }
1840
1841   music_floating_ip:
1842     type: OS::Neutron::FloatingIP
1843     properties:
1844       floating_network_id: { get_param: public_net_id }
1845       port_id: { get_resource: music_private_port }
1846
1847   music_vm:
1848     type: OS::Nova::Server
1849     properties:
1850       image: { get_param: ubuntu_1404_image }
1851       flavor: { get_param: flavor_large }
1852       name:
1853         str_replace:
1854           template: base-music
1855           params:
1856             base: { get_param: vm_base_name }
1857       key_name: { get_resource: vm_key }
1858       networks:
1859         - port: { get_resource: music_private_port }
1860       user_data_format: RAW
1861       user_data:
1862         str_replace:
1863           params:
1864             __nexus_repo__: { get_param: nexus_repo }
1865             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1866             __nexus_username__: { get_param: nexus_username }
1867             __nexus_password__: { get_param: nexus_password }
1868             __artifacts_version__: { get_param: artifacts_version }
1869             __dns_ip_addr__: { get_param: dns_ip_addr }
1870             __docker_version__: { get_param: music_docker }
1871             __cloud_env__: { get_param: cloud_env }
1872             __external_dns__: { get_param: external_dns }
1873           template: |
1874             #!/bin/bash
1875
1876             # Create configuration files
1877             mkdir -p /opt/config
1878             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1879             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1880             echo "__nexus_username__" > /opt/config/nexus_username.txt
1881             echo "__nexus_password__" > /opt/config/nexus_password.txt
1882             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1883             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1884             echo "__docker_version__" > /opt/config/docker_version.txt
1885             echo "__cloud_env__" > /opt/config/cloud_env.txt
1886             echo "__external_dns__" > /opt/config/external_dns.txt
1887
1888             # Download and run install script
1889             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/music_install.sh -o /opt/music_install.sh
1890             cd /opt
1891             chmod +x music_install.sh
1892             ./music_install.sh
1893
1894
1895   # OOF instantiation
1896   oof_private_port:
1897     type: OS::Neutron::Port
1898     properties:
1899       network: { get_resource: oam_onap }
1900       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
1901       security_groups:
1902       - { get_resource: onap_sg }
1903
1904   oof_floating_ip:
1905     type: OS::Neutron::FloatingIP
1906     properties:
1907       floating_network_id: { get_param: public_net_id }
1908       port_id: { get_resource: oof_private_port }
1909
1910   oof_vm:
1911     type: OS::Nova::Server
1912     properties:
1913       image: { get_param: ubuntu_1404_image }
1914       flavor: { get_param: flavor_medium }
1915       name:
1916         str_replace:
1917           template: base-oof
1918           params:
1919             base: { get_param: vm_base_name }
1920       key_name: { get_resource: vm_key }
1921       networks:
1922         - port: { get_resource: oof_private_port }
1923       user_data_format: RAW
1924       user_data:
1925         str_replace:
1926           params:
1927             __nexus_repo__: { get_param: nexus_repo }
1928             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1929             __nexus_username__: { get_param: nexus_username }
1930             __nexus_password__: { get_param: nexus_password }
1931             __artifacts_version__: { get_param: artifacts_version }
1932             __dns_ip_addr__: { get_param: dns_ip_addr }
1933             __docker_version__: { get_param: oof_docker }
1934             __cloud_env__: { get_param: cloud_env }
1935             __external_dns__: { get_param: external_dns }
1936           template: |
1937             #!/bin/bash
1938
1939             # Create configuration files
1940             mkdir -p /opt/config
1941             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1942             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1943             echo "__nexus_username__" > /opt/config/nexus_username.txt
1944             echo "__nexus_password__" > /opt/config/nexus_password.txt
1945             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1946             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1947             echo "__docker_version__" > /opt/config/docker_version.txt
1948             echo "__cloud_env__" > /opt/config/cloud_env.txt
1949             echo "__external_dns__" > /opt/config/external_dns.txt
1950
1951             # Download and run install script
1952             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/oof_install.sh -o /opt/oof_install.sh
1953             cd /opt
1954             chmod +x oof_install.sh
1955             ./oof_install.sh
1956
1957
1958   # AAF instantiation
1959   aaf_private_port:
1960     type: OS::Neutron::Port
1961     properties:
1962       network: { get_resource: oam_onap }
1963       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
1964       security_groups:
1965       - { get_resource: onap_sg }
1966
1967   aaf_floating_ip:
1968     type: OS::Neutron::FloatingIP
1969     properties:
1970       floating_network_id: { get_param: public_net_id }
1971       port_id: { get_resource: aaf_private_port }
1972
1973   aaf_vm:
1974     type: OS::Nova::Server
1975     properties:
1976       image: { get_param: ubuntu_1404_image }
1977       flavor: { get_param: flavor_medium }
1978       name:
1979         str_replace:
1980           template: base-aaf
1981           params:
1982             base: { get_param: vm_base_name }
1983       key_name: { get_resource: vm_key }
1984       networks:
1985         - port: { get_resource: aaf_private_port }
1986       user_data_format: RAW
1987       user_data:
1988         str_replace:
1989           params:
1990             __nexus_repo__: { get_param: nexus_repo }
1991             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1992             __nexus_username__: { get_param: nexus_username }
1993             __nexus_password__: { get_param: nexus_password }
1994             __artifacts_version__: { get_param: artifacts_version }
1995             __dns_ip_addr__: { get_param: dns_ip_addr }
1996             __docker_version__: { get_param: aaf_docker }
1997             __cloud_env__: { get_param: cloud_env }
1998             __external_dns__: { get_param: external_dns }
1999           template: |
2000             #!/bin/bash
2001
2002             # Create configuration files
2003             mkdir -p /opt/config
2004             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2005             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2006             echo "__nexus_username__" > /opt/config/nexus_username.txt
2007             echo "__nexus_password__" > /opt/config/nexus_password.txt
2008             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2009             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2010             echo "__docker_version__" > /opt/config/docker_version.txt
2011             echo "__cloud_env__" > /opt/config/cloud_env.txt
2012             echo "__external_dns__" > /opt/config/external_dns.txt
2013
2014             # Download and run install script
2015             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aaf_install.sh -o /opt/aaf_install.sh
2016             cd /opt
2017             chmod +x aaf_install.sh
2018             ./aaf_install.sh
2019
2020   # NBI instantiation
2021   nbi_private_port:
2022     type: OS::Neutron::Port
2023     properties:
2024       network: { get_resource: oam_onap }
2025       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: nbi_ip_addr }}]
2026       security_groups:
2027       - { get_resource: onap_sg }
2028
2029   nbi_floating_ip:
2030     type: OS::Neutron::FloatingIP
2031     properties:
2032       floating_network_id: { get_param: public_net_id }
2033       port_id: { get_resource: nbi_private_port }
2034
2035   nbi_vm:
2036     type: OS::Nova::Server
2037     properties:
2038       image: { get_param: ubuntu_1604_image }
2039       flavor: { get_param: flavor_small }
2040       name:
2041         str_replace:
2042           template: base-nbi
2043           params:
2044             base: { get_param: vm_base_name }
2045       key_name: { get_resource: vm_key }
2046       networks:
2047         - port: { get_resource: nbi_private_port }
2048       user_data_format: RAW
2049       user_data:
2050         str_replace:
2051           params:
2052             __nexus_repo__: { get_param: nexus_repo }
2053             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2054             __nexus_username__: { get_param: nexus_username }
2055             __nexus_password__: { get_param: nexus_password }
2056             __artifacts_version__: { get_param: artifacts_version }
2057             __dns_ip_addr__: { get_param: dns_ip_addr }
2058             __docker_version__: { get_param: nbi_docker }
2059             __cloud_env__: { get_param: cloud_env }
2060             __external_dns__: { get_param: external_dns }
2061           template: |
2062             #!/bin/bash
2063
2064             # Create configuration files
2065             mkdir -p /opt/config
2066             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2067             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2068             echo "__nexus_username__" > /opt/config/nexus_username.txt
2069             echo "__nexus_password__" > /opt/config/nexus_password.txt
2070             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2071             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2072             echo "__docker_version__" > /opt/config/docker_version.txt
2073             echo "__cloud_env__" > /opt/config/cloud_env.txt
2074             echo "__external_dns__" > /opt/config/external_dns.txt
2075
2076             # Download and run install script
2077             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/nbi_install.sh -o /opt/nbi_install.sh
2078             cd /opt
2079             chmod +x nbi_install.sh
2080             ./nbi_install.sh