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