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