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