Merge "Use parameter constraints for image, key and flavor"
[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   NtpServer:
183     type: string
184     default: ''
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   RabbitUserName:
190     default: guest
191     description: The username for RabbitMQ
192     type: string
193   RabbitPassword:
194     default: guest
195     description: The password for RabbitMQ
196     type: string
197     hidden: true
198   SnmpdReadonlyUserName:
199     default: ro_snmp_user
200     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
201     type: string
202   SnmpdReadonlyUserPassword:
203     default: unset
204     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
205     type: string
206     hidden: true
207   undercloudImage:
208     default: undercloud
209     type: string
210 resources:
211   RabbitCookie:
212     type: OS::Heat::RandomString
213     properties:
214       length: 20
215       salt:
216         get_param: RabbitCookieSalt
217   MysqlRootPassword:
218     type: OS::Heat::RandomString
219     properties:
220       length: 10
221   undercloudConfig:
222     type: OS::Heat::StructuredConfig
223     properties:
224       config:
225         completion-signal: {get_input: deploy_signal_id}
226         admin-password:
227           get_param: AdminPassword
228         admin-token:
229           get_param: AdminToken
230         bootstrap_host:
231           bootstrap_nodeid:
232             Fn::Select:
233             - 0
234             - Fn::Select:
235               - 0
236               - Merge::Map:
237                   undercloud:
238                   - get_attr:
239                     - undercloud
240                     - name
241           nodeid: {get_input: bootstack_nodeid}
242         bootstack:
243           public_interface_ip:
244             get_param: NeutronPublicInterfaceIP
245         controller-address:
246           get_input: controller_host
247         corosync:
248           bindnetaddr: {get_input: controller_host}
249           mcastport: 5577
250           nodes:
251             Merge::Map:
252               controller0:
253                 ip: {get_attr: [undercloud, networks, ctlplane, 0]}
254         pacemaker:
255           stonith_enabled : false
256           recheck_interval : 5
257           quorum_policy : ignore
258         ceilometer:
259           db: mysql://ceilometer:unset@localhost/ceilometer
260           debug: {get_param: Debug}
261           metering_secret: {get_param: CeilometerMeteringSecret}
262           snmpd_readonly_user_name:
263             get_param: SnmpdReadonlyUserName
264           snmpd_readonly_user_password:
265             get_param: SnmpdReadonlyUserPassword
266           service-password:
267             get_param: CeilometerPassword
268         db-password: unset
269         glance:
270           backend: file
271           db: mysql://glance:unset@localhost/glance
272           debug: {get_param: Debug}
273           host: 127.0.0.1
274           port:
275             get_param: GlancePort
276           protocol:
277             get_param: GlanceProtocol
278           service-password:
279             get_param: GlancePassword
280           notifier-strategy:
281             get_param: GlanceNotifierStrategy
282           log-file:
283             get_param: GlanceLogFile
284         heat:
285           admin_password:
286             get_param: HeatPassword
287           admin_tenant_name: service
288           admin_user: heat
289           auth_encryption_key: unset___________
290           db: mysql://heat:unset@localhost/heat
291           debug: {get_param: Debug}
292           stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
293           watch_server_url: {get_input: heat.watch_server_url}
294           metadata_server_url: {get_input: heat.metadata_server_url}
295           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
296         keystone:
297           db: mysql://keystone:unset@localhost/keystone
298           debug: {get_param: Debug}
299           host: 127.0.0.1
300           ca_certificate: {get_param: KeystoneCACertificate}
301           signing_key: {get_param: KeystoneSigningKey}
302           signing_certificate: {get_param: KeystoneSigningCertificate}
303           ssl:
304               certificate: {get_param: KeystoneSSLCertificate}
305               certificate_key: {get_param: KeystoneSSLCertificateKey}
306         mysql:
307           innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
308           root-password: {get_resource: MysqlRootPassword}
309           bind_address: 127.0.0.1
310         neutron:
311           debug: {get_param: Debug}
312           host: 127.0.0.1
313           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
314           ovs:
315             public_interface:
316               get_param: NeutronPublicInterface
317             public_interface_raw_device:
318               get_param: NeutronPublicInterfaceRawDevice
319             public_interface_route:
320               get_param: NeutronPublicInterfaceDefaultRoute
321             public_interface_tag:
322               get_param: NeutronPublicInterfaceTag
323             physical_bridge: br-ctlplane
324             physical_network: ctlplane
325             network_vlan_ranges: ctlplane
326             bridge_mappings: ctlplane:br-ctlplane
327             tenant_network_type: vlan
328             enable_tunneling: 'False'
329           service-password:
330             get_param: NeutronPassword
331         rabbit:
332           host: 127.0.0.1
333           username:
334             get_param: RabbitUserName
335           password:
336             get_param: RabbitPassword
337           cookie:
338             get_attr:
339             - RabbitCookie
340             - value
341         ntp:
342           servers:
343             - {server: {get_param: NtpServer}, fudge: "stratum 0"}
344   undercloudPassthroughConfig:
345     type: OS::Heat::StructuredConfig
346     properties:
347       config: {get_input: passthrough_config}
348   undercloud:
349     type: OS::Nova::Server
350     properties:
351       image:
352         get_param: undercloudImage
353       flavor:
354         get_param: Flavor
355       key_name:
356         get_param: KeyName
357       image_update_policy:
358         get_param: ImageUpdatePolicy
359       networks:
360         - network: ctlplane
361       user_data_format: SOFTWARE_CONFIG
362   undercloudDeployment:
363     depends_on: [undercloudPassthroughDeployment]
364     type: OS::Heat::StructuredDeployment
365     properties:
366       config: {get_resource: undercloudConfig}
367       server: {get_resource: undercloud}
368       signal_transport: {get_param: DefaultSignalTransport}
369       input_values:
370         bootstack_nodeid:
371           get_attr:
372           - undercloud
373           - name
374         controller_host:
375           get_attr:
376           - undercloud
377           - networks
378           - ctlplane
379           - 0
380         heat.watch_server_url:
381           Fn::Join:
382             - ''
383             - - 'http://'
384               - get_attr: [undercloud, networks, ctlplane, 0]
385               - ':8003'
386         heat.metadata_server_url:
387           Fn::Join:
388             - ''
389             - - 'http://'
390               - {get_attr: [undercloud, networks, ctlplane, 0]}
391               - ':8000'
392         heat.waitcondition_server_url:
393           Fn::Join:
394             - ''
395             - - 'http://'
396               - {get_attr: [undercloud, networks, ctlplane, 0]}
397               - ':8000/v1/waitcondition'
398   undercloudPassthroughDeployment:
399     depends_on: [undercloudNovaDeployment]
400     type: OS::Heat::StructuredDeployment
401     properties:
402       config: {get_resource: undercloudPassthroughConfig}
403       server: {get_resource: undercloud}
404       signal_transport: NO_SIGNAL
405       input_values:
406         passthrough_config: {get_param: ExtraConfig}