Merge "Increase PXE deployment timeout for overcloud"
[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               - "\n"
281               - Merge::Map:
282                   controller0:
283                     Fn::Join:
284                     - ' '
285                     - - Fn::Select:
286                         - 0
287                         - Fn::Select:
288                           - ctlplane
289                           - Fn::GetAtt:
290                             - controller0
291                             - networks
292                       - Fn::Select:
293                         - name
294                         - Fn::GetAtt:
295                           - controller0
296                           - show
297                       - Fn::Join:
298                         - '.'
299                         - - Fn::Select:
300                             - name
301                             - Fn::GetAtt:
302                               - controller0
303                               - show
304                           - 'novalocal'
305                       - {Ref: CloudName}
306   NovaCompute0Passthrough:
307     Type: OS::Heat::StructuredDeployment
308     Properties:
309       config: {Ref: NovaComputePassthrough}
310       server: {Ref: NovaCompute0}
311       signal_transport: NO_SIGNAL
312       input_values:
313         passthrough_config: {Ref: ExtraConfig}
314   NovaCompute0:
315     Type: FileInclude
316     Path: nova-compute-instance.yaml
317     SubKey: Resources.NovaCompute0
318   controllerConfig:
319     Type: OS::Heat::StructuredConfig
320     Properties:
321       config:
322         completion-signal: {get_input: deploy_signal_id}
323         admin-password:
324           Ref: AdminPassword
325         admin-token:
326           Ref: AdminToken
327         bootstack:
328           public_interface_ip:
329             Ref: NeutronPublicInterfaceIP
330         cinder:
331           db: mysql://cinder:unset@localhost/cinder
332           volume_size_mb: '5000'
333           service-password:
334             Ref: CinderPassword
335           iscsi-helper:
336             Ref: CinderISCSIHelper
337         controller-address:
338           get_input: controller_host
339         db-password: unset
340         glance:
341           backend: swift
342           db: mysql://glance:unset@localhost/glance
343           host:
344             get_input: controller_host
345           service-password:
346             Ref: GlancePassword
347           swift-store-user: service:glance
348           swift-store-key:
349             Ref: GlancePassword
350           notifier-strategy:
351             Ref: GlanceNotifierStrategy
352           log-file:
353             Ref: GlanceLogFile
354         heat:
355           admin_password:
356             Ref: HeatPassword
357           admin_tenant_name: service
358           admin_user: heat
359           auth_encryption_key: unset___________
360           db: mysql://heat:unset@localhost/heat
361           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
362           watch_server_url: {get_input: heat.watch_server_url}
363           metadata_server_url: {get_input: heat.metadata_server_url}
364           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
365         hosts: {get_input: hosts}
366         keystone:
367           db: mysql://keystone:unset@localhost/keystone
368           host:
369             get_input: controller_host
370         mysql:
371           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
372         neutron:
373           flat-networks: {Ref: NeutronFlatNetworks}
374           host:
375             get_input: controller_host
376           metadata_proxy_shared_secret: unset
377           ovs:
378             enable_tunneling: 'True'
379             local_ip:
380               get_input: controller_host
381             bridge_mappings: {Ref: NeutronBridgeMappings}
382             public_interface:
383               Ref: NeutronPublicInterface
384             public_interface_raw_device:
385               Ref: NeutronPublicInterfaceRawDevice
386             public_interface_route:
387               Ref: NeutronPublicInterfaceDefaultRoute
388             physical_bridge: br-ex
389             tenant_network_type: gre
390           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
391           service-password:
392             Ref: NeutronPassword
393           dnsmasq-options:
394             Ref: NeutronDnsmasqOptions
395         ceilometer:
396           db: mysql://ceilometer:unset@localhost/ceilometer
397           metering_secret: {Ref: CeilometerMeteringSecret}
398           service-password:
399             Ref: CeilometerPassword
400         nova:
401           compute_driver: libvirt.LibvirtDriver
402           db: mysql://nova:unset@localhost/nova
403           default_floating_pool:
404             ext-net
405           host:
406             get_input: controller_host
407           metadata-proxy: true
408           service-password:
409             Ref: NovaPassword
410         rabbit:
411           host:
412             get_input: controller_host
413           username:
414             Ref: RabbitUserName
415           password:
416             Ref: RabbitPassword
417           cookie:
418             Fn::GetAtt:
419             - RabbitCookie
420             - value
421         ntp:
422           servers:
423               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
424   controllerPassthrough:
425     Type: OS::Heat::StructuredConfig
426     Properties:
427       config: {get_input: passthrough_config}
428   controller0:
429     Type: OS::Nova::Server
430     Properties:
431       image:
432         Ref: controllerImage
433       image_update_policy:
434         Ref: ImageUpdatePolicy
435       flavor:
436         Ref: OvercloudControlFlavor
437       key_name:
438         Ref: KeyName
439       user_data_format: SOFTWARE_CONFIG
440   controller0Deployment:
441     Type: OS::Heat::StructuredDeployment
442     Properties:
443       config: {Ref: controllerConfig}
444       server: {Ref: controller0}
445       input_values:
446         controller_host:  
447           Fn::Select:
448             - 0
449             - Fn::Select:
450               - ctlplane
451               - Fn::GetAtt:
452                 - controller0
453                 - networks
454         heat.watch_server_url:
455           Fn::Join:
456             - ''
457             - - 'http://'
458               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
459               - ':8003'
460         heat.metadata_server_url:
461           Fn::Join:
462             - ''
463             - - 'http://'
464               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
465               - ':8000'
466         heat.waitcondition_server_url:
467           Fn::Join:
468             - ''
469             - - 'http://'
470               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
471               - ':8000/v1/waitcondition'
472         hosts:
473           Fn::Join:
474           - "\n"
475           - - Fn::Join:
476               - "\n"
477               - Merge::Map:
478                   NovaCompute0:
479                     Fn::Join:
480                     - ' '
481                     - - Fn::Select:
482                         - 0
483                         - Fn::Select:
484                           - ctlplane
485                           - Fn::GetAtt:
486                             - NovaCompute0
487                             - networks
488                       - Fn::Select:
489                         - name
490                         - Fn::GetAtt:
491                           - NovaCompute0
492                           - show
493                       - Fn::Join:
494                         - '.'
495                         - - Fn::Select:
496                             - name
497                             - Fn::GetAtt:
498                               - NovaCompute0
499                               - show
500                           - 'novalocal'
501             - Fn::Join:
502               - "\n"
503               - Merge::Map:
504                   controller0:
505                     Fn::Join:
506                     - ' '
507                     - - Fn::Select:
508                         - 0
509                         - Fn::Select:
510                           - ctlplane
511                           - Fn::GetAtt:
512                             - controller0
513                             - networks
514                       - Fn::Select:
515                         - name
516                         - Fn::GetAtt:
517                           - controller0
518                           - show
519                       - Fn::Join:
520                         - '.'
521                         - - Fn::Select:
522                             - name
523                             - Fn::GetAtt:
524                               - controller0
525                               - show
526                           - 'novalocal'
527                       - {Ref: CloudName}
528   controller0SSLDeployment:
529     Type: OS::Heat::StructuredDeployment
530     Properties:
531       config: {Ref: SSLConfig}
532       server: {Ref: controller0}
533       signal_transport: NO_SIGNAL
534       input_values:
535         ssl_certificate: {Ref: SSLCertificate}
536         ssl_key: {Ref: SSLKey}
537   controller0Passthrough:
538     Type: OS::Heat::StructuredDeployment
539     Properties:
540       config: {Ref: controllerPassthrough}
541       server: {Ref: controller0}
542       signal_transport: NO_SIGNAL
543       input_values:
544         passthrough_config: {Ref: ExtraConfig}
545 Outputs:
546   KeystoneURL:
547     Description: URL for the Overcloud Keystone service
548     Value:
549       Fn::Join:
550       - ''
551       - - http://
552         - Fn::Select:
553           - 0
554           - Fn::Select:
555             - ctlplane
556             - Fn::GetAtt:
557               - controller0
558               - networks
559         - :5000/v2.0/