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