[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / getAttr / getAttrUnsupportedResource / inputfiles / base_pronghorn.yaml
1 heat_template_version: 2015-04-30
2
3 description: Pronghorn Openstack Heat Template
4
5 parameters:
6   oam_net_name:
7     label: Database OAM Network
8     description: Name of the OAM network for the database servers
9     type: string
10   common_ports:
11     label: Common Ports
12     description: List of ports to apply to the security group for all VMs
13     type: comma_delimited_list
14   common_protocols:
15     label: Common Protocols
16     description: List of protocols associated with the common_ports
17     type: comma_delimited_list
18   db_ports:
19     label: Database Ports
20     description: List of ports to apply to the security group for the database VMs
21     type: comma_delimited_list
22   db_protocols:
23     label: Database Protocols
24     description: List of protocols associated with the db_ports
25     type: comma_delimited_list
26   app_ports:
27     label: Application Ports
28     description: List of ports to apply to the security group for the application VMs
29     type: comma_delimited_list
30   app_protocols:
31     label: Application Protocols
32     description: List of protocols associated with the app_ports
33     type: comma_delimited_list
34   ###
35   # vnf info
36   ###
37   vnf_id:
38     label: VNF ID
39     description: Unique ID for this VF instance
40     type: string
41   vf_module_id:
42     label: VF Module ID
43     description: Unique ID for this VF Module instance
44     type: string
45   db_vm_role:
46     label: DB VM Role
47     description: Role for the DB VM
48     type: string
49   app_vm_role:
50     label: App VM Role
51     description: Role for the App VM
52     type: string
53
54   ###
55   # availability zones
56   ###
57   availability_zone_0:
58     label: First Availability Zone
59     description: Name of the first availability zone
60     type: string
61   
62   ###
63   # database server networks, ips and hostnames
64   ###
65   db_name:
66     label: Database Hostname
67     description: Hostname of the database server
68     type: string
69   db_oam_ip_0:
70     label: Database OAM IP Addresse
71     description: OAM IP Address of the database server
72     type: string
73   ###
74   # database common server info (flavor, image, keypair)
75   ###
76   db_flavor_name:
77     label: Database Flavor
78     description: Flavor of the database server
79     type: string
80   db_image_name:
81     label: Database Image
82     description: Image of the database server
83     type: string
84   db_public_key:
85     label: Database Public Key
86     description: Public ssh key for the database servers
87     type: string
88   db_deploy_timeout:
89     label: Database Deployment Timeout
90     description: Timeout in seconds before declaring the database stack as failed
91     type: number
92     constraints:
93       - range: { min: 60, max: 3600 }
94
95   ###
96   # database volume ids
97   ###
98   db_volume_id_0:
99     label: Data Volume IDs for disk 0
100     description: IDs to be used for the database volumes
101     type: string
102   db_volume_id_1:
103     label: Data Volume IDs for disk 1
104     description: IDs to be used for the database volumes
105     type: string
106   db_volume_id_2:
107     label: Data Volume IDs for disk 2
108     description: IDs to be used for the database volumes
109     type: string
110   db_volume_id_3:
111     label: Data Volume IDs for disk 3
112     description: IDs to be used for the database volumes
113     type: string
114
115
116   ###
117   # application server networks, ips and hostnames
118   ###
119   app_name:
120     label: Application Hostname
121     description: Hostname of the application server
122     type: string
123   app_oam_ip_0:
124     label: Application OAM IP Address
125     description: OAM IP Address of the application server
126     type: string
127   ###
128   # application common server info (flavor, image, keypair)
129   ###
130   app_flavor_name:
131     label: App Flavor
132     description: Flavor to be used for the application server
133     type: string
134   app_image_name:
135     label: App Image
136     description: Image to be used for the application server
137     type: string
138   app_public_key:
139     label: Application Public Key
140     description: Public ssh key for the application servers
141     type: string
142
143   app_deploy_timeout:
144     label: Application Deployment Timeout
145     description: Timeout in seconds before declaring the application stack as failed
146     type: number
147     constraints:
148       - range: { min: 60, max: 3600 }
149
150 resources:
151   ###
152   # define unique keypairs for each role
153   ###
154   db_keypair:
155     type: OS::Nova::KeyPair
156     properties:
157       name: pronghorn database key
158       public_key: { get_param: db_public_key }
159       save_private_key: false
160   app_keypair:
161     type: OS::Nova::KeyPair
162     properties:
163       name: pronghorn application key
164       public_key: { get_param: app_public_key }
165       save_private_key: false
166
167   ###
168   # define security groups for each role
169   ###
170   ###
171   # NOTE:  I would like to use the repeat/for_each function to iterate over these lists
172   #        My local Mirantis 7 testing environment contains the following bug:
173   #
174   # ERROR: The values of the "for_each" argument to "repeat" must be lists
175   ###
176   common_security_group:
177     type: OS::Neutron::SecurityGroup
178     properties:
179       name: common security group
180       rules:
181         - protocol: { get_param: [ common_protocols, 0 ] }
182           port_range_min: { get_param: [ common_ports, 0 ] }
183           port_range_max: { get_param: [ common_ports, 0 ] }
184         - protocol: { get_param: [ common_protocols, 1 ] }
185           port_range_min: { get_param: [ common_ports, 1 ] }
186           port_range_max: { get_param: [ common_ports, 1 ] }
187         - protocol: { get_param: [ common_protocols, 2 ] }
188           port_range_min: { get_param: [ common_ports, 2 ] }
189           port_range_max: { get_param: [ common_ports, 2 ] }
190         - protocol: { get_param: [ common_protocols, 3 ] }
191           port_range_min: { get_param: [ common_ports, 3 ] }
192           port_range_max: { get_param: [ common_ports, 3 ] }
193   db_security_group:
194     type: OS::Neutron::SecurityGroup
195     properties:
196       name: data security group
197       rules:
198         - protocol: { get_param: [ db_protocols, 0 ] }
199           port_range_min: { get_param: [ db_ports, 0 ] }
200           port_range_max: { get_param: [ db_ports, 0 ] }
201   app_security_group:
202     type: OS::Neutron::SecurityGroup
203     properties:
204       name: app security group
205       rules:
206         - protocol: { get_param: [ app_protocols, 0 ] }
207           port_range_min: { get_param: [ app_ports, 0 ] }
208           port_range_max: { get_param: [ app_ports, 0 ] }
209
210   ###
211   # create the database servers
212   ###
213   db_server_group:
214     type: OS::Nova::ServerGroup
215     properties:
216       name: data server group
217       policies:
218         - anti-affinity
219   
220   db_servers:
221     type: OS::Heat::ResourceGroup
222     properties:
223       count: 1
224       resource_def:
225         type: nested_db_server.yaml
226         properties:
227           server_group_id: { get_resource: db_server_group }
228           vnf_id: { get_param: vnf_id }
229           vf_module_id: { get_param: vf_module_id }
230           vm_role: { get_param: db_vm_role }
231           availability_zone_0: { get_param: availability_zone_0 }
232           oam_net_name: { get_param: oam_net_name }
233           db_name: { get_param: db_name }
234           db_oam_ip_0: { get_param: db_oam_ip_0 }
235           security_group_ids: 
236             - { get_resource: common_security_group }
237             - { get_resource: db_security_group }
238           keypair_id: { get_resource: db_keypair }
239           db_flavor_name: { get_param: db_flavor_name }
240           db_image_name: { get_param: db_image_name }
241           db_volume_id_0: { get_param: db_volume_id_0 }
242           db_volume_id_1: { get_param: db_volume_id_1 }
243           db_volume_id_2: { get_param: db_volume_id_2 }
244           db_volume_id_3: { get_param: db_volume_id_3 }
245           deploy_timeout: { get_param: db_deploy_timeout }
246
247
248   ###
249   # create the application servers
250   ###
251   app_server_group:
252     type: OS::Nova::ServerGroup
253     properties:
254       name: app server group
255       policies:
256         - anti-affinity
257
258   app_servers:
259     type: OS::Heat::ResourceGroup
260     properties:
261       count: 1
262       resource_def:
263         type: nested_app_server.yaml
264         properties:
265           server_group_id: { get_resource: app_server_group }
266           vnf_id: { get_param: vnf_id }
267           vf_module_id: { get_param: vf_module_id }
268           vm_role: { get_param: app_vm_role }
269           availability_zone_0: { get_param: availability_zone_0 }
270           oam_net_name: { get_param: oam_net_name }
271           app_name: { get_param: app_name }
272           app_oam_ip_0: { get_param: app_oam_ip_0 }
273           security_group_ids: 
274             - { get_resource: common_security_group }
275             - { get_resource: app_security_group }
276           keypair_id: { get_resource: app_keypair }
277           app_flavor_name: { get_param: app_flavor_name }
278           app_image_name: { get_param: app_image_name }
279           deploy_timeout: { get_param: app_deploy_timeout }
280
281 outputs:
282   ###
283   # No outputs as the base_pronghorn is the only VNF component
284   ###