Fix VNF instantiation issues in SO and Robot
[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: Public network for floating IP address allocation
46
47   ubuntu_1404_image:
48     type: string
49     description: Name of the Ubuntu 14.04 image
50
51   ubuntu_1604_image:
52     type: string
53     description: Name of the Ubuntu 16.04 image
54
55   centos_7_image:
56     type: string
57     description: Name of the CentOS 7 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   security_group:
80     type: string
81     description: Security group used by DCAE GEN 2
82
83   vm_base_name:
84     type: string
85     description: Base name of ONAP VMs
86
87   key_name:
88     type: string
89     description: Public/Private key pair name
90
91   dcae_key_name:
92     type: string
93     description: Public/Private key pair name for DCAE GEN 2
94
95   pub_key:
96     type: string
97     description: Public key to be installed on the compute instance
98
99   dcae_pub_key:
100     type: string
101     description: Public key to be installed on the DCAE GEN 2 compute instance
102
103   nexus_repo:
104     type: string
105     description: Complete URL for the Nexus repository.
106
107   nexus_docker_repo:
108     type: string
109     description: Complete URL for the Nexus repository for docker images.
110
111   nexus_username:
112     type: string
113     description: Nexus Repository username
114
115   nexus_password:
116     type: string
117     description: Nexus Repository Password
118
119   artifacts_version:
120     type: string
121     description: Artifacts version of ONAP components
122
123   dmaap_topic:
124     type: string
125     description: DMaaP Topic name
126
127   openstack_tenant_id:
128     type: string
129     description: Openstack tenant ID
130
131   openstack_username:
132     type: string
133     description: Openstack username
134
135   openstack_auth_method:
136     type: string
137     description: Openstack authentication method (password VS. api-key)
138
139   openstack_api_key:
140     type: string
141     description: Openstack password or API Key
142
143   horizon_url:
144     type: string
145     description: URL of Openstack Horizon
146
147   keystone_url:
148     type: string
149     description: URL of Openstack Keystone
150
151   cloud_env:
152     type: string
153     description: Cloud Provider Name
154
155   ######################
156   #                    #
157   # Network parameters #
158   #                    #
159   ######################
160
161   dns_list:
162     type: comma_delimited_list
163     description: List of External DNS for OAM ONAP network
164
165   external_dns:
166     type: string
167     description: First element of the dns_list for ONAP network
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   dcae_coll_ip_addr:
183     type: string
184   dcae_db_ip_addr:
185     type: string
186   dcae_hdp1_ip_addr:
187     type: string
188   dcae_hdp2_ip_addr:
189     type: string
190   dcae_hdp3_ip_addr:
191     type: string
192   dns_ip_addr:
193     type: string
194   so_ip_addr:
195     type: string
196   mr_ip_addr:
197     type: string
198   policy_ip_addr:
199     type: string
200   portal_ip_addr:
201     type: string
202   robot_ip_addr:
203     type: string
204   sdc_ip_addr:
205     type: string
206   sdnc_ip_addr:
207     type: string
208   vid_ip_addr:
209     type: string
210   clamp_ip_addr:
211     type: string
212   openo_ip_addr:
213     type: string
214   dcae_coll_float_ip:
215     type: string
216   dcae_db_float_ip:
217     type: string
218   dcae_hdp1_float_ip:
219     type: string
220   dcae_hdp2_float_ip:
221     type: string
222   dcae_hdp3_float_ip:
223     type: string
224
225   ###########################
226   #                         #
227   # Parameters used by DCAE #
228   #                         #
229   ###########################
230
231   dcae_base_environment:
232     type: string
233     description: DCAE Base Environment configuration (RACKSPACE/2-NIC/1-NIC-FLOATING-IPS)
234
235   dcae_zone:
236     type: string
237     description: DCAE Zone to use in VM names created by DCAE controller
238
239   dcae_state:
240     type: string
241     description: DCAE State to use in VM names created by DCAE controller
242
243   nexus_repo_root:
244     type: string
245     description: Root URL of Nexus repository
246
247   nexus_url_snapshot:
248     type: string
249     description: Snapshot of Maven repository for DCAE deployment
250
251   openstack_region:
252     type: string
253     description: Region where the DCAE controller will spin the VMs
254
255   gitlab_branch:
256     type: string
257     description: Branch of the Gitlab repository
258     
259   dcae_code_version:
260     type: string
261     description: DCAE Code Version Number
262
263   #####################
264   #                   #
265   # ONAP repositories #
266   #                   #
267   #####################
268
269   aai_repo:
270     type: string
271   appc_repo:
272     type: string
273   dcae_repo:
274     type: string
275   mr_repo:
276     type: string
277   so_repo:
278     type: string
279   policy_repo:
280     type: string
281   portal_repo:
282     type: string
283   robot_repo:
284     type: string
285   sdc_repo:
286     type: string
287   sdnc_repo:
288     type: string
289   vid_repo:
290     type: string
291   clamp_repo:
292     type: string
293   vnfsdk_repo:
294     type: string
295
296   ################################
297   #                              #
298   # Docker versions and branches #
299   #                              #
300   ################################
301
302   aai_docker:
303     type: string
304   appc_docker:
305     type: string
306   so_docker:
307     type: string
308   mr_docker:
309     type: string
310   dcae_docker:
311     type: string
312   policy_docker:
313     type: string
314   portal_docker:
315     type: string
316   robot_docker:
317     type: string
318   sdc_docker:
319     type: string
320   sdnc_docker:
321     type: string
322   vid_docker:
323     type: string
324   clamp_docker:
325     type: string
326   msb_docker:
327     type: string
328   mvim_docker:
329     type: string
330   vfc_docker:
331     type: string
332   uui_docker:
333     type: string
334   esr_docker:
335     type: string
336   dgbuilder_docker:
337     type: string
338   cli_docker:
339     type: string
340
341   aai_branch:
342     type: string
343   appc_branch:
344     type: string
345   so_branch:
346     type: string
347   mr_branch:
348     type: string
349   dcae_branch:
350     type: string
351   policy_branch:
352     type: string
353   portal_branch:
354     type: string
355   robot_branch:
356     type: string
357   sdc_branch:
358     type: string
359   sdnc_branch:
360     type: string
361   vid_branch:
362     type: string
363   clamp_branch:
364     type: string
365   vnfsdk_branch:
366     type: string
367
368
369 #############
370 #           #
371 # RESOURCES #
372 #           #
373 #############
374
375 resources:
376   random-str:
377     type: OS::Heat::RandomString
378     properties:
379       length: 4
380
381
382   # Public key used to access ONAP components
383   vm_key:
384     type: OS::Nova::KeyPair
385     properties:
386       name:
387         str_replace:
388           template: base_rand
389           params:
390             base: { get_param: key_name }
391             rand: { get_resource: random-str }
392       public_key: { get_param: pub_key }
393       save_private_key: false
394
395   # Public key used to access DCAE GEN 2
396   dcae_vm_key:
397     type: OS::Nova::KeyPair
398     properties:
399       name:
400         str_replace:
401           template: base_rand
402           params:
403             base: { get_param: dcae_key_name }
404             rand: { get_resource: random-str }
405       public_key: { get_param: dcae_pub_key }
406       save_private_key: true
407
408   # ONAP management private network
409   oam_onap:
410     type: OS::Neutron::Net
411     properties:
412       name:
413         str_replace:
414           template: oam_onap_rand
415           params:
416             rand: { get_resource: random-str }
417
418   oam_onap_subnet:
419     type: OS::Neutron::Subnet
420     properties:
421       name:
422         str_replace:
423           template: oam_onap_rand
424           params:
425             rand: { get_resource: random-str }
426       network_id: { get_resource: oam_onap }
427       cidr: { get_param: oam_network_cidr }
428       dns_nameservers: { get_param: dns_list }
429
430   router:
431     type: OS::Neutron::Router
432     properties:
433       external_gateway_info:
434         network: { get_param: public_net_id }
435
436   router_interface:
437     type: OS::Neutron::RouterInterface
438     properties:
439       router_id: { get_resource: router }
440       subnet_id: { get_resource: oam_onap_subnet }
441
442
443   # DNS Server instantiation
444   dns_private_port:
445     type: OS::Neutron::Port
446     properties:
447       network: { get_resource: oam_onap }
448       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
449
450   dns_floating_ip:
451     type: OS::Neutron::FloatingIP
452     properties:
453       floating_network_id: { get_param: public_net_id }
454       port_id: { get_resource: dns_private_port }
455
456   dns_vm:
457     type: OS::Nova::Server
458     properties:
459       image: { get_param: ubuntu_1404_image }
460       flavor: { get_param: flavor_small }
461       name:
462         str_replace:
463           template: base-dns-server
464           params:
465             base: { get_param: vm_base_name }
466       key_name: { get_resource: vm_key }
467       networks:
468         - port: { get_resource: dns_private_port }
469       user_data_format: RAW
470       user_data:
471         str_replace:
472           params:
473             __nexus_repo__: { get_param: nexus_repo }
474             __artifacts_version__: { get_param: artifacts_version }
475             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
476             __dns_ip_addr__: { get_param: dns_ip_addr }
477             __aai1_ip_addr__: { get_param: aai1_ip_addr }
478             __aai2_ip_addr__: { get_param: aai2_ip_addr }
479             __appc_ip_addr__: { get_param: appc_ip_addr }
480             __dcae_ip_addr__: { get_param: dcae_ip_addr }
481             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
482             __so_ip_addr__: { get_param: so_ip_addr }
483             __mr_ip_addr__: { get_param: mr_ip_addr }
484             __policy_ip_addr__: { get_param: policy_ip_addr }
485             __portal_ip_addr__: { get_param: portal_ip_addr }
486             __robot_ip_addr__: { get_param: robot_ip_addr }
487             __sdc_ip_addr__: { get_param: sdc_ip_addr }
488             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
489             __vid_ip_addr__: { get_param: vid_ip_addr }
490             __clamp_ip_addr__: { get_param: clamp_ip_addr }
491             __openo_ip_addr__: { get_param: openo_ip_addr }
492             __cloud_env__: { get_param: cloud_env }
493             __external_dns__: { get_param: external_dns }
494           template: |
495             #!/bin/bash
496
497             # Create configuration files
498             mkdir -p /opt/config
499             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
500             echo "__cloud_env__" > /opt/config/cloud_env.txt
501             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
502             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
503             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
504             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
505             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
506             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
507             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
508             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
509             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
510             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
511             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
512             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
513             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
514             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
515             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
516             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
517             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
518             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
519             echo "__external_dns__" > /opt/config/external_dns.txt
520
521             # Download and run install script
522             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
523             cd /opt
524             chmod +x dns_install.sh
525             ./dns_install.sh
526
527
528   # A&AI instantiation (2 VMs)
529   aai1_private_port:
530     type: OS::Neutron::Port
531     properties:
532       network: { get_resource: oam_onap }
533       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
534
535   aai1_floating_ip:
536     type: OS::Neutron::FloatingIP
537     properties:
538       floating_network_id: { get_param: public_net_id }
539       port_id: { get_resource: aai1_private_port }
540
541   aai1_vm:
542     type: OS::Nova::Server
543     depends_on: aai2_vm
544     properties:
545       image: { get_param: ubuntu_1404_image }
546       flavor: { get_param: flavor_xlarge }
547       name:
548         str_replace:
549           template: base-aai-inst1
550           params:
551             base: { get_param: vm_base_name }      
552       key_name: { get_resource: vm_key }
553       networks:
554         - port: { get_resource: aai1_private_port }
555       user_data_format: RAW
556       user_data:
557         str_replace:
558           params:
559             __nexus_repo__: { get_param: nexus_repo }
560             __nexus_docker_repo__: { get_param: nexus_docker_repo }
561             __nexus_username__: { get_param: nexus_username }
562             __nexus_password__: { get_param: nexus_password }
563             __dmaap_topic__: { get_param: dmaap_topic }
564             __artifacts_version__: { get_param: artifacts_version }
565             __dns_ip_addr__: { get_param: dns_ip_addr }
566             __docker_version__: { get_param: aai_docker }
567             __gerrit_branch__: { get_param: aai_branch }
568             __cloud_env__: { get_param: cloud_env }
569             __external_dns__: { get_param: external_dns }
570             __aai_repo__: { get_param: aai_repo }
571           template: |
572             #!/bin/bash
573
574             # Create configuration files
575             mkdir -p /opt/config
576             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
577             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
578             echo "__nexus_username__" > /opt/config/nexus_username.txt
579             echo "__nexus_password__" > /opt/config/nexus_password.txt
580             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
581             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
582             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
583             echo "__docker_version__" > /opt/config/docker_version.txt
584             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
585             echo "aai_instance_1" > /opt/config/aai_instance.txt
586             echo "__cloud_env__" > /opt/config/cloud_env.txt
587             echo "__external_dns__" > /opt/config/external_dns.txt
588             echo "__aai_repo__" > /opt/config/remote_repo.txt
589
590             # Download and run install script
591             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
592             cd /opt
593             chmod +x aai_install.sh
594             ./aai_install.sh
595
596
597   aai2_private_port:
598     type: OS::Neutron::Port
599     properties:
600       network: { get_resource: oam_onap }
601       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
602
603   aai2_floating_ip:
604     type: OS::Neutron::FloatingIP
605     properties:
606       floating_network_id: { get_param: public_net_id }
607       port_id: { get_resource: aai2_private_port }
608
609   aai2_vm:
610     type: OS::Nova::Server
611     properties:
612       image: { get_param: ubuntu_1404_image }
613       flavor: { get_param: flavor_xlarge }
614       name:
615         str_replace:
616           template: base-aai-inst2
617           params:
618             base: { get_param: vm_base_name }      
619       key_name: { get_resource: vm_key }
620       networks:
621         - port: { get_resource: aai2_private_port }
622       user_data_format: RAW
623       user_data:
624         str_replace:
625           params:
626             __nexus_repo__: { get_param: nexus_repo }
627             __nexus_docker_repo__: { get_param: nexus_docker_repo }
628             __nexus_username__: { get_param: nexus_username }
629             __nexus_password__: { get_param: nexus_password }
630             __dmaap_topic__: { get_param: dmaap_topic }
631             __artifacts_version__: { get_param: artifacts_version }
632             __dns_ip_addr__: { get_param: dns_ip_addr }
633             __docker_version__: { get_param: aai_docker }
634             __gerrit_branch__: { get_param: aai_branch }
635             __cloud_env__: { get_param: cloud_env }
636             __external_dns__: { get_param: external_dns }
637             __aai_repo__: { get_param: aai_repo }
638           template: |
639             #!/bin/bash
640
641             # Create configuration files
642             mkdir -p /opt/config
643             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
644             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
645             echo "__nexus_username__" > /opt/config/nexus_username.txt
646             echo "__nexus_password__" > /opt/config/nexus_password.txt
647             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
648             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
649             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
650             echo "__docker_version__" > /opt/config/docker_version.txt
651             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
652             echo "aai_instance_2" > /opt/config/aai_instance.txt
653             echo "__cloud_env__" > /opt/config/cloud_env.txt
654             echo "__external_dns__" > /opt/config/external_dns.txt
655             echo "__aai_repo__" > /opt/config/remote_repo.txt
656
657             # Download and run install script
658             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
659             cd /opt
660             chmod +x aai_install.sh
661             ./aai_install.sh
662
663
664   # SO instantiation
665   so_private_port:
666     type: OS::Neutron::Port
667     properties:
668       network: { get_resource: oam_onap }
669       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: so_ip_addr }}]
670
671   so_floating_ip:
672     type: OS::Neutron::FloatingIP
673     properties:
674       floating_network_id: { get_param: public_net_id }
675       port_id: { get_resource: so_private_port }
676
677   so_vm:
678     type: OS::Nova::Server
679     properties:
680       image: { get_param: ubuntu_1604_image }
681       flavor: { get_param: flavor_large }
682       name:
683         str_replace:
684           template: base-so
685           params:
686             base: { get_param: vm_base_name }      
687       key_name: { get_resource: vm_key }
688       networks:
689         - port: { get_resource: so_private_port }
690       user_data_format: RAW
691       user_data:
692         str_replace:
693           params:
694             __nexus_repo__: { get_param: nexus_repo }
695             __nexus_docker_repo__: { get_param: nexus_docker_repo }
696             __nexus_username__: { get_param: nexus_username }
697             __nexus_password__: { get_param: nexus_password }
698             __openstack_username__: { get_param: openstack_username }
699             __openstack_tenant_id__: { get_param: openstack_tenant_id }
700             __openstack_api_key__: { get_param: openstack_api_key }
701             __openstack_region__: { get_param: openstack_region }
702             __keystone_url__: { get_param: keystone_url }
703             __dmaap_topic__: { get_param: dmaap_topic }
704             __artifacts_version__: { get_param: artifacts_version }
705             __dns_ip_addr__: { get_param: dns_ip_addr }
706             __docker_version__: { get_param: so_docker }
707             __gerrit_branch__: { get_param: so_branch }
708             __cloud_env__: { get_param: cloud_env }
709             __external_dns__: { get_param: external_dns }
710             __so_repo__: { get_param: so_repo }
711           template: |
712             #!/bin/bash
713
714             # Create configuration files
715             mkdir -p /opt/config
716             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
717             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
718             echo "__nexus_username__" > /opt/config/nexus_username.txt
719             echo "__nexus_password__" > /opt/config/nexus_password.txt
720             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
721             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
722             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
723             echo "__openstack_username__" > /opt/config/openstack_username.txt
724             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
725             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
726             echo "__openstack_region__" > /opt/config/openstack_region.txt
727             echo "__keystone_url__" > /opt/config/keystone.txt
728             echo "__docker_version__" > /opt/config/docker_version.txt
729             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
730             echo "__cloud_env__" > /opt/config/cloud_env.txt
731             echo "__external_dns__" > /opt/config/external_dns.txt
732             echo "__so_repo__" > /opt/config/remote_repo.txt
733
734             # Download and run install script
735             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/so_install.sh -o /opt/so_install.sh
736             cd /opt
737             chmod +x so_install.sh
738             ./so_install.sh
739
740
741   # Message Router instantiation
742   mrouter_private_port:
743     type: OS::Neutron::Port
744     properties:
745       network: { get_resource: oam_onap }
746       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
747
748   mrouter_floating_ip:
749     type: OS::Neutron::FloatingIP
750     properties:
751       floating_network_id: { get_param: public_net_id }
752       port_id: { get_resource: mrouter_private_port }
753
754   mrouter_vm:
755     type: OS::Nova::Server
756     properties:
757       image: { get_param: ubuntu_1404_image }
758       flavor: { get_param: flavor_large }
759       name:
760         str_replace: 
761           template: base-message-router
762           params:
763             base: { get_param: vm_base_name }
764       key_name: { get_resource: vm_key }
765       networks:
766         - port: { get_resource: mrouter_private_port }
767       user_data_format: RAW
768       user_data:
769         str_replace:
770           params:
771             __nexus_repo__: { get_param: nexus_repo }
772             __nexus_docker_repo__: { get_param: nexus_docker_repo }
773             __nexus_username__: { get_param: nexus_username }
774             __nexus_password__: { get_param: nexus_password }
775             __artifacts_version__: { get_param: artifacts_version }
776             __dns_ip_addr__: { get_param: dns_ip_addr }
777             __gerrit_branch__: { get_param: mr_branch }
778             __cloud_env__: { get_param: cloud_env }
779             __external_dns__: { get_param: external_dns }
780             __mr_repo__: { get_param: mr_repo }
781           template: |
782             #!/bin/bash
783
784             # Create configuration files
785             mkdir -p /opt/config
786             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
787             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
788             echo "__nexus_username__" > /opt/config/nexus_username.txt
789             echo "__nexus_password__" > /opt/config/nexus_password.txt
790             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
791             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
792             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
793             echo "__cloud_env__" > /opt/config/cloud_env.txt
794             echo "__external_dns__" > /opt/config/external_dns.txt
795             echo "__mr_repo__" > /opt/config/remote_repo.txt
796
797             # Download and run install script
798             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
799             cd /opt
800             chmod +x mr_install.sh
801             ./mr_install.sh
802
803
804   # Robot Framework instantiation
805   robot_private_port:
806     type: OS::Neutron::Port
807     properties:
808       network: { get_resource: oam_onap }
809       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
810
811   robot_floating_ip:
812     type: OS::Neutron::FloatingIP
813     properties:
814       floating_network_id: { get_param: public_net_id }
815       port_id: { get_resource: robot_private_port }
816  
817   robot_vm:
818     type: OS::Nova::Server
819     properties:
820       image: { get_param: ubuntu_1604_image }
821       flavor: { get_param: flavor_medium }
822       name:
823         str_replace: 
824           template: base-robot
825           params:
826             base: { get_param: vm_base_name }
827       key_name: { get_resource: vm_key }
828       networks:
829         - port: { get_resource: robot_private_port }
830       user_data_format: RAW
831       user_data:
832         str_replace:
833           params:
834             __nexus_repo__: { get_param: nexus_repo }
835             __nexus_docker_repo__: { get_param: nexus_docker_repo }
836             __nexus_username__: { get_param: nexus_username }
837             __nexus_password__: { get_param: nexus_password }
838             __network_name__: { get_attr: [oam_onap, name] }
839             __openstack_username__: { get_param: openstack_username }
840             __openstack_api_key__: { get_param : openstack_api_key }
841             __openstack_tenant_id__: { get_param: openstack_tenant_id }
842             __artifacts_version__: { get_param: artifacts_version }
843             __openstack_region__: { get_param: openstack_region }
844             __dns_ip_addr__: { get_param: dns_ip_addr }
845             __docker_version__: { get_param: mr_docker }
846             __gerrit_branch__: { get_param: mr_branch }
847             __cloud_env__: { get_param: cloud_env }
848             __keystone_url__: { get_param: keystone_url }
849             __aai1_ip_addr__: { get_param: aai1_ip_addr }
850             __aai2_ip_addr__: { get_param: aai2_ip_addr }
851             __appc_ip_addr__: { get_param: appc_ip_addr }
852             __dcae_ip_addr__: { get_param: dcae_ip_addr }
853             __so_ip_addr__: { get_param: so_ip_addr }
854             __mr_ip_addr__: { get_param: mr_ip_addr }
855             __policy_ip_addr__: { get_param: policy_ip_addr }
856             __portal_ip_addr__: { get_param: portal_ip_addr }
857             __sdc_ip_addr__: { get_param: sdc_ip_addr }
858             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
859             __vid_ip_addr__: { get_param: vid_ip_addr }
860             __clamp_ip_addr__: { get_param: clamp_ip_addr }
861             __openo_ip_addr__: { get_param: openo_ip_addr }
862             __external_dns__: { get_param: external_dns }
863             __vm_image_name__: { get_param: ubuntu_1404_image }
864             __vm_flavor__: { get_param: flavor_medium }
865             __public_net_id__: { get_param: public_net_id }
866             __script_version__: { get_param: artifact_version }
867             __robot_repo__: { get_param: robot_repo }
868           template: |
869             #!/bin/bash
870
871             # Create configuration files
872             mkdir -p /opt/config
873             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
874             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
875             echo "__nexus_username__" > /opt/config/nexus_username.txt
876             echo "__nexus_password__" > /opt/config/nexus_password.txt
877             echo "__network_name__" > /opt/config/network.txt
878             echo "__openstack_username__" > /opt/config/openstack_username.txt
879             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
880             echo "__openstack_tenant_id__" > /opt/config/openstack_tenant_id.txt
881             echo "__openstack_region__" > /opt/config/region.txt
882             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
883             echo "__docker_version__" > /opt/config/docker_version.txt
884             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
885             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
886             echo "__keystone_url__" > /opt/config/keystone.txt
887             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
888             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
889             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
890             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
891             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
892             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
893             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
894             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
895             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
896             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
897             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
898             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
899             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
900             echo "__cloud_env__" > /opt/config/cloud_env.txt
901             echo "__external_dns__" > /opt/config/external_dns.txt
902             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
903             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
904             echo "__script_version__" > /opt/config/script_version.txt
905             echo "__public_net_id__" > /opt/config/public_net_id.txt
906             echo "__robot_repo__" > /opt/config/remote_repo.txt
907
908             # Download and run install script
909             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
910             cd /opt
911             chmod +x robot_install.sh
912             ./robot_install.sh
913
914
915   # VID instantiation
916   vid_private_port:
917     type: OS::Neutron::Port
918     properties:
919       network: { get_resource: oam_onap }
920       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
921
922   vid_floating_ip:
923     type: OS::Neutron::FloatingIP
924     properties:
925       floating_network_id: { get_param: public_net_id }
926       port_id: { get_resource: vid_private_port }
927
928   vid_vm:
929     type: OS::Nova::Server
930     properties:
931       image: { get_param: ubuntu_1404_image }
932       flavor: { get_param: flavor_medium }
933       name:
934         str_replace: 
935           template: base-vid
936           params:
937             base: { get_param: vm_base_name }
938       key_name: { get_resource: vm_key }
939       networks:
940         - port: { get_resource: vid_private_port }
941       user_data_format: RAW
942       user_data:
943         str_replace:
944           params:
945             __nexus_repo__: { get_param: nexus_repo }
946             __nexus_docker_repo__: { get_param: nexus_docker_repo }
947             __nexus_username__: { get_param: nexus_username }
948             __nexus_password__: { get_param: nexus_password }
949             __artifacts_version__: { get_param: artifacts_version }
950             __dns_ip_addr__: { get_param: dns_ip_addr }
951             __docker_version__: { get_param: vid_docker }
952             __gerrit_branch__: { get_param: vid_branch }
953             __cloud_env__: { get_param: cloud_env }
954             __external_dns__: { get_param: external_dns }
955             __vid_repo__: { get_param: vid_repo }
956           template: |
957             #!/bin/bash
958
959             # Create configuration files
960             mkdir -p /opt/config
961             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
962             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
963             echo "__nexus_username__" > /opt/config/nexus_username.txt
964             echo "__nexus_password__" > /opt/config/nexus_password.txt
965             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
966             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
967             echo "__docker_version__" > /opt/config/docker_version.txt
968             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
969             echo "__cloud_env__" > /opt/config/cloud_env.txt
970             echo "__external_dns__" > /opt/config/external_dns.txt
971             echo "__vid_repo__" > /opt/config/remote_repo.txt
972
973             # Download and run install script
974             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
975             cd /opt
976             chmod +x vid_install.sh
977             ./vid_install.sh
978
979  
980   # SDN-C instantiation
981   sdnc_private_port:
982     type: OS::Neutron::Port
983     properties:
984       network: { get_resource: oam_onap }
985       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
986
987   sdnc_floating_ip:
988     type: OS::Neutron::FloatingIP
989     properties:
990       floating_network_id: { get_param: public_net_id }
991       port_id: { get_resource: sdnc_private_port }
992
993   sdnc_vm:
994     type: OS::Nova::Server
995     properties:
996       image: { get_param: ubuntu_1404_image }
997       flavor: { get_param: flavor_large }
998       name:
999         str_replace: 
1000           template: base-sdnc
1001           params:
1002             base: { get_param: vm_base_name }
1003       key_name: { get_resource: vm_key }
1004       networks:
1005         - port: { get_resource: sdnc_private_port }
1006       user_data_format: RAW
1007       user_data:
1008         str_replace:
1009           params:
1010             __nexus_repo__: { get_param: nexus_repo }
1011             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1012             __nexus_username__: { get_param: nexus_username }
1013             __nexus_password__: { get_param: nexus_password }
1014             __artifacts_version__: { get_param: artifacts_version }
1015             __dns_ip_addr__: { get_param: dns_ip_addr }
1016             __docker_version__: { get_param: sdnc_docker }
1017             __gerrit_branch__: { get_param: sdnc_branch }
1018             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1019             __cloud_env__: { get_param: cloud_env }
1020             __external_dns__: { get_param: external_dns }
1021             __sdnc_repo__: { get_param: sdnc_repo }
1022           template: |
1023             #!/bin/bash
1024
1025             # Create configuration files
1026             mkdir -p /opt/config
1027             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1028             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1029             echo "__nexus_username__" > /opt/config/nexus_username.txt
1030             echo "__nexus_password__" > /opt/config/nexus_password.txt
1031             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1032             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1033             echo "__docker_version__" > /opt/config/docker_version.txt
1034             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1035             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1036             echo "__cloud_env__" > /opt/config/cloud_env.txt
1037             echo "__external_dns__" > /opt/config/external_dns.txt
1038             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
1039
1040             # Download and run install script
1041             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
1042             cd /opt
1043             chmod +x sdnc_install.sh
1044             ./sdnc_install.sh
1045
1046
1047   # SDC instantiation
1048   sdc_private_port:
1049     type: OS::Neutron::Port
1050     properties:
1051       network: { get_resource: oam_onap }
1052       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1053
1054   sdc_floating_ip:
1055     type: OS::Neutron::FloatingIP
1056     properties:
1057       floating_network_id: { get_param: public_net_id }
1058       port_id: { get_resource: sdc_private_port }
1059
1060   sdc_volume_data:
1061     type: OS::Cinder::Volume
1062     properties:
1063       name: vol1-sdc-data
1064       size: 100
1065
1066   sdc_vm:
1067     type: OS::Nova::Server
1068     properties:
1069       image: { get_param: ubuntu_1604_image }
1070       flavor: { get_param: flavor_xlarge }
1071       name:
1072         str_replace: 
1073           template: base-sdc
1074           params:
1075             base: { get_param: vm_base_name }
1076       key_name: { get_resource: vm_key }
1077       networks:
1078         - port: { get_resource: sdc_private_port }
1079       block_device_mapping:
1080         - device_name: /dev/vdb
1081           volume_id: {get_resource: sdc_volume_data}
1082       user_data_format: RAW
1083       user_data:
1084         str_replace:
1085           params:
1086             __nexus_repo__: { get_param: nexus_repo }
1087             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1088             __nexus_username__: { get_param: nexus_username }
1089             __nexus_password__: { get_param: nexus_password }
1090             __env_name__: { get_param: dmaap_topic }
1091             __artifacts_version__: { get_param: artifacts_version }
1092             __dns_ip_addr__: { get_param: dns_ip_addr }
1093             __mr_ip_addr__: { get_param: mr_ip_addr }
1094             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1095             __docker_version__: { get_param: sdc_docker }
1096             __gerrit_branch__: { get_param: sdc_branch }
1097             __cloud_env__: { get_param: cloud_env }
1098             __external_dns__: { get_param: external_dns }
1099             __sdc_repo__: { get_param: sdc_repo }
1100           template: |
1101             #!/bin/bash
1102
1103             # Create configuration files
1104             mkdir -p /opt/config
1105             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1106             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1107             echo "__nexus_username__" > /opt/config/nexus_username.txt
1108             echo "__nexus_password__" > /opt/config/nexus_password.txt
1109             echo "__env_name__" > /opt/config/env_name.txt
1110             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1111             echo "__public_ip__" > /opt/config/public_ip.txt
1112             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1113             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1114             echo "__docker_version__" > /opt/config/docker_version.txt
1115             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1116             echo "__cloud_env__" > /opt/config/cloud_env.txt
1117             echo "__external_dns__" > /opt/config/external_dns.txt
1118             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1119
1120             # Download and run install script
1121             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
1122             cd /opt
1123             chmod +x sdc_install.sh
1124             ./sdc_install.sh
1125
1126
1127   # PORTAL instantiation
1128   portal_private_port:
1129     type: OS::Neutron::Port
1130     properties:
1131       network: { get_resource: oam_onap }
1132       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1133
1134   portal_floating_ip:
1135     type: OS::Neutron::FloatingIP
1136     properties:
1137       floating_network_id: { get_param: public_net_id }
1138       port_id: { get_resource: portal_private_port }
1139
1140   portal_vm:
1141     type: OS::Nova::Server
1142     properties:
1143       image: { get_param: ubuntu_1404_image }
1144       flavor: { get_param: flavor_large }
1145       name:
1146         str_replace: 
1147           template: base-portal
1148           params:
1149             base: { get_param: vm_base_name }
1150       key_name: { get_resource: vm_key }
1151       networks:
1152         - port: { get_resource: portal_private_port }
1153       user_data_format: RAW
1154       user_data:
1155         str_replace:
1156           params:
1157             __nexus_repo__: { get_param: nexus_repo }
1158             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1159             __nexus_username__: { get_param: nexus_username }
1160             __nexus_password__: { get_param: nexus_password }
1161             __artifacts_version__: { get_param: artifacts_version }
1162             __dns_ip_addr__: { get_param: dns_ip_addr }
1163             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1164             __docker_version__: { get_param: portal_docker }
1165             __gerrit_branch__: { get_param: portal_branch }
1166             __cli_docker__: { get_param: cli_docker }
1167             __cloud_env__: { get_param: cloud_env }
1168             __external_dns__: { get_param: external_dns }
1169             __portal_repo__: { get_param: portal_repo }
1170           template: |
1171             #!/bin/bash
1172
1173             # Create configuration files
1174             mkdir -p /opt/config
1175             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1176             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1177             echo "__nexus_username__" > /opt/config/nexus_username.txt
1178             echo "__nexus_password__" > /opt/config/nexus_password.txt
1179             echo "__public_ip__" > /opt/config/public_ip.txt
1180             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1181             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1182             echo "__docker_version__" > /opt/config/docker_version.txt
1183             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1184             echo "__cli_docker__" > /opt/config/cli_docker_version.txt
1185             echo "__cloud_env__" > /opt/config/cloud_env.txt
1186             echo "__external_dns__" > /opt/config/external_dns.txt
1187             echo "__portal_repo__" > /opt/config/remote_repo.txt
1188
1189             # Download and run install script
1190             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1191             cd /opt
1192             chmod +x portal_install.sh
1193             ./portal_install.sh
1194
1195
1196   # DCAE Controller instantiation
1197 #  dcae_c_private_port:
1198 #    type: OS::Neutron::Port
1199 #    properties:
1200 #      network: { get_resource: oam_onap }
1201 #      fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1202
1203 #  dcae_c_floating_ip:
1204 #    type: OS::Neutron::FloatingIP
1205 #    properties:
1206 #      floating_network_id: { get_param: public_net_id }
1207 #      port_id: { get_resource: dcae_c_private_port }
1208
1209 #  dcae_c_vm:
1210 #    type: OS::Nova::Server
1211 #    properties:
1212 #      image: { get_param: ubuntu_1404_image }
1213 #      flavor: { get_param: flavor_medium }
1214 #      name:
1215 #        str_replace: 
1216 #          template: base-dcae-controller
1217 #          params:
1218 #            base: { get_param: vm_base_name }
1219 #      key_name: { get_resource: vm_key }
1220 #      networks:
1221 #        - port: { get_resource: dcae_c_private_port }
1222 #      user_data_format: RAW
1223 #      user_data:
1224 #        str_replace:
1225 #          params:
1226 #            __nexus_repo__: { get_param: nexus_repo }
1227 #            __nexus_docker_repo__: { get_param: nexus_docker_repo }
1228 #            __nexus_username__: { get_param: nexus_username }
1229 #            __nexus_password__: { get_param: nexus_password }
1230 #            __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1231 #            __gitlab_branch__: { get_param: gitlab_branch }
1232 #            __dns_ip_addr__: { get_param: dns_ip_addr }
1233 #            __dcae_zone__: { get_param: dcae_zone }
1234 #            __dcae_state__: { get_param: dcae_state }
1235 #            __artifacts_version__: { get_param: artifacts_version }
1236 #            __tenant_id__: { get_param: openstack_tenant_id }
1237 #            __openstack_private_network_name__: { get_attr: [oam_onap, name] }
1238 #            __openstack_user__: { get_param: openstack_username }
1239 #            __openstack_password__: { get_param: openstack_api_key }
1240 #            __openstack_auth_method__: { get_param: openstack_auth_method }
1241 #            __key_name__: { get_param: key_name }
1242 #            __rand_str__: { get_resource: random-str }
1243 #            __pub_key__: { get_param: pub_key }
1244 #            __nexus_repo_root__: { get_param: nexus_repo_root }
1245 #            __openstack_region__: { get_param: openstack_region }
1246 #            __horizon_url__: { get_param: horizon_url }
1247 #            __keystone_url__: { get_param: keystone_url }
1248 #            __docker_version__: { get_param: dcae_docker }
1249 #            __gerrit_branch__: { get_param: dcae_branch }
1250 #            __dcae_code_version__: { get_param: dcae_code_version }
1251 #            __cloud_env__: { get_param: cloud_env }
1252 #            __public_net_id__: { get_param: public_net_id }
1253 #            __dcae_base_environment__: { get_param: dcae_base_environment }
1254 #            __dcae_ip_addr__: { get_param: dcae_ip_addr }
1255 #            __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1256 #            __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1257 #            __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1258 #            __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1259 #            __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1260 #            __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1261 #            __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1262 #            __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1263 #            __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1264 #            __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1265 #            __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1266 #            __external_dns__: { get_param: external_dns }
1267 #            __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1268 #            __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1269 #            __flavor_small__: { get_param: flavor_small }
1270 #            __flavor_medium__: { get_param: flavor_medium }
1271 #            __flavor_large__: { get_param: flavor_large }
1272 #            __flavor_xlarge__: { get_param: flavor_xlarge }
1273 #            __dcae_repo__: { get_param: dcae_repo }
1274 #            __mr_repo__: { get_param: mr_repo }
1275 #          template: |
1276             #!/bin/bash
1277
1278             # Create configuration files
1279 #            mkdir -p /opt/config
1280 #            echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1281 #            echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1282 #            echo "__nexus_username__" > /opt/config/nexus_username.txt
1283 #            echo "__nexus_password__" > /opt/config/nexus_password.txt
1284 #            echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1285 #            echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1286 #            echo "__docker_version__" > /opt/config/docker_version.txt
1287 #            echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1288 #            echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1289 #            echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1290 #            echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1291 #            echo "__dcae_state__" > /opt/config/dcae_state.txt
1292 #            echo "__tenant_id__" > /opt/config/tenant_id.txt
1293 #            echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1294 #            echo "__openstack_user__" > /opt/config/openstack_user.txt
1295 #            echo "__openstack_password__" > /opt/config/openstack_password.txt
1296 #            echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1297 #            echo "__key_name__" > /opt/config/key_name.txt
1298 #            echo "__rand_str__" > /opt/config/rand_str.txt
1299 #            echo "__pub_key__" > /opt/config/pub_key.txt
1300 #            echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1301 #            echo "__openstack_region__" > /opt/config/openstack_region.txt
1302 #            echo "__horizon_url__" > /opt/config/horizon_url.txt
1303 #            echo "__keystone_url__" > /opt/config/keystone_url.txt
1304 #            echo "__cloud_env__" > /opt/config/cloud_env.txt
1305 #            echo "__public_net_id__" > /opt/config/public_net_id.txt
1306 #            echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1307 #            echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1308 #            echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1309 #            echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1310 #            echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1311 #            echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1312 #            echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1313 #            echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1314 #            echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1315 #            echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1316 #            echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1317 #            echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1318 #            echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1319 #            echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1320 #            echo "__external_dns__" > /opt/config/external_dns.txt
1321 #            echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1322 #            echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1323 #            echo "__flavor_small__" > /opt/config/flavor_small.txt
1324 #            echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1325 #            echo "__flavor_large__" > /opt/config/flavor_large.txt
1326 #            echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1327 #            echo "__dcae_repo__" > /opt/config/remote_repo.txt
1328 #            echo "__mr_repo__" > /opt/config/mr_repo.txt
1329
1330             # Download and run install script
1331 #            curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1332 #            cd /opt
1333 #            chmod +x dcae_install.sh
1334 #            ./dcae_install.sh
1335
1336
1337   # Policy Engine instantiation
1338   policy_private_port:
1339     type: OS::Neutron::Port
1340     properties:
1341       network: { get_resource: oam_onap }
1342       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1343
1344   policy_floating_ip:
1345     type: OS::Neutron::FloatingIP
1346     properties:
1347       floating_network_id: { get_param: public_net_id }
1348       port_id: { get_resource: policy_private_port }
1349
1350   policy_vm:
1351     type: OS::Nova::Server
1352     properties:
1353       image: { get_param: ubuntu_1404_image }
1354       flavor: { get_param: flavor_xlarge }
1355       name:
1356         str_replace: 
1357           template: base-policy
1358           params:
1359             base: { get_param: vm_base_name }
1360       key_name: { get_resource: vm_key }
1361       networks:
1362         - port: { get_resource: policy_private_port }
1363       user_data_format: RAW
1364       user_data:
1365         str_replace:
1366           params:
1367             __nexus_repo__: { get_param: nexus_repo }
1368             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1369             __nexus_username__: { get_param: nexus_username }
1370             __nexus_password__: { get_param: nexus_password }
1371             __artifacts_version__: { get_param: artifacts_version }
1372             __dns_ip_addr__: { get_param: dns_ip_addr }
1373             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1374             __docker_version__: { get_param: policy_docker }
1375             __gerrit_branch__: { get_param: policy_branch }
1376             __cloud_env__: { get_param: cloud_env }
1377             __external_dns__: { get_param: external_dns }
1378             __policy_repo__: { get_param: policy_repo }
1379           template: |
1380             #!/bin/bash
1381
1382             # Create configuration files
1383             mkdir -p /opt/config
1384             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1385             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1386             echo "__nexus_username__" > /opt/config/nexus_username.txt
1387             echo "__nexus_password__" > /opt/config/nexus_password.txt
1388             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1389             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1390             echo "__public_ip__" > /opt/config/public_ip.txt
1391             echo "__docker_version__" > /opt/config/docker_version.txt
1392             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1393             echo "__cloud_env__" > /opt/config/cloud_env.txt
1394             echo "__external_dns__" > /opt/config/external_dns.txt
1395             echo "__policy_repo__" > /opt/config/remote_repo.txt
1396
1397             # Download and run install script
1398             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1399             cd /opt
1400             chmod +x policy_install.sh
1401             ./policy_install.sh
1402
1403
1404   # APP-C instantiation
1405   appc_private_port:
1406     type: OS::Neutron::Port
1407     properties:
1408       network: { get_resource: oam_onap }
1409       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1410
1411   appc_floating_ip:
1412     type: OS::Neutron::FloatingIP
1413     properties:
1414       floating_network_id: { get_param: public_net_id }
1415       port_id: { get_resource: appc_private_port }
1416
1417   appc_vm:
1418     type: OS::Nova::Server
1419     properties:
1420       image: { get_param: ubuntu_1404_image }
1421       flavor: { get_param: flavor_large }
1422       name:
1423         str_replace: 
1424           template: base-appc
1425           params:
1426             base: { get_param: vm_base_name }
1427       key_name: { get_resource: vm_key }
1428       networks:
1429         - port: { get_resource: appc_private_port }
1430       user_data_format: RAW
1431       user_data:
1432         str_replace:
1433           params:
1434             __nexus_repo__: { get_param: nexus_repo }
1435             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1436             __nexus_username__: { get_param: nexus_username }
1437             __nexus_password__: { get_param: nexus_password }
1438             __dmaap_topic__: { get_param: dmaap_topic }
1439             __artifacts_version__: { get_param: artifacts_version }
1440             __dns_ip_addr__: { get_param: dns_ip_addr }
1441             __docker_version__: { get_param: appc_docker }
1442             __gerrit_branch__: { get_param: appc_branch }
1443             __dgbuilder_docker__: { get_param: dgbuilder_docker }
1444             __cloud_env__: { get_param: cloud_env }
1445             __external_dns__: { get_param: external_dns }
1446             __appc_repo__: { get_param: appc_repo }
1447           template: |
1448             #!/bin/bash
1449
1450             # Create configuration files
1451             mkdir -p /opt/config
1452             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1453             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1454             echo "__nexus_username__" > /opt/config/nexus_username.txt
1455             echo "__nexus_password__" > /opt/config/nexus_password.txt
1456             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1457             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1458             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1459             echo "__docker_version__" > /opt/config/docker_version.txt
1460             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1461             echo "__dgbuilder_docker__" > /opt/config/dgbuilder_version.txt
1462             echo "__cloud_env__" > /opt/config/cloud_env.txt
1463             echo "__external_dns__" > /opt/config/external_dns.txt
1464             echo "__appc_repo__" > /opt/config/remote_repo.txt
1465
1466             # Download and run install script
1467             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1468             cd /opt
1469             chmod +x appc_install.sh
1470             ./appc_install.sh
1471
1472
1473   # CLAMP instantiation
1474   clamp_private_port:
1475     type: OS::Neutron::Port
1476     properties:
1477       network: { get_resource: oam_onap }
1478       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1479
1480   clamp_floating_ip:
1481     type: OS::Neutron::FloatingIP
1482     properties:
1483       floating_network_id: { get_param: public_net_id }
1484       port_id: { get_resource: clamp_private_port }
1485
1486   clamp_vm:
1487     type: OS::Nova::Server
1488     properties:
1489       image: { get_param: ubuntu_1604_image }
1490       flavor: { get_param: flavor_medium }
1491       name:
1492         str_replace:
1493           template: base-clamp
1494           params:
1495             base: { get_param: vm_base_name }      
1496       key_name: { get_resource: vm_key }
1497       networks:
1498         - port: { get_resource: clamp_private_port }
1499       user_data_format: RAW
1500       user_data:
1501         str_replace:
1502           params:
1503             __nexus_repo__: { get_param: nexus_repo }
1504             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1505             __nexus_username__: { get_param: nexus_username }
1506             __nexus_password__: { get_param: nexus_password }
1507             __openstack_username__: { get_param: openstack_username }
1508             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1509             __openstack_api_key__: { get_param: openstack_api_key }
1510             __openstack_region__: { get_param: openstack_region }
1511             __keystone_url__: { get_param: keystone_url }
1512             __dmaap_topic__: { get_param: dmaap_topic }
1513             __artifacts_version__: { get_param: artifacts_version }
1514             __dns_ip_addr__: { get_param: dns_ip_addr }
1515             __docker_version__: { get_param: clamp_docker }
1516             __gerrit_branch__: { get_param: clamp_branch }
1517             __cloud_env__: { get_param: cloud_env }
1518             __external_dns__: { get_param: external_dns }
1519             __clamp_repo__: { get_param: clamp_repo }
1520           template: |
1521             #!/bin/bash
1522
1523             # Create configuration files
1524             mkdir -p /opt/config
1525             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1526             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1527             echo "__nexus_username__" > /opt/config/nexus_username.txt
1528             echo "__nexus_password__" > /opt/config/nexus_password.txt
1529             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1530             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1531             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1532             echo "__openstack_username__" > /opt/config/openstack_username.txt
1533             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1534             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1535             echo "__openstack_region__" > /opt/config/openstack_region.txt
1536             echo "__keystone_url__" > /opt/config/keystone.txt
1537             echo "__docker_version__" > /opt/config/docker_version.txt
1538             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1539             echo "__cloud_env__" > /opt/config/cloud_env.txt
1540             echo "__external_dns__" > /opt/config/external_dns.txt
1541             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1542
1543             # Download and run install script
1544             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1545             cd /opt
1546             chmod +x clamp_install.sh
1547             ./clamp_install.sh
1548
1549
1550   # OPEN-O VM instantiation
1551   openo_private_port:
1552     type: OS::Neutron::Port
1553     properties:
1554       network: { get_resource: oam_onap }
1555       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: openo_ip_addr }}]
1556
1557   openo_floating_ip:
1558     type: OS::Neutron::FloatingIP
1559     properties:
1560       floating_network_id: { get_param: public_net_id }
1561       port_id: { get_resource: openo_private_port }
1562
1563   openo_vm:
1564     type: OS::Nova::Server
1565     properties:
1566       image: { get_param: ubuntu_1604_image }
1567       flavor: { get_param: flavor_xxlarge }
1568       name:
1569         str_replace:
1570           template: base-multi-service
1571           params:
1572             base: { get_param: vm_base_name }
1573       key_name: { get_resource: vm_key }
1574       networks:
1575         - port: { get_resource: openo_private_port }
1576       user_data_format: RAW
1577       user_data:
1578         str_replace:
1579           params:
1580             __nexus_repo__: { get_param: nexus_repo }
1581             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1582             __nexus_username__: { get_param: nexus_username }
1583             __nexus_password__: { get_param: nexus_password }
1584             __artifacts_version__: { get_param: artifacts_version }
1585             __dns_ip_addr__: { get_param: dns_ip_addr }
1586             __oam_network_cidr__: { get_param: oam_network_cidr }
1587             __aai1_ip_addr__: { get_param: aai1_ip_addr }
1588             __aai2_ip_addr__: { get_param: aai2_ip_addr }
1589             __appc_ip_addr__: { get_param: appc_ip_addr }
1590             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1591             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1592             __so_ip_addr__: { get_param: so_ip_addr }
1593             __mr_ip_addr__: { get_param: mr_ip_addr }
1594             __policy_ip_addr__: { get_param: policy_ip_addr }
1595             __portal_ip_addr__: { get_param: portal_ip_addr }
1596             __robot_ip_addr__: { get_param: robot_ip_addr }
1597             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1598             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
1599             __vid_ip_addr__: { get_param: vid_ip_addr }
1600             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1601             __openo_ip_addr__: { get_param: openo_ip_addr }
1602             __cloud_env__: { get_param: cloud_env }
1603             __external_dns__: { get_param: external_dns }
1604             __vnfsdk_branch__: { get_param: vnfsdk_branch }
1605             __msb_docker__: { get_param: msb_docker }
1606             __mvim_docker__: { get_param: mvim_docker }
1607             __vfc_docker__: { get_param: vfc_docker }
1608             __uui_docker__: { get_param: uui_docker }
1609             __esr_docker__: { get_param: esr_docker }
1610             __vnfsdk_repo__: { get_param: vnfsdk_repo }
1611           template: |
1612             #!/bin/bash
1613
1614             # Create configuration files
1615             mkdir -p /opt/config
1616             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1617             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1618             echo "__nexus_username__" > /opt/config/nexus_username.txt
1619             echo "__nexus_password__" > /opt/config/nexus_password.txt
1620             echo "__cloud_env__" > /opt/config/cloud_env.txt
1621             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1622             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1623             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1624             echo "__external_dns__" > /opt/config/external_dns.txt
1625             echo "__vnfsdk_branch__" > /opt/config/vnfsdk_branch.txt
1626             echo "__msb_docker__" > /opt/config/msb_docker.txt
1627             echo "__mvim_docker__" > /opt/config/mvim_docker.txt
1628             echo "__vfc_docker__" > /opt/config/vfc_docker.txt
1629             echo "__uui_docker__" > /opt/config/uui_docker.txt
1630             echo "__esr_docker__" > /opt/config/esr_docker.txt
1631             echo "__vnfsdk_repo__" > /opt/config/vnfsdk_repo.txt
1632
1633             # Create env file with the IP address of all ONAP components
1634             echo "export AAI_IP1=__aai1_ip_addr__" >> /opt/config/onap_ips.txt
1635             echo "export AAI_IP2=__aai2_ip_addr__" >> /opt/config/onap_ips.txt
1636             echo "export APPC_IP=__appc_ip_addr__" >> /opt/config/onap_ips.txt
1637             echo "export DCAE_IP=__dcae_ip_addr__" >> /opt/config/onap_ips.txt
1638             echo "export DCAE_COLL_IP=__dcae_coll_ip_addr__" >> /opt/config/onap_ips.txt
1639             echo "export SO_IP=__so_ip_addr__" >> /opt/config/onap_ips.txt
1640             echo "export MR_IP=__mr_ip_addr__" >> /opt/config/onap_ips.txt
1641             echo "export POLICY_IP=__policy_ip_addr__" >> /opt/config/onap_ips.txt
1642             echo "export PORTAL_IP=__portal_ip_addr__" >> /opt/config/onap_ips.txt
1643             echo "export ROBOT_IP=__robot_ip_addr__" >> /opt/config/onap_ips.txt
1644             echo "export SDC_IP=__sdc_ip_addr__" >> /opt/config/onap_ips.txt
1645             echo "export SDNC_IP=__sdnc_ip_addr__" >> /opt/config/onap_ips.txt
1646             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
1647             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
1648             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
1649
1650             # Download and run install script
1651             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/openo_install.sh -o /opt/openo_install.sh
1652             cd /opt
1653             chmod +x openo_install.sh
1654             ./openo_install.sh
1655
1656
1657   # DCAE GEN 2 Controller instantiation
1658   dcae_c_private_port:
1659     type: OS::Neutron::Port
1660     properties:
1661       network: { get_resource: oam_onap }
1662       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1663
1664   dcae_c_floating_ip:
1665     type: OS::Neutron::FloatingIP
1666     properties:
1667       floating_network_id: { get_param: public_net_id }
1668       port_id: { get_resource: dcae_c_private_port }
1669
1670   dcae_c_vm:
1671     type: OS::Nova::Server
1672     properties:
1673       image: { get_param: ubuntu_1604_image }
1674       flavor: { get_param: flavor_medium }
1675       name:
1676         str_replace: 
1677           template: base-dcae-bootstrap
1678           params:
1679             base: { get_param: vm_base_name }
1680       key_name: { get_resource: dcae_vm_key }
1681       networks:
1682         - port: { get_resource: dcae_c_private_port }
1683       user_data_format: RAW
1684       user_data:
1685         str_replace:
1686           params:
1687             __nexus_repo__: { get_param: nexus_repo }
1688             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1689             __nexus_username__: { get_param: nexus_username }
1690             __nexus_password__: { get_param: nexus_password }
1691             __dns_ip_addr__: { get_param: dns_ip_addr }
1692             __dcae_zone__: { get_param: dcae_zone }
1693             __artifacts_version__: { get_param: artifacts_version }
1694             __tenant_id__: { get_param: openstack_tenant_id }
1695             __openstack_private_network_name__: { get_attr: [oam_onap, name] }
1696             __openstack_user__: { get_param: openstack_username }
1697             __openstack_password__: { get_param: openstack_api_key }
1698             __key_name__: { get_param: dcae_key_name }
1699             __pub_key__: { get_param: dcae_pub_key }
1700             __private_key__: { get_attr: [ dcae_vm_key, private_key ] }
1701             __openstack_region__: { get_param: openstack_region }
1702             __keystone_url__: { get_param: keystone_url }
1703             __docker_version__: { get_param: dcae_docker }
1704             __dcae_repo__: { get_param: dcae_repo }
1705             __gerrit_branch__: { get_param: dcae_branch }
1706             __cloud_env__: { get_param: cloud_env }
1707             __public_net_id__: { get_param: public_net_id }
1708             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1709             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1710             __external_dns__: { get_param: external_dns }
1711             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1712             __centos_7_image__: { get_param: centos_7_image }
1713             __security_group__ : { get_param: security_group }
1714             __flavor_medium__: { get_param: flavor_medium }
1715             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
1716             __rand_str__: { get_resource: random-str }
1717             __mr_ip_addr__: { get_param: mr_ip_addr }
1718             #__mr_float_ip__: { get_attr: [mr_floating_ip, floating_ip_address] }
1719             __policy_ip_addr__: { get_param: policy_ip_addr }
1720             #__policy_float_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1721             __sdc_ip_addr__: { get_param: sdc_ip_addr }
1722             #__sdc_float_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1723
1724           template: |
1725             #!/bin/bash
1726
1727             # Create configuration files
1728             mkdir -p /opt/config
1729             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1730             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1731             echo "__nexus_username__" > /opt/config/nexus_username.txt
1732             echo "__nexus_password__" > /opt/config/nexus_password.txt
1733             echo "__docker_version__" > /opt/config/docker_version.txt
1734             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1735             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1736             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1737             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1738             echo "__tenant_id__" > /opt/config/tenant_id.txt
1739             echo "__tenant_id__" > /opt/config/tenant_name.txt
1740             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1741             echo "__openstack_user__" > /opt/config/openstack_user.txt
1742             echo "__openstack_password__" > /opt/config/openstack_password.txt
1743             echo "__key_name__" > /opt/config/key_name.txt
1744             echo "__pub_key__" > /opt/config/pub_key.txt
1745             echo "__private_key__" > /opt/config/priv_key
1746             echo "__openstack_region__" > /opt/config/openstack_region.txt
1747             echo "__keystone_url__" > /opt/config/keystone_url.txt
1748             echo "__cloud_env__" > /opt/config/cloud_env.txt
1749             echo "__public_net_id__" > /opt/config/public_net_id.txt
1750             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1751             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1752             echo "__external_dns__" > /opt/config/external_dns.txt
1753             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1754             echo "__centos_7_image__" > /opt/config/centos_7_image.txt
1755             echo "__security_group__" > /opt/config/security_group.txt
1756             echo "__flavor_medium__" > /opt/config/flavor_id.txt
1757             echo "__dcae_repo__" > /opt/config/remote_repo.txt
1758             echo "__mac_addr__" > /opt/config/mac_addr.txt
1759             echo "__rand_str__" > /opt/config/rand_str.txt
1760             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1761             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
1762             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
1763             #echo "__mr_floating_ip_addr__" > /opt/config/mr_floating_ip_addr.txt
1764             #echo "__policy_floating_ip_addr__" > /opt/config/policy_floating_ip_addr.txt 
1765             #echo "__sdc_floating_ip_addr__" > /opt/config/sdc_floating_ip_addr.txt
1766
1767
1768             # Download and run install script
1769             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae2_install.sh -o /opt/dcae2_install.sh
1770             cd /opt
1771             chmod +x dcae2_install.sh
1772             ./dcae2_install.sh