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