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