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