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