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