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