Specify group os-apply-config for config resources
[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   ExtraConfig:
25     Default: {}
26     Description: |
27       Additional configuration to inject into the cluster. The JSON should have
28       the following structure:
29         {"FILEKEY":
30           {"config":
31             [{"section": "SECTIONNAME",
32               "values":
33                 [{"option": "OPTIONNAME",
34                   "value": "VALUENAME"
35                  }
36                 ]
37              }
38             ]
39           }
40         }
41       For instance:
42         {"nova":
43           {"config":
44             [{"section": "default",
45               "values":
46                 [{"option": "compute_manager",
47                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
48                  }
49                 ]
50              },
51              {"section": "cells",
52               "values":
53                 [{"option": "driver",
54                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
55                  }
56                 ]
57              }
58             ]
59           }
60         }
61     Type: Json
62   OvercloudControlFlavor:
63     Default: baremetal
64     Description: Flavor for control nodes to request when deploying.
65     Type: String
66   OvercloudComputeFlavor:
67     Default: baremetal
68     Description: Flavor for compute nodes to request when deploying.
69     Type: String
70   GlancePassword:
71     Default: unset
72     Description: The password for the glance service account, used by the glance services.
73     Type: String
74     NoEcho: true
75   GlanceNotifierStrategy:
76     Description: Strategy to use for Glance notification queue
77     Type: String
78     Default: noop
79   GlanceLogFile:
80     Description: The filepath of the file to use for logging messages from Glance.
81     Type: String
82     Default: ''
83   HeatPassword:
84     Default: unset
85     Description: The password for the Heat service account, used by the Heat services.
86     Type: String
87     NoEcho: true
88   ImageUpdatePolicy:
89     Default: 'REBUILD_PRESERVE_EPHEMERAL'
90     Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
91     Type: String
92   KeyName:
93     Default: default
94     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
95     Type: String
96   NeutronBridgeMappings:
97     Description: The OVS logical->physical bridge mappings to use.
98     Type: String
99     Default: ''
100   NeutronPassword:
101     Default: unset
102     Description: The password for the neutron service account, used by neutron agents.
103     Type: String
104     NoEcho: true
105   CeilometerComputeAgent:
106     Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
107     Type: String
108     Default: ''
109     AllowedValues: ['', Present]
110   CeilometerMeteringSecret:
111     Default: unset
112     Description: Secret shared by the ceilometer services.
113     Type: String
114     NoEcho: true
115   CeilometerPassword:
116     Default: unset
117     Description: The password for the ceilometer service account.
118     Type: String
119     NoEcho: true
120   CloudName:
121     Default: ''
122     Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
123     Type: String
124   NovaComputeDriver:
125     Default: libvirt.LibvirtDriver
126     Type: String
127   NovaComputeLibvirtType:
128     Default: ''
129     Type: String
130   NovaImage:
131     Type: String
132     Default: overcloud-compute
133   NovaPassword:
134     Default: unset
135     Description: The password for the nova service account, used by nova-api.
136     Type: String
137     NoEcho: true
138   NeutronFlatNetworks:
139     Type: String
140     Default: ''
141     Description: If set, flat networks to configure in neutron plugins.
142   HypervisorNeutronPhysicalBridge:
143     Default: ''
144     Description: An OVS bridge to create on each hypervisor.
145     Type: String
146   HypervisorNeutronPublicInterface:
147     Default: ''
148     Description: What interface to add to the HypervisorNeutronPhysicalBridge.
149     Type: String
150   NeutronPublicInterface:
151     Default: eth0
152     Description: What interface to bridge onto br-ex for network nodes.
153     Type: String
154   NeutronPublicInterfaceDefaultRoute:
155     Default: ''
156     Description: A custom default route for the NeutronPublicInterface.
157     Type: String
158   NeutronPublicInterfaceIP:
159     Default: ''
160     Description: A custom IP address to put onto the NeutronPublicInterface.
161     Type: String
162   NeutronPublicInterfaceRawDevice:
163     Default: ''
164     Description: If set, the public interface is a vlan with this device as the raw device.
165     Type: String
166   NeutronDnsmasqOptions:
167     Default: 'dhcp-option-force=26,1400'
168     Description: Dnsmasq options for neutron-dhcp-agent. The default value here forces MTU to be set to 1400 to account for the gre tunnel overhead.
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       group: os-apply-config
307       config:
308         completion-signal: {get_input: deploy_signal_id}
309         admin-password:
310           Ref: AdminPassword
311         admin-token:
312           Ref: AdminToken
313         bootstack:
314           public_interface_ip:
315             Ref: NeutronPublicInterfaceIP
316         cinder:
317           db: mysql://cinder:unset@localhost/cinder
318           volume_size_mb: '5000'
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           dnsmasq-options:
380             Ref: NeutronDnsmasqOptions
381         ceilometer:
382           db: mysql://ceilometer:unset@localhost/ceilometer
383           metering_secret: {Ref: CeilometerMeteringSecret}
384           service-password:
385             Ref: CeilometerPassword
386         nova:
387           compute_driver: libvirt.LibvirtDriver
388           db: mysql://nova:unset@localhost/nova
389           default_floating_pool:
390             ext-net
391           host:
392             get_input: controller_host
393           metadata-proxy: true
394           service-password:
395             Ref: NovaPassword
396         rabbit:
397           host:
398             get_input: controller_host
399           username:
400             Ref: RabbitUserName
401           password:
402             Ref: RabbitPassword
403           cookie:
404             Fn::GetAtt:
405             - RabbitCookie
406             - value
407         ntp:
408           servers:
409               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
410   controllerPassthrough:
411     Type: OS::Heat::StructuredConfig
412     Properties:
413       group: os-apply-config
414       config: {get_input: passthrough_config}
415   controller0:
416     Type: OS::Nova::Server
417     Properties:
418       image:
419         Ref: controllerImage
420       image_update_policy:
421         Ref: ImageUpdatePolicy
422       flavor:
423         Ref: OvercloudControlFlavor
424       key_name:
425         Ref: KeyName
426       user_data_format: SOFTWARE_CONFIG
427   controller0Deployment:
428     Type: OS::Heat::StructuredDeployment
429     Properties:
430       config: {Ref: controllerConfig}
431       server: {Ref: controller0}
432       input_values:
433         controller_host:  
434           Fn::Select:
435             - 0
436             - Fn::Select:
437               - ctlplane
438               - Fn::GetAtt:
439                 - controller0
440                 - networks
441         heat.watch_server_url:
442           Fn::Join:
443             - ''
444             - - 'http://'
445               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
446               - ':8003'
447         heat.metadata_server_url:
448           Fn::Join:
449             - ''
450             - - 'http://'
451               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
452               - ':8000'
453         heat.waitcondition_server_url:
454           Fn::Join:
455             - ''
456             - - 'http://'
457               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
458               - ':8000/v1/waitcondition'
459         hosts:
460           Fn::Join:
461           - ' '
462           - - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
463             - {Ref: CloudName}
464   controller0SSLDeployment:
465     Type: OS::Heat::StructuredDeployment
466     Properties:
467       config: {Ref: SSLConfig}
468       server: {Ref: controller0}
469       signal_transport: NO_SIGNAL
470       input_values:
471         ssl_certificate: {Ref: SSLCertificate}
472         ssl_key: {Ref: SSLKey}
473   controller0Passthrough:
474     Type: OS::Heat::StructuredDeployment
475     Properties:
476       config: {Ref: controllerPassthrough}
477       server: {Ref: controller0}
478       signal_transport: NO_SIGNAL
479       input_values:
480         passthrough_config: {Ref: ExtraConfig}
481 Outputs:
482   KeystoneURL:
483     Description: URL for the Overcloud Keystone service
484     Value:
485       Fn::Join:
486       - ''
487       - - http://
488         - Fn::Select:
489           - 0
490           - Fn::Select:
491             - ctlplane
492             - Fn::GetAtt:
493               - controller0
494               - networks
495         - :5000/v2.0/