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