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