Incorporate changes from OOM robot resources
[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 "__policy_ip_addr__" > /opt/config/policy_healthcheck_ip_addr.txt
1210             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
1211             echo "__portal_ip_addr__" > /opt/config/cli_ip_addr.txt
1212             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1213             echo "__sdc_fe_ip_addr__" > /opt/config/sdc_fe_ip_addr.txt
1214             echo "__sdc_be_ip_addr__" > /opt/config/sdc_be_ip_addr.txt
1215             echo "__sdc_be_onboard_ip_addr__" > /opt/config/sdc_be_onboard_ip_addr.txt
1216             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
1217             echo "__sdnc_ip_addr__" > /opt/config/sdnc_portal_ip_addr.txt
1218             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
1219             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
1220             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
1221             echo "__openo_ip_addr__" > /opt/config/vnfsdk_ip_addr.txt
1222             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
1223             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
1224             echo "__oof_ip_addr__" > /opt/config/oof_homing_ip_addr.txt
1225             echo "__oof_ip_addr__" > /opt/config/oof_sniro_ip_addr.txt
1226             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
1227             echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
1228             echo "__cloud_env__" > /opt/config/cloud_env.txt
1229             echo "__external_dns__" > /opt/config/external_dns.txt
1230             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
1231             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1232             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1233             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
1234             echo "__script_version__" > /opt/config/script_version.txt
1235             if [ "__use_oam_net_for_robot__" != "False" ] && [ "__use_oam_net_for_robot__" != "false" ]; then
1236               echo "__oam_network_id__" > /opt/config/public_net_id.txt
1237             else
1238               echo "__public_net_id__" > /opt/config/public_net_id.txt
1239             fi
1240             echo "__oam_network_id__" > /opt/config/oam_network_id.txt
1241             echo "__use_oam_net_for_robot__" > /opt/config/use_oam_net_for_robot.txt
1242             echo "__vnf_pub_key__" > /opt/config/vnf_pub_key.txt
1243             echo "__robot_repo__" > /opt/config/remote_repo.txt
1244             echo "localhost" > /opt/config/log_elasticsearch_ip_addr.txt # these tests will be skipped by robot
1245             echo "localhost" > /opt/config/log_logstash_ip_addr.txt # these tests will be skipped by robot
1246             echo "localhost" > /opt/config/log_kibana_ip_addr.txt # these tests will be skipped by robot
1247             echo "__http_proxy__" > /opt/config/http_proxy.txt
1248             echo "__https_proxy__" > /opt/config/https_proxy.txt
1249             if [ __http_proxy__ != "no_proxy" ]
1250             then
1251             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1252             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1253             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1254             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1255             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1256             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1257
1258             # Download and run install script
1259             export http_proxy=__http_proxy__
1260             export https_proxy=__https_proxy__
1261             fi
1262             apt-get -y install unzip
1263             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1264             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
1265             unzip -j /opt/boot-__artifacts_version__.zip -d /opt robot_install.sh
1266             cd /opt
1267             chmod +x robot_install.sh
1268             ./robot_install.sh
1269
1270
1271   # VID instantiation
1272   vid_private_port:
1273     type: OS::Neutron::Port
1274     properties:
1275       network: { get_resource: oam_onap }
1276       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
1277       security_groups:
1278       - { get_resource: onap_sg }
1279
1280   vid_floating_ip:
1281     type: OS::Neutron::FloatingIP
1282     properties:
1283       floating_network_id: { get_param: public_net_id }
1284       port_id: { get_resource: vid_private_port }
1285
1286   vid_vm:
1287     type: OS::Nova::Server
1288     properties:
1289       image: { get_param: ubuntu_1404_image }
1290       flavor: { get_param: flavor_medium }
1291       name:
1292         str_replace:
1293           template: base-vid
1294           params:
1295             base: { get_param: vm_base_name }
1296       key_name: { get_resource: vm_key }
1297       networks:
1298         - port: { get_resource: vid_private_port }
1299       user_data_format: RAW
1300       user_data:
1301         str_replace:
1302           params:
1303             __http_proxy__: { get_param: http_proxy }
1304             __https_proxy__: { get_param: https_proxy }
1305             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1306             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1307             __nexus_username__: { get_param: nexus_username }
1308             __nexus_password__: { get_param: nexus_password }
1309             __artifacts_version__: { get_param: artifacts_version }
1310             __dns_ip_addr__: { get_param: dns_ip_addr }
1311             __docker_version__: { get_param: vid_docker }
1312             __gerrit_branch__: { get_param: vid_branch }
1313             __cloud_env__: { get_param: cloud_env }
1314             __external_dns__: { get_param: external_dns }
1315             __vid_repo__: { get_param: vid_repo }
1316           template: |
1317             #!/bin/bash
1318
1319             # Create configuration files
1320             mkdir -p /opt/config
1321             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1322             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1323             echo "__nexus_username__" > /opt/config/nexus_username.txt
1324             echo "__nexus_password__" > /opt/config/nexus_password.txt
1325             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1326             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1327             echo "__docker_version__" > /opt/config/docker_version.txt
1328             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1329             echo "__cloud_env__" > /opt/config/cloud_env.txt
1330             echo "__external_dns__" > /opt/config/external_dns.txt
1331             echo "__vid_repo__" > /opt/config/remote_repo.txt
1332             echo "__http_proxy__" > /opt/config/http_proxy.txt
1333             echo "__https_proxy__" > /opt/config/https_proxy.txt
1334             if [ __http_proxy__ != "no_proxy" ]
1335             then
1336             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1337             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1338             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1339             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1340             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1341             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1342
1343             # Download and run install script
1344             export http_proxy=__http_proxy__
1345             export https_proxy=__https_proxy__
1346             fi
1347             apt-get -y install unzip
1348             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1349             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
1350             unzip -j /opt/boot-__artifacts_version__.zip -d /opt vid_install.sh
1351             cd /opt
1352             chmod +x vid_install.sh
1353             ./vid_install.sh
1354
1355
1356   # SDN-C instantiation
1357   sdnc_private_port:
1358     type: OS::Neutron::Port
1359     properties:
1360       network: { get_resource: oam_onap }
1361       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
1362       security_groups:
1363       - { get_resource: onap_sg }
1364
1365   sdnc_floating_ip:
1366     type: OS::Neutron::FloatingIP
1367     properties:
1368       floating_network_id: { get_param: public_net_id }
1369       port_id: { get_resource: sdnc_private_port }
1370
1371   sdnc_vm:
1372     type: OS::Nova::Server
1373     properties:
1374       image: { get_param: ubuntu_1404_image }
1375       flavor: { get_param: flavor_large }
1376       name:
1377         str_replace:
1378           template: base-sdnc
1379           params:
1380             base: { get_param: vm_base_name }
1381       key_name: { get_resource: vm_key }
1382       networks:
1383         - port: { get_resource: sdnc_private_port }
1384       user_data_format: RAW
1385       user_data:
1386         str_replace:
1387           params:
1388             __http_proxy__: { get_param: http_proxy }
1389             __https_proxy__: { get_param: https_proxy }
1390             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1391             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1392             __nexus_username__: { get_param: nexus_username }
1393             __nexus_password__: { get_param: nexus_password }
1394             __artifacts_version__: { get_param: artifacts_version }
1395             __dns_ip_addr__: { get_param: dns_ip_addr }
1396             __docker_version__: { get_param: sdnc_docker }
1397             __gerrit_branch__: { get_param: sdnc_branch }
1398             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1399             __cloud_env__: { get_param: cloud_env }
1400             __external_dns__: { get_param: external_dns }
1401             __sdnc_repo__: { get_param: sdnc_repo }
1402           template: |
1403             #!/bin/bash
1404
1405             # Create configuration files
1406             mkdir -p /opt/config
1407             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1408             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1409             echo "__nexus_username__" > /opt/config/nexus_username.txt
1410             echo "__nexus_password__" > /opt/config/nexus_password.txt
1411             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1412             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1413             echo "__docker_version__" > /opt/config/docker_version.txt
1414             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1415             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1416             echo "__cloud_env__" > /opt/config/cloud_env.txt
1417             echo "__external_dns__" > /opt/config/external_dns.txt
1418             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1419             echo "__http_proxy__" > /opt/config/http_proxy.txt
1420             echo "__https_proxy__" > /opt/config/https_proxy.txt
1421             if [ __http_proxy__ != "no_proxy" ]
1422             then
1423             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1424             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1425             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1426             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1427             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1428             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1429
1430             # Download and run install script
1431             export http_proxy=__http_proxy__
1432             export https_proxy=__https_proxy__
1433             fi
1434             apt-get -y install unzip
1435             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1436             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
1437             unzip -j /opt/boot-__artifacts_version__.zip -d /opt sdnc_install.sh
1438             cd /opt
1439             chmod +x sdnc_install.sh
1440             ./sdnc_install.sh
1441
1442
1443   # SDC instantiation
1444   sdc_private_port:
1445     type: OS::Neutron::Port
1446     properties:
1447       network: { get_resource: oam_onap }
1448       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1449       security_groups:
1450       - { get_resource: onap_sg }
1451
1452   sdc_floating_ip:
1453     type: OS::Neutron::FloatingIP
1454     properties:
1455       floating_network_id: { get_param: public_net_id }
1456       port_id: { get_resource: sdc_private_port }
1457
1458   sdc_volume_data:
1459     type: OS::Cinder::Volume
1460     properties:
1461       name: vol1-sdc-data
1462       size: 100
1463
1464   sdc_vm:
1465     type: OS::Nova::Server
1466     properties:
1467       image: { get_param: ubuntu_1604_image }
1468       flavor: { get_param: flavor_xlarge }
1469       name:
1470         str_replace:
1471           template: base-sdc
1472           params:
1473             base: { get_param: vm_base_name }
1474       key_name: { get_resource: vm_key }
1475       networks:
1476         - port: { get_resource: sdc_private_port }
1477       block_device_mapping:
1478         - device_name: /dev/vdb
1479           volume_id: {get_resource: sdc_volume_data}
1480       user_data_format: RAW
1481       user_data:
1482         str_replace:
1483           params:
1484             __http_proxy__: { get_param: http_proxy }
1485             __https_proxy__: { get_param: https_proxy }
1486             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1487             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1488             __nexus_username__: { get_param: nexus_username }
1489             __nexus_password__: { get_param: nexus_password }
1490             __env_name__: { get_param: dmaap_topic }
1491             __artifacts_version__: { get_param: artifacts_version }
1492             __dns_ip_addr__: { get_param: dns_ip_addr }
1493             __mr_ip_addr__: { get_param: mr_ip_addr }
1494             __private_ip__: { get_param: sdc_ip_addr }
1495             __docker_version__: { get_param: sdc_docker }
1496             __sdc_wfd_docker__: { get_param: sdc_wfd_docker }
1497             __gerrit_branch__: { get_param: sdc_branch }
1498             __cloud_env__: { get_param: cloud_env }
1499             __external_dns__: { get_param: external_dns }
1500             __sdc_repo__: { get_param: sdc_repo }
1501           template: |
1502             #!/bin/bash
1503
1504             # Create configuration files
1505             mkdir -p /opt/config
1506             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1507             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1508             echo "__nexus_username__" > /opt/config/nexus_username.txt
1509             echo "__nexus_password__" > /opt/config/nexus_password.txt
1510             echo "__env_name__" > /opt/config/env_name.txt
1511             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1512             echo "__private_ip__" > /opt/config/private_ip.txt
1513             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1514             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1515             echo "__docker_version__" > /opt/config/docker_version.txt
1516             echo "__sdc_wfd_docker__" > /opt/config/sdc_wfd_docker.txt
1517             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1518             echo "__cloud_env__" > /opt/config/cloud_env.txt
1519             echo "__external_dns__" > /opt/config/external_dns.txt
1520             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1521             echo "__http_proxy__" > /opt/config/http_proxy.txt
1522             echo "__https_proxy__" > /opt/config/https_proxy.txt
1523             if [ __http_proxy__ != "no_proxy" ]
1524             then
1525             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1526             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1527             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1528             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1529             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1530             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1531
1532             # Download and run install script
1533             export http_proxy=__http_proxy__
1534             export https_proxy=__https_proxy__
1535             fi
1536             apt-get -y install unzip
1537             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1538             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
1539             unzip -j /opt/boot-__artifacts_version__.zip -d /opt sdc_install.sh
1540             cd /opt
1541             chmod +x sdc_install.sh
1542             ./sdc_install.sh
1543
1544
1545   # PORTAL instantiation
1546   portal_private_port:
1547     type: OS::Neutron::Port
1548     properties:
1549       network: { get_resource: oam_onap }
1550       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1551       security_groups:
1552       - { get_resource: onap_sg }
1553
1554   portal_floating_ip:
1555     type: OS::Neutron::FloatingIP
1556     properties:
1557       floating_network_id: { get_param: public_net_id }
1558       port_id: { get_resource: portal_private_port }
1559
1560   portal_vm:
1561     type: OS::Nova::Server
1562     properties:
1563       image: { get_param: ubuntu_1404_image }
1564       flavor: { get_param: flavor_large }
1565       name:
1566         str_replace:
1567           template: base-portal
1568           params:
1569             base: { get_param: vm_base_name }
1570       key_name: { get_resource: vm_key }
1571       networks:
1572         - port: { get_resource: portal_private_port }
1573       user_data_format: RAW
1574       user_data:
1575         str_replace:
1576           params:
1577             __http_proxy__: { get_param: http_proxy }
1578             __https_proxy__: { get_param: https_proxy }
1579             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1580             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1581             __nexus_username__: { get_param: nexus_username }
1582             __nexus_password__: { get_param: nexus_password }
1583             __artifacts_version__: { get_param: artifacts_version }
1584             __dns_ip_addr__: { get_param: dns_ip_addr }
1585             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1586             __docker_version__: { get_param: portal_docker }
1587             __gerrit_branch__: { get_param: portal_branch }
1588             __cli_docker__: { get_param: cli_docker }
1589             __cloud_env__: { get_param: cloud_env }
1590             __external_dns__: { get_param: external_dns }
1591             __portal_repo__: { get_param: portal_repo }
1592           template: |
1593             #!/bin/bash
1594
1595             # Create configuration files
1596             mkdir -p /opt/config
1597             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1598             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1599             echo "__nexus_username__" > /opt/config/nexus_username.txt
1600             echo "__nexus_password__" > /opt/config/nexus_password.txt
1601             echo "__public_ip__" > /opt/config/public_ip.txt
1602             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1603             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1604             echo "__docker_version__" > /opt/config/docker_version.txt
1605             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1606             echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1607             echo "__cloud_env__" > /opt/config/cloud_env.txt
1608             echo "__external_dns__" > /opt/config/external_dns.txt
1609             echo "__portal_repo__" > /opt/config/remote_repo.txt
1610             echo "__http_proxy__" > /opt/config/http_proxy.txt
1611             echo "__https_proxy__" > /opt/config/https_proxy.txt
1612             if [ __http_proxy__ != "no_proxy" ]
1613             then
1614             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1615             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1616             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1617             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1618             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1619             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1620
1621             # Download and run install script
1622             export http_proxy=__http_proxy__
1623             export https_proxy=__https_proxy__
1624             fi
1625             apt-get -y install unzip
1626             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1627             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
1628             unzip -j /opt/boot-__artifacts_version__.zip -d /opt portal_install.sh
1629             cd /opt
1630             chmod +x portal_install.sh
1631             ./portal_install.sh
1632
1633   # Policy Engine instantiation
1634   policy_private_port:
1635     type: OS::Neutron::Port
1636     properties:
1637       network: { get_resource: oam_onap }
1638       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1639       security_groups:
1640       - { get_resource: onap_sg }
1641
1642   policy_floating_ip:
1643     type: OS::Neutron::FloatingIP
1644     properties:
1645       floating_network_id: { get_param: public_net_id }
1646       port_id: { get_resource: policy_private_port }
1647
1648   policy_vm:
1649     type: OS::Nova::Server
1650     properties:
1651       image: { get_param: ubuntu_1404_image }
1652       flavor: { get_param: flavor_xlarge }
1653       name:
1654         str_replace:
1655           template: base-policy
1656           params:
1657             base: { get_param: vm_base_name }
1658       key_name: { get_resource: vm_key }
1659       networks:
1660         - port: { get_resource: policy_private_port }
1661       user_data_format: RAW
1662       user_data:
1663         str_replace:
1664           params:
1665             __http_proxy__: { get_param: http_proxy }
1666             __https_proxy__: { get_param: https_proxy }
1667             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1668             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1669             __nexus_username__: { get_param: nexus_username }
1670             __nexus_password__: { get_param: nexus_password }
1671             __artifacts_version__: { get_param: artifacts_version }
1672             __dns_ip_addr__: { get_param: dns_ip_addr }
1673             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1674             __docker_version__: { get_param: policy_docker }
1675             __gerrit_branch__: { get_param: policy_branch }
1676             __cloud_env__: { get_param: cloud_env }
1677             __external_dns__: { get_param: external_dns }
1678             __policy_repo__: { get_param: policy_repo }
1679           template: |
1680             #!/bin/bash
1681
1682             # Create configuration files
1683             mkdir -p /opt/config
1684             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1685             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1686             echo "__nexus_username__" > /opt/config/nexus_username.txt
1687             echo "__nexus_password__" > /opt/config/nexus_password.txt
1688             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1689             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1690             echo "__public_ip__" > /opt/config/public_ip.txt
1691             echo "__docker_version__" > /opt/config/docker_version.txt
1692             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1693             echo "__cloud_env__" > /opt/config/cloud_env.txt
1694             echo "__external_dns__" > /opt/config/external_dns.txt
1695             echo "__policy_repo__" > /opt/config/remote_repo.txt
1696             echo "__http_proxy__" > /opt/config/http_proxy.txt
1697             echo "__https_proxy__" > /opt/config/https_proxy.txt
1698             if [ __http_proxy__ != "no_proxy" ]
1699             then
1700             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1701             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1702             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1703             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1704             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1705             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1706
1707             # Download and run install script
1708             export http_proxy=__http_proxy__
1709             export https_proxy=__https_proxy__
1710             fi
1711             apt-get -y install unzip
1712             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1713             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
1714             unzip -j /opt/boot-__artifacts_version__.zip -d /opt policy_install.sh
1715             cd /opt
1716             chmod +x policy_install.sh
1717             ./policy_install.sh
1718
1719
1720   # APP-C instantiation
1721   appc_private_port:
1722     type: OS::Neutron::Port
1723     properties:
1724       network: { get_resource: oam_onap }
1725       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1726       security_groups:
1727       - { get_resource: onap_sg }
1728
1729   appc_floating_ip:
1730     type: OS::Neutron::FloatingIP
1731     properties:
1732       floating_network_id: { get_param: public_net_id }
1733       port_id: { get_resource: appc_private_port }
1734
1735   appc_vm:
1736     type: OS::Nova::Server
1737     properties:
1738       image: { get_param: ubuntu_1404_image }
1739       flavor: { get_param: flavor_large }
1740       name:
1741         str_replace:
1742           template: base-appc
1743           params:
1744             base: { get_param: vm_base_name }
1745       key_name: { get_resource: vm_key }
1746       networks:
1747         - port: { get_resource: appc_private_port }
1748       user_data_format: RAW
1749       user_data:
1750         str_replace:
1751           params:
1752             __http_proxy__: { get_param: http_proxy }
1753             __https_proxy__: { get_param: https_proxy }
1754             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1755             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1756             __nexus_username__: { get_param: nexus_username }
1757             __nexus_password__: { get_param: nexus_password }
1758             __dmaap_topic__: { get_param: dmaap_topic }
1759             __artifacts_version__: { get_param: artifacts_version }
1760             __dns_ip_addr__: { get_param: dns_ip_addr }
1761             __docker_version__: { get_param: appc_docker }
1762             __gerrit_branch__: { get_param: appc_branch }
1763             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1764             __cloud_env__: { get_param: cloud_env }
1765             __external_dns__: { get_param: external_dns }
1766             __appc_repo__: { get_param: appc_repo }
1767           template: |
1768             #!/bin/bash
1769
1770             # Create configuration files
1771             mkdir -p /opt/config
1772             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1773             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1774             echo "__nexus_username__" > /opt/config/nexus_username.txt
1775             echo "__nexus_password__" > /opt/config/nexus_password.txt
1776             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1777             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1778             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1779             echo "__docker_version__" > /opt/config/docker_version.txt
1780             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1781             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1782             echo "__cloud_env__" > /opt/config/cloud_env.txt
1783             echo "__external_dns__" > /opt/config/external_dns.txt
1784             echo "__appc_repo__" > /opt/config/remote_repo.txt
1785             echo "__http_proxy__" > /opt/config/http_proxy.txt
1786             echo "__https_proxy__" > /opt/config/https_proxy.txt
1787             if [ __http_proxy__ != "no_proxy" ]
1788             then
1789             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1790             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1791             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1792             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1793             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1794             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1795
1796             # Download and run install script
1797             export http_proxy=__http_proxy__
1798             export https_proxy=__https_proxy__
1799             fi
1800             apt-get -y install unzip
1801             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1802             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
1803             unzip -j /opt/boot-__artifacts_version__.zip -d /opt appc_install.sh
1804             cd /opt
1805             chmod +x appc_install.sh
1806             ./appc_install.sh
1807
1808
1809   # CLAMP instantiation
1810   clamp_private_port:
1811     type: OS::Neutron::Port
1812     properties:
1813       network: { get_resource: oam_onap }
1814       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1815       security_groups:
1816       - { get_resource: onap_sg }
1817
1818   clamp_floating_ip:
1819     type: OS::Neutron::FloatingIP
1820     properties:
1821       floating_network_id: { get_param: public_net_id }
1822       port_id: { get_resource: clamp_private_port }
1823
1824   clamp_vm:
1825     type: OS::Nova::Server
1826     properties:
1827       image: { get_param: ubuntu_1604_image }
1828       flavor: { get_param: flavor_medium }
1829       name:
1830         str_replace:
1831           template: base-clamp
1832           params:
1833             base: { get_param: vm_base_name }
1834       key_name: { get_resource: vm_key }
1835       networks:
1836         - port: { get_resource: clamp_private_port }
1837       user_data_format: RAW
1838       user_data:
1839         str_replace:
1840           params:
1841             __http_proxy__: { get_param: http_proxy }
1842             __https_proxy__: { get_param: https_proxy }
1843             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1844             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1845             __nexus_username__: { get_param: nexus_username }
1846             __nexus_password__: { get_param: nexus_password }
1847             __openstack_username__: { get_param: openstack_username }
1848             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1849             __openstack_api_key__: { get_param: openstack_api_key }
1850             __openstack_region__: { get_param: openstack_region }
1851             __keystone_url__: { get_param: keystone_url }
1852             __dmaap_topic__: { get_param: dmaap_topic }
1853             __artifacts_version__: { get_param: artifacts_version }
1854             __dns_ip_addr__: { get_param: dns_ip_addr }
1855             __docker_version__: { get_param: clamp_docker }
1856             __gerrit_branch__: { get_param: clamp_branch }
1857             __cloud_env__: { get_param: cloud_env }
1858             __external_dns__: { get_param: external_dns }
1859             __clamp_repo__: { get_param: clamp_repo }
1860           template: |
1861             #!/bin/bash
1862
1863             # Create configuration files
1864             mkdir -p /opt/config
1865             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1866             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1867             echo "__nexus_username__" > /opt/config/nexus_username.txt
1868             echo "__nexus_password__" > /opt/config/nexus_password.txt
1869             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1870             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1871             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1872             echo "__openstack_username__" > /opt/config/openstack_username.txt
1873             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1874             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1875             echo "__openstack_region__" > /opt/config/openstack_region.txt
1876             echo "__keystone_url__" > /opt/config/keystone.txt
1877             echo "__docker_version__" > /opt/config/docker_version.txt
1878             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1879             echo "__cloud_env__" > /opt/config/cloud_env.txt
1880             echo "__external_dns__" > /opt/config/external_dns.txt
1881             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1882             echo "__http_proxy__" > /opt/config/http_proxy.txt
1883             echo "__https_proxy__" > /opt/config/https_proxy.txt
1884             if [ __http_proxy__ != "no_proxy" ]
1885             then
1886             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
1887             echo "{" >> /etc/apt/apt.conf.d/apt.conf
1888             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
1889             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1890             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
1891             echo "};" >> /etc/apt/apt.conf.d/apt.conf
1892
1893             # Download and run install script
1894             export http_proxy=__http_proxy__
1895             export https_proxy=__https_proxy__
1896             fi
1897             apt-get -y install unzip
1898             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
1899             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
1900             unzip -j /opt/boot-__artifacts_version__.zip -d /opt clamp_install.sh
1901             cd /opt
1902             chmod +x clamp_install.sh
1903             ./clamp_install.sh
1904
1905
1906   # OPEN-O VM instantiation
1907   openo_private_port:
1908     type: OS::Neutron::Port
1909     properties:
1910       network: { get_resource: oam_onap }
1911       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1912       security_groups:
1913       - { get_resource: onap_sg }
1914
1915   openo_floating_ip:
1916     type: OS::Neutron::FloatingIP
1917     properties:
1918       floating_network_id: { get_param: public_net_id }
1919       port_id: { get_resource: openo_private_port }
1920
1921   openo_vm:
1922     type: OS::Nova::Server
1923     properties:
1924       image: { get_param: ubuntu_1604_image }
1925       flavor: { get_param: flavor_xlarge }
1926       name:
1927         str_replace:
1928           template: base-multi-service
1929           params:
1930             base: { get_param: vm_base_name }
1931       key_name: { get_resource: vm_key }
1932       networks:
1933         - port: { get_resource: openo_private_port }
1934       user_data_format: RAW
1935       user_data:
1936         str_replace:
1937           params:
1938             __http_proxy__: { get_param: http_proxy }
1939             __https_proxy__: { get_param: https_proxy }
1940             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
1941             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1942             __nexus_username__: { get_param: nexus_username }
1943             __nexus_password__: { get_param: nexus_password }
1944             __artifacts_version__: { get_param: artifacts_version }
1945             __dns_ip_addr__: { get_param: dns_ip_addr }
1946             __oam_network_cidr__: { get_param: oam_network_cidr }
1947             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1948             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1949             __appc_ip_addr__: { get_param: appc_ip_addr }
1950             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1951             __so_ip_addr__: { get_param: so_ip_addr }
1952             __mr_ip_addr__: { get_param: mr_ip_addr }
1953             __policy_ip_addr__: { get_param: policy_ip_addr }
1954             __portal_ip_addr__: { get_param: portal_ip_addr }
1955             __robot_ip_addr__: { get_param: robot_ip_addr }
1956             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1957             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1958             __vid_ip_addr__: { get_param: vid_ip_addr }
1959             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1960             __openo_ip_addr__: { get_param: openo_ip_addr }
1961             __cloud_env__: { get_param: cloud_env }
1962             __external_dns__: { get_param: external_dns }
1963             __vnfsdk_branch__: { get_param: vnfsdk_branch }
1964             __msb_docker__: { get_param: msb_docker }
1965             __mvim_docker__: { get_param: mvim_docker }
1966             __mvim_openstack_docker__: { get_param: mvim_openstack_docker }
1967             __uui_docker__: { get_param: uui_docker }
1968             __esr_docker__: { get_param: esr_docker }
1969             __vnfsdk_repo__: { get_param: vnfsdk_repo }
1970             __vfc_nokia_docker__: { get_param: vfc_nokia_docker }
1971             __vfc_nokiav2_docker__: { get_param: vfc_nokiav2_docker }
1972             __vfc_ztevnfmdriver_docker__: { get_param: vfc_ztevnfmdriver_docker }
1973             __vfc_multivimproxy_docker__: { get_param: vfc_multivimproxy_docker }
1974             __vfc_ztesdncdriver_docker__: { get_param: vfc_ztesdncdriver_docker }
1975             __vfc_vnfres_docker__: { get_param: vfc_vnfres_docker }
1976             __vfc_vnfmgr_docker__: { get_param: vfc_vnfmgr_docker }
1977             __vfc_vnflcm_docker__: { get_param: vfc_vnflcm_docker }
1978             __vfc_resmanagement_docker__: { get_param: vfc_resmanagement_docker }
1979             __vfc_nslcm_docker__: { get_param: vfc_nslcm_docker }
1980             __vfc_huawei_docker__: { get_param: vfc_huawei_docker }
1981             __vfc_jujudriver_docker__: { get_param: vfc_jujudriver_docker }
1982             __vfc_gvnfmdriver_docker__: { get_param: vfc_gvnfmdriver_docker }
1983             __vfc_emsdriver_docker__: { get_param: vfc_emsdriver_docker }
1984             __vfc_catalog_docker__: { get_param: vfc_catalog_docker }
1985             __vfc_wfengine_mgrservice_docker__: { get_param: vfc_wfengine_mgrservice_docker }
1986             __vfc_wfengine_activiti_docker__: { get_param: vfc_wfengine_activiti_docker }
1987           template: |
1988             #!/bin/bash
1989
1990             # Create configuration files
1991             mkdir -p /opt/config
1992             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
1993             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1994             echo "__nexus_username__" > /opt/config/nexus_username.txt
1995             echo "__nexus_password__" > /opt/config/nexus_password.txt
1996             echo "__cloud_env__" > /opt/config/cloud_env.txt
1997             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1998             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1999             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2000             echo "__external_dns__" > /opt/config/external_dns.txt
2001             echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
2002             echo "__msb_docker__" > /opt/config/msb_docker.txt
2003             echo "__mvim_docker__" > /opt/config/mvim_docker.txt
2004             echo "__mvim_openstack_docker__" > /opt/config/mvim_openstack_docker.txt
2005             echo "__uui_docker__" > /opt/config/uui_docker.txt
2006             echo "__esr_docker__" > /opt/config/esr_docker.txt
2007             echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
2008
2009             echo "export NOKIA_DOCKER_VER=__vfc_nokia_docker__" >> /opt/config/vfc_docker.txt
2010             echo "export NOKIAV2_DOCKER_VER=__vfc_nokiav2_docker__" >> /opt/config/vfc_docker.txt
2011             echo "export MULTIVIMPROXY_DOCKER_VER=__vfc_multivimproxy_docker__" >> /opt/config/vfc_docker.txt
2012             echo "export ZTEVNFMDRIVER_DOCKER_VER=__vfc_ztevnfmdriver_docker__" >> /opt/config/vfc_docker.txt
2013             echo "export ZTESDNCDRIVER_DOCKER_VER=__vfc_ztesdncdriver_docker__" >> /opt/config/vfc_docker.txt
2014             echo "export VNFRES_DOCKER_VER=__vfc_vnfres_docker__" >> /opt/config/vfc_docker.txt
2015             echo "export VNFMGR_DOCKER_VER=__vfc_vnfmgr_docker__" >> /opt/config/vfc_docker.txt
2016             echo "export VNFLCM_DOCKER_VER=__vfc_vnflcm_docker__" >> /opt/config/vfc_docker.txt
2017             echo "export RESMANAGEMENT_DOCKER_VER=__vfc_resmanagement_docker__" >> /opt/config/vfc_docker.txt
2018             echo "export NSLCM_DOCKER_VER=__vfc_nslcm_docker__" >> /opt/config/vfc_docker.txt
2019             echo "export HUAWEI_DOCKER_VER=__vfc_huawei_docker__" >> /opt/config/vfc_docker.txt
2020             echo "export JUJUDRIVER_DOCKER_VER=__vfc_jujudriver_docker__" >> /opt/config/vfc_docker.txt
2021             echo "export GVNFMDRIVER_DOCKER_VER=__vfc_gvnfmdriver_docker__" >> /opt/config/vfc_docker.txt
2022             echo "export EMSDRIVER_DOCKER_VER=__vfc_emsdriver_docker__" >> /opt/config/vfc_docker.txt
2023             echo "export CATALOG_DOCKER_VER=__vfc_catalog_docker__" >> /opt/config/vfc_docker.txt
2024             echo "export MGRSERVICE_DOCKER_VER=__vfc_wfengine_mgrservice_docker__" >> /opt/config/vfc_docker.txt
2025             echo "export ACTIVITI_DOCKER_VER=__vfc_wfengine_activiti_docker__" >> /opt/config/vfc_docker.txt
2026
2027             # Create env file with the IP address of all ONAP components
2028             echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
2029             echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
2030             echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
2031             echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
2032             echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
2033             echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
2034             echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
2035             echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
2036             echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
2037             echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
2038             echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
2039             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
2040             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
2041             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
2042             echo "__http_proxy__" > /opt/config/http_proxy.txt
2043             echo "__https_proxy__" > /opt/config/https_proxy.txt
2044             if [ __http_proxy__ != "no_proxy" ]
2045             then
2046             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
2047             echo "{" >> /etc/apt/apt.conf.d/apt.conf
2048             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
2049             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2050             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2051             echo "};" >> /etc/apt/apt.conf.d/apt.conf
2052
2053             # Download and run install script
2054             export http_proxy=__http_proxy__
2055             export https_proxy=__https_proxy__
2056             fi
2057             apt-get -y install unzip
2058             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2059             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
2060             unzip -j /opt/boot-__artifacts_version__.zip -d /opt openo_install.sh
2061             cd /opt
2062             chmod +x openo_install.sh
2063             ./openo_install.sh
2064
2065
2066   # DCAE GEN 2 Controller instantiation
2067   dcae_c_private_port:
2068     type: OS::Neutron::Port
2069     properties:
2070       network: { get_resource: oam_onap }
2071       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
2072       security_groups:
2073       - { get_resource: onap_sg }
2074
2075   dcae_c_floating_ip:
2076     type: OS::Neutron::FloatingIP
2077     properties:
2078       floating_network_id: { get_param: public_net_id }
2079       port_id: { get_resource: dcae_c_private_port }
2080
2081   dcae_c_vm:
2082     type: OS::Nova::Server
2083     properties:
2084       image: { get_param: ubuntu_1604_image }
2085       flavor: { get_param: flavor_xlarge }
2086       name:
2087         str_replace:
2088           template: base-dcae
2089           params:
2090             base: { get_param: vm_base_name }
2091       key_name: { get_resource: vm_key }
2092       networks:
2093         - port: { get_resource: dcae_c_private_port }
2094       #security_groups:
2095       #  - { get_resource: onap_sg }
2096       user_data_format: RAW
2097       user_data:
2098         str_replace:
2099           params:
2100             __rand_str__: { get_resource: random-str }
2101             # repo related
2102             __http_proxy__: { get_param: http_proxy }
2103             __https_proxy__: { get_param: https_proxy }
2104             __artifacts_version__: { get_param: artifacts_version }
2105             __docker_version__: { get_param: dcae_docker }
2106             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
2107             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2108             __nexus_username__: { get_param: nexus_username }
2109             __nexus_password__: { get_param: nexus_password }
2110             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
2111             __dcae_deployment_profile__: { get_param: dcae_deployment_profile }
2112             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
2113             __dcae_ip_addr__: { get_param: dcae_ip_addr }
2114             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
2115             __dns_ip_addr__: { get_param: dns_ip_addr }
2116             __external_dns__: { get_param: external_dns }
2117             __dns_forwarder__: { get_param: dns_forwarder }
2118             __dcae_domain__: { get_param: dcae_domain }
2119             # conf for VMs DCAE is to bringup
2120             __openstack_keystone_url__: { get_param: keystone_url }
2121             __dcae_keystone_url__: { get_param: dcae_keystone_url }
2122             __dcaeos_cloud_env__: { get_param: cloud_env }
2123             __dcaeos_keystone_url__: { get_param: dcae_keystone_url }
2124             __dcaeos_region__: { get_param: openstack_region }
2125             __dcaeos_tenant_id__: { get_param: openstack_tenant_id }
2126             __dcaeos_tenant_name__: { get_param: openstack_tenant_name }
2127             __dcaeos_security_group__:
2128               str_replace:
2129                 template: 'onap_sg_rand'
2130                 params:
2131                   rand: { get_resource: random-str }
2132             #__dcaeos_security_group__: { get_attr: [onap_sg, name] }
2133             __dcaeos_username__: { get_param: openstack_username }
2134             __dcaeos_password__: { get_param: openstack_api_key }
2135             __dcaeos_key_name__: { get_resource: vm_key }
2136             __dcaeos_public_key__: { get_param: dcae_public_key }
2137             __dcaeos_private_key__: { get_param: dcae_private_key }
2138             __dcaeos_private_network_name__: { get_attr: [oam_onap, name] }
2139             __dcaeos_public_network_name__: { get_param: public_net_name }
2140             __dcaeos_ubuntu_1604_image__: { get_param: ubuntu_1604_image }
2141             __dcaeos_centos_7_image__: { get_param: dcae_centos_7_image }
2142             __dcaeos_flavor_id__: { get_param: flavor_medium }
2143             __dcaeos_flavor_id_cdap__: { get_param: flavor_large }
2144             __dcaeos_dnsaas_config_enabled__: { get_param: dnsaas_config_enabled }
2145             __dcaeos_dnsaas_region__: { get_param: dnsaas_region }
2146             __dcaeos_dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
2147             __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
2148             __dcaeos_dnsaas_username__: { get_param: dnsaas_username }
2149             __dcaeos_dnsaas_password__: { get_param: dnsaas_password }
2150             # fixed private IPs
2151             __mr_ip_addr__: { get_param: mr_ip_addr }
2152             __policy_ip_addr__: { get_param: policy_ip_addr }
2153             __sdc_ip_addr__: { get_param: sdc_ip_addr }
2154             __openo_ip_addr__: { get_param: openo_ip_addr }
2155             __aai1_ip_addr__: { get_param: aai1_ip_addr }
2156             __aai2_ip_addr__: { get_param: aai2_ip_addr }
2157             # floating IPs
2158             __dns_floating_ip_addr__: { get_attr: [dns_floating_ip, floating_ip_address] }
2159             __aai1_floating_ip_addr__: { get_attr: [aai1_floating_ip, floating_ip_address] }
2160             __aai2_floating_ip_addr__: { get_attr: [aai2_floating_ip, floating_ip_address] }
2161             __mrouter_floating_ip_addr__: { get_attr: [mrouter_floating_ip, floating_ip_address] }
2162             __sdc_floating_ip_addr__: { get_attr: [sdc_floating_ip, floating_ip_address] }
2163             __policy_floating_ip_addr__: { get_attr: [policy_floating_ip, floating_ip_address] }
2164             __openo_floating_ip_addr__: { get_attr: [openo_floating_ip, floating_ip_address] }
2165             __dcae_c_floating_ip_addr__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
2166             # container versions
2167             __dcae_docker__:  { get_param: dcae_docker }
2168             __dcae_snmptrap_docker__:  { get_param: dcae_snmptrap_docker }
2169             __dcae_ves_docker__:  { get_param: dcae_ves_docker }
2170             __dcae_bootstrap_docker__:  { get_param: dcae_bootstrap_docker }
2171             __dcae_cm_docker__:  { get_param: dcae_cm_docker }
2172             __dcae_k8sbootstrap_docker__:  { get_param: dcae_k8sbootstrap_docker }
2173             __dcae_redisc_docker__:  { get_param: dcae_redisc_docker }
2174             __dcae_tca_docker__:  { get_param: dcae_tca_docker }
2175             __dcae_cb_docker__:  { get_param: dcae_cb_docker }
2176             __dcae_cbs_docker__:  { get_param: dcae_cbs_docker }
2177             __dcae_dh_docker__:  { get_param: dcae_dh_docker }
2178             __dcae_inv_docker__:  { get_param: dcae_inv_docker }
2179             __dcae_ph_docker__:  { get_param: dcae_ph_docker }
2180             __dcae_sch_docker__:  { get_param: dcae_sch_docker }
2181             __dcae_heartbeat_docker__:  { get_param: dcae_heartbeat_docker }
2182             __dcae_prh_docker__:  { get_param: dcae_prh_docker }
2183             __holmes_em_docker__:  { get_param: holmes_em_docker }
2184             __holmes_rm_docker__:  { get_param: holmes_rm_docker }
2185
2186
2187           template: |
2188             #!/bin/bash
2189
2190             # Create configuration files
2191             mkdir -p /opt/config
2192             echo "__rand_str__" > /opt/config/dcae_zone.txt
2193             echo "__rand_str__" > /opt/config/rand_str.txt
2194             # repo related
2195             echo "__docker_version__" > /opt/config/docker_version.txt
2196             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2197             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
2198             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2199             echo "__nexus_username__" > /opt/config/nexus_username.txt
2200             echo "__nexus_password__" > /opt/config/nexus_password.txt
2201             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2202             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
2203             echo "__dcae_deployment_profile__" > /opt/config/dcae_deployment_profile.txt
2204             echo "__mac_addr__" > /opt/config/mac_addr.txt
2205             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
2206             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
2207             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2208             echo "__external_dns__" > /opt/config/external_dns.txt
2209             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
2210             echo "__dcae_domain__" > /opt/config/dcae_domain.txt
2211             # conf for the OpenStack env where DCAE is deployed
2212             echo "__openstack_keystone_url__" > /opt/config/openstack_keystone_url.txt
2213             echo "__dcaeos_cloud_env__" > /opt/config/cloud_env.txt
2214             echo "__dcaeos_keystone_url__" > /opt/config/keystone_url.txt
2215             echo "__dcaeos_region__" > /opt/config/openstack_region.txt
2216             echo "__dcaeos_tenant_id__" > /opt/config/tenant_id.txt
2217             echo "__dcaeos_tenant_name__" > /opt/config/tenant_name.txt
2218             echo "__dcaeos_username__" > /opt/config/openstack_user.txt
2219             echo "__dcaeos_password__" > /opt/config/openstack_password.txt
2220             echo "__dcaeos_key_name__" > /opt/config/key_name.txt
2221             echo "__dcaeos_public_key__" > /opt/config/pub_key.txt
2222             echo "__dcaeos_private_key__" > /opt/config/priv_key
2223             echo "__dcaeos_private_network_name__" > /opt/config/openstack_private_network_name.txt
2224             echo "__dcaeos_public_network_name__" > /opt/config/public_net_name.txt
2225             echo "__dcaeos_public_network_name__" > /opt/config/public_net_id.txt
2226             echo "__dcaeos_ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
2227             echo "__dcaeos_centos_7_image__" > /opt/config/centos_7_image.txt
2228             echo "__dcaeos_security_group__" > /opt/config/security_group.txt
2229             echo "__dcaeos_flavor_id__" > /opt/config/flavor_id.txt
2230             echo "__dcaeos_flavor_id_cdap__" > /opt/config/flavor_id_cdap.txt
2231             echo "__dcaeos_dnsaas_config_enabled__" > /opt/config/dnsaas_config_enabled.txt
2232             echo "__dcaeos_dnsaas_region__" > /opt/config/dnsaas_region.txt
2233             echo "__dcaeos_dnsaas_keystone_url__" > /opt/config/dnsaas_keystone_url.txt
2234             echo "__dnsaas_tenant_name__" > /opt/config/dnsaas_tenant_name.txt
2235             echo "__dcaeos_dnsaas_username__" > /opt/config/dnsaas_username.txt
2236             echo "__dcaeos_dnsaas_password__" > /opt/config/dnsaas_password.txt
2237             # fixed private IP addresses of other ONAP components
2238             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
2239             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
2240             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
2241             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
2242             echo "__openo_ip_addr__" > /opt/config/msb_ip_addr.txt
2243             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
2244             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
2245             # floating IPs
2246             echo "__dns_floating_ip_addr__" > /opt/config/dns_floating_ip_addr.txt
2247             echo "__aai1_floating_ip_addr__" > /opt/config/aai1_floating_ip_addr.txt
2248             echo "__aai2_floating_ip_addr__" > /opt/config/aai2_floating_ip_addr.txt
2249             echo "__mrouter_floating_ip_addr__" > /opt/config/mrouter_floating_ip_addr.txt
2250             echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
2251             echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt
2252             echo "__openo_floating_ip_addr__" > /opt/config/openo_floating_ip_addr.txt
2253             echo "__dcae_c_floating_ip_addr__" > /opt/config/dcae_c_floating_ip_addr.txt
2254             # container versions
2255             echo "__dcae_docker__" > /opt/config/dcae_docker.txt
2256             echo "__dcae_snmptrap_docker__" > /opt/config/dcae_docker_snmptrap.txt
2257             echo "__dcae_ves_docker__" > /opt/config/dcae_docker_ves.txt
2258             echo "__dcae_bootstrap_docker__" > /opt/config/dcae_docker_bootstrap.txt
2259             echo "__dcae_cm_docker__" > /opt/config/dcae_docker_cm.txt
2260             echo "__dcae_k8sbootstrap_docker__" > /opt/config/dcae_docker_k8sbootstrap.txt
2261             echo "__dcae_redisc_docker__" > /opt/config/dcae_docker_redisc.txt
2262             echo "__dcae_tca_docker__" > /opt/config/dcae_docker_tca.txt
2263             echo "__dcae_cb_docker__" > /opt/config/dcae_docker_cb.txt
2264             echo "__dcae_cbs_docker__" > /opt/config/dcae_docker_cbs.txt
2265             echo "__dcae_dh_docker__" > /opt/config/dcae_docker_dh.txt
2266             echo "__dcae_inv_docker__" > /opt/config/dcae_docker_inv.txt
2267             echo "__dcae_ph_docker__" > /opt/config/dcae_docker_ph.txt
2268             echo "__dcae_sch_docker__" > /opt/config/dcae_docker_sch.txt
2269             echo "__dcae_heartbeat_docker__" > /opt/config/dcae_docker_heartbeat.txt
2270             echo "__dcae_prh_docker__" > /opt/config/dcae_docker_prh.txt
2271             echo "__holmes_em_docker__" > /opt/config/holmes_docker_em.txt
2272             echo "__holmes_rm_docker__" > /opt/config/holmes_docker_rm.txt
2273             echo "__http_proxy__" > /opt/config/http_proxy.txt
2274             echo "__https_proxy__" > /opt/config/https_proxy.txt
2275             if [ __http_proxy__ != "no_proxy" ]
2276             then
2277             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
2278             echo "{" >> /etc/apt/apt.conf.d/apt.conf
2279             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
2280             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2281             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2282             echo "};" >> /etc/apt/apt.conf.d/apt.conf
2283
2284             # Download and run install script
2285             export http_proxy=__http_proxy__
2286             export https_proxy=__https_proxy__
2287             fi
2288             apt-get -y install unzip
2289             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2290             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
2291             unzip -j /opt/boot-__artifacts_version__.zip -d /opt dcae2_install.sh
2292             cd /opt
2293             chmod +x dcae2_install.sh
2294             ./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
2295
2296
2297   # MUSIC instantiation
2298   music_private_port:
2299     type: OS::Neutron::Port
2300     properties:
2301       network: { get_resource: oam_onap }
2302       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
2303       security_groups:
2304       - { get_resource: onap_sg }
2305
2306   music_floating_ip:
2307     type: OS::Neutron::FloatingIP
2308     properties:
2309       floating_network_id: { get_param: public_net_id }
2310       port_id: { get_resource: music_private_port }
2311
2312   music_vm:
2313     type: OS::Nova::Server
2314     properties:
2315       image: { get_param: ubuntu_1404_image }
2316       flavor: { get_param: flavor_large }
2317       name:
2318         str_replace:
2319           template: base-music
2320           params:
2321             base: { get_param: vm_base_name }
2322       key_name: { get_resource: vm_key }
2323       networks:
2324         - port: { get_resource: music_private_port }
2325       user_data_format: RAW
2326       user_data:
2327         str_replace:
2328           params:
2329             __http_proxy__: { get_param: http_proxy }
2330             __https_proxy__: { get_param: https_proxy }
2331             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
2332             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2333             __nexus_username__: { get_param: nexus_username }
2334             __nexus_password__: { get_param: nexus_password }
2335             __artifacts_version__: { get_param: artifacts_version }
2336             __dns_ip_addr__: { get_param: dns_ip_addr }
2337             __docker_version__: { get_param: music_docker }
2338             __music_repo__: { get_param: music_repo }
2339             __gerrit_branch__: { get_param: music_branch }
2340             __cloud_env__: { get_param: cloud_env }
2341             __external_dns__: { get_param: external_dns }
2342           template: |
2343             #!/bin/bash
2344
2345             # Create configuration files
2346             mkdir -p /opt/config
2347             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
2348             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2349             echo "__nexus_username__" > /opt/config/nexus_username.txt
2350             echo "__nexus_password__" > /opt/config/nexus_password.txt
2351             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2352             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2353             echo "__docker_version__" > /opt/config/docker_version.txt
2354             echo "__music_repo__" > /opt/config/remote_repo.txt
2355             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2356             echo "__cloud_env__" > /opt/config/cloud_env.txt
2357             echo "__external_dns__" > /opt/config/external_dns.txt
2358             echo "__http_proxy__" > /opt/config/http_proxy.txt
2359             echo "__https_proxy__" > /opt/config/https_proxy.txt
2360             if [ __http_proxy__ != "no_proxy" ]
2361             then
2362             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
2363             echo "{" >> /etc/apt/apt.conf.d/apt.conf
2364             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
2365             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2366             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2367             echo "};" >> /etc/apt/apt.conf.d/apt.conf
2368
2369             # Download and run install script
2370             export http_proxy=__http_proxy__
2371             export https_proxy=__https_proxy__
2372             fi
2373             apt-get -y install unzip
2374             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2375             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
2376             unzip -j /opt/boot-__artifacts_version__.zip -d /opt music_install.sh
2377             cd /opt
2378             chmod +x music_install.sh
2379             ./music_install.sh
2380
2381
2382   # OOF instantiation
2383   oof_private_port:
2384     type: OS::Neutron::Port
2385     properties:
2386       network: { get_resource: oam_onap }
2387       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
2388       security_groups:
2389       - { get_resource: onap_sg }
2390
2391   oof_floating_ip:
2392     type: OS::Neutron::FloatingIP
2393     properties:
2394       floating_network_id: { get_param: public_net_id }
2395       port_id: { get_resource: oof_private_port }
2396
2397   oof_vm:
2398     type: OS::Nova::Server
2399     properties:
2400       image: { get_param: ubuntu_1604_image }
2401       flavor: { get_param: flavor_large }
2402       name:
2403         str_replace:
2404           template: base-oof
2405           params:
2406             base: { get_param: vm_base_name }
2407       key_name: { get_resource: vm_key }
2408       networks:
2409         - port: { get_resource: oof_private_port }
2410       user_data_format: RAW
2411       user_data:
2412         str_replace:
2413           params:
2414             __http_proxy__: { get_param: http_proxy }
2415             __https_proxy__: { get_param: https_proxy }
2416             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
2417             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2418             __nexus_username__: { get_param: nexus_username }
2419             __nexus_password__: { get_param: nexus_password }
2420             __artifacts_version__: { get_param: artifacts_version }
2421             __dns_ip_addr__: { get_param: dns_ip_addr }
2422             __has_docker_version__: { get_param: optf_has_docker }
2423             __osdf_docker_version__: { get_param: optf_osdf_docker }
2424             __music_docker_version__: { get_param: music_docker }
2425             __cass_music_docker_version__: { get_param: cassandra_music_docker }
2426             __oof_repo__: { get_param: oof_repo }
2427             __gerrit_branch__: { get_param: oof_branch }
2428             __cloud_env__: { get_param: cloud_env }
2429             __external_dns__: { get_param: external_dns }
2430           template: |
2431             #!/bin/bash
2432
2433             # Create configuration files
2434             mkdir -p /opt/config
2435             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
2436             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2437             echo "__nexus_username__" > /opt/config/nexus_username.txt
2438             echo "__nexus_password__" > /opt/config/nexus_password.txt
2439             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2440             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2441             echo "__has_docker_version__" > /opt/config/has_docker_version.txt
2442             echo "__osdf_docker_version__" > /opt/config/osdf_docker_version.txt
2443             echo "__music_docker_version__" > /opt/config/music_version.txt
2444             echo "__cass_music_docker_version__" > /opt/config/cass_version.txt
2445             echo "__oof_repo__" > /opt/config/remote_repo.txt
2446             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2447             echo "__cloud_env__" > /opt/config/cloud_env.txt
2448             echo "__external_dns__" > /opt/config/external_dns.txt
2449             echo "__http_proxy__" > /opt/config/http_proxy.txt
2450             echo "__https_proxy__" > /opt/config/https_proxy.txt
2451             if [ __http_proxy__ != "no_proxy" ]
2452             then
2453             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
2454             echo "{" >> /etc/apt/apt.conf.d/apt.conf
2455             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
2456             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2457             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2458             echo "};" >> /etc/apt/apt.conf.d/apt.conf
2459
2460             # Download and run install script
2461             export http_proxy=__http_proxy__
2462             export https_proxy=__https_proxy__
2463             fi
2464             apt-get -y install unzip
2465             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2466             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
2467             unzip -j /opt/boot-__artifacts_version__.zip -d /opt oof_install.sh
2468             cd /opt
2469             chmod +x oof_install.sh
2470             ./oof_install.sh
2471
2472
2473   # AAF instantiation
2474   aaf_private_port:
2475     type: OS::Neutron::Port
2476     properties:
2477       network: { get_resource: oam_onap }
2478       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
2479       security_groups:
2480       - { get_resource: onap_sg }
2481
2482   aaf_floating_ip:
2483     type: OS::Neutron::FloatingIP
2484     properties:
2485       floating_network_id: { get_param: public_net_id }
2486       port_id: { get_resource: aaf_private_port }
2487
2488   aaf_vm:
2489     type: OS::Nova::Server
2490     properties:
2491       image: { get_param: ubuntu_1604_image }
2492       flavor: { get_param: flavor_medium }
2493       name:
2494         str_replace:
2495           template: base-aaf
2496           params:
2497             base: { get_param: vm_base_name }
2498       key_name: { get_resource: vm_key }
2499       networks:
2500         - port: { get_resource: aaf_private_port }
2501       user_data_format: RAW
2502       user_data:
2503         str_replace:
2504           params:
2505             __http_proxy__: { get_param: http_proxy }
2506             __https_proxy__: { get_param: https_proxy }
2507             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
2508             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2509             __nexus_username__: { get_param: nexus_username }
2510             __nexus_password__: { get_param: nexus_password }
2511             __artifacts_version__: { get_param: artifacts_version }
2512             __dns_ip_addr__: { get_param: dns_ip_addr }
2513             __docker_version__: { get_param: aaf_docker }
2514             __cloud_env__: { get_param: cloud_env }
2515             __external_dns__: { get_param: external_dns }
2516             __aaf_repo__: { get_param: aaf_repo }
2517             __gerrit_branch__: { get_param: aaf_branch }
2518             __local_ip__: { get_param: aaf_ip_addr }
2519           template: |
2520             #!/bin/bash
2521
2522             # Create configuration files
2523             mkdir -p /opt/config
2524             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
2525             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2526             echo "__nexus_username__" > /opt/config/nexus_username.txt
2527             echo "__nexus_password__" > /opt/config/nexus_password.txt
2528             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2529             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2530             echo "__docker_version__" > /opt/config/docker_version.txt
2531             echo "__cloud_env__" > /opt/config/cloud_env.txt
2532             echo "__external_dns__" > /opt/config/external_dns.txt
2533             echo "__aaf_repo__" > /opt/config/remote_repo.txt
2534             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2535             echo "__local_ip__" > /opt/config/local_ip.txt
2536             echo "__http_proxy__" > /opt/config/http_proxy.txt
2537             echo "__https_proxy__" > /opt/config/https_proxy.txt
2538             if [ __http_proxy__ != "no_proxy" ]
2539             then
2540             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
2541             echo "{" >> /etc/apt/apt.conf.d/apt.conf
2542             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
2543             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2544             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2545             echo "};" >> /etc/apt/apt.conf.d/apt.conf
2546
2547             # Download and run install script
2548             export http_proxy=__http_proxy__
2549             export https_proxy=__https_proxy__
2550             fi
2551             apt-get -y install unzip
2552             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2553             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
2554             unzip -j /opt/boot-__artifacts_version__.zip -d /opt aaf_install.sh
2555             cd /opt
2556             chmod +x aaf_install.sh
2557             ./aaf_install.sh
2558
2559   # SMS instantiation
2560   sms_private_port:
2561     type: OS::Neutron::Port
2562     properties:
2563       network: { get_resource: oam_onap }
2564       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sms_ip_addr }}]
2565       security_groups:
2566       - { get_resource: onap_sg }
2567
2568   sms_floating_ip:
2569     type: OS::Neutron::FloatingIP
2570     properties:
2571       floating_network_id: { get_param: public_net_id }
2572       port_id: { get_resource: sms_private_port }
2573
2574   sms_vm:
2575     type: OS::Nova::Server
2576     properties:
2577       image: { get_param: ubuntu_1604_image }
2578       flavor: { get_param: flavor_medium }
2579       name:
2580         str_replace:
2581           template: base-sms
2582           params:
2583             base: { get_param: vm_base_name }
2584       key_name: { get_resource: vm_key }
2585       networks:
2586         - port: { get_resource: sms_private_port }
2587       user_data_format: RAW
2588       user_data:
2589         str_replace:
2590           params:
2591             __http_proxy__: { get_param: http_proxy }
2592             __https_proxy__: { get_param: https_proxy }
2593             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
2594             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2595             __nexus_username__: { get_param: nexus_username }
2596             __nexus_password__: { get_param: nexus_password }
2597             __artifacts_version__: { get_param: artifacts_version }
2598             __dns_ip_addr__: { get_param: dns_ip_addr }
2599             __docker_version__: { get_param: sms_docker }
2600             __cloud_env__: { get_param: cloud_env }
2601             __external_dns__: { get_param: external_dns }
2602             __sms_repo__: { get_param: sms_repo }
2603             __gerrit_branch__: { get_param: sms_branch }
2604             __local_ip__: { get_param: sms_ip_addr }
2605           template: |
2606             #!/bin/bash
2607
2608             # Create configuration files
2609             mkdir -p /opt/config
2610             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
2611             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2612             echo "__nexus_username__" > /opt/config/nexus_username.txt
2613             echo "__nexus_password__" > /opt/config/nexus_password.txt
2614             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2615             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2616             echo "__docker_version__" > /opt/config/docker_version.txt
2617             echo "__cloud_env__" > /opt/config/cloud_env.txt
2618             echo "__external_dns__" > /opt/config/external_dns.txt
2619             echo "__sms_repo__" > /opt/config/remote_repo.txt
2620             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2621             echo "__local_ip__" > /opt/config/local_ip.txt
2622             echo "__http_proxy__" > /opt/config/http_proxy.txt
2623             echo "__https_proxy__" > /opt/config/https_proxy.txt
2624             if [ __http_proxy__ != "no_proxy" ]
2625             then
2626             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
2627             echo "{" >> /etc/apt/apt.conf.d/apt.conf
2628             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
2629             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2630             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2631             echo "};" >> /etc/apt/apt.conf.d/apt.conf
2632
2633             # Download and run install script
2634             export http_proxy=__http_proxy__
2635             export https_proxy=__https_proxy__
2636             fi
2637             apt-get -y install unzip
2638             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2639             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
2640             unzip -j /opt/boot-__artifacts_version__.zip -d /opt sms_install.sh
2641             cd /opt
2642             chmod +x sms_install.sh
2643             ./sms_install.sh
2644
2645   # NBI instantiation
2646   nbi_private_port:
2647     type: OS::Neutron::Port
2648     properties:
2649       network: { get_resource: oam_onap }
2650       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: nbi_ip_addr }}]
2651       security_groups:
2652       - { get_resource: onap_sg }
2653
2654   nbi_floating_ip:
2655     type: OS::Neutron::FloatingIP
2656     properties:
2657       floating_network_id: { get_param: public_net_id }
2658       port_id: { get_resource: nbi_private_port }
2659
2660   nbi_vm:
2661     type: OS::Nova::Server
2662     properties:
2663       image: { get_param: ubuntu_1604_image }
2664       flavor: { get_param: flavor_small }
2665       name:
2666         str_replace:
2667           template: base-nbi
2668           params:
2669             base: { get_param: vm_base_name }
2670       key_name: { get_resource: vm_key }
2671       networks:
2672         - port: { get_resource: nbi_private_port }
2673       user_data_format: RAW
2674       user_data:
2675         str_replace:
2676           params:
2677             __http_proxy__: { get_param: http_proxy }
2678             __https_proxy__: { get_param: https_proxy }
2679             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
2680             __nexus_docker_repo__: { get_param: nexus_docker_repo }
2681             __nexus_username__: { get_param: nexus_username }
2682             __nexus_password__: { get_param: nexus_password }
2683             __artifacts_version__: { get_param: artifacts_version }
2684             __dns_ip_addr__: { get_param: dns_ip_addr }
2685             __docker_version__: { get_param: nbi_docker }
2686             __nbi_repo__: { get_param: nbi_repo }
2687             __gerrit_branch__: { get_param: nbi_branch }
2688             __cloud_env__: { get_param: cloud_env }
2689             __external_dns__: { get_param: external_dns }
2690             __sdc_ip_addr__: { get_param: sdc_ip_addr }
2691             __aai1_ip_addr__: { get_param: aai1_ip_addr }
2692             __so_ip_addr__: { get_param: so_ip_addr }
2693           template: |
2694             #!/bin/bash
2695
2696             # Create configuration files
2697             mkdir -p /opt/config
2698             echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
2699             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
2700             echo "__nexus_username__" > /opt/config/nexus_username.txt
2701             echo "__nexus_password__" > /opt/config/nexus_password.txt
2702             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
2703             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
2704             echo "__docker_version__" > /opt/config/docker_version.txt
2705             echo "__nbi_repo__" > /opt/config/remote_repo.txt
2706             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
2707             echo "__cloud_env__" > /opt/config/cloud_env.txt
2708             echo "__external_dns__" > /opt/config/external_dns.txt
2709             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
2710             echo "__aai1_ip_addr__" > /opt/config/aai_ip_addr.txt
2711             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
2712             echo "__http_proxy__" > /opt/config/http_proxy.txt
2713             echo "__https_proxy__" > /opt/config/https_proxy.txt
2714             if [ __http_proxy__ != "no_proxy" ]
2715             then
2716             echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
2717             echo "{" >> /etc/apt/apt.conf.d/apt.conf
2718             echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
2719             echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2720             echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
2721             echo "};" >> /etc/apt/apt.conf.d/apt.conf
2722
2723             # Download and run install script
2724             export http_proxy=__http_proxy__
2725             export https_proxy=__https_proxy__
2726             fi
2727             apt-get -y install unzip
2728             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
2729             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
2730             unzip -j /opt/boot-__artifacts_version__.zip -d /opt nbi_install.sh
2731             cd /opt
2732             chmod +x nbi_install.sh
2733             ./nbi_install.sh