Make size of loop device used by cinder LVM configurable
[apex-tripleo-heat-templates.git] / overcloud-source.yaml
1 Description: Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL
2   server,Dedicated RabbitMQ Server,Group of Nova Computes
3 HeatTemplateFormatVersion: '2012-12-12'
4 Parameters:
5   AdminPassword:
6     Default: unset
7     Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
8     Type: String
9     NoEcho: true
10   AdminToken:
11     Default: unset
12     Description: The keystone auth secret.
13     Type: String
14     NoEcho: true
15   CinderPassword:
16     Default: unset
17     Description: The password for the cinder service account, used by cinder-api.
18     Type: String
19     NoEcho: true
20   CinderISCSIHelper:
21     Default: tgtadm
22     Description: The iSCSI helper to use with cinder.
23     Type: String
24   CinderLVMLoopDeviceSize:
25     Default: 5000
26     Description: The size of the loopback file used by the cinder LVM driver.
27     Type: Number
28   ExtraConfig:
29     Default: {}
30     Description: |
31       Additional configuration to inject into the cluster. The JSON should have
32       the following structure:
33         {"FILEKEY":
34           {"config":
35             [{"section": "SECTIONNAME",
36               "values":
37                 [{"option": "OPTIONNAME",
38                   "value": "VALUENAME"
39                  }
40                 ]
41              }
42             ]
43           }
44         }
45       For instance:
46         {"nova":
47           {"config":
48             [{"section": "default",
49               "values":
50                 [{"option": "compute_manager",
51                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
52                  }
53                 ]
54              },
55              {"section": "cells",
56               "values":
57                 [{"option": "driver",
58                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
59                  }
60                 ]
61              }
62             ]
63           }
64         }
65     Type: Json
66   OvercloudControlFlavor:
67     Default: baremetal
68     Description: Flavor for control nodes to request when deploying.
69     Type: String
70   OvercloudComputeFlavor:
71     Default: baremetal
72     Description: Flavor for compute nodes to request when deploying.
73     Type: String
74   GlancePassword:
75     Default: unset
76     Description: The password for the glance service account, used by the glance services.
77     Type: String
78     NoEcho: true
79   GlanceNotifierStrategy:
80     Description: Strategy to use for Glance notification queue
81     Type: String
82     Default: noop
83   GlanceLogFile:
84     Description: The filepath of the file to use for logging messages from Glance.
85     Type: String
86     Default: ''
87   HeatPassword:
88     Default: unset
89     Description: The password for the Heat service account, used by the Heat services.
90     Type: String
91     NoEcho: true
92   ImageUpdatePolicy:
93     Default: 'REBUILD_PRESERVE_EPHEMERAL'
94     Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
95     Type: String
96   KeyName:
97     Default: default
98     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
99     Type: String
100   NeutronBridgeMappings:
101     Description: The OVS logical->physical bridge mappings to use.
102     Type: String
103     Default: ''
104   NeutronPassword:
105     Default: unset
106     Description: The password for the neutron service account, used by neutron agents.
107     Type: String
108     NoEcho: true
109   CeilometerComputeAgent:
110     Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
111     Type: String
112     Default: ''
113     AllowedValues: ['', Present]
114   CeilometerMeteringSecret:
115     Default: unset
116     Description: Secret shared by the ceilometer services.
117     Type: String
118     NoEcho: true
119   CeilometerPassword:
120     Default: unset
121     Description: The password for the ceilometer service account.
122     Type: String
123     NoEcho: true
124   CloudName:
125     Default: ''
126     Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
127     Type: String
128   NovaComputeDriver:
129     Default: libvirt.LibvirtDriver
130     Type: String
131   NovaComputeLibvirtType:
132     Default: ''
133     Type: String
134   NovaImage:
135     Type: String
136     Default: overcloud-compute
137   NovaPassword:
138     Default: unset
139     Description: The password for the nova service account, used by nova-api.
140     Type: String
141     NoEcho: true
142   NeutronFlatNetworks:
143     Type: String
144     Default: ''
145     Description: If set, flat networks to configure in neutron plugins.
146   HypervisorNeutronPhysicalBridge:
147     Default: ''
148     Description: An OVS bridge to create on each hypervisor.
149     Type: String
150   HypervisorNeutronPublicInterface:
151     Default: ''
152     Description: What interface to add to the HypervisorNeutronPhysicalBridge.
153     Type: String
154   NeutronPublicInterface:
155     Default: eth0
156     Description: What interface to bridge onto br-ex for network nodes.
157     Type: String
158   NeutronPublicInterfaceDefaultRoute:
159     Default: ''
160     Description: A custom default route for the NeutronPublicInterface.
161     Type: String
162   NeutronPublicInterfaceIP:
163     Default: ''
164     Description: A custom IP address to put onto the NeutronPublicInterface.
165     Type: String
166   NeutronPublicInterfaceRawDevice:
167     Default: ''
168     Description: If set, the public interface is a vlan with this device as the raw device.
169     Type: String
170   controllerImage:
171     Type: String
172     Default: overcloud-control
173   NtpServer:
174     Type: String
175     Default: ''
176   RabbitUserName:
177     Default: guest
178     Description: The username for RabbitMQ
179     Type: String
180   RabbitPassword:
181     Default: guest
182     Description: The password for RabbitMQ
183     Type: String
184     NoEcho: true
185   RabbitCookieSalt:
186     Type: String
187     Default: unset
188     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
189   HeatStackDomainAdminPassword:
190     Description: Password for heat_domain_admin user.
191     Type: String
192     Default: ''
193     NoEcho: true
194   LiveUpdateUserName:
195     Type: String
196     Description: The live-update username for the undercloud Glance API.
197     Default: ''
198   LiveUpdateTenantName:
199     Type: String
200     Description: The live-update tenant name for the undercloud Glance API.
201     Default: ''
202   LiveUpdateHost:
203     Type: String
204     Description: The IP address for the undercloud Glance API.
205     Default: ''
206   LiveUpdatePassword:
207     Type: String
208     Default: ''
209     Description: The live-update password for the undercloud Glance API.
210     NoEcho: true
211   LiveUpdateComputeImage:
212     Type: String
213     Description: The image ID for live-updates to the overcloud compute nodes.
214     Default: ''
215   MysqlInnodbBufferPoolSize:
216     Description: Specifies the size of the buffer pool in megabytes.
217     Type: Number
218     Default: 100
219 Resources:
220   RabbitCookie:
221     Type: OS::Heat::RandomString
222     Properties:
223       length: 20
224       salt:
225         Ref: RabbitCookieSalt
226   NovaCompute0Config:
227     Type: FileInclude
228     Path: nova-compute-instance.yaml
229     SubKey: Resources.NovaCompute0Deploy
230     Parameters:
231         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
232         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
233         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
234         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
235         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
236         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/nova']]}
237         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/ceilometer']]}
238         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/neutron']]}
239         NeutronNetworkType: "gre"
240         NeutronEnableTunnelling: "True"
241         NeutronFlatNetworks:
242             Ref: NeutronFlatNetworks
243         NeutronNetworkVLANRanges: ""
244         NeutronPhysicalBridge:
245             Ref: HypervisorNeutronPhysicalBridge
246         NeutronPublicInterface:
247             Ref: HypervisorNeutronPublicInterface
248         NeutronBridgeMappings:
249             Ref: NeutronBridgeMappings
250         StaticHosts:
251           Fn::Join:
252           - "\n"
253           - - Fn::Join:
254               - "\n"
255               - Merge::Map:
256                   NovaCompute0:
257                     Fn::Join:
258                     - ' '
259                     - - Fn::Select:
260                         - 0
261                         - Fn::Select:
262                           - ctlplane
263                           - Fn::GetAtt:
264                             - NovaCompute0
265                             - networks
266                       - Fn::Select:
267                         - name
268                         - Fn::GetAtt:
269                           - NovaCompute0
270                           - show
271                       - Fn::Join:
272                         - '.'
273                         - - Fn::Select:
274                             - name
275                             - Fn::GetAtt:
276                               - NovaCompute0
277                               - show
278                           - 'novalocal'
279             - Fn::Join:
280               - ' '
281               - - Fn::Select:
282                   - 0
283                   - Fn::Select:
284                     - ctlplane
285                     - Fn::GetAtt:
286                       - controller0
287                       - networks
288                 - {Ref: CloudName}
289                 # If CloudName is unset, make the hosts line still valid
290                 - unused
291   NovaCompute0Passthrough:
292     Type: OS::Heat::StructuredDeployment
293     Properties:
294       config: {Ref: NovaComputePassthrough}
295       server: {Ref: NovaCompute0}
296       signal_transport: NO_SIGNAL
297       input_values:
298         passthrough_config: {Ref: ExtraConfig}
299   NovaCompute0:
300     Type: FileInclude
301     Path: nova-compute-instance.yaml
302     SubKey: Resources.NovaCompute0
303   controllerConfig:
304     Type: OS::Heat::StructuredConfig
305     Properties:
306       config:
307         completion-signal: {get_input: deploy_signal_id}
308         admin-password:
309           Ref: AdminPassword
310         admin-token:
311           Ref: AdminToken
312         bootstack:
313           public_interface_ip:
314             Ref: NeutronPublicInterfaceIP
315         cinder:
316           db: mysql://cinder:unset@localhost/cinder
317           volume_size_mb:
318             Ref: CinderLVMLoopDeviceSize
319           service-password:
320             Ref: CinderPassword
321           iscsi-helper:
322             Ref: CinderISCSIHelper
323         controller-address:
324           get_input: controller_host
325         db-password: unset
326         glance:
327           backend: swift
328           db: mysql://glance:unset@localhost/glance
329           host:
330             get_input: controller_host
331           service-password:
332             Ref: GlancePassword
333           swift-store-user: service:glance
334           swift-store-key:
335             Ref: GlancePassword
336           notifier-strategy:
337             Ref: GlanceNotifierStrategy
338           log-file:
339             Ref: GlanceLogFile
340         heat:
341           admin_password:
342             Ref: HeatPassword
343           admin_tenant_name: service
344           admin_user: heat
345           auth_encryption_key: unset___________
346           db: mysql://heat:unset@localhost/heat
347           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
348           watch_server_url: {get_input: heat.watch_server_url}
349           metadata_server_url: {get_input: heat.metadata_server_url}
350           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
351         hosts: {get_input: hosts}
352         keystone:
353           db: mysql://keystone:unset@localhost/keystone
354           host:
355             get_input: controller_host
356         mysql:
357           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
358         neutron:
359           flat-networks: {Ref: NeutronFlatNetworks}
360           host:
361             get_input: controller_host
362           metadata_proxy_shared_secret: unset
363           ovs:
364             enable_tunneling: 'True'
365             local_ip:
366               get_input: controller_host
367             bridge_mappings: {Ref: NeutronBridgeMappings}
368             public_interface:
369               Ref: NeutronPublicInterface
370             public_interface_raw_device:
371               Ref: NeutronPublicInterfaceRawDevice
372             public_interface_route:
373               Ref: NeutronPublicInterfaceDefaultRoute
374             physical_bridge: br-ex
375             tenant_network_type: gre
376           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
377           service-password:
378             Ref: NeutronPassword
379         ceilometer:
380           db: mysql://ceilometer:unset@localhost/ceilometer
381           metering_secret: {Ref: CeilometerMeteringSecret}
382           service-password:
383             Ref: CeilometerPassword
384         nova:
385           compute_driver: libvirt.LibvirtDriver
386           db: mysql://nova:unset@localhost/nova
387           default_floating_pool:
388             ext-net
389           host:
390             get_input: controller_host
391           metadata-proxy: true
392           service-password:
393             Ref: NovaPassword
394         rabbit:
395           host:
396             get_input: controller_host
397           username:
398             Ref: RabbitUserName
399           password:
400             Ref: RabbitPassword
401           cookie:
402             Fn::GetAtt:
403             - RabbitCookie
404             - value
405         ntp:
406           servers:
407               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
408   controllerPassthrough:
409     Type: OS::Heat::StructuredConfig
410     Properties:
411       config: {get_input: passthrough_config}
412   controller0:
413     Type: OS::Nova::Server
414     Properties:
415       image:
416         Ref: controllerImage
417       image_update_policy:
418         Ref: ImageUpdatePolicy
419       flavor:
420         Ref: OvercloudControlFlavor
421       key_name:
422         Ref: KeyName
423       user_data_format: SOFTWARE_CONFIG
424   controller0Deployment:
425     Type: OS::Heat::StructuredDeployment
426     Properties:
427       config: {Ref: controllerConfig}
428       server: {Ref: controller0}
429       input_values:
430         controller_host:  
431           Fn::Select:
432             - 0
433             - Fn::Select:
434               - ctlplane
435               - Fn::GetAtt:
436                 - controller0
437                 - networks
438         heat.watch_server_url:
439           Fn::Join:
440             - ''
441             - - 'http://'
442               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
443               - ':8003'
444         heat.metadata_server_url:
445           Fn::Join:
446             - ''
447             - - 'http://'
448               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
449               - ':8000'
450         heat.waitcondition_server_url:
451           Fn::Join:
452             - ''
453             - - 'http://'
454               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
455               - ':8000/v1/waitcondition'
456         hosts:
457           Fn::Join:
458           - ' '
459           - - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
460             - {Ref: CloudName}
461   controller0SSLDeployment:
462     Type: OS::Heat::StructuredDeployment
463     Properties:
464       config: {Ref: SSLConfig}
465       server: {Ref: controller0}
466       signal_transport: NO_SIGNAL
467       input_values:
468         ssl_certificate: {Ref: SSLCertificate}
469         ssl_key: {Ref: SSLKey}
470   controller0Passthrough:
471     Type: OS::Heat::StructuredDeployment
472     Properties:
473       config: {Ref: controllerPassthrough}
474       server: {Ref: controller0}
475       signal_transport: NO_SIGNAL
476       input_values:
477         passthrough_config: {Ref: ExtraConfig}
478 Outputs:
479   KeystoneURL:
480     Description: URL for the Overcloud Keystone service
481     Value:
482       Fn::Join:
483       - ''
484       - - http://
485         - Fn::Select:
486           - 0
487           - Fn::Select:
488             - ctlplane
489             - Fn::GetAtt:
490               - controller0
491               - networks
492         - :5000/v2.0/