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