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