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