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