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