Fix OAM network name in SDNC VM
[demo.git] / heat / ONAP / onap_openstack.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4
5 #
6 # Copyright © 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   flavor_small:
56     type: string
57     description: Name of the Small Flavor supported by the cloud provider
58
59   flavor_medium:
60     type: string
61     description: Name of the Medium Flavor supported by the cloud provider
62
63   flavor_large:
64     type: string
65     description: Name of the Large Flavor supported by the cloud provider
66
67   flavor_xlarge:
68     type: string
69     description: Name of the Extra Large Flavor supported by the cloud provider
70
71   vm_base_name:
72     type: string
73     description: Base name of ONAP VMs
74
75   key_name:
76     type: string
77     description: Public/Private key pair name
78
79   pub_key:
80     type: string
81     description: Public key to be installed on the compute instance
82
83   nexus_repo:
84     type: string
85     description: Complete URL for the Nexus repository.
86
87   nexus_docker_repo:
88     type: string
89     description: Complete URL for the Nexus repository for docker images.
90
91   nexus_username:
92     type: string
93     description: Nexus Repository username
94
95   nexus_password:
96     type: string
97     description: Nexus Repository Password
98
99   artifacts_version:
100     type: string
101     description: Artifacts version of ONAP components
102
103   docker_version:
104     type: string
105     label: Version number of ONAP docker images
106
107   gerrit_branch:
108     type: string
109     label: Gerrit code branch
110     description: Gerrit branch where to download the code from
111
112   dmaap_topic:
113     type: string
114     description: DMaaP Topic name
115
116   openstack_tenant_id:
117     type: string
118     description: Openstack tenant ID
119
120   openstack_username:
121     type: string
122     description: Openstack username
123
124   openstack_auth_method:
125     type: string
126     description: Openstack authentication method (password VS. api-key)
127
128   openstack_api_key:
129     type: string
130     description: Openstack API Key
131
132   horizon_url:
133     type: string
134     description: URL of Openstack Horizon
135
136   keystone_url:
137     type: string
138     description: URL of Openstack Keystone
139
140   cloud_env:
141     type: string
142     description: Cloud Provider Name
143
144   ######################
145   #                    #
146   # Network parameters #
147   #                    #
148   ######################
149
150   dns_list:
151     type: comma_delimited_list
152     description: List of External DNS for OAM ONAP network
153
154   external_dns:
155     type: string
156     description: First element of the dns_list for ONAP network
157
158   ### Private IP addresses ###
159   oam_network_cidr:
160     type: string
161     description: CIDR of the OAM ONAP network
162
163   aai1_ip_addr:
164     type: string
165     description: AAI Instance 1 IP Address
166
167   aai2_ip_addr:
168     type: string
169     description: AAI Instance 2 IP Address
170
171   appc_ip_addr:
172     type: string
173     description: APP-C IP Address
174
175   dcae_ip_addr:
176     type: string
177     description: DCAE IP Address
178  
179   dcae_coll_ip_addr:
180     type: string
181     description: DCAE Collector IP Address
182
183   dcae_db_ip_addr:
184     type: string
185     description: DCAE Database IP Address
186
187   dcae_hdp1_ip_addr:
188     type: string
189     description: Hadoop VM1 IP Address
190
191   dcae_hdp2_ip_addr:
192     type: string
193     description: Hadoop VM2 IP Address
194
195   dcae_hdp3_ip_addr:
196     type: string
197     description: Hadoop VM3 IP Address
198
199   dns_ip_addr:
200     type: string
201     description: DNS IP Address
202
203   mso_ip_addr:
204     type: string
205     description: MSO IP Address
206
207   mr_ip_addr:
208     type: string
209     description: Message Router IP Address
210
211   policy_ip_addr:
212     type: string
213     description: Policy Engine IP Address
214
215   portal_ip_addr:
216     type: string
217     description: Portal IP Address
218
219   robot_ip_addr:
220     type: string
221     description: Robot Framework IP Address
222
223   sdc_ip_addr:
224     type: string
225     description: SDC IP Address
226
227   sdnc_ip_addr:
228     type: string
229     description: SDN-C IP Address
230
231   vid_ip_addr:
232     type: string
233     description: VID IP Address
234
235   dcae_coll_float_ip:
236     type: string
237     description: DCAE Collector Floating IP Address
238
239   dcae_db_float_ip:
240     type: string
241     description: DCAE Collector Database Floating IP Address
242
243   dcae_hdp1_float_ip:
244     type: string
245     description: Hadoop VM1 Floating IP Address
246
247   dcae_hdp2_float_ip:
248     type: string
249     description: Hadoop VM2 Floating IP Address
250
251   dcae_hdp3_float_ip:
252     type: string
253     description: Hadoop VM3 Floating IP Address
254
255   ###########################
256   #                         #
257   # Parameters used by DCAE #
258   #                         #
259   ###########################
260
261   dcae_base_environment:
262     type: string
263     description: DCAE Base Environment configuration (RACKSPACE/2-NIC/1-NIC-FLOATING-IPS)
264
265   dcae_zone:
266     type: string
267     description: DCAE Zone to use in VM names created by DCAE controller
268
269   dcae_state:
270     type: string
271     description: DCAE State to use in VM names created by DCAE controller
272
273   nexus_repo_root:
274     type: string
275     description: Root URL of Nexus repository
276
277   nexus_url_snapshot:
278     type: string
279     description: Snapshot of Maven repository for DCAE deployment
280
281   openstack_region:
282     type: string
283     description: Region where the DCAE controller will spin the VMs
284
285   gitlab_branch:
286     type: string
287     description: Branch of the Gitlab repository
288     
289   dcae_code_version:
290     type: string
291     description: DCAE Code Version Number
292
293   #####################
294   #                   #
295   # ONAP repositories #
296   #                   #
297   #####################
298
299   aai_repo:
300     type: string
301     description: AAI repository
302
303   appc_repo:
304     type: string
305     description: APPC repository
306
307   dcae_repo:
308     type: string
309     description: DCAE repository
310
311   mr_repo:
312     type: string
313     description: Message Router repository
314
315   mso_repo:
316     type: string
317     description: MSO repository
318
319   policy_repo:
320     type: string
321     description: Policy repository
322
323   portal_repo:
324     type: string
325     description: Portal repository
326
327   robot_repo:
328     type: string
329     description: Robot repository
330
331   sdc_repo:
332     type: string
333     description: SDC repository
334
335   sdnc_repo:
336     type: string
337     description: SDNC repository
338
339   vid_repo:
340     type: string
341     description: VID repository
342
343
344 #############
345 #           #
346 # RESOURCES #
347 #           #
348 #############
349
350 resources:
351   random-str:
352     type: OS::Heat::RandomString
353     properties:
354       length: 4
355
356
357   # Public key used to access ONAP components
358   vm_key:
359     type: OS::Nova::KeyPair
360     properties:
361       name:
362         str_replace:
363           template: base_rand
364           params:
365             base: { get_param: key_name }
366             rand: { get_resource: random-str }
367       public_key: { get_param: pub_key }
368       save_private_key: false
369
370
371   # ONAP management private network
372   oam_onap:
373     type: OS::Neutron::Net
374     properties:
375       name:
376         str_replace:
377           template: oam_onap_rand
378           params:
379             rand: { get_resource: random-str }
380
381   oam_onap_subnet:
382     type: OS::Neutron::Subnet
383     properties:
384       name:
385         str_replace:
386           template: oam_onap_rand
387           params:
388             rand: { get_resource: random-str }
389       network_id: { get_resource: oam_onap }
390       cidr: { get_param: oam_network_cidr }
391       dns_nameservers: { get_param: dns_list }
392
393   router:
394     type: OS::Neutron::Router
395     properties:
396       external_gateway_info:
397         network: { get_param: public_net_id }
398
399   router_interface:
400     type: OS::Neutron::RouterInterface
401     properties:
402       router_id: { get_resource: router }
403       subnet_id: { get_resource: oam_onap_subnet }
404
405
406   # DNS Server instantiation
407   dns_private_port:
408     type: OS::Neutron::Port
409     properties:
410       network: { get_resource: oam_onap }
411       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
412
413   dns_floating_ip:
414     type: OS::Neutron::FloatingIP
415     properties:
416       floating_network_id: { get_param: public_net_id }
417       port_id: { get_resource: dns_private_port }
418
419   dns_vm:
420     type: OS::Nova::Server
421     properties:
422       image: { get_param: ubuntu_1404_image }
423       flavor: { get_param: flavor_small }
424       name:
425         str_replace:
426           template: base-dns-server
427           params:
428             base: { get_param: vm_base_name }
429       key_name: { get_resource: vm_key }
430       networks:
431         - port: { get_resource: dns_private_port }
432       user_data_format: RAW
433       user_data:
434         str_replace:
435           params:
436             __nexus_repo__: { get_param: nexus_repo }
437             __artifacts_version__: { get_param: artifacts_version }
438             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
439             __dns_ip_addr__: { get_param: dns_ip_addr }
440             __aai1_ip_addr__: { get_param: aai1_ip_addr }
441             __aai2_ip_addr__: { get_param: aai2_ip_addr }
442             __appc_ip_addr__: { get_param: appc_ip_addr }
443             __dcae_ip_addr__: { get_param: dcae_ip_addr }
444             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
445             __mso_ip_addr__: { get_param: mso_ip_addr }
446             __mr_ip_addr__: { get_param: mr_ip_addr }
447             __policy_ip_addr__: { get_param: policy_ip_addr }
448             __portal_ip_addr__: { get_param: portal_ip_addr }
449             __robot_ip_addr__: { get_param: robot_ip_addr }
450             __sdc_ip_addr__: { get_param: sdc_ip_addr }
451             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
452             __vid_ip_addr__: { get_param: vid_ip_addr }
453             __cloud_env__: { get_param: cloud_env }
454             __external_dns__: { get_param: external_dns }
455           template: |
456             #!/bin/bash
457
458             # Create configuration files
459             mkdir -p /opt/config
460             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
461             echo "__cloud_env__" > /opt/config/cloud_env.txt
462             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
463             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
464             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
465             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
466             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
467             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
468             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
469             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
470             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
471             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
472             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
473             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
474             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
475             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
476             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
477             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
478             echo "__external_dns__" > /opt/config/external_dns.txt
479
480             # Download and run install script
481             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
482             cd /opt
483             chmod +x dns_install.sh
484             ./dns_install.sh
485
486
487   # A&AI instantiation (2 VMs)
488   aai1_private_port:
489     type: OS::Neutron::Port
490     properties:
491       network: { get_resource: oam_onap }
492       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
493
494   aai1_floating_ip:
495     type: OS::Neutron::FloatingIP
496     properties:
497       floating_network_id: { get_param: public_net_id }
498       port_id: { get_resource: aai1_private_port }
499
500   aai1_vm:
501     type: OS::Nova::Server
502     depends_on: aai2_vm
503     properties:
504       image: { get_param: ubuntu_1404_image }
505       flavor: { get_param: flavor_xlarge }
506       name:
507         str_replace:
508           template: base-aai-inst1
509           params:
510             base: { get_param: vm_base_name }      
511       key_name: { get_resource: vm_key }
512       networks:
513         - port: { get_resource: aai1_private_port }
514       user_data_format: RAW
515       user_data:
516         str_replace:
517           params:
518             __nexus_repo__: { get_param: nexus_repo }
519             __nexus_docker_repo__: { get_param: nexus_docker_repo }
520             __nexus_username__: { get_param: nexus_username }
521             __nexus_password__: { get_param: nexus_password }
522             __dmaap_topic__: { get_param: dmaap_topic }
523             __artifacts_version__: { get_param: artifacts_version }
524             __dns_ip_addr__: { get_param: dns_ip_addr }
525             __docker_version__: { get_param: docker_version }
526             __gerrit_branch__: { get_param: gerrit_branch }
527             __cloud_env__: { get_param: cloud_env }
528             __external_dns__: { get_param: external_dns }
529             __aai_repo__: { get_param: aai_repo }
530           template: |
531             #!/bin/bash
532
533             # Create configuration files
534             mkdir -p /opt/config
535             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
536             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
537             echo "__nexus_username__" > /opt/config/nexus_username.txt
538             echo "__nexus_password__" > /opt/config/nexus_password.txt
539             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
540             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
541             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
542             echo "__docker_version__" > /opt/config/docker_version.txt
543             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
544             echo "aai_instance_1" > /opt/config/aai_instance.txt
545             echo "__cloud_env__" > /opt/config/cloud_env.txt
546             echo "__external_dns__" > /opt/config/external_dns.txt
547             echo "__aai_repo__" > /opt/config/remote_repo.txt
548
549             # Download and run install script
550             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
551             cd /opt
552             chmod +x aai_install.sh
553             ./aai_install.sh
554
555
556   aai2_private_port:
557     type: OS::Neutron::Port
558     properties:
559       network: { get_resource: oam_onap }
560       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
561
562   aai2_floating_ip:
563     type: OS::Neutron::FloatingIP
564     properties:
565       floating_network_id: { get_param: public_net_id }
566       port_id: { get_resource: aai2_private_port }
567
568   aai2_vm:
569     type: OS::Nova::Server
570     properties:
571       image: { get_param: ubuntu_1404_image }
572       flavor: { get_param: flavor_xlarge }
573       name:
574         str_replace:
575           template: base-aai-inst2
576           params:
577             base: { get_param: vm_base_name }      
578       key_name: { get_resource: vm_key }
579       networks:
580         - port: { get_resource: aai2_private_port }
581       user_data_format: RAW
582       user_data:
583         str_replace:
584           params:
585             __nexus_repo__: { get_param: nexus_repo }
586             __nexus_docker_repo__: { get_param: nexus_docker_repo }
587             __nexus_username__: { get_param: nexus_username }
588             __nexus_password__: { get_param: nexus_password }
589             __dmaap_topic__: { get_param: dmaap_topic }
590             __artifacts_version__: { get_param: artifacts_version }
591             __dns_ip_addr__: { get_param: dns_ip_addr }
592             __docker_version__: { get_param: docker_version }
593             __gerrit_branch__: { get_param: gerrit_branch }
594             __cloud_env__: { get_param: cloud_env }
595             __external_dns__: { get_param: external_dns }
596             __aai_repo__: { get_param: aai_repo }
597           template: |
598             #!/bin/bash
599
600             # Create configuration files
601             mkdir -p /opt/config
602             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
603             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
604             echo "__nexus_username__" > /opt/config/nexus_username.txt
605             echo "__nexus_password__" > /opt/config/nexus_password.txt
606             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
607             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
608             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
609             echo "__docker_version__" > /opt/config/docker_version.txt
610             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
611             echo "aai_instance_2" > /opt/config/aai_instance.txt
612             echo "__cloud_env__" > /opt/config/cloud_env.txt
613             echo "__external_dns__" > /opt/config/external_dns.txt
614             echo "__aai_repo__" > /opt/config/remote_repo.txt
615
616             # Download and run install script
617             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
618             cd /opt
619             chmod +x aai_install.sh
620             ./aai_install.sh
621
622
623   # MSO instantiation
624   mso_private_port:
625     type: OS::Neutron::Port
626     properties:
627       network: { get_resource: oam_onap }
628       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mso_ip_addr }}]
629
630   mso_floating_ip:
631     type: OS::Neutron::FloatingIP
632     properties:
633       floating_network_id: { get_param: public_net_id }
634       port_id: { get_resource: mso_private_port }
635
636   mso_vm:
637     type: OS::Nova::Server
638     properties:
639       image: { get_param: ubuntu_1604_image }
640       flavor: { get_param: flavor_large }
641       name:
642         str_replace:
643           template: base-mso
644           params:
645             base: { get_param: vm_base_name }      
646       key_name: { get_resource: vm_key }
647       networks:
648         - port: { get_resource: mso_private_port }
649       user_data_format: RAW
650       user_data:
651         str_replace:
652           params:
653             __nexus_repo__: { get_param: nexus_repo }
654             __nexus_docker_repo__: { get_param: nexus_docker_repo }
655             __nexus_username__: { get_param: nexus_username }
656             __nexus_password__: { get_param: nexus_password }
657             __openstack_username__: { get_param: openstack_username }
658             __openstack_tenant_id__: { get_param: openstack_tenant_id }
659             __openstack_api_key__: { get_param: openstack_api_key }
660             __openstack_region__: { get_param: openstack_region }
661             __keystone_url__: { get_param: keystone_url }
662             __dmaap_topic__: { get_param: dmaap_topic }
663             __artifacts_version__: { get_param: artifacts_version }
664             __dns_ip_addr__: { get_param: dns_ip_addr }
665             __docker_version__: { get_param: docker_version }
666             __gerrit_branch__: { get_param: gerrit_branch }
667             __cloud_env__: { get_param: cloud_env }
668             __external_dns__: { get_param: external_dns }
669             __mso_repo__: { get_param: mso_repo }
670           template: |
671             #!/bin/bash
672
673             # Create configuration files
674             mkdir -p /opt/config
675             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
676             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
677             echo "__nexus_username__" > /opt/config/nexus_username.txt
678             echo "__nexus_password__" > /opt/config/nexus_password.txt
679             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
680             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
681             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
682             echo "__openstack_username__" > /opt/config/openstack_username.txt
683             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
684             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
685             echo "__openstack_region__" > /opt/config/openstack_region.txt
686             echo "__keystone_url__" > /opt/config/keystone.txt
687             echo "__docker_version__" > /opt/config/docker_version.txt
688             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
689             echo "__cloud_env__" > /opt/config/cloud_env.txt
690             echo "__external_dns__" > /opt/config/external_dns.txt
691             echo "__mso_repo__" > /opt/config/remote_repo.txt
692
693             # Download and run install script
694             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh
695             cd /opt
696             chmod +x mso_install.sh
697             ./mso_install.sh
698
699
700   # Message Router instantiation
701   mrouter_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: mr_ip_addr }}]
706
707   mrouter_floating_ip:
708     type: OS::Neutron::FloatingIP
709     properties:
710       floating_network_id: { get_param: public_net_id }
711       port_id: { get_resource: mrouter_private_port }
712
713   mrouter_vm:
714     type: OS::Nova::Server
715     properties:
716       image: { get_param: ubuntu_1404_image }
717       flavor: { get_param: flavor_large }
718       name:
719         str_replace: 
720           template: base-message-router
721           params:
722             base: { get_param: vm_base_name }
723       key_name: { get_resource: vm_key }
724       networks:
725         - port: { get_resource: mrouter_private_port }
726       user_data_format: RAW
727       user_data:
728         str_replace:
729           params:
730             __nexus_repo__: { get_param: nexus_repo }
731             __nexus_docker_repo__: { get_param: nexus_docker_repo }
732             __nexus_username__: { get_param: nexus_username }
733             __nexus_password__: { get_param: nexus_password }
734             __artifacts_version__: { get_param: artifacts_version }
735             __dns_ip_addr__: { get_param: dns_ip_addr }
736             __gerrit_branch__: { get_param: gerrit_branch }
737             __cloud_env__: { get_param: cloud_env }
738             __external_dns__: { get_param: external_dns }
739             __mr_repo__: { get_param: mr_repo }
740           template: |
741             #!/bin/bash
742
743             # Create configuration files
744             mkdir -p /opt/config
745             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
746             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
747             echo "__nexus_username__" > /opt/config/nexus_username.txt
748             echo "__nexus_password__" > /opt/config/nexus_password.txt
749             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
750             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
751             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
752             echo "__cloud_env__" > /opt/config/cloud_env.txt
753             echo "__external_dns__" > /opt/config/external_dns.txt
754             echo "__mr_repo__" > /opt/config/remote_repo.txt
755
756             # Download and run install script
757             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
758             cd /opt
759             chmod +x mr_install.sh
760             ./mr_install.sh
761
762
763   # Robot Framework instantiation
764   robot_private_port:
765     type: OS::Neutron::Port
766     properties:
767       network: { get_resource: oam_onap }
768       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
769
770   robot_floating_ip:
771     type: OS::Neutron::FloatingIP
772     properties:
773       floating_network_id: { get_param: public_net_id }
774       port_id: { get_resource: robot_private_port }
775  
776   robot_vm:
777     type: OS::Nova::Server
778     properties:
779       image: { get_param: ubuntu_1604_image }
780       flavor: { get_param: flavor_small }
781       name:
782         str_replace: 
783           template: base-robot
784           params:
785             base: { get_param: vm_base_name }
786       key_name: { get_resource: vm_key }
787       networks:
788         - port: { get_resource: robot_private_port }
789       user_data_format: RAW
790       user_data:
791         str_replace:
792           params:
793             __nexus_repo__: { get_param: nexus_repo }
794             __nexus_docker_repo__: { get_param: nexus_docker_repo }
795             __nexus_username__: { get_param: nexus_username }
796             __nexus_password__: { get_param: nexus_password }
797             __network_name__: { get_attr: [oam_onap, name] }
798             __openstack_username__: { get_param: openstack_username }
799             __openstack_api_key__: { get_param : openstack_api_key }
800             __artifacts_version__: { get_param: artifacts_version }
801             __openstack_region__: { get_param: openstack_region }
802             __dns_ip_addr__: { get_param: dns_ip_addr }
803             __docker_version__: { get_param: docker_version }
804             __gerrit_branch__: { get_param: gerrit_branch }
805             __cloud_env__: { get_param: cloud_env }
806             __keystone_url__: { get_param: keystone_url }
807             __aai1_ip_addr__: { get_param: aai1_ip_addr }
808             __aai2_ip_addr__: { get_param: aai2_ip_addr }
809             __appc_ip_addr__: { get_param: appc_ip_addr }
810             __dcae_ip_addr__: { get_param: dcae_ip_addr }
811             __mso_ip_addr__: { get_param: mso_ip_addr }
812             __mr_ip_addr__: { get_param: mr_ip_addr }
813             __policy_ip_addr__: { get_param: policy_ip_addr }
814             __portal_ip_addr__: { get_param: portal_ip_addr }
815             __sdc_ip_addr__: { get_param: sdc_ip_addr }
816             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
817             __vid_ip_addr__: { get_param: vid_ip_addr }
818             __external_dns__: { get_param: external_dns }
819             __vm_image_name__: { get_param: ubuntu_1404_image }
820             __vm_flavor__: { get_param: flavor_medium }
821             __robot_repo__: { get_param: robot_repo }
822           template: |
823             #!/bin/bash
824
825             # Create configuration files
826             mkdir -p /opt/config
827             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
828             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
829             echo "__nexus_username__" > /opt/config/nexus_username.txt
830             echo "__nexus_password__" > /opt/config/nexus_password.txt
831             echo "__network_name__" > /opt/config/network.txt
832             echo "__openstack_username__" > /opt/config/openstack_username.txt
833             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
834             echo "__openstack_region__" > /opt/config/region.txt
835             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
836             echo "__docker_version__" > /opt/config/docker_version.txt
837             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
838             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
839             echo "__keystone_url__" > /opt/config/keystone.txt
840             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
841             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
842             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
843             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
844             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
845             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
846             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
847             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
848             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
849             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
850             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
851             echo "__cloud_env__" > /opt/config/cloud_env.txt
852             echo "__external_dns__" > /opt/config/external_dns.txt
853             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
854             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
855             echo "__robot_repo__" > /opt/config/remote_repo.txt
856
857             # Download and run install script
858             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
859             cd /opt
860             chmod +x robot_install.sh
861             ./robot_install.sh
862
863
864   # VID instantiation
865   vid_private_port:
866     type: OS::Neutron::Port
867     properties:
868       network: { get_resource: oam_onap }
869       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
870
871   vid_floating_ip:
872     type: OS::Neutron::FloatingIP
873     properties:
874       floating_network_id: { get_param: public_net_id }
875       port_id: { get_resource: vid_private_port }
876
877   vid_vm:
878     type: OS::Nova::Server
879     properties:
880       image: { get_param: ubuntu_1404_image }
881       flavor: { get_param: flavor_medium }
882       name:
883         str_replace: 
884           template: base-vid
885           params:
886             base: { get_param: vm_base_name }
887       key_name: { get_resource: vm_key }
888       networks:
889         - port: { get_resource: vid_private_port }
890       user_data_format: RAW
891       user_data:
892         str_replace:
893           params:
894             __nexus_repo__: { get_param: nexus_repo }
895             __nexus_docker_repo__: { get_param: nexus_docker_repo }
896             __nexus_username__: { get_param: nexus_username }
897             __nexus_password__: { get_param: nexus_password }
898             __artifacts_version__: { get_param: artifacts_version }
899             __dns_ip_addr__: { get_param: dns_ip_addr }
900             __docker_version__: { get_param: docker_version }
901             __gerrit_branch__: { get_param: gerrit_branch }
902             __cloud_env__: { get_param: cloud_env }
903             __external_dns__: { get_param: external_dns }
904             __vid_repo__: { get_param: vid_repo }
905           template: |
906             #!/bin/bash
907
908             # Create configuration files
909             mkdir -p /opt/config
910             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
911             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
912             echo "__nexus_username__" > /opt/config/nexus_username.txt
913             echo "__nexus_password__" > /opt/config/nexus_password.txt
914             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
915             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.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 "__vid_repo__" > /opt/config/remote_repo.txt
921
922             # Download and run install script
923             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
924             cd /opt
925             chmod +x vid_install.sh
926             ./vid_install.sh
927
928  
929   # SDN-C instantiation
930   sdnc_private_port:
931     type: OS::Neutron::Port
932     properties:
933       network: { get_resource: oam_onap }
934       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
935
936   sdnc_floating_ip:
937     type: OS::Neutron::FloatingIP
938     properties:
939       floating_network_id: { get_param: public_net_id }
940       port_id: { get_resource: sdnc_private_port }
941
942   sdnc_vm:
943     type: OS::Nova::Server
944     properties:
945       image: { get_param: ubuntu_1404_image }
946       flavor: { get_param: flavor_large }
947       name:
948         str_replace: 
949           template: base-sdnc
950           params:
951             base: { get_param: vm_base_name }
952       key_name: { get_resource: vm_key }
953       networks:
954         - port: { get_resource: sdnc_private_port }
955       user_data_format: RAW
956       user_data:
957         str_replace:
958           params:
959             __nexus_repo__: { get_param: nexus_repo }
960             __nexus_docker_repo__: { get_param: nexus_docker_repo }
961             __nexus_username__: { get_param: nexus_username }
962             __nexus_password__: { get_param: nexus_password }
963             __artifacts_version__: { get_param: artifacts_version }
964             __dns_ip_addr__: { get_param: dns_ip_addr }
965             __docker_version__: { get_param: docker_version }
966             __gerrit_branch__: { get_param: gerrit_branch }
967             __cloud_env__: { get_param: cloud_env }
968             __external_dns__: { get_param: external_dns }
969             __sdnc_repo__: { get_param: sdnc_repo }
970           template: |
971             #!/bin/bash
972
973             # Create configuration files
974             mkdir -p /opt/config
975             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
976             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
977             echo "__nexus_username__" > /opt/config/nexus_username.txt
978             echo "__nexus_password__" > /opt/config/nexus_password.txt
979             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
980             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
981             echo "__docker_version__" > /opt/config/docker_version.txt
982             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
983             echo "__cloud_env__" > /opt/config/cloud_env.txt
984             echo "__external_dns__" > /opt/config/external_dns.txt
985             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
986
987             # Download and run install script
988             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
989             cd /opt
990             chmod +x sdnc_install.sh
991             ./sdnc_install.sh
992
993
994   # SDC instantiation
995   sdc_private_port:
996     type: OS::Neutron::Port
997     properties:
998       network: { get_resource: oam_onap }
999       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
1000
1001   sdc_floating_ip:
1002     type: OS::Neutron::FloatingIP
1003     properties:
1004       floating_network_id: { get_param: public_net_id }
1005       port_id: { get_resource: sdc_private_port }
1006
1007   sdc_volume_data:
1008     type: OS::Cinder::Volume
1009     properties:
1010       name: vol1-sdc-data
1011       size: 100
1012
1013   sdc_vm:
1014     type: OS::Nova::Server
1015     properties:
1016       image: { get_param: ubuntu_1604_image }
1017       flavor: { get_param: flavor_xlarge }
1018       name:
1019         str_replace: 
1020           template: base-sdc
1021           params:
1022             base: { get_param: vm_base_name }
1023       key_name: { get_resource: vm_key }
1024       networks:
1025         - port: { get_resource: sdc_private_port }
1026       block_device_mapping:
1027         - device_name: /dev/vdb
1028           volume_id: {get_resource: sdc_volume_data}
1029       user_data_format: RAW
1030       user_data:
1031         str_replace:
1032           params:
1033             __nexus_repo__: { get_param: nexus_repo }
1034             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1035             __nexus_username__: { get_param: nexus_username }
1036             __nexus_password__: { get_param: nexus_password }
1037             __env_name__: { get_param: dmaap_topic }
1038             __artifacts_version__: { get_param: artifacts_version }
1039             __dns_ip_addr__: { get_param: dns_ip_addr }
1040             __mr_ip_addr__: { get_param: mr_ip_addr }
1041             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
1042             __docker_version__: { get_param: docker_version }
1043             __gerrit_branch__: { get_param: gerrit_branch }
1044             __cloud_env__: { get_param: cloud_env }
1045             __external_dns__: { get_param: external_dns }
1046             __sdc_repo__: { get_param: sdc_repo }
1047           template: |
1048             #!/bin/bash
1049
1050             # Create configuration files
1051             mkdir -p /opt/config
1052             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1053             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1054             echo "__nexus_username__" > /opt/config/nexus_username.txt
1055             echo "__nexus_password__" > /opt/config/nexus_password.txt
1056             echo "__env_name__" > /opt/config/env_name.txt
1057             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1058             echo "__public_ip__" > /opt/config/public_ip.txt
1059             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1060             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1061             echo "__docker_version__" > /opt/config/docker_version.txt
1062             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1063             echo "__cloud_env__" > /opt/config/cloud_env.txt
1064             echo "__external_dns__" > /opt/config/external_dns.txt
1065             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1066
1067             # Download and run install script
1068             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh
1069             cd /opt
1070             chmod +x asdc_install.sh
1071             ./asdc_install.sh
1072
1073
1074   # PORTAL instantiation
1075   portal_private_port:
1076     type: OS::Neutron::Port
1077     properties:
1078       network: { get_resource: oam_onap }
1079       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1080
1081   portal_floating_ip:
1082     type: OS::Neutron::FloatingIP
1083     properties:
1084       floating_network_id: { get_param: public_net_id }
1085       port_id: { get_resource: portal_private_port }
1086
1087   portal_vm:
1088     type: OS::Nova::Server
1089     properties:
1090       image: { get_param: ubuntu_1404_image }
1091       flavor: { get_param: flavor_large }
1092       name:
1093         str_replace: 
1094           template: base-portal
1095           params:
1096             base: { get_param: vm_base_name }
1097       key_name: { get_resource: vm_key }
1098       networks:
1099         - port: { get_resource: portal_private_port }
1100       user_data_format: RAW
1101       user_data:
1102         str_replace:
1103           params:
1104             __nexus_repo__: { get_param: nexus_repo }
1105             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1106             __nexus_username__: { get_param: nexus_username }
1107             __nexus_password__: { get_param: nexus_password }
1108             __artifacts_version__: { get_param: artifacts_version }
1109             __dns_ip_addr__: { get_param: dns_ip_addr }
1110             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1111             __docker_version__: { get_param: docker_version }
1112             __gerrit_branch__: { get_param: gerrit_branch }
1113             __cloud_env__: { get_param: cloud_env }
1114             __external_dns__: { get_param: external_dns }
1115             __portal_repo__: { get_param: portal_repo }
1116           template: |
1117             #!/bin/bash
1118
1119             # Create configuration files
1120             mkdir -p /opt/config
1121             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1122             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1123             echo "__nexus_username__" > /opt/config/nexus_username.txt
1124             echo "__nexus_password__" > /opt/config/nexus_password.txt
1125             echo "__public_ip__" > /opt/config/public_ip.txt
1126             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1127             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1128             echo "__docker_version__" > /opt/config/docker_version.txt
1129             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1130             echo "__cloud_env__" > /opt/config/cloud_env.txt
1131             echo "__external_dns__" > /opt/config/external_dns.txt
1132             echo "__portal_repo__" > /opt/config/remote_repo.txt
1133
1134             # Download and run install script
1135             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1136             cd /opt
1137             chmod +x portal_install.sh
1138             ./portal_install.sh
1139
1140
1141   # DCAE Controller instantiation
1142   dcae_c_private_port:
1143     type: OS::Neutron::Port
1144     properties:
1145       network: { get_resource: oam_onap }
1146       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1147
1148   dcae_c_floating_ip:
1149     type: OS::Neutron::FloatingIP
1150     properties:
1151       floating_network_id: { get_param: public_net_id }
1152       port_id: { get_resource: dcae_c_private_port }
1153
1154   dcae_c_vm:
1155     type: OS::Nova::Server
1156     properties:
1157       image: { get_param: ubuntu_1404_image }
1158       flavor: { get_param: flavor_medium }
1159       name:
1160         str_replace: 
1161           template: base-dcae-controller
1162           params:
1163             base: { get_param: vm_base_name }
1164       key_name: { get_resource: vm_key }
1165       networks:
1166         - port: { get_resource: dcae_c_private_port }
1167       user_data_format: RAW
1168       user_data:
1169         str_replace:
1170           params:
1171             __nexus_repo__: { get_param: nexus_repo }
1172             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1173             __nexus_username__: { get_param: nexus_username }
1174             __nexus_password__: { get_param: nexus_password }
1175             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1176             __gitlab_branch__: { get_param: gitlab_branch }
1177             __dns_ip_addr__: { get_param: dns_ip_addr }
1178             __dcae_zone__: { get_param: dcae_zone }
1179             __dcae_state__: { get_param: dcae_state }
1180             __artifacts_version__: { get_param: artifacts_version }
1181             __tenant_id__: { get_param: openstack_tenant_id }
1182             __openstack_private_network_name__: { get_attr: [oam_onap, name] }
1183             __openstack_user__: { get_param: openstack_username }
1184             __openstack_password__: { get_param: openstack_api_key }
1185             __openstack_auth_method__: { get_param: openstack_auth_method }
1186             __key_name__: { get_param: key_name }
1187             __rand_str__: { get_resource: random-str }
1188             __pub_key__: { get_param: pub_key }
1189             __nexus_repo_root__: { get_param: nexus_repo_root }
1190             __openstack_region__: { get_param: openstack_region }
1191             __horizon_url__: { get_param: horizon_url }
1192             __keystone_url__: { get_param: keystone_url }
1193             __docker_version__: { get_param: docker_version }
1194             __gerrit_branch__: { get_param: gerrit_branch }
1195             __dcae_code_version__: { get_param: dcae_code_version }
1196             __cloud_env__: { get_param: cloud_env }
1197             __public_net_id__: { get_param: public_net_id }
1198             __dcae_base_environment__: { get_param: dcae_base_environment }
1199             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1200             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1201             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1202             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1203             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1204             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1205             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1206             __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1207             __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1208             __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1209             __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1210             __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1211             __external_dns__: { get_param: external_dns }
1212             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1213             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1214             __flavor_small__: { get_param: flavor_small }
1215             __flavor_medium__: { get_param: flavor_medium }
1216             __flavor_large__: { get_param: flavor_large }
1217             __flavor_xlarge__: { get_param: flavor_xlarge }
1218             __dcae_repo__: { get_param: dcae_repo }
1219             __mr_repo__: { get_param: mr_repo }
1220           template: |
1221             #!/bin/bash
1222
1223             # Create configuration files
1224             mkdir -p /opt/config
1225             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1226             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1227             echo "__nexus_username__" > /opt/config/nexus_username.txt
1228             echo "__nexus_password__" > /opt/config/nexus_password.txt
1229             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1230             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1231             echo "__docker_version__" > /opt/config/docker_version.txt
1232             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1233             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1234             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1235             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1236             echo "__dcae_state__" > /opt/config/dcae_state.txt
1237             echo "__tenant_id__" > /opt/config/tenant_id.txt
1238             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1239             echo "__openstack_user__" > /opt/config/openstack_user.txt
1240             echo "__openstack_password__" > /opt/config/openstack_password.txt
1241             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1242             echo "__key_name__" > /opt/config/key_name.txt
1243             echo "__rand_str__" > /opt/config/rand_str.txt
1244             echo "__pub_key__" > /opt/config/pub_key.txt
1245             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1246             echo "__openstack_region__" > /opt/config/openstack_region.txt
1247             echo "__horizon_url__" > /opt/config/horizon_url.txt
1248             echo "__keystone_url__" > /opt/config/keystone_url.txt
1249             echo "__cloud_env__" > /opt/config/cloud_env.txt
1250             echo "__public_net_id__" > /opt/config/public_net_id.txt
1251             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1252             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1253             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1254             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1255             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1256             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1257             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1258             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1259             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1260             echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1261             echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1262             echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1263             echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1264             echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1265             echo "__external_dns__" > /opt/config/external_dns.txt
1266             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1267             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1268             echo "__flavor_small__" > /opt/config/flavor_small.txt
1269             echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1270             echo "__flavor_large__" > /opt/config/flavor_large.txt
1271             echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1272             echo "__dcae_repo__" > /opt/config/remote_repo.txt
1273             echo "__mr_repo__" > /opt/config/mr_repo.txt
1274
1275             # Download and run install script
1276             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1277             cd /opt
1278             chmod +x dcae_install.sh
1279             ./dcae_install.sh
1280
1281
1282   # Policy Engine instantiation
1283   policy_private_port:
1284     type: OS::Neutron::Port
1285     properties:
1286       network: { get_resource: oam_onap }
1287       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1288
1289   policy_floating_ip:
1290     type: OS::Neutron::FloatingIP
1291     properties:
1292       floating_network_id: { get_param: public_net_id }
1293       port_id: { get_resource: policy_private_port }
1294
1295   policy_vm:
1296     type: OS::Nova::Server
1297     properties:
1298       image: { get_param: ubuntu_1404_image }
1299       flavor: { get_param: flavor_xlarge }
1300       name:
1301         str_replace: 
1302           template: base-policy
1303           params:
1304             base: { get_param: vm_base_name }
1305       key_name: { get_resource: vm_key }
1306       networks:
1307         - port: { get_resource: policy_private_port }
1308       user_data_format: RAW
1309       user_data:
1310         str_replace:
1311           params:
1312             __nexus_repo__: { get_param: nexus_repo }
1313             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1314             __nexus_username__: { get_param: nexus_username }
1315             __nexus_password__: { get_param: nexus_password }
1316             __artifacts_version__: { get_param: artifacts_version }
1317             __dns_ip_addr__: { get_param: dns_ip_addr }
1318             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1319             __docker_version__: { get_param: docker_version }
1320             __gerrit_branch__: { get_param: gerrit_branch }
1321             __cloud_env__: { get_param: cloud_env }
1322             __external_dns__: { get_param: external_dns }
1323             __policy_repo__: { get_param: policy_repo }
1324           template: |
1325             #!/bin/bash
1326
1327             # Create configuration files
1328             mkdir -p /opt/config
1329             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1330             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1331             echo "__nexus_username__" > /opt/config/nexus_username.txt
1332             echo "__nexus_password__" > /opt/config/nexus_password.txt
1333             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1334             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1335             echo "__public_ip__" > /opt/config/public_ip.txt
1336             echo "__docker_version__" > /opt/config/docker_version.txt
1337             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1338             echo "__cloud_env__" > /opt/config/cloud_env.txt
1339             echo "__external_dns__" > /opt/config/external_dns.txt
1340             echo "__policy_repo__" > /opt/config/remote_repo.txt
1341
1342             # Download and run install script
1343             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1344             cd /opt
1345             chmod +x policy_install.sh
1346             ./policy_install.sh
1347
1348
1349   # APP-C instantiation
1350   appc_private_port:
1351     type: OS::Neutron::Port
1352     properties:
1353       network: { get_resource: oam_onap }
1354       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1355
1356   appc_floating_ip:
1357     type: OS::Neutron::FloatingIP
1358     properties:
1359       floating_network_id: { get_param: public_net_id }
1360       port_id: { get_resource: appc_private_port }
1361
1362   appc_vm:
1363     type: OS::Nova::Server
1364     properties:
1365       image: { get_param: ubuntu_1404_image }
1366       flavor: { get_param: flavor_large }
1367       name:
1368         str_replace: 
1369           template: base-appc
1370           params:
1371             base: { get_param: vm_base_name }
1372       key_name: { get_resource: vm_key }
1373       networks:
1374         - port: { get_resource: appc_private_port }
1375       user_data_format: RAW
1376       user_data:
1377         str_replace:
1378           params:
1379             __nexus_repo__: { get_param: nexus_repo }
1380             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1381             __nexus_username__: { get_param: nexus_username }
1382             __nexus_password__: { get_param: nexus_password }
1383             __dmaap_topic__: { get_param: dmaap_topic }
1384             __artifacts_version__: { get_param: artifacts_version }
1385             __dns_ip_addr__: { get_param: dns_ip_addr }
1386             __docker_version__: { get_param: docker_version }
1387             __gerrit_branch__: { get_param: gerrit_branch }
1388             __cloud_env__: { get_param: cloud_env }
1389             __external_dns__: { get_param: external_dns }
1390             __appc_repo__: { get_param: appc_repo }
1391           template: |
1392             #!/bin/bash
1393
1394             # Create configuration files
1395             mkdir -p /opt/config
1396             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1397             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1398             echo "__nexus_username__" > /opt/config/nexus_username.txt
1399             echo "__nexus_password__" > /opt/config/nexus_password.txt
1400             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1401             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1402             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1403             echo "__docker_version__" > /opt/config/docker_version.txt
1404             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1405             echo "__cloud_env__" > /opt/config/cloud_env.txt
1406             echo "__external_dns__" > /opt/config/external_dns.txt
1407             echo "__appc_repo__" > /opt/config/remote_repo.txt
1408
1409             # Download and run install script
1410             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1411             cd /opt
1412             chmod +x appc_install.sh
1413             ./appc_install.sh