9ac381209d5b3122a5f57f9088be80e8c4bbc7be
[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   use_oam_net_for_robot:
174     type: boolean
175     description: Whether to use oam_network for Robot VNFs or not.  The default is false, which uses public_net_id.  Set to true if the Robot VNFs are unable to bind to the public network (needed by TLAB).
176     default: false
177
178   ### Private IP addresses ###
179   aai1_ip_addr:
180     type: string
181   aai2_ip_addr:
182     type: string
183   appc_ip_addr:
184     type: string
185   dcae_ip_addr:
186     type: string
187   dns_ip_addr:
188     type: string
189   so_ip_addr:
190     type: string
191   mr_ip_addr:
192     type: string
193   policy_ip_addr:
194     type: string
195   portal_ip_addr:
196     type: string
197   robot_ip_addr:
198     type: string
199   sdc_ip_addr:
200     type: string
201   sdnc_ip_addr:
202     type: string
203   vid_ip_addr:
204     type: string
205   clamp_ip_addr:
206     type: string
207   openo_ip_addr:
208     type: string
209   music_ip_addr:
210     type: string
211   oof_ip_addr:
212     type: string
213   aaf_ip_addr:
214     type: string
215   sms_ip_addr:
216     type: string
217   nbi_ip_addr:
218     type: string
219
220   ###########################
221   #                         #
222   # Parameters used by DCAE #
223   #                         #
224   ###########################
225
226   dcae_deployment_profile:
227     type: string
228     description: DCAE deployment profile.  Currently supported profiles R1, R2MVP.
229
230   dnsaas_config_enabled:
231     type: string
232     description: whether the DNSaaS configuration section is enabled
233
234   dnsaas_region:
235     type: string
236     description: the region of the cloud instance providing the Designate DNS as a Service
237
238   dnsaas_keystone_url:
239     type: string
240     description: the keystone URL of the cloud instance providing the Designate DNS as a Service
241
242   dnsaas_username:
243     type: string
244     description: the username of the cloud instance providing the Designate DNS as a Service
245
246   dnsaas_password:
247     type: string
248     description: the password of the cloud instance providing the Designate DNS as a Service
249
250   dnsaas_tenant_name:
251     type: string
252     description: the name of the tenant in the cloud instance providing the Designate DNS as a Service
253
254   dcae_keystone_url:
255     type: string
256     description: the keystone URL for DCAE to use (via MultiCloud)
257
258   dcae_private_key:
259     type: string
260     description: the private key of the key-apir used between the DCAE bootstrap container and DCAE VMs
261
262   dcae_public_key:
263     type: string
264     description: the prublic key of the key-apir used between the DCAE bootstrap container and DCAE VMs
265
266   dcae_centos_7_image:
267     type: string
268     description: the id/name of the CentOS 7 VM imange
269
270   dcae_domain:
271     type: string
272     description: the top level domain to register DCAE VMs (the zone will be random-str.dcae_domain)
273
274   #####################
275   #                   #
276   # ONAP repositories #
277   #                   #
278   #####################
279
280   aai_repo:
281     type: string
282   appc_repo:
283     type: string
284   mr_repo:
285     type: string
286   so_repo:
287     type: string
288   policy_repo:
289     type: string
290   portal_repo:
291     type: string
292   robot_repo:
293     type: string
294   sdc_repo:
295     type: string
296   sdnc_repo:
297     type: string
298   vid_repo:
299     type: string
300   clamp_repo:
301     type: string
302   vnfsdk_repo:
303     type: string
304   music_repo:
305     type: string
306   nbi_repo:
307     type: string
308   aaf_repo:
309     type: string
310   sms_repo:
311     type: string
312   oof_repo:
313     type: string
314
315   ################################
316   #                              #
317   # Docker versions and branches #
318   #                              #
319   ################################
320
321   aai_docker:
322     type: string
323   aai_sparky_docker:
324     type: string
325   appc_docker:
326     type: string
327   so_docker:
328     type: string
329
330   dcae_docker:
331     type: string
332     default: latest
333   dcae_snmptrap_docker:
334     type: string
335     default: latest
336     description: Docker image version for onap/org.dcaegen2.collectors.snmptrap
337   dcae_ves_docker:
338     type: string
339     default: latest
340     description: Docker image version for onap/org.dcaegen2.collectors.ves.vescollector
341   dcae_bootstrap_docker:
342     type: string
343     default: latest
344     description: Docker image version for onap/org.dcaegen2.deployments.bootstrap
345   dcae_cm_docker:
346     type: string
347     default: latest
348     description: Docker image version for onap/org.dcaegen2.deployments.cm-container
349   dcae_k8sbootstrap_docker:
350     type: string
351     default: latest
352     description: Docker image version for onap/org.dcaegen2.deployments.k8s-bootstrap-container
353   dcae_redisc_docker:
354     type: string
355     default: latest
356     description: Docker image version for onap/org.dcaegen2.deployments.redis-cluster-container
357   dcae_tca_docker:
358     type: string
359     default: latest
360     description: Docker image version for onap/org.dcaegen2.deployments.tca-cdap-container
361   dcae_cb_docker:
362     type: string
363     default: latest
364     description: Docker image version for onap/org.dcaegen2.platform.cdapbroker
365   dcae_cbs_docker:
366     type: string
367     default: latest
368     description: Docker image version for onap/org.dcaegen2.platform.configbinding
369   dcae_dh_docker:
370     type: string
371     default: latest
372     description: Docker image version for onap/org.dcaegen2.platform.deployment-handler
373   dcae_inv_docker:
374     type: string
375     default: latest
376     description: Docker image version for onap/org.dcaegen2.platform.inventory-api
377   dcae_ph_docker:
378     type: string
379     default: latest
380     description: Docker image version for onap/org.dcaegen2.platform.deployment-handler
381   dcae_sch_docker:
382     type: string
383     default: latest
384     description: Docker image version for onap/org.dcaegen2.platform.servicechange-handler
385   dcae_heartbeat_docker:
386     type: string
387     default: latest
388     description: Docker image version for onap/org.dcaegen2.services.heartbeat
389   dcae_prh_docker:
390     type: string
391     default: latest
392     description: Docker image version for onap/org.dcaegen2.services.prh.prh-app-server
393   holmes_em_docker:
394     type: string
395     default: latest
396     description: Docker image version for onap/holmes/engine-management
397   holmes_rm_docker:
398     type: string
399     default: latest
400     description: Docker image version for onap/holmes/rule-management
401
402   policy_docker:
403     type: string
404   portal_docker:
405     type: string
406   robot_docker:
407     type: string
408   sdc_docker:
409     type: string
410   sdc_wfd_docker:
411     type: string
412   sdnc_docker:
413     type: string
414   vid_docker:
415     type: string
416   clamp_docker:
417     type: string
418   msb_docker:
419     type: string
420   mvim_docker:
421     type: string
422   mvim_openstack_docker:
423     type: string
424   uui_docker:
425     type: string
426   esr_docker:
427     type: string
428   dgbuilder_docker:
429     type: string
430   cli_docker:
431     type: string
432   music_docker:
433     type: string
434   oof_docker:
435     type: string
436   aaf_docker:
437     type: string
438   sms_docker:
439     type: string
440   nbi_docker:
441     type: string
442   dbcl_docker:
443     type: string
444
445   vfc_nokia_docker:
446     type: string
447   vfc_nokiav2_docker:
448     type: string
449   vfc_ztevnfmdriver_docker:
450     type: string
451   vfc_ztesdncdriver_docker:
452     type: string
453   vfc_vnfres_docker:
454     type: string
455   vfc_vnfmgr_docker:
456     type: string
457   vfc_vnflcm_docker:
458     type: string
459   vfc_resmanagement_docker:
460     type: string
461   vfc_nslcm_docker:
462     type: string
463   vfc_huawei_docker:
464     type: string
465   vfc_jujudriver_docker:
466     type: string
467   vfc_gvnfmdriver_docker:
468     type: string
469   vfc_emsdriver_docker:
470     type: string
471   vfc_catalog_docker:
472     type: string
473   vfc_wfengine_mgrservice_docker:
474     type: string
475   vfc_wfengine_activiti_docker:
476     type: string
477   vfc_multivimproxy_docker:
478     type: string
479
480   aai_branch:
481     type: string
482   appc_branch:
483     type: string
484   so_branch:
485     type: string
486   mr_branch:
487     type: string
488   policy_branch:
489     type: string
490   portal_branch:
491     type: string
492   robot_branch:
493     type: string
494   sdc_branch:
495     type: string
496   sdnc_branch:
497     type: string
498   vid_branch:
499     type: string
500   clamp_branch:
501     type: string
502   vnfsdk_branch:
503     type: string
504   music_branch:
505     type: string
506   nbi_branch:
507     type: string
508   aaf_branch:
509     type: string
510   sms_branch:
511     type: string
512   oof_branch:
513     type: string
514
515 #############
516 #           #
517 # RESOURCES #
518 #           #
519 #############
520
521 resources:
522   random-str:
523     type: OS::Heat::RandomString
524     properties:
525       length: 4
526
527   # Public key used to access ONAP components
528   vm_key:
529     type: OS::Nova::KeyPair
530     properties:
531       name:
532         str_replace:
533           template: base_rand
534           params:
535             base: { get_param: key_name }
536             rand: { get_resource: random-str }
537       public_key: { get_param: pub_key }
538       save_private_key: false
539
540
541   # ONAP security group
542   onap_sg:
543     type: OS::Neutron::SecurityGroup
544     properties:
545       name:
546         str_replace:
547           template: base_rand
548           params:
549             base: onap_sg
550             rand: { get_resource: random-str }
551       description: security group used by ONAP
552       rules:
553         # All egress traffic
554         - direction: egress
555           ethertype: IPv4
556         - direction: egress
557           ethertype: IPv6
558         # ingress traffic
559         # ICMP
560         - protocol: icmp
561         - protocol: udp
562           port_range_min: 1
563           port_range_max: 65535
564         - protocol: tcp
565           port_range_min: 1
566           port_range_max: 65535
567
568
569
570   # ONAP management private network
571   oam_onap:
572     type: OS::Neutron::Net
573     properties:
574       name:
575         str_replace:
576           template: oam_onap_rand
577           params:
578             rand: { get_resource: random-str }
579
580   oam_onap_subnet:
581     type: OS::Neutron::Subnet
582     properties:
583       name:
584         str_replace:
585           template: oam_onap_rand
586           params:
587             rand: { get_resource: random-str }
588       network_id: { get_resource: oam_onap }
589       cidr: { get_param: oam_network_cidr }
590       dns_nameservers: { get_param: dns_list }
591
592   router:
593     type: OS::Neutron::Router
594     properties:
595       external_gateway_info:
596         network: { get_param: public_net_id }
597
598   router_interface:
599     type: OS::Neutron::RouterInterface
600     properties:
601       router_id: { get_resource: router }
602       subnet_id: { get_resource: oam_onap_subnet }
603
604
605   # DNS Server instantiation
606   dns_private_port:
607     type: OS::Neutron::Port
608     properties:
609       network: { get_resource: oam_onap }
610       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
611       security_groups:
612       - { get_resource: onap_sg }
613
614   dns_floating_ip:
615     type: OS::Neutron::FloatingIP
616     properties:
617       floating_network_id: { get_param: public_net_id }
618       port_id: { get_resource: dns_private_port }
619
620   dns_vm:
621     type: OS::Nova::Server
622     properties:
623       image: { get_param: ubuntu_1404_image }
624       flavor: { get_param: flavor_small }
625       name:
626         str_replace:
627           template: base-dns-server
628           params:
629             base: { get_param: vm_base_name }
630       key_name: { get_resource: vm_key }
631       networks:
632         - port: { get_resource: dns_private_port }
633       user_data_format: RAW
634       user_data:
635         str_replace:
636           params:
637             __nexus_repo__: { get_param: nexus_repo }
638             __artifacts_version__: { get_param: artifacts_version }
639             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
640             __dns_ip_addr__: { get_param: dns_ip_addr }
641             __aai1_ip_addr__: { get_param: aai1_ip_addr }
642             __aai2_ip_addr__: { get_param: aai2_ip_addr }
643             __appc_ip_addr__: { get_param: appc_ip_addr }
644             __dcae_ip_addr__: { get_param: dcae_ip_addr }
645             __so_ip_addr__: { get_param: so_ip_addr }
646             __mr_ip_addr__: { get_param: mr_ip_addr }
647             __policy_ip_addr__: { get_param: policy_ip_addr }
648             __portal_ip_addr__: { get_param: portal_ip_addr }
649             __robot_ip_addr__: { get_param: robot_ip_addr }
650             __sdc_ip_addr__: { get_param: sdc_ip_addr }
651             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
652             __vid_ip_addr__: { get_param: vid_ip_addr }
653             __clamp_ip_addr__: { get_param: clamp_ip_addr }
654             __openo_ip_addr__: { get_param: openo_ip_addr }
655             __music_ip_addr__: { get_param: music_ip_addr }
656             __oof_ip_addr__: { get_param: oof_ip_addr }
657             __aaf_ip_addr__: { get_param: aaf_ip_addr }
658             __sms_ip_addr__: { get_param: sms_ip_addr }
659             __nbi_ip_addr__: { get_param: nbi_ip_addr }
660             __cloud_env__: { get_param: cloud_env }
661             __external_dns__: { get_param: external_dns }
662             __dns_forwarder__: { get_param: dns_forwarder }
663           template: |
664             #!/bin/bash
665
666             # Create configuration files
667             mkdir -p /opt/config
668             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
669             echo "__cloud_env__" > /opt/config/cloud_env.txt
670             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
671             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
672             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
673             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
674             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
675             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
676             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
677             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
678             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
679             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
680             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
681             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
682             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
683             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
684             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
685             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
686             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
687             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
688             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
689             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
690             echo "__sms_ip_addr__" > /opt/config/sms_ip_addr.txt
691             echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
692             echo "__external_dns__" > /opt/config/external_dns.txt
693             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
694
695             # Download and run install script
696             apt-get -y install unzip
697             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
698             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
699             unzip -j /opt/boot-__artifacts_version__.zip -d /opt dns_install.sh
700             cd /opt
701             chmod +x dns_install.sh
702             ./dns_install.sh
703
704
705   # A&AI instantiation (2 VMs)
706   aai1_private_port:
707     type: OS::Neutron::Port
708     properties:
709       network: { get_resource: oam_onap }
710       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
711       security_groups:
712       - { get_resource: onap_sg }
713
714   aai1_floating_ip:
715     type: OS::Neutron::FloatingIP
716     properties:
717       floating_network_id: { get_param: public_net_id }
718       port_id: { get_resource: aai1_private_port }
719
720   aai1_vm:
721     type: OS::Nova::Server
722     depends_on: aai2_vm
723     properties:
724       image: { get_param: ubuntu_1404_image }
725       flavor: { get_param: flavor_xlarge }
726       name:
727         str_replace:
728           template: base-aai-inst1
729           params:
730             base: { get_param: vm_base_name }
731       key_name: { get_resource: vm_key }
732       networks:
733         - port: { get_resource: aai1_private_port }
734       user_data_format: RAW
735       user_data:
736         str_replace:
737           params:
738             __nexus_repo__: { get_param: nexus_repo }
739             __nexus_docker_repo__: { get_param: nexus_docker_repo }
740             __nexus_username__: { get_param: nexus_username }
741             __nexus_password__: { get_param: nexus_password }
742             __dmaap_topic__: { get_param: dmaap_topic }
743             __artifacts_version__: { get_param: artifacts_version }
744             __dns_ip_addr__: { get_param: dns_ip_addr }
745             __docker_version__: { get_param: aai_docker }
746             __aai_sparky_docker__ : { get_param: aai_sparky_docker }
747             __gerrit_branch__: { get_param: aai_branch }
748             __cloud_env__: { get_param: cloud_env }
749             __external_dns__: { get_param: external_dns }
750             __aai_repo__: { get_param: aai_repo }
751           template: |
752             #!/bin/bash
753
754             # Create configuration files
755             mkdir -p /opt/config
756             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
757             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
758             echo "__nexus_username__" > /opt/config/nexus_username.txt
759             echo "__nexus_password__" > /opt/config/nexus_password.txt
760             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
761             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
762             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
763             echo "__docker_version__" > /opt/config/docker_version.txt
764             echo "__aai_sparky_docker__" > /opt/config/sparky_version.txt
765             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
766             echo "aai_instance_1" > /opt/config/aai_instance.txt
767             echo "__cloud_env__" > /opt/config/cloud_env.txt
768             echo "__external_dns__" > /opt/config/external_dns.txt
769             echo "__aai_repo__" > /opt/config/remote_repo.txt
770
771             # Download and run install script
772             apt-get -y install unzip
773             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
774             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
775             unzip -j /opt/boot-__artifacts_version__.zip -d /opt aai_install.sh
776             cd /opt
777             chmod +x aai_install.sh
778             ./aai_install.sh
779
780
781   aai2_private_port:
782     type: OS::Neutron::Port
783     properties:
784       network: { get_resource: oam_onap }
785       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
786       security_groups:
787       - { get_resource: onap_sg }
788
789   aai2_floating_ip:
790     type: OS::Neutron::FloatingIP
791     properties:
792       floating_network_id: { get_param: public_net_id }
793       port_id: { get_resource: aai2_private_port }
794
795   aai2_vm:
796     type: OS::Nova::Server
797     properties:
798       image: { get_param: ubuntu_1404_image }
799       flavor: { get_param: flavor_xlarge }
800       name:
801         str_replace:
802           template: base-aai-inst2
803           params:
804             base: { get_param: vm_base_name }
805       key_name: { get_resource: vm_key }
806       networks:
807         - port: { get_resource: aai2_private_port }
808       user_data_format: RAW
809       user_data:
810         str_replace:
811           params:
812             __nexus_repo__: { get_param: nexus_repo }
813             __nexus_docker_repo__: { get_param: nexus_docker_repo }
814             __nexus_username__: { get_param: nexus_username }
815             __nexus_password__: { get_param: nexus_password }
816             __dmaap_topic__: { get_param: dmaap_topic }
817             __artifacts_version__: { get_param: artifacts_version }
818             __dns_ip_addr__: { get_param: dns_ip_addr }
819             __docker_version__: { get_param: aai_docker }
820             __gerrit_branch__: { get_param: aai_branch }
821             __cloud_env__: { get_param: cloud_env }
822             __external_dns__: { get_param: external_dns }
823             __aai_repo__: { get_param: aai_repo }
824           template: |
825             #!/bin/bash
826
827             # Create configuration files
828             mkdir -p /opt/config
829             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
830             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
831             echo "__nexus_username__" > /opt/config/nexus_username.txt
832             echo "__nexus_password__" > /opt/config/nexus_password.txt
833             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
834             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
835             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
836             echo "__docker_version__" > /opt/config/docker_version.txt
837             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
838             echo "aai_instance_2" > /opt/config/aai_instance.txt
839             echo "__cloud_env__" > /opt/config/cloud_env.txt
840             echo "__external_dns__" > /opt/config/external_dns.txt
841             echo "__aai_repo__" > /opt/config/remote_repo.txt
842
843             # Download and run install script
844             apt-get -y install unzip
845             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
846             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
847             unzip -j /opt/boot-__artifacts_version__.zip -d /opt aai_install.sh
848             cd /opt
849             chmod +x aai_install.sh
850             ./aai_install.sh
851
852
853   # SO instantiation
854   so_private_port:
855     type: OS::Neutron::Port
856     properties:
857       network: { get_resource: oam_onap }
858       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: so_ip_addr }}]
859       security_groups:
860       - { get_resource: onap_sg }
861
862   so_floating_ip:
863     type: OS::Neutron::FloatingIP
864     properties:
865       floating_network_id: { get_param: public_net_id }
866       port_id: { get_resource: so_private_port }
867
868   so_vm:
869     type: OS::Nova::Server
870     properties:
871       image: { get_param: ubuntu_1604_image }
872       flavor: { get_param: flavor_large }
873       name:
874         str_replace:
875           template: base-so
876           params:
877             base: { get_param: vm_base_name }
878       key_name: { get_resource: vm_key }
879       networks:
880         - port: { get_resource: so_private_port }
881       user_data_format: RAW
882       user_data:
883         str_replace:
884           params:
885             __nexus_repo__: { get_param: nexus_repo }
886             __nexus_docker_repo__: { get_param: nexus_docker_repo }
887             __nexus_username__: { get_param: nexus_username }
888             __nexus_password__: { get_param: nexus_password }
889             __openstack_username__: { get_param: openstack_username }
890             __openstack_tenant_id__: { get_param: openstack_tenant_id }
891             __openstack_api_key__: { get_param: openstack_api_key }
892             __openstack_region__: { get_param: openstack_region }
893             __keystone_url__: { get_param: keystone_url }
894             __dmaap_topic__: { get_param: dmaap_topic }
895             __artifacts_version__: { get_param: artifacts_version }
896             __dns_ip_addr__: { get_param: dns_ip_addr }
897             __openo_ip__: { get_param: openo_ip_addr }
898             __docker_version__: { get_param: so_docker }
899             __gerrit_branch__: { get_param: so_branch }
900             __cloud_env__: { get_param: cloud_env }
901             __external_dns__: { get_param: external_dns }
902             __so_repo__: { get_param: so_repo }
903           template: |
904             #!/bin/bash
905
906             # Create configuration files
907             mkdir -p /opt/config
908             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
909             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
910             echo "__nexus_username__" > /opt/config/nexus_username.txt
911             echo "__nexus_password__" > /opt/config/nexus_password.txt
912             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
913             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
914             echo "__openo_ip__" > /opt/config/openo_ip.txt
915             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
916             echo "__openstack_username__" > /opt/config/openstack_username.txt
917             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
918             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
919             echo "__openstack_region__" > /opt/config/openstack_region.txt
920             echo "__keystone_url__" > /opt/config/keystone.txt
921             echo "__docker_version__" > /opt/config/docker_version.txt
922             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
923             echo "__cloud_env__" > /opt/config/cloud_env.txt
924             echo "__external_dns__" > /opt/config/external_dns.txt
925             echo "__so_repo__" > /opt/config/remote_repo.txt
926
927             # Download and run install script
928             apt-get -y install unzip
929             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
930             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
931             unzip -j /opt/boot-__artifacts_version__.zip -d /opt so_install.sh
932             cd /opt
933             chmod +x so_install.sh
934             ./so_install.sh
935
936
937   # Message Router instantiation
938   mrouter_private_port:
939     type: OS::Neutron::Port
940     properties:
941       network: { get_resource: oam_onap }
942       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
943       security_groups:
944       - { get_resource: onap_sg }
945
946   mrouter_floating_ip:
947     type: OS::Neutron::FloatingIP
948     properties:
949       floating_network_id: { get_param: public_net_id }
950       port_id: { get_resource: mrouter_private_port }
951
952   mrouter_vm:
953     type: OS::Nova::Server
954     properties:
955       image: { get_param: ubuntu_1404_image }
956       flavor: { get_param: flavor_large }
957       name:
958         str_replace:
959           template: base-message-router
960           params:
961             base: { get_param: vm_base_name }
962       key_name: { get_resource: vm_key }
963       networks:
964         - port: { get_resource: mrouter_private_port }
965       user_data_format: RAW
966       user_data:
967         str_replace:
968           params:
969             __nexus_repo__: { get_param: nexus_repo }
970             __nexus_docker_repo__: { get_param: nexus_docker_repo }
971             __nexus_username__: { get_param: nexus_username }
972             __nexus_password__: { get_param: nexus_password }
973             __artifacts_version__: { get_param: artifacts_version }
974             __dns_ip_addr__: { get_param: dns_ip_addr }
975             __gerrit_branch__: { get_param: mr_branch }
976             __cloud_env__: { get_param: cloud_env }
977             __external_dns__: { get_param: external_dns }
978             __mr_repo__: { get_param: mr_repo }
979             __dbcl_docker__: { get_param: dbcl_docker }
980           template: |
981             #!/bin/bash
982
983             # Create configuration files
984             mkdir -p /opt/config
985             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
986             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
987             echo "__nexus_username__" > /opt/config/nexus_username.txt
988             echo "__nexus_password__" > /opt/config/nexus_password.txt
989             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
990             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
991             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
992             echo "__cloud_env__" > /opt/config/cloud_env.txt
993             echo "__external_dns__" > /opt/config/external_dns.txt
994             echo "__mr_repo__" > /opt/config/remote_repo.txt
995             echo "__dbcl_docker__" > /opt/config/docker_version.txt
996
997             # Download and run install script
998             apt-get -y install unzip
999             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1000             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1001             unzip -j /opt/boot-__artifacts_version__.zip -d /opt mr_install.sh
1002             cd /opt
1003             chmod +x mr_install.sh
1004             ./mr_install.sh
1005
1006
1007   # Robot Framework instantiation
1008   robot_private_port:
1009     type: OS::Neutron::Port
1010     properties:
1011       network: { get_resource: oam_onap }
1012       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
1013       security_groups:
1014       - { get_resource: onap_sg }
1015
1016   robot_floating_ip:
1017     type: OS::Neutron::FloatingIP
1018     properties:
1019       floating_network_id: { get_param: public_net_id }
1020       port_id: { get_resource: robot_private_port }
1021
1022   robot_vm:
1023     type: OS::Nova::Server
1024     properties:
1025       image: { get_param: ubuntu_1604_image }
1026       flavor: { get_param: flavor_medium }
1027       name:
1028         str_replace:
1029           template: base-robot
1030           params:
1031             base: { get_param: vm_base_name }
1032       key_name: { get_resource: vm_key }
1033       networks:
1034         - port: { get_resource: robot_private_port }
1035       user_data_format: RAW
1036       user_data:
1037         str_replace:
1038           params:
1039             __nexus_repo__: { get_param: nexus_repo }
1040             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1041             __nexus_username__: { get_param: nexus_username }
1042             __nexus_password__: { get_param: nexus_password }
1043             __network_name__: { get_attr: [oam_onap, name] }
1044             __openstack_username__: { get_param: openstack_username }
1045             __openstack_api_key__: { get_param : openstack_api_key }
1046             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1047             __artifacts_version__: { get_param: artifacts_version }
1048             __openstack_region__: { get_param: openstack_region }
1049             __dns_ip_addr__: { get_param: dns_ip_addr }
1050             __gerrit_branch__: { get_param: robot_branch }
1051             __cloud_env__: { get_param: cloud_env }
1052             __keystone_url__: { get_param: keystone_url }
1053             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1054             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1055             __appc_ip_addr__: { get_param: appc_ip_addr }
1056             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1057             __dcae_collector_ip__: { get_param: dcae_ip_addr }
1058             __so_ip_addr__: { get_param: so_ip_addr }
1059             __mr_ip_addr__: { get_param: mr_ip_addr }
1060             __policy_ip_addr__: { get_param: policy_ip_addr }
1061             __portal_ip_addr__: { get_param: portal_ip_addr }
1062             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1063             __sdc_fe_ip_addr__: { get_param: sdc_ip_addr }
1064             __sdc_be_ip_addr__: { get_param: sdc_ip_addr }
1065             __sdc_be_onboard_ip_addr__: { get_param: sdc_ip_addr }
1066             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1067             __vid_ip_addr__: { get_param: vid_ip_addr }
1068             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1069             __openo_ip_addr__: { get_param: openo_ip_addr }
1070             __music_ip_addr__: { get_param: music_ip_addr }
1071             __oof_ip_addr__: { get_param: oof_ip_addr }
1072             __aaf_ip_addr__: { get_param: aaf_ip_addr }
1073             __nbi_ip_addr__: { get_param: nbi_ip_addr }
1074             __external_dns__: { get_param: external_dns }
1075             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1076             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1077             __vm_image_name__: { get_param: ubuntu_1404_image }
1078             __vm_flavor__: { get_param: flavor_medium }
1079             __public_net_id__: { get_param: public_net_id }
1080             __oam_network_id__: { get_resource: oam_onap }
1081             __script_version__: { get_param: artifacts_version }
1082             __robot_repo__: { get_param: robot_repo }
1083             __docker_version__: { get_param: robot_docker }
1084             __vnf_pub_key__: { get_param: pub_key }
1085             __use_oam_net_for_robot__: { get_param: use_oam_net_for_robot }
1086           template: |
1087             #!/bin/bash
1088
1089             # Create configuration files
1090             mkdir -p /opt/config
1091             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1092             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1093             echo "__nexus_username__" > /opt/config/nexus_username.txt
1094             echo "__nexus_password__" > /opt/config/nexus_password.txt
1095             echo "__network_name__" > /opt/config/network.txt
1096             echo "__openstack_username__" > /opt/config/openstack_username.txt
1097             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
1098             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
1099             echo "__openstack_region__" > /opt/config/region.txt
1100             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1101             echo "__docker_version__" > /opt/config/docker_version.txt
1102             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1103             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1104             echo "__keystone_url__" > /opt/config/keystone.txt
1105             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
1106             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
1107             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
1108             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1109             echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
1110             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
1111             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1112             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1113             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
1114             echo "__portal_ip_addr__" > /opt/config/cli_ip_addr.txt
1115             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1116             echo "__sdc_fe_ip_addr__" > /opt/config/sdc_fe_ip_addr.txt
1117             echo "__sdc_be_ip_addr__" > /opt/config/sdc_be_ip_addr.txt
1118             echo "__sdc_be_onboard_ip_addr__" > /opt/config/sdc_be_onboard_ip_addr.txt
1119             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
1120             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
1121             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
1122             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
1123             echo "__openo_ip_addr__" > /opt/config/vnfsdk_ip_addr.txt
1124             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
1125             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
1126             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
1127             echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
1128             echo "__cloud_env__" > /opt/config/cloud_env.txt
1129             echo "__external_dns__" > /opt/config/external_dns.txt
1130             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
1131             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1132             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1133             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
1134             echo "__script_version__" > /opt/config/script_version.txt
1135             if [ "__use_oam_net_for_robot__" != "False" ] && [ "__use_oam_net_for_robot__" != "false" ]; then
1136               echo "__oam_network_id__" > /opt/config/public_net_id.txt
1137             else
1138               echo "__public_net_id__" > /opt/config/public_net_id.txt
1139             fi
1140             echo "__oam_network_id__" > /opt/config/oam_network_id.txt
1141             echo "__use_oam_net_for_robot__" > /opt/config/use_oam_net_for_robot.txt
1142             echo "__vnf_pub_key__" > /opt/config/vnf_pub_key.txt
1143             echo "__robot_repo__" > /opt/config/remote_repo.txt
1144             echo "localhost" > /opt/config/log_elasticsearch_ip_addr.txt # these tests will be skipped by robot
1145             echo "localhost" > /opt/config/log_logstash_ip_addr.txt # these tests will be skipped by robot
1146             echo "localhost" > /opt/config/log_kibana_ip_addr.txt # these tests will be skipped by robot
1147
1148             # Download and run install script
1149             apt-get -y install unzip
1150             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1151             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1152             unzip -j /opt/boot-__artifacts_version__.zip -d /opt robot_install.sh
1153             cd /opt
1154             chmod +x robot_install.sh
1155             ./robot_install.sh
1156
1157
1158   # VID instantiation
1159   vid_private_port:
1160     type: OS::Neutron::Port
1161     properties:
1162       network: { get_resource: oam_onap }
1163       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
1164       security_groups:
1165       - { get_resource: onap_sg }
1166
1167   vid_floating_ip:
1168     type: OS::Neutron::FloatingIP
1169     properties:
1170       floating_network_id: { get_param: public_net_id }
1171       port_id: { get_resource: vid_private_port }
1172
1173   vid_vm:
1174     type: OS::Nova::Server
1175     properties:
1176       image: { get_param: ubuntu_1404_image }
1177       flavor: { get_param: flavor_medium }
1178       name:
1179         str_replace:
1180           template: base-vid
1181           params:
1182             base: { get_param: vm_base_name }
1183       key_name: { get_resource: vm_key }
1184       networks:
1185         - port: { get_resource: vid_private_port }
1186       user_data_format: RAW
1187       user_data:
1188         str_replace:
1189           params:
1190             __nexus_repo__: { get_param: nexus_repo }
1191             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1192             __nexus_username__: { get_param: nexus_username }
1193             __nexus_password__: { get_param: nexus_password }
1194             __artifacts_version__: { get_param: artifacts_version }
1195             __dns_ip_addr__: { get_param: dns_ip_addr }
1196             __docker_version__: { get_param: vid_docker }
1197             __gerrit_branch__: { get_param: vid_branch }
1198             __cloud_env__: { get_param: cloud_env }
1199             __external_dns__: { get_param: external_dns }
1200             __vid_repo__: { get_param: vid_repo }
1201           template: |
1202             #!/bin/bash
1203
1204             # Create configuration files
1205             mkdir -p /opt/config
1206             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1207             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1208             echo "__nexus_username__" > /opt/config/nexus_username.txt
1209             echo "__nexus_password__" > /opt/config/nexus_password.txt
1210             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1211             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1212             echo "__docker_version__" > /opt/config/docker_version.txt
1213             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1214             echo "__cloud_env__" > /opt/config/cloud_env.txt
1215             echo "__external_dns__" > /opt/config/external_dns.txt
1216             echo "__vid_repo__" > /opt/config/remote_repo.txt
1217
1218             # Download and run install script
1219             apt-get -y install unzip
1220             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1221             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1222             unzip -j /opt/boot-__artifacts_version__.zip -d /opt vid_install.sh
1223             cd /opt
1224             chmod +x vid_install.sh
1225             ./vid_install.sh
1226
1227
1228   # SDN-C instantiation
1229   sdnc_private_port:
1230     type: OS::Neutron::Port
1231     properties:
1232       network: { get_resource: oam_onap }
1233       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
1234       security_groups:
1235       - { get_resource: onap_sg }
1236
1237   sdnc_floating_ip:
1238     type: OS::Neutron::FloatingIP
1239     properties:
1240       floating_network_id: { get_param: public_net_id }
1241       port_id: { get_resource: sdnc_private_port }
1242
1243   sdnc_vm:
1244     type: OS::Nova::Server
1245     properties:
1246       image: { get_param: ubuntu_1404_image }
1247       flavor: { get_param: flavor_large }
1248       name:
1249         str_replace:
1250           template: base-sdnc
1251           params:
1252             base: { get_param: vm_base_name }
1253       key_name: { get_resource: vm_key }
1254       networks:
1255         - port: { get_resource: sdnc_private_port }
1256       user_data_format: RAW
1257       user_data:
1258         str_replace:
1259           params:
1260             __nexus_repo__: { get_param: nexus_repo }
1261             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1262             __nexus_username__: { get_param: nexus_username }
1263             __nexus_password__: { get_param: nexus_password }
1264             __artifacts_version__: { get_param: artifacts_version }
1265             __dns_ip_addr__: { get_param: dns_ip_addr }
1266             __docker_version__: { get_param: sdnc_docker }
1267             __gerrit_branch__: { get_param: sdnc_branch }
1268             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1269             __cloud_env__: { get_param: cloud_env }
1270             __external_dns__: { get_param: external_dns }
1271             __sdnc_repo__: { get_param: sdnc_repo }
1272           template: |
1273             #!/bin/bash
1274
1275             # Create configuration files
1276             mkdir -p /opt/config
1277             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1278             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1279             echo "__nexus_username__" > /opt/config/nexus_username.txt
1280             echo "__nexus_password__" > /opt/config/nexus_password.txt
1281             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1282             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1283             echo "__docker_version__" > /opt/config/docker_version.txt
1284             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1285             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1286             echo "__cloud_env__" > /opt/config/cloud_env.txt
1287             echo "__external_dns__" > /opt/config/external_dns.txt
1288             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1289
1290             # Download and run install script
1291             apt-get -y install unzip
1292             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1293             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1294             unzip -j /opt/boot-__artifacts_version__.zip -d /opt sdnc_install.sh
1295             cd /opt
1296             chmod +x sdnc_install.sh
1297             ./sdnc_install.sh
1298
1299
1300   # SDC instantiation
1301   sdc_private_port:
1302     type: OS::Neutron::Port
1303     properties:
1304       network: { get_resource: oam_onap }
1305       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1306       security_groups:
1307       - { get_resource: onap_sg }
1308
1309   sdc_floating_ip:
1310     type: OS::Neutron::FloatingIP
1311     properties:
1312       floating_network_id: { get_param: public_net_id }
1313       port_id: { get_resource: sdc_private_port }
1314
1315   sdc_volume_data:
1316     type: OS::Cinder::Volume
1317     properties:
1318       name: vol1-sdc-data
1319       size: 100
1320
1321   sdc_vm:
1322     type: OS::Nova::Server
1323     properties:
1324       image: { get_param: ubuntu_1604_image }
1325       flavor: { get_param: flavor_xlarge }
1326       name:
1327         str_replace:
1328           template: base-sdc
1329           params:
1330             base: { get_param: vm_base_name }
1331       key_name: { get_resource: vm_key }
1332       networks:
1333         - port: { get_resource: sdc_private_port }
1334       block_device_mapping:
1335         - device_name: /dev/vdb
1336           volume_id: {get_resource: sdc_volume_data}
1337       user_data_format: RAW
1338       user_data:
1339         str_replace:
1340           params:
1341             __nexus_repo__: { get_param: nexus_repo }
1342             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1343             __nexus_username__: { get_param: nexus_username }
1344             __nexus_password__: { get_param: nexus_password }
1345             __env_name__: { get_param: dmaap_topic }
1346             __artifacts_version__: { get_param: artifacts_version }
1347             __dns_ip_addr__: { get_param: dns_ip_addr }
1348             __mr_ip_addr__: { get_param: mr_ip_addr }
1349             __private_ip__: { get_param: sdc_ip_addr }
1350             __docker_version__: { get_param: sdc_docker }
1351             __sdc_wfd_docker__: { get_param: sdc_wfd_docker }
1352             __gerrit_branch__: { get_param: sdc_branch }
1353             __cloud_env__: { get_param: cloud_env }
1354             __external_dns__: { get_param: external_dns }
1355             __sdc_repo__: { get_param: sdc_repo }
1356           template: |
1357             #!/bin/bash
1358
1359             # Create configuration files
1360             mkdir -p /opt/config
1361             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1362             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1363             echo "__nexus_username__" > /opt/config/nexus_username.txt
1364             echo "__nexus_password__" > /opt/config/nexus_password.txt
1365             echo "__env_name__" > /opt/config/env_name.txt
1366             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1367             echo "__private_ip__" > /opt/config/private_ip.txt
1368             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1369             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1370             echo "__docker_version__" > /opt/config/docker_version.txt
1371             echo "__sdc_wfd_docker__" > /opt/config/sdc_wfd_docker.txt
1372             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1373             echo "__cloud_env__" > /opt/config/cloud_env.txt
1374             echo "__external_dns__" > /opt/config/external_dns.txt
1375             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1376
1377             # Download and run install script
1378             apt-get -y install unzip
1379             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1380             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1381             unzip -j /opt/boot-__artifacts_version__.zip -d /opt sdc_install.sh
1382             cd /opt
1383             chmod +x sdc_install.sh
1384             ./sdc_install.sh
1385
1386
1387   # PORTAL instantiation
1388   portal_private_port:
1389     type: OS::Neutron::Port
1390     properties:
1391       network: { get_resource: oam_onap }
1392       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1393       security_groups:
1394       - { get_resource: onap_sg }
1395
1396   portal_floating_ip:
1397     type: OS::Neutron::FloatingIP
1398     properties:
1399       floating_network_id: { get_param: public_net_id }
1400       port_id: { get_resource: portal_private_port }
1401
1402   portal_vm:
1403     type: OS::Nova::Server
1404     properties:
1405       image: { get_param: ubuntu_1404_image }
1406       flavor: { get_param: flavor_large }
1407       name:
1408         str_replace:
1409           template: base-portal
1410           params:
1411             base: { get_param: vm_base_name }
1412       key_name: { get_resource: vm_key }
1413       networks:
1414         - port: { get_resource: portal_private_port }
1415       user_data_format: RAW
1416       user_data:
1417         str_replace:
1418           params:
1419             __nexus_repo__: { get_param: nexus_repo }
1420             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1421             __nexus_username__: { get_param: nexus_username }
1422             __nexus_password__: { get_param: nexus_password }
1423             __artifacts_version__: { get_param: artifacts_version }
1424             __dns_ip_addr__: { get_param: dns_ip_addr }
1425             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1426             __docker_version__: { get_param: portal_docker }
1427             __gerrit_branch__: { get_param: portal_branch }
1428             __cli_docker__: { get_param: cli_docker }
1429             __cloud_env__: { get_param: cloud_env }
1430             __external_dns__: { get_param: external_dns }
1431             __portal_repo__: { get_param: portal_repo }
1432           template: |
1433             #!/bin/bash
1434
1435             # Create configuration files
1436             mkdir -p /opt/config
1437             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1438             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1439             echo "__nexus_username__" > /opt/config/nexus_username.txt
1440             echo "__nexus_password__" > /opt/config/nexus_password.txt
1441             echo "__public_ip__" > /opt/config/public_ip.txt
1442             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1443             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1444             echo "__docker_version__" > /opt/config/docker_version.txt
1445             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1446             echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1447             echo "__cloud_env__" > /opt/config/cloud_env.txt
1448             echo "__external_dns__" > /opt/config/external_dns.txt
1449             echo "__portal_repo__" > /opt/config/remote_repo.txt
1450
1451             # Download and run install script
1452             apt-get -y install unzip
1453             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1454             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1455             unzip -j /opt/boot-__artifacts_version__.zip -d /opt portal_install.sh
1456             cd /opt
1457             chmod +x portal_install.sh
1458             ./portal_install.sh
1459
1460
1461   # Policy Engine instantiation
1462   policy_private_port:
1463     type: OS::Neutron::Port
1464     properties:
1465       network: { get_resource: oam_onap }
1466       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1467       security_groups:
1468       - { get_resource: onap_sg }
1469
1470   policy_floating_ip:
1471     type: OS::Neutron::FloatingIP
1472     properties:
1473       floating_network_id: { get_param: public_net_id }
1474       port_id: { get_resource: policy_private_port }
1475
1476   policy_vm:
1477     type: OS::Nova::Server
1478     properties:
1479       image: { get_param: ubuntu_1404_image }
1480       flavor: { get_param: flavor_xlarge }
1481       name:
1482         str_replace:
1483           template: base-policy
1484           params:
1485             base: { get_param: vm_base_name }
1486       key_name: { get_resource: vm_key }
1487       networks:
1488         - port: { get_resource: policy_private_port }
1489       user_data_format: RAW
1490       user_data:
1491         str_replace:
1492           params:
1493             __nexus_repo__: { get_param: nexus_repo }
1494             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1495             __nexus_username__: { get_param: nexus_username }
1496             __nexus_password__: { get_param: nexus_password }
1497             __artifacts_version__: { get_param: artifacts_version }
1498             __dns_ip_addr__: { get_param: dns_ip_addr }
1499             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1500             __docker_version__: { get_param: policy_docker }
1501             __gerrit_branch__: { get_param: policy_branch }
1502             __cloud_env__: { get_param: cloud_env }
1503             __external_dns__: { get_param: external_dns }
1504             __policy_repo__: { get_param: policy_repo }
1505           template: |
1506             #!/bin/bash
1507
1508             # Create configuration files
1509             mkdir -p /opt/config
1510             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1511             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1512             echo "__nexus_username__" > /opt/config/nexus_username.txt
1513             echo "__nexus_password__" > /opt/config/nexus_password.txt
1514             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1515             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1516             echo "__public_ip__" > /opt/config/public_ip.txt
1517             echo "__docker_version__" > /opt/config/docker_version.txt
1518             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1519             echo "__cloud_env__" > /opt/config/cloud_env.txt
1520             echo "__external_dns__" > /opt/config/external_dns.txt
1521             echo "__policy_repo__" > /opt/config/remote_repo.txt
1522
1523             # Download and run install script
1524             apt-get -y install unzip
1525             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1526             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1527             unzip -j /opt/boot-__artifacts_version__.zip -d /opt policy_install.sh
1528             cd /opt
1529             chmod +x policy_install.sh
1530             ./policy_install.sh
1531
1532
1533   # APP-C instantiation
1534   appc_private_port:
1535     type: OS::Neutron::Port
1536     properties:
1537       network: { get_resource: oam_onap }
1538       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1539       security_groups:
1540       - { get_resource: onap_sg }
1541
1542   appc_floating_ip:
1543     type: OS::Neutron::FloatingIP
1544     properties:
1545       floating_network_id: { get_param: public_net_id }
1546       port_id: { get_resource: appc_private_port }
1547
1548   appc_vm:
1549     type: OS::Nova::Server
1550     properties:
1551       image: { get_param: ubuntu_1404_image }
1552       flavor: { get_param: flavor_large }
1553       name:
1554         str_replace:
1555           template: base-appc
1556           params:
1557             base: { get_param: vm_base_name }
1558       key_name: { get_resource: vm_key }
1559       networks:
1560         - port: { get_resource: appc_private_port }
1561       user_data_format: RAW
1562       user_data:
1563         str_replace:
1564           params:
1565             __nexus_repo__: { get_param: nexus_repo }
1566             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1567             __nexus_username__: { get_param: nexus_username }
1568             __nexus_password__: { get_param: nexus_password }
1569             __dmaap_topic__: { get_param: dmaap_topic }
1570             __artifacts_version__: { get_param: artifacts_version }
1571             __dns_ip_addr__: { get_param: dns_ip_addr }
1572             __docker_version__: { get_param: appc_docker }
1573             __gerrit_branch__: { get_param: appc_branch }
1574             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1575             __cloud_env__: { get_param: cloud_env }
1576             __external_dns__: { get_param: external_dns }
1577             __appc_repo__: { get_param: appc_repo }
1578           template: |
1579             #!/bin/bash
1580
1581             # Create configuration files
1582             mkdir -p /opt/config
1583             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1584             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1585             echo "__nexus_username__" > /opt/config/nexus_username.txt
1586             echo "__nexus_password__" > /opt/config/nexus_password.txt
1587             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1588             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1589             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1590             echo "__docker_version__" > /opt/config/docker_version.txt
1591             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1592             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1593             echo "__cloud_env__" > /opt/config/cloud_env.txt
1594             echo "__external_dns__" > /opt/config/external_dns.txt
1595             echo "__appc_repo__" > /opt/config/remote_repo.txt
1596
1597             # Download and run install script
1598             apt-get -y install unzip
1599             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1600             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1601             unzip -j /opt/boot-__artifacts_version__.zip -d /opt appc_install.sh
1602             cd /opt
1603             chmod +x appc_install.sh
1604             ./appc_install.sh
1605
1606
1607   # CLAMP instantiation
1608   clamp_private_port:
1609     type: OS::Neutron::Port
1610     properties:
1611       network: { get_resource: oam_onap }
1612       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1613       security_groups:
1614       - { get_resource: onap_sg }
1615
1616   clamp_floating_ip:
1617     type: OS::Neutron::FloatingIP
1618     properties:
1619       floating_network_id: { get_param: public_net_id }
1620       port_id: { get_resource: clamp_private_port }
1621
1622   clamp_vm:
1623     type: OS::Nova::Server
1624     properties:
1625       image: { get_param: ubuntu_1604_image }
1626       flavor: { get_param: flavor_medium }
1627       name:
1628         str_replace:
1629           template: base-clamp
1630           params:
1631             base: { get_param: vm_base_name }
1632       key_name: { get_resource: vm_key }
1633       networks:
1634         - port: { get_resource: clamp_private_port }
1635       user_data_format: RAW
1636       user_data:
1637         str_replace:
1638           params:
1639             __nexus_repo__: { get_param: nexus_repo }
1640             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1641             __nexus_username__: { get_param: nexus_username }
1642             __nexus_password__: { get_param: nexus_password }
1643             __openstack_username__: { get_param: openstack_username }
1644             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1645             __openstack_api_key__: { get_param: openstack_api_key }
1646             __openstack_region__: { get_param: openstack_region }
1647             __keystone_url__: { get_param: keystone_url }
1648             __dmaap_topic__: { get_param: dmaap_topic }
1649             __artifacts_version__: { get_param: artifacts_version }
1650             __dns_ip_addr__: { get_param: dns_ip_addr }
1651             __docker_version__: { get_param: clamp_docker }
1652             __gerrit_branch__: { get_param: clamp_branch }
1653             __cloud_env__: { get_param: cloud_env }
1654             __external_dns__: { get_param: external_dns }
1655             __clamp_repo__: { get_param: clamp_repo }
1656           template: |
1657             #!/bin/bash
1658
1659             # Create configuration files
1660             mkdir -p /opt/config
1661             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1662             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1663             echo "__nexus_username__" > /opt/config/nexus_username.txt
1664             echo "__nexus_password__" > /opt/config/nexus_password.txt
1665             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1666             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1667             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1668             echo "__openstack_username__" > /opt/config/openstack_username.txt
1669             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1670             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1671             echo "__openstack_region__" > /opt/config/openstack_region.txt
1672             echo "__keystone_url__" > /opt/config/keystone.txt
1673             echo "__docker_version__" > /opt/config/docker_version.txt
1674             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1675             echo "__cloud_env__" > /opt/config/cloud_env.txt
1676             echo "__external_dns__" > /opt/config/external_dns.txt
1677             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1678
1679             # Download and run install script
1680             apt-get -y install unzip
1681             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1682             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1683             unzip -j /opt/boot-__artifacts_version__.zip -d /opt clamp_install.sh
1684             cd /opt
1685             chmod +x clamp_install.sh
1686             ./clamp_install.sh
1687
1688
1689   # OPEN-O VM instantiation
1690   openo_private_port:
1691     type: OS::Neutron::Port
1692     properties:
1693       network: { get_resource: oam_onap }
1694       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1695       security_groups:
1696       - { get_resource: onap_sg }
1697
1698   openo_floating_ip:
1699     type: OS::Neutron::FloatingIP
1700     properties:
1701       floating_network_id: { get_param: public_net_id }
1702       port_id: { get_resource: openo_private_port }
1703
1704   openo_vm:
1705     type: OS::Nova::Server
1706     properties:
1707       image: { get_param: ubuntu_1604_image }
1708       flavor: { get_param: flavor_xlarge }
1709       name:
1710         str_replace:
1711           template: base-multi-service
1712           params:
1713             base: { get_param: vm_base_name }
1714       key_name: { get_resource: vm_key }
1715       networks:
1716         - port: { get_resource: openo_private_port }
1717       user_data_format: RAW
1718       user_data:
1719         str_replace:
1720           params:
1721             __nexus_repo__: { get_param: nexus_repo }
1722             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1723             __nexus_username__: { get_param: nexus_username }
1724             __nexus_password__: { get_param: nexus_password }
1725             __artifacts_version__: { get_param: artifacts_version }
1726             __dns_ip_addr__: { get_param: dns_ip_addr }
1727             __oam_network_cidr__: { get_param: oam_network_cidr }
1728             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1729             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1730             __appc_ip_addr__: { get_param: appc_ip_addr }
1731             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1732             __so_ip_addr__: { get_param: so_ip_addr }
1733             __mr_ip_addr__: { get_param: mr_ip_addr }
1734             __policy_ip_addr__: { get_param: policy_ip_addr }
1735             __portal_ip_addr__: { get_param: portal_ip_addr }
1736             __robot_ip_addr__: { get_param: robot_ip_addr }
1737             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1738             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1739             __vid_ip_addr__: { get_param: vid_ip_addr }
1740             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1741             __openo_ip_addr__: { get_param: openo_ip_addr }
1742             __cloud_env__: { get_param: cloud_env }
1743             __external_dns__: { get_param: external_dns }
1744             __vnfsdk_branch__: { get_param: vnfsdk_branch }
1745             __msb_docker__: { get_param: msb_docker }
1746             __mvim_docker__: { get_param: mvim_docker }
1747             __mvim_openstack_docker__: { get_param: mvim_openstack_docker }
1748             __uui_docker__: { get_param: uui_docker }
1749             __esr_docker__: { get_param: esr_docker }
1750             __vnfsdk_repo__: { get_param: vnfsdk_repo }
1751             __vfc_nokia_docker__: { get_param: vfc_nokia_docker }
1752             __vfc_nokiav2_docker__: { get_param: vfc_nokiav2_docker }
1753             __vfc_ztevnfmdriver_docker__: { get_param: vfc_ztevnfmdriver_docker }
1754             __vfc_multivimproxy_docker__: { get_param: vfc_multivimproxy_docker }
1755             __vfc_ztesdncdriver_docker__: { get_param: vfc_ztesdncdriver_docker }
1756             __vfc_vnfres_docker__: { get_param: vfc_vnfres_docker }
1757             __vfc_vnfmgr_docker__: { get_param: vfc_vnfmgr_docker }
1758             __vfc_vnflcm_docker__: { get_param: vfc_vnflcm_docker }
1759             __vfc_resmanagement_docker__: { get_param: vfc_resmanagement_docker }
1760             __vfc_nslcm_docker__: { get_param: vfc_nslcm_docker }
1761             __vfc_huawei_docker__: { get_param: vfc_huawei_docker }
1762             __vfc_jujudriver_docker__: { get_param: vfc_jujudriver_docker }
1763             __vfc_gvnfmdriver_docker__: { get_param: vfc_gvnfmdriver_docker }
1764             __vfc_emsdriver_docker__: { get_param: vfc_emsdriver_docker }
1765             __vfc_catalog_docker__: { get_param: vfc_catalog_docker }
1766             __vfc_wfengine_mgrservice_docker__: { get_param: vfc_wfengine_mgrservice_docker }
1767             __vfc_wfengine_activiti_docker__: { get_param: vfc_wfengine_activiti_docker }
1768           template: |
1769             #!/bin/bash
1770
1771             # Create configuration files
1772             mkdir -p /opt/config
1773             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1774             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1775             echo "__nexus_username__" > /opt/config/nexus_username.txt
1776             echo "__nexus_password__" > /opt/config/nexus_password.txt
1777             echo "__cloud_env__" > /opt/config/cloud_env.txt
1778             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1779             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1780             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1781             echo "__external_dns__" > /opt/config/external_dns.txt
1782             echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
1783             echo "__msb_docker__" > /opt/config/msb_docker.txt
1784             echo "__mvim_docker__" > /opt/config/mvim_docker.txt
1785             echo "__mvim_openstack_docker__" > /opt/config/mvim_openstack_docker.txt
1786             echo "__uui_docker__" > /opt/config/uui_docker.txt
1787             echo "__esr_docker__" > /opt/config/esr_docker.txt
1788             echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
1789
1790             echo "export NOKIA_DOCKER_VER=__vfc_nokia_docker__" >> /opt/config/vfc_docker.txt
1791             echo "export NOKIAV2_DOCKER_VER=__vfc_nokiav2_docker__" >> /opt/config/vfc_docker.txt
1792             echo "export MULTIVIMPROXY_DOCKER_VER=__vfc_multivimproxy_docker__" >> /opt/config/vfc_docker.txt
1793             echo "export ZTEVNFMDRIVER_DOCKER_VER=__vfc_ztevnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1794             echo "export ZTESDNCDRIVER_DOCKER_VER=__vfc_ztesdncdriver_docker__" >> /opt/config/vfc_docker.txt
1795             echo "export VNFRES_DOCKER_VER=__vfc_vnfres_docker__" >> /opt/config/vfc_docker.txt
1796             echo "export VNFMGR_DOCKER_VER=__vfc_vnfmgr_docker__" >> /opt/config/vfc_docker.txt
1797             echo "export VNFLCM_DOCKER_VER=__vfc_vnflcm_docker__" >> /opt/config/vfc_docker.txt
1798             echo "export RESMANAGEMENT_DOCKER_VER=__vfc_resmanagement_docker__" >> /opt/config/vfc_docker.txt
1799             echo "export NSLCM_DOCKER_VER=__vfc_nslcm_docker__" >> /opt/config/vfc_docker.txt
1800             echo "export HUAWEI_DOCKER_VER=__vfc_huawei_docker__" >> /opt/config/vfc_docker.txt
1801             echo "export JUJUDRIVER_DOCKER_VER=__vfc_jujudriver_docker__" >> /opt/config/vfc_docker.txt
1802             echo "export GVNFMDRIVER_DOCKER_VER=__vfc_gvnfmdriver_docker__" >> /opt/config/vfc_docker.txt
1803             echo "export EMSDRIVER_DOCKER_VER=__vfc_emsdriver_docker__" >> /opt/config/vfc_docker.txt
1804             echo "export CATALOG_DOCKER_VER=__vfc_catalog_docker__" >> /opt/config/vfc_docker.txt
1805             echo "export MGRSERVICE_DOCKER_VER=__vfc_wfengine_mgrservice_docker__" >> /opt/config/vfc_docker.txt
1806             echo "export ACTIVITI_DOCKER_VER=__vfc_wfengine_activiti_docker__" >> /opt/config/vfc_docker.txt
1807
1808             # Create env file with the IP address of all ONAP components
1809             echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
1810             echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
1811             echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
1812             echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
1813             echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
1814             echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
1815             echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
1816             echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
1817             echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
1818             echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
1819             echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
1820             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
1821             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
1822             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
1823
1824             # Download and run install script
1825             apt-get -y install unzip
1826             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1827             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
1828             unzip -j /opt/boot-__artifacts_version__.zip -d /opt openo_install.sh
1829             cd /opt
1830             chmod +x openo_install.sh
1831             ./openo_install.sh
1832
1833
1834   # DCAE GEN 2 Controller instantiation
1835   dcae_c_private_port:
1836     type: OS::Neutron::Port
1837     properties:
1838       network: { get_resource: oam_onap }
1839       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1840       security_groups:
1841       - { get_resource: onap_sg }
1842
1843   dcae_c_floating_ip:
1844     type: OS::Neutron::FloatingIP
1845     properties:
1846       floating_network_id: { get_param: public_net_id }
1847       port_id: { get_resource: dcae_c_private_port }
1848
1849   dcae_c_vm:
1850     type: OS::Nova::Server
1851     properties:
1852       image: { get_param: ubuntu_1604_image }
1853       flavor: { get_param: flavor_xlarge }
1854       name:
1855         str_replace:
1856           template: base-dcae
1857           params:
1858             base: { get_param: vm_base_name }
1859       key_name: { get_resource: vm_key }
1860       networks:
1861         - port: { get_resource: dcae_c_private_port }
1862       #security_groups:
1863       #  - { get_resource: onap_sg }
1864       user_data_format: RAW
1865       user_data:
1866         str_replace:
1867           params:
1868             __rand_str__: { get_resource: random-str }
1869             # repo related
1870             __artifacts_version__: { get_param: artifacts_version }
1871             __docker_version__: { get_param: dcae_docker }
1872             __nexus_repo__: { get_param: nexus_repo }
1873             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1874             __nexus_username__: { get_param: nexus_username }
1875             __nexus_password__: { get_param: nexus_password }
1876             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1877             __dcae_deployment_profile__: { get_param: dcae_deployment_profile }
1878             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
1879             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1880             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1881             __dns_ip_addr__: { get_param: dns_ip_addr }
1882             __external_dns__: { get_param: external_dns }
1883             __dns_forwarder__: { get_param: dns_forwarder }
1884             __dcae_domain__: { get_param: dcae_domain }
1885             # conf for VMs DCAE is to bringup
1886             __openstack_keystone_url__: { get_param: keystone_url }
1887             __dcae_keystone_url__: { get_param: dcae_keystone_url }
1888             __dcaeos_cloud_env__: { get_param: cloud_env }
1889             __dcaeos_keystone_url__: { get_param: dcae_keystone_url }
1890             __dcaeos_region__: { get_param: openstack_region }
1891             __dcaeos_tenant_id__: { get_param: openstack_tenant_id }
1892             __dcaeos_tenant_name__: { get_param: openstack_tenant_name }
1893             __dcaeos_security_group__:
1894               str_replace:
1895                 template: 'onap_sg_rand'
1896                 params:
1897                   rand: { get_resource: random-str }
1898             #__dcaeos_security_group__: { get_attr: [onap_sg, name] }
1899             __dcaeos_username__: { get_param: openstack_username }
1900             __dcaeos_password__: { get_param: openstack_api_key }
1901             __dcaeos_key_name__: { get_resource: vm_key }
1902             __dcaeos_public_key__: { get_param: dcae_public_key }
1903             __dcaeos_private_key__: { get_param: dcae_private_key }
1904             __dcaeos_private_network_name__: { get_attr: [oam_onap, name] }
1905             __dcaeos_public_network_name__: { get_param: public_net_name }
1906             __dcaeos_ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1907             __dcaeos_centos_7_image__: { get_param: dcae_centos_7_image }
1908             __dcaeos_flavor_id__: { get_param: flavor_medium }
1909             __dcaeos_flavor_id_cdap__: { get_param: flavor_large }
1910             __dcaeos_dnsaas_config_enabled__: { get_param: dnsaas_config_enabled }
1911             __dcaeos_dnsaas_region__: { get_param: dnsaas_region }
1912             __dcaeos_dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
1913             __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
1914             __dcaeos_dnsaas_username__: { get_param: dnsaas_username }
1915             __dcaeos_dnsaas_password__: { get_param: dnsaas_password }
1916             # fixed private IPs
1917             __mr_ip_addr__: { get_param: mr_ip_addr }
1918             __policy_ip_addr__: { get_param: policy_ip_addr }
1919             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1920             __openo_ip_addr__: { get_param: openo_ip_addr }
1921             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1922             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1923             # floating IPs
1924             __dns_floating_ip_addr__: { get_attr: [dns_floating_ip, floating_ip_address] }
1925             __aai1_floating_ip_addr__: { get_attr: [aai1_floating_ip, floating_ip_address] }
1926             __aai2_floating_ip_addr__: { get_attr: [aai2_floating_ip, floating_ip_address] }
1927             __mrouter_floating_ip_addr__: { get_attr: [mrouter_floating_ip, floating_ip_address] }
1928             __sdc_floating_ip_addr__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1929             __policy_floating_ip_addr__: { get_attr: [policy_floating_ip, floating_ip_address] }
1930             __openo_floating_ip_addr__: { get_attr: [openo_floating_ip, floating_ip_address] }
1931             __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1932             # container versions
1933             __dcae_docker__:  { get_param: dcae_docker }
1934             __dcae_snmptrap_docker__:  { get_param: dcae_snmptrap_docker }
1935             __dcae_ves_docker__:  { get_param: dcae_ves_docker }
1936             __dcae_bootstrap_docker__:  { get_param: dcae_bootstrap_docker }
1937             __dcae_cm_docker__:  { get_param: dcae_cm_docker }
1938             __dcae_k8sbootstrap_docker__:  { get_param: dcae_k8sbootstrap_docker }
1939             __dcae_redisc_docker__:  { get_param: dcae_redisc_docker }
1940             __dcae_tca_docker__:  { get_param: dcae_tca_docker }
1941             __dcae_cb_docker__:  { get_param: dcae_cb_docker }
1942             __dcae_cbs_docker__:  { get_param: dcae_cbs_docker }
1943             __dcae_dh_docker__:  { get_param: dcae_dh_docker }
1944             __dcae_inv_docker__:  { get_param: dcae_inv_docker }
1945             __dcae_ph_docker__:  { get_param: dcae_ph_docker }
1946             __dcae_sch_docker__:  { get_param: dcae_sch_docker }
1947             __dcae_heartbeat_docker__:  { get_param: dcae_heartbeat_docker }
1948             __dcae_prh_docker__:  { get_param: dcae_prh_docker }
1949             __holmes_em_docker__:  { get_param: holmes_em_docker }
1950             __holmes_rm_docker__:  { get_param: holmes_rm_docker }
1951
1952
1953           template: |
1954             #!/bin/bash
1955
1956             # Create configuration files
1957             mkdir -p /opt/config
1958             echo "__rand_str__" > /opt/config/dcae_zone.txt
1959             echo "__rand_str__" > /opt/config/rand_str.txt
1960             # repo related
1961             echo "__docker_version__" > /opt/config/docker_version.txt
1962             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1963             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1964             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1965             echo "__nexus_username__" > /opt/config/nexus_username.txt
1966             echo "__nexus_password__" > /opt/config/nexus_password.txt
1967             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1968             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
1969             echo "__dcae_deployment_profile__" > /opt/config/dcae_deployment_profile.txt
1970             echo "__mac_addr__" > /opt/config/mac_addr.txt
1971             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1972             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1973             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1974             echo "__external_dns__" > /opt/config/external_dns.txt
1975             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
1976             echo "__dcae_domain__" > /opt/config/dcae_domain.txt
1977             # conf for the OpenStack env where DCAE is deployed
1978             echo "__openstack_keystone_url__" > /opt/config/openstack_keystone_url.txt
1979             echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
1980             echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
1981             echo "__dcaeos_region__" > /opt/config/openstack_region.txt
1982             echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
1983             echo "__dcaeos_tenant_name__" > /opt/config/tenant_name.txt
1984             echo "__dcaeos_username__" > /opt/config/openstack_user.txt
1985             echo "__dcaeos_password__" > /opt/config/openstack_password.txt
1986             echo "__dcaeos_key_name__" > /opt/config/key_name.txt
1987             echo "__dcaeos_public_key__" > /opt/config/pub_key.txt
1988             echo "__dcaeos_private_key__" > /opt/config/priv_key
1989             echo "__dcaeos_private_network_name__" > /opt/config/openstack_private_network_name.txt
1990             echo "__dcaeos_public_network_name__" > /opt/config/public_net_name.txt
1991             echo "__dcaeos_public_network_name__" > /opt/config/public_net_id.txt
1992             echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1993             echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
1994             echo "__dcaeos_security_group__" > /opt/config/security_group.txt
1995             echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
1996             echo "__dcaeos_flavor_id_cdap__" > /opt/config/flavor_id_cdap.txt
1997             echo "__dcaeos_dnsaas_config_enabled__" > /opt/config/dnsaas_config_enabled.txt
1998             echo "__dcaeos_dnsaas_region__" > /opt/config/dnsaas_region.txt
1999             echo "__dcaeos_dnsaas_keystone_url__" > /opt/config/dnsaas_keystone_url.txt
2000             echo "__dnsaas_tenant_name__" > /opt/config/dnsaas_tenant_name.txt
2001             echo "__dcaeos_dnsaas_username__" > /opt/config/dnsaas_username.txt
2002             echo "__dcaeos_dnsaas_password__" > /opt/config/dnsaas_password.txt
2003             # fixed private IP addresses of other ONAP components
2004             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
2005             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
2006             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
2007             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
2008             echo "__openo_ip_addr__" > /opt/config/msb_ip_addr.txt
2009             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
2010             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
2011             # floating IPs
2012             echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
2013             echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
2014             echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
2015             echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
2016             echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
2017             echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
2018             echo "__openo_floating_ip_addr__" > /opt/config/openo_floating_ip_addr.txt
2019             echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
2020             # container versions
2021             echo "__dcae_docker__" > /opt/config/dcae_docker.txt
2022             echo "__dcae_snmptrap_docker__" > /opt/config/dcae_docker_snmptrap.txt
2023             echo "__dcae_ves_docker__" > /opt/config/dcae_docker_ves.txt
2024             echo "__dcae_bootstrap_docker__" > /opt/config/dcae_docker_bootstrap.txt
2025             echo "__dcae_cm_docker__" > /opt/config/dcae_docker_cm.txt
2026             echo "__dcae_k8sbootstrap_docker__" > /opt/config/dcae_docker_k8sbootstrap.txt
2027             echo "__dcae_redisc_docker__" > /opt/config/dcae_docker_redisc.txt
2028             echo "__dcae_tca_docker__" > /opt/config/dcae_docker_tca.txt
2029             echo "__dcae_cb_docker__" > /opt/config/dcae_docker_cb.txt
2030             echo "__dcae_cbs_docker__" > /opt/config/dcae_docker_cbs.txt
2031             echo "__dcae_dh_docker__" > /opt/config/dcae_docker_dh.txt
2032             echo "__dcae_inv_docker__" > /opt/config/dcae_docker_inv.txt
2033             echo "__dcae_ph_docker__" > /opt/config/dcae_docker_ph.txt
2034             echo "__dcae_sch_docker__" > /opt/config/dcae_docker_sch.txt
2035             echo "__dcae_heartbeat_docker__" > /opt/config/dcae_docker_heartbeat.txt
2036             echo "__dcae_prh_docker__" > /opt/config/dcae_docker_prh.txt
2037             echo "__holmes_em_docker__" > /opt/config/holmes_docker_em.txt
2038             echo "__holmes_rm_docker__" > /opt/config/holmes_docker_rm.txt
2039
2040             # Download and run install script
2041             apt-get -y install unzip
2042             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2043             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
2044             unzip -j /opt/boot-__artifacts_version__.zip -d /opt dcae2_install.sh
2045             cd /opt
2046             chmod +x dcae2_install.sh
2047             ./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
2048
2049
2050   # MUSIC instantiation
2051   music_private_port:
2052     type: OS::Neutron::Port
2053     properties:
2054       network: { get_resource: oam_onap }
2055       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
2056       security_groups:
2057       - { get_resource: onap_sg }
2058
2059   music_floating_ip:
2060     type: OS::Neutron::FloatingIP
2061     properties:
2062       floating_network_id: { get_param: public_net_id }
2063       port_id: { get_resource: music_private_port }
2064
2065   music_vm:
2066     type: OS::Nova::Server
2067     properties:
2068       image: { get_param: ubuntu_1404_image }
2069       flavor: { get_param: flavor_large }
2070       name:
2071         str_replace:
2072           template: base-music
2073           params:
2074             base: { get_param: vm_base_name }
2075       key_name: { get_resource: vm_key }
2076       networks:
2077         - port: { get_resource: music_private_port }
2078       user_data_format: RAW
2079       user_data:
2080         str_replace:
2081           params:
2082             __nexus_repo__: { get_param: nexus_repo }
2083             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2084             __nexus_username__: { get_param: nexus_username }
2085             __nexus_password__: { get_param: nexus_password }
2086             __artifacts_version__: { get_param: artifacts_version }
2087             __dns_ip_addr__: { get_param: dns_ip_addr }
2088             __docker_version__: { get_param: music_docker }
2089             __music_repo__: { get_param: music_repo }
2090             __gerrit_branch__: { get_param: music_branch }
2091             __cloud_env__: { get_param: cloud_env }
2092             __external_dns__: { get_param: external_dns }
2093           template: |
2094             #!/bin/bash
2095
2096             # Create configuration files
2097             mkdir -p /opt/config
2098             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2099             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2100             echo "__nexus_username__" > /opt/config/nexus_username.txt
2101             echo "__nexus_password__" > /opt/config/nexus_password.txt
2102             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2103             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2104             echo "__docker_version__" > /opt/config/docker_version.txt
2105             echo "__music_repo__" > /opt/config/remote_repo.txt
2106             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2107             echo "__cloud_env__" > /opt/config/cloud_env.txt
2108             echo "__external_dns__" > /opt/config/external_dns.txt
2109
2110             # Download and run install script
2111             apt-get -y install unzip
2112             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2113             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
2114             unzip -j /opt/boot-__artifacts_version__.zip -d /opt music_install.sh
2115             cd /opt
2116             chmod +x music_install.sh
2117             ./music_install.sh
2118
2119
2120   # OOF instantiation
2121   oof_private_port:
2122     type: OS::Neutron::Port
2123     properties:
2124       network: { get_resource: oam_onap }
2125       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
2126       security_groups:
2127       - { get_resource: onap_sg }
2128
2129   oof_floating_ip:
2130     type: OS::Neutron::FloatingIP
2131     properties:
2132       floating_network_id: { get_param: public_net_id }
2133       port_id: { get_resource: oof_private_port }
2134
2135   oof_vm:
2136     type: OS::Nova::Server
2137     properties:
2138       image: { get_param: ubuntu_1604_image }
2139       flavor: { get_param: flavor_large }
2140       name:
2141         str_replace:
2142           template: base-oof
2143           params:
2144             base: { get_param: vm_base_name }
2145       key_name: { get_resource: vm_key }
2146       networks:
2147         - port: { get_resource: oof_private_port }
2148       user_data_format: RAW
2149       user_data:
2150         str_replace:
2151           params:
2152             __nexus_repo__: { get_param: nexus_repo }
2153             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2154             __nexus_username__: { get_param: nexus_username }
2155             __nexus_password__: { get_param: nexus_password }
2156             __artifacts_version__: { get_param: artifacts_version }
2157             __dns_ip_addr__: { get_param: dns_ip_addr }
2158             __docker_version__: { get_param: oof_docker }
2159             __oof_repo__: { get_param: oof_repo }
2160             __gerrit_branch__: { get_param: oof_branch }
2161             __cloud_env__: { get_param: cloud_env }
2162             __external_dns__: { get_param: external_dns }
2163           template: |
2164             #!/bin/bash
2165
2166             # Create configuration files
2167             mkdir -p /opt/config
2168             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2169             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2170             echo "__nexus_username__" > /opt/config/nexus_username.txt
2171             echo "__nexus_password__" > /opt/config/nexus_password.txt
2172             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2173             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2174             echo "__docker_version__" > /opt/config/docker_version.txt
2175             echo "__oof_repo__" > /opt/config/remote_repo.txt
2176             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2177             echo "__cloud_env__" > /opt/config/cloud_env.txt
2178             echo "__external_dns__" > /opt/config/external_dns.txt
2179
2180             # Download and run install script
2181             apt-get -y install unzip
2182             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2183             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
2184             unzip -j /opt/boot-__artifacts_version__.zip -d /opt oof_install.sh
2185             cd /opt
2186             chmod +x oof_install.sh
2187             ./oof_install.sh
2188
2189
2190   # AAF instantiation
2191   aaf_private_port:
2192     type: OS::Neutron::Port
2193     properties:
2194       network: { get_resource: oam_onap }
2195       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
2196       security_groups:
2197       - { get_resource: onap_sg }
2198
2199   aaf_floating_ip:
2200     type: OS::Neutron::FloatingIP
2201     properties:
2202       floating_network_id: { get_param: public_net_id }
2203       port_id: { get_resource: aaf_private_port }
2204
2205   aaf_vm:
2206     type: OS::Nova::Server
2207     properties:
2208       image: { get_param: ubuntu_1604_image }
2209       flavor: { get_param: flavor_medium }
2210       name:
2211         str_replace:
2212           template: base-aaf
2213           params:
2214             base: { get_param: vm_base_name }
2215       key_name: { get_resource: vm_key }
2216       networks:
2217         - port: { get_resource: aaf_private_port }
2218       user_data_format: RAW
2219       user_data:
2220         str_replace:
2221           params:
2222             __nexus_repo__: { get_param: nexus_repo }
2223             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2224             __nexus_username__: { get_param: nexus_username }
2225             __nexus_password__: { get_param: nexus_password }
2226             __artifacts_version__: { get_param: artifacts_version }
2227             __dns_ip_addr__: { get_param: dns_ip_addr }
2228             __docker_version__: { get_param: aaf_docker }
2229             __cloud_env__: { get_param: cloud_env }
2230             __external_dns__: { get_param: external_dns }
2231             __aaf_repo__: { get_param: aaf_repo }
2232             __gerrit_branch__: { get_param: aaf_branch }
2233             __local_ip__: { get_param: aaf_ip_addr }
2234           template: |
2235             #!/bin/bash
2236
2237             # Create configuration files
2238             mkdir -p /opt/config
2239             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2240             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2241             echo "__nexus_username__" > /opt/config/nexus_username.txt
2242             echo "__nexus_password__" > /opt/config/nexus_password.txt
2243             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2244             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2245             echo "__docker_version__" > /opt/config/docker_version.txt
2246             echo "__cloud_env__" > /opt/config/cloud_env.txt
2247             echo "__external_dns__" > /opt/config/external_dns.txt
2248             echo "__aaf_repo__" > /opt/config/remote_repo.txt
2249             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2250             echo "__local_ip__" > /opt/config/local_ip.txt
2251
2252             # Download and run install script
2253             apt-get -y install unzip
2254             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2255             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
2256             unzip -j /opt/boot-__artifacts_version__.zip -d /opt aaf_install.sh
2257             cd /opt
2258             chmod +x aaf_install.sh
2259             ./aaf_install.sh
2260
2261   # SMS instantiation
2262   sms_private_port:
2263     type: OS::Neutron::Port
2264     properties:
2265       network: { get_resource: oam_onap }
2266       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sms_ip_addr }}]
2267       security_groups:
2268       - { get_resource: onap_sg }
2269
2270   sms_floating_ip:
2271     type: OS::Neutron::FloatingIP
2272     properties:
2273       floating_network_id: { get_param: public_net_id }
2274       port_id: { get_resource: sms_private_port }
2275
2276   sms_vm:
2277     type: OS::Nova::Server
2278     properties:
2279       image: { get_param: ubuntu_1604_image }
2280       flavor: { get_param: flavor_medium }
2281       name:
2282         str_replace:
2283           template: base-sms
2284           params:
2285             base: { get_param: vm_base_name }
2286       key_name: { get_resource: vm_key }
2287       networks:
2288         - port: { get_resource: sms_private_port }
2289       user_data_format: RAW
2290       user_data:
2291         str_replace:
2292           params:
2293             __nexus_repo__: { get_param: nexus_repo }
2294             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2295             __nexus_username__: { get_param: nexus_username }
2296             __nexus_password__: { get_param: nexus_password }
2297             __artifacts_version__: { get_param: artifacts_version }
2298             __dns_ip_addr__: { get_param: dns_ip_addr }
2299             __docker_version__: { get_param: sms_docker }
2300             __cloud_env__: { get_param: cloud_env }
2301             __external_dns__: { get_param: external_dns }
2302             __sms_repo__: { get_param: sms_repo }
2303             __gerrit_branch__: { get_param: sms_branch }
2304             __local_ip__: { get_param: sms_ip_addr }
2305           template: |
2306             #!/bin/bash
2307
2308             # Create configuration files
2309             mkdir -p /opt/config
2310             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2311             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2312             echo "__nexus_username__" > /opt/config/nexus_username.txt
2313             echo "__nexus_password__" > /opt/config/nexus_password.txt
2314             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2315             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2316             echo "__docker_version__" > /opt/config/docker_version.txt
2317             echo "__cloud_env__" > /opt/config/cloud_env.txt
2318             echo "__external_dns__" > /opt/config/external_dns.txt
2319             echo "__sms_repo__" > /opt/config/remote_repo.txt
2320             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2321             echo "__local_ip__" > /opt/config/local_ip.txt
2322
2323             # Download and run install script
2324             apt-get -y install unzip
2325             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2326             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
2327             unzip -j /opt/boot-__artifacts_version__.zip -d /opt sms_install.sh
2328             cd /opt
2329             chmod +x sms_install.sh
2330             ./sms_install.sh
2331
2332   # NBI instantiation
2333   nbi_private_port:
2334     type: OS::Neutron::Port
2335     properties:
2336       network: { get_resource: oam_onap }
2337       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: nbi_ip_addr }}]
2338       security_groups:
2339       - { get_resource: onap_sg }
2340
2341   nbi_floating_ip:
2342     type: OS::Neutron::FloatingIP
2343     properties:
2344       floating_network_id: { get_param: public_net_id }
2345       port_id: { get_resource: nbi_private_port }
2346
2347   nbi_vm:
2348     type: OS::Nova::Server
2349     properties:
2350       image: { get_param: ubuntu_1604_image }
2351       flavor: { get_param: flavor_small }
2352       name:
2353         str_replace:
2354           template: base-nbi
2355           params:
2356             base: { get_param: vm_base_name }
2357       key_name: { get_resource: vm_key }
2358       networks:
2359         - port: { get_resource: nbi_private_port }
2360       user_data_format: RAW
2361       user_data:
2362         str_replace:
2363           params:
2364             __nexus_repo__: { get_param: nexus_repo }
2365             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2366             __nexus_username__: { get_param: nexus_username }
2367             __nexus_password__: { get_param: nexus_password }
2368             __artifacts_version__: { get_param: artifacts_version }
2369             __dns_ip_addr__: { get_param: dns_ip_addr }
2370             __docker_version__: { get_param: nbi_docker }
2371             __nbi_repo__: { get_param: nbi_repo }
2372             __gerrit_branch__: { get_param: nbi_branch }
2373             __cloud_env__: { get_param: cloud_env }
2374             __external_dns__: { get_param: external_dns }
2375             __sdc_ip_addr__: { get_param: sdc_ip_addr }
2376             __aai1_ip_addr__: { get_param: aai1_ip_addr }
2377             __so_ip_addr__: { get_param: so_ip_addr }
2378           template: |
2379             #!/bin/bash
2380
2381             # Create configuration files
2382             mkdir -p /opt/config
2383             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
2384             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2385             echo "__nexus_username__" > /opt/config/nexus_username.txt
2386             echo "__nexus_password__" > /opt/config/nexus_password.txt
2387             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2388             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2389             echo "__docker_version__" > /opt/config/docker_version.txt
2390             echo "__nbi_repo__" > /opt/config/remote_repo.txt
2391             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2392             echo "__cloud_env__" > /opt/config/cloud_env.txt
2393             echo "__external_dns__" > /opt/config/external_dns.txt
2394             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
2395             echo "__aai1_ip_addr__" > /opt/config/aai_ip_addr.txt
2396             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
2397
2398             # Download and run install script
2399             apt-get -y install unzip
2400             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2401             curl -k -L "https://nexus.onap.org/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
2402             unzip -j /opt/boot-__artifacts_version__.zip -d /opt nbi_install.sh
2403             cd /opt
2404             chmod +x nbi_install.sh
2405             ./nbi_install.sh