Split out Nova software config
[apex-tripleo-heat-templates.git] / undercloud-source.yaml
1 description: All-in-one baremetal OpenStack and all dependencies.
2 heat_template_version: 2013-05-23
3 parameters:
4   AdminPassword:
5     default: unset
6     description: The password for the keystone admin account, used for monitoring, querying neutron etc.
7     type: string
8     hidden: true
9   AdminToken:
10     default: unset
11     description: The keystone auth secret.
12     type: string
13     hidden: true
14   BaremetalArch:
15     default: i386
16     description: The architecture to use in Nova-BM - i386 or amd64.
17     type: string
18   CeilometerMeteringSecret:
19     default: unset
20     description: Secret shared by the ceilometer services.
21     type: string
22     hidden: true
23   CeilometerPassword:
24     default: unset
25     description: The password for the ceilometer service account.
26     type: string
27     hidden: true
28   Debug:
29     default: ''
30     description: Set to True to enable debugging on all services.
31     type: string
32   DefaultSignalTransport:
33     default: CFN_SIGNAL
34     description: Transport to use for software-config signals.
35     type: string
36     constraints:
37       - allowed_values: [ CFN_SIGNAL, HEAT_SIGNAL, NO_SIGNAL ]
38   ExtraConfig:
39     default: {}
40     description: |
41       Additional configuration to inject into the cluster. The JSON should have
42       the following structure:
43         {"FILEKEY":
44           {"config:
45             [{"section": "SECTIONNAME",
46               "values":
47                [{"option": "OPTIONNAME",
48                   "value": "VALUENAME"
49                 }
50                ]
51              }
52             ]
53           }
54         }
55       For instance:
56         {"nova":
57           {"config":
58             [{"section": "default",
59               "values":
60                 [{"option": "compute_manager",
61                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
62                  }
63                 ]
64              },
65              {"section": "cells",
66               "values":
67                 [{"option": "driver",
68                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
69                  }
70                 ]
71              }
72             ]
73           }
74         }
75     type: json
76   Flavor:
77     default: baremetal
78     description: Flavor to request when deploying.
79     type: string
80   GlanceLogFile:
81     description: The filepath of the file to use for logging messages from Glance.
82     type: string
83     default: ''
84   GlancePassword:
85     default: unset
86     description: The password for the glance service account, used by the glance services.
87     type: string
88     hidden: true
89   GlancePort:
90    default: 9292
91    description: Glance port.
92    type: string
93   GlanceProtocol:
94    default: http
95    description: Protocol to use when connecting to glance, set to https for SSL.
96    type: string
97   GlanceNotifierStrategy:
98     description: Strategy to use for Glance notification queue
99     type: string
100     default: noop
101   KeyName:
102     default: default
103     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
104     type: string
105   KeystoneCACertificate:
106     default: ''
107     description: Keystone self-signed certificate authority certificate.
108     type: string
109   KeystoneSigningCertificate:
110     default: ''
111     description: Keystone certificate for verifying token validity.
112     type: string
113   KeystoneSigningKey:
114     default: ''
115     description: Keystone key for signing tokens.
116     type: string
117     hidden: true
118   KeystoneSSLCertificate:
119     default: ''
120     description: Keystone certificate for verifying token validity.
121     type: string
122   KeystoneSSLCertificateKey:
123     default: ''
124     description: Keystone key for signing tokens.
125     type: string
126     hidden: true
127   HeatPassword:
128     default: unset
129     description: The password for the Heat service account, used by the Heat services.
130     type: string
131     hidden: true
132   HeatStackDomainAdminPassword:
133     description: Password for heat_domain_admin user.
134     type: string
135     default: ''
136     hidden: true
137   ImageUpdatePolicy:
138     default: REBUILD_PRESERVE_EPHEMERAL
139     description: What policy to use when reconstructing instances. REBUILD for rebuilds,
140       REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
141     type: string
142   MysqlInnodbBufferPoolSize:
143     description: >
144         Specifies the size of the buffer pool in megabytes. Setting to
145         zero should be interpreted as "no value" and will defer to the
146         lower level default.
147     type: number
148     default: 0
149   NeutronPassword:
150     default: unset
151     description: The password for the neutron service account, used by neutron agents.
152     type: string
153     hidden: true
154   NeutronPublicInterfaceDefaultRoute:
155     default: ''
156     description: A custom default route for the NeutronPublicInterface.
157     type: string
158   NeutronPublicInterfaceIP:
159     default: ''
160     description: >
161       A custom IP address to put onto the NeutronPublicInterface bridge.
162       See also NeutronPublicInterfaceTagIP for adding a VLAN tagging IP.
163       NeutronPublicInterfaceIP is deprecated in the context of deploying
164       underclouds - its only needed for the seed bootstrap process.
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   NeutronPublicInterfaceTag:
171     default: ''
172     description: >
173       VLAN tag for creating a public VLAN. The tag will be used to
174       create an access port on the exterior bridge, and that port will be
175       given the IP address returned by neutron from the public network.
176     type: string
177   NovaPassword:
178     default: unset
179     description: The password for the nova service account, used by nova-api.
180     type: string
181     hidden: true
182   NeutronDVR:
183     default: 'False'
184     type: string
185   NtpServer:
186     type: string
187     default: ''
188   RabbitCookieSalt:
189     type: string
190     default: unset
191     description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
192   RabbitUserName:
193     default: guest
194     description: The username for RabbitMQ
195     type: string
196   RabbitPassword:
197     default: guest
198     description: The password for RabbitMQ
199     type: string
200     hidden: true
201   SnmpdReadonlyUserName:
202     default: ro_snmp_user
203     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
204     type: string
205   SnmpdReadonlyUserPassword:
206     default: unset
207     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
208     type: string
209     hidden: true
210   undercloudImage:
211     default: undercloud
212     type: string
213 resources:
214   RabbitCookie:
215     type: OS::Heat::RandomString
216     properties:
217       length: 20
218       salt:
219         get_param: RabbitCookieSalt
220   MysqlRootPassword:
221     type: OS::Heat::RandomString
222     properties:
223       length: 10
224   undercloudConfig:
225     type: OS::Heat::StructuredConfig
226     properties:
227       config:
228         completion-signal: {get_input: deploy_signal_id}
229         admin-password:
230           get_param: AdminPassword
231         admin-token:
232           get_param: AdminToken
233         bootstrap_host:
234           bootstrap_nodeid:
235             Fn::Select:
236             - 0
237             - Fn::Select:
238               - 0
239               - Merge::Map:
240                   undercloud:
241                   - get_attr:
242                     - undercloud
243                     - name
244           nodeid: {get_input: bootstack_nodeid}
245         bootstack:
246           public_interface_ip:
247             get_param: NeutronPublicInterfaceIP
248         controller-address:
249           get_input: controller_host
250         corosync:
251           bindnetaddr: {get_input: controller_host}
252           mcastport: 5577
253           nodes:
254             Merge::Map:
255               controller0:
256                 ip: {get_attr: [undercloud, networks, ctlplane, 0]}
257         pacemaker:
258           stonith_enabled : false
259           recheck_interval : 5
260           quorum_policy : ignore
261         ceilometer:
262           db: mysql://ceilometer:unset@localhost/ceilometer
263           debug: {get_param: Debug}
264           metering_secret: {get_param: CeilometerMeteringSecret}
265           snmpd_readonly_user_name:
266             get_param: SnmpdReadonlyUserName
267           snmpd_readonly_user_password:
268             get_param: SnmpdReadonlyUserPassword
269           service-password:
270             get_param: CeilometerPassword
271         db-password: unset
272         glance:
273           backend: file
274           db: mysql://glance:unset@localhost/glance
275           debug: {get_param: Debug}
276           host: 127.0.0.1
277           port:
278             get_param: GlancePort
279           protocol:
280             get_param: GlanceProtocol
281           service-password:
282             get_param: GlancePassword
283           notifier-strategy:
284             get_param: GlanceNotifierStrategy
285           log-file:
286             get_param: GlanceLogFile
287         heat:
288           admin_password:
289             get_param: HeatPassword
290           admin_tenant_name: service
291           admin_user: heat
292           auth_encryption_key: unset___________
293           db: mysql://heat:unset@localhost/heat
294           debug: {get_param: Debug}
295           stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
296           watch_server_url: {get_input: heat.watch_server_url}
297           metadata_server_url: {get_input: heat.metadata_server_url}
298           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
299         keystone:
300           db: mysql://keystone:unset@localhost/keystone
301           debug: {get_param: Debug}
302           host: 127.0.0.1
303           ca_certificate: {get_param: KeystoneCACertificate}
304           signing_key: {get_param: KeystoneSigningKey}
305           signing_certificate: {get_param: KeystoneSigningCertificate}
306           ssl:
307               certificate: {get_param: KeystoneSSLCertificate}
308               certificate_key: {get_param: KeystoneSSLCertificateKey}
309         mysql:
310           innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
311           root-password: {get_resource: MysqlRootPassword}
312           bind_address: 127.0.0.1
313         neutron:
314           debug: {get_param: Debug}
315           host: 127.0.0.1
316           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
317           ovs:
318             public_interface:
319               get_param: NeutronPublicInterface
320             public_interface_raw_device:
321               get_param: NeutronPublicInterfaceRawDevice
322             public_interface_route:
323               get_param: NeutronPublicInterfaceDefaultRoute
324             public_interface_tag:
325               get_param: NeutronPublicInterfaceTag
326             physical_bridge: br-ctlplane
327             physical_network: ctlplane
328             network_vlan_ranges: ctlplane
329             bridge_mappings: ctlplane:br-ctlplane
330             tenant_network_type: vlan
331             enable_tunneling: 'False'
332           service-password:
333             get_param: NeutronPassword
334         rabbit:
335           host: 127.0.0.1
336           username:
337             get_param: RabbitUserName
338           password:
339             get_param: RabbitPassword
340           cookie:
341             get_attr:
342             - RabbitCookie
343             - value
344         ntp:
345           servers:
346             - {server: {get_param: NtpServer}, fudge: "stratum 0"}
347   undercloudPassthroughConfig:
348     type: OS::Heat::StructuredConfig
349     properties:
350       config: {get_input: passthrough_config}
351   undercloud:
352     type: OS::Nova::Server
353     properties:
354       image:
355         get_param: undercloudImage
356       flavor:
357         get_param: Flavor
358       key_name:
359         get_param: KeyName
360       image_update_policy:
361         get_param: ImageUpdatePolicy
362       networks:
363         - network: ctlplane
364       user_data_format: SOFTWARE_CONFIG
365   undercloudDeployment:
366     depends_on: [undercloudPassthroughDeployment]
367     type: OS::Heat::StructuredDeployment
368     properties:
369       config: {get_resource: undercloudConfig}
370       server: {get_resource: undercloud}
371       signal_transport: {get_param: DefaultSignalTransport}
372       input_values:
373         bootstack_nodeid:
374           get_attr:
375           - undercloud
376           - name
377         controller_host:
378           get_attr:
379           - undercloud
380           - networks
381           - ctlplane
382           - 0
383         heat.watch_server_url:
384           Fn::Join:
385             - ''
386             - - 'http://'
387               - get_attr: [undercloud, networks, ctlplane, 0]
388               - ':8003'
389         heat.metadata_server_url:
390           Fn::Join:
391             - ''
392             - - 'http://'
393               - {get_attr: [undercloud, networks, ctlplane, 0]}
394               - ':8000'
395         heat.waitcondition_server_url:
396           Fn::Join:
397             - ''
398             - - 'http://'
399               - {get_attr: [undercloud, networks, ctlplane, 0]}
400               - ':8000/v1/waitcondition'
401   undercloudPassthroughDeployment:
402     depends_on: [undercloudNovaDeployment]
403     type: OS::Heat::StructuredDeployment
404     properties:
405       config: {get_resource: undercloudPassthroughConfig}
406       server: {get_resource: undercloud}
407       signal_transport: NO_SIGNAL
408       input_values:
409         passthrough_config: {get_param: ExtraConfig}