Merge "Secure the MySQL bind-address on the undercloud"
[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   HeatPassword:
119     default: unset
120     description: The password for the Heat service account, used by the Heat services.
121     type: string
122     hidden: true
123   HeatStackDomainAdminPassword:
124     description: Password for heat_domain_admin user.
125     type: string
126     default: ''
127     hidden: true
128   ImageUpdatePolicy:
129     default: REBUILD_PRESERVE_EPHEMERAL
130     description: What policy to use when reconstructing instances. REBUILD for rebuilds,
131       REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
132     type: string
133   MysqlInnodbBufferPoolSize:
134     description: >
135         Specifies the size of the buffer pool in megabytes. Setting to
136         zero should be interpreted as "no value" and will defer to the
137         lower level default.
138     type: number
139     default: 0
140   NeutronPassword:
141     default: unset
142     description: The password for the neutron service account, used by neutron agents.
143     type: string
144     hidden: true
145   NeutronPublicInterfaceDefaultRoute:
146     default: ''
147     description: A custom default route for the NeutronPublicInterface.
148     type: string
149   NeutronPublicInterfaceIP:
150     default: ''
151     description: >
152       A custom IP address to put onto the NeutronPublicInterface bridge.
153       See also NeutronPublicInterfaceTagIP for adding a VLAN tagging IP.
154       NeutronPublicInterfaceIP is deprecated in the context of deploying
155       underclouds - its only needed for the seed bootstrap process.
156     type: string
157   NeutronPublicInterfaceRawDevice:
158     default: ''
159     description: If set, the public interface is a vlan with this device as the raw device.
160     type: string
161   NeutronPublicInterfaceTag:
162     default: ''
163     description: >
164       VLAN tag for creating a public VLAN. The tag will be used to
165       create an access port on the exterior bridge, and that port will be
166       given the IP address returned by neutron from the public network.
167     type: string
168   NovaPassword:
169     default: unset
170     description: The password for the nova service account, used by nova-api.
171     type: string
172     hidden: true
173   NtpServer:
174     type: string
175     default: ''
176   RabbitCookieSalt:
177     type: string
178     default: unset
179     description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
180   RabbitUserName:
181     default: guest
182     description: The username for RabbitMQ
183     type: string
184   RabbitPassword:
185     default: guest
186     description: The password for RabbitMQ
187     type: string
188     hidden: true
189   SnmpdReadonlyUserName:
190     default: ro_snmp_user
191     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
192     type: string
193   SnmpdReadonlyUserPassword:
194     default: unset
195     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
196     type: string
197     hidden: true
198   undercloudImage:
199     default: undercloud
200     type: string
201 resources:
202   RabbitCookie:
203     type: OS::Heat::RandomString
204     properties:
205       length: 20
206       salt:
207         get_param: RabbitCookieSalt
208   MysqlRootPassword:
209     type: OS::Heat::RandomString
210     properties:
211       length: 10
212   undercloudConfig:
213     type: OS::Heat::StructuredConfig
214     properties:
215       config:
216         completion-signal: {get_input: deploy_signal_id}
217         admin-password:
218           get_param: AdminPassword
219         admin-token:
220           get_param: AdminToken
221         bootstrap_host:
222           bootstrap_nodeid:
223             Fn::Select:
224             - 0
225             - Fn::Select:
226               - 0
227               - Merge::Map:
228                   undercloud:
229                   - get_attr:
230                     - undercloud
231                     - name
232           nodeid: {get_input: bootstack_nodeid}
233         bootstack:
234           public_interface_ip:
235             get_param: NeutronPublicInterfaceIP
236         controller-address:
237           get_input: controller_host
238         corosync:
239           bindnetaddr: {get_input: controller_host}
240           mcastport: 5577
241           nodes:
242             Merge::Map:
243               controller0:
244                 ip: {get_attr: [undercloud, networks, ctlplane, 0]}
245         pacemaker:
246           stonith_enabled : false
247           recheck_interval : 5
248           quorum_policy : ignore
249         ceilometer:
250           db: mysql://ceilometer:unset@localhost/ceilometer
251           debug: {get_param: Debug}
252           metering_secret: {get_param: CeilometerMeteringSecret}
253           snmpd_readonly_user_name:
254             get_param: SnmpdReadonlyUserName
255           snmpd_readonly_user_password:
256             get_param: SnmpdReadonlyUserPassword
257           service-password:
258             get_param: CeilometerPassword
259         db-password: unset
260         glance:
261           backend: file
262           db: mysql://glance:unset@localhost/glance
263           debug: {get_param: Debug}
264           host: 127.0.0.1
265           port:
266             get_param: GlancePort
267           protocol:
268             get_param: GlanceProtocol
269           service-password:
270             get_param: GlancePassword
271           notifier-strategy:
272             get_param: GlanceNotifierStrategy
273           log-file:
274             get_param: GlanceLogFile
275         heat:
276           admin_password:
277             get_param: HeatPassword
278           admin_tenant_name: service
279           admin_user: heat
280           auth_encryption_key: unset___________
281           db: mysql://heat:unset@localhost/heat
282           debug: {get_param: Debug}
283           stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
284           watch_server_url: {get_input: heat.watch_server_url}
285           metadata_server_url: {get_input: heat.metadata_server_url}
286           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
287         keystone:
288           db: mysql://keystone:unset@localhost/keystone
289           debug: {get_param: Debug}
290           host: 127.0.0.1
291           ca_certificate: {get_param: KeystoneCACertificate}
292           signing_key: {get_param: KeystoneSigningKey}
293           signing_certificate: {get_param: KeystoneSigningCertificate}
294         mysql:
295           innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
296           root-password: {get_resource: MysqlRootPassword}
297           bind_address: 127.0.0.1
298         neutron:
299           debug: {get_param: Debug}
300           host: 127.0.0.1
301           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
302           ovs:
303             public_interface:
304               get_param: NeutronPublicInterface
305             public_interface_raw_device:
306               get_param: NeutronPublicInterfaceRawDevice
307             public_interface_route:
308               get_param: NeutronPublicInterfaceDefaultRoute
309             public_interface_tag:
310               get_param: NeutronPublicInterfaceTag
311             physical_bridge: br-ctlplane
312             physical_network: ctlplane
313             network_vlan_ranges: ctlplane
314             bridge_mappings: ctlplane:br-ctlplane
315             tenant_network_type: vlan
316             enable_tunneling: 'False'
317           service-password:
318             get_param: NeutronPassword
319         rabbit:
320           host: 127.0.0.1
321           username:
322             get_param: RabbitUserName
323           password:
324             get_param: RabbitPassword
325           cookie:
326             get_attr:
327             - RabbitCookie
328             - value
329         ntp:
330           servers:
331             - {server: {get_param: NtpServer}, fudge: "stratum 0"}
332   undercloudPassthroughConfig:
333     type: OS::Heat::StructuredConfig
334     properties:
335       config: {get_input: passthrough_config}
336   undercloud:
337     type: OS::Nova::Server
338     properties:
339       image:
340         get_param: undercloudImage
341       flavor:
342         get_param: Flavor
343       key_name:
344         get_param: KeyName
345       image_update_policy:
346         get_param: ImageUpdatePolicy
347       networks:
348         - network: ctlplane
349       user_data_format: SOFTWARE_CONFIG
350   undercloudDeployment:
351     depends_on: [undercloudPassthroughDeployment]
352     type: OS::Heat::StructuredDeployment
353     properties:
354       config: {get_resource: undercloudConfig}
355       server: {get_resource: undercloud}
356       signal_transport: {get_param: DefaultSignalTransport}
357       input_values:
358         bootstack_nodeid:
359           get_attr:
360           - undercloud
361           - name
362         controller_host:
363           get_attr:
364           - undercloud
365           - networks
366           - ctlplane
367           - 0
368         heat.watch_server_url:
369           Fn::Join:
370             - ''
371             - - 'http://'
372               - get_attr: [undercloud, networks, ctlplane, 0]
373               - ':8003'
374         heat.metadata_server_url:
375           Fn::Join:
376             - ''
377             - - 'http://'
378               - {get_attr: [undercloud, networks, ctlplane, 0]}
379               - ':8000'
380         heat.waitcondition_server_url:
381           Fn::Join:
382             - ''
383             - - 'http://'
384               - {get_attr: [undercloud, networks, ctlplane, 0]}
385               - ':8000/v1/waitcondition'
386   undercloudPassthroughDeployment:
387     depends_on: [undercloudNovaDeployment]
388     type: OS::Heat::StructuredDeployment
389     properties:
390       config: {get_resource: undercloudPassthroughConfig}
391       server: {get_resource: undercloud}
392       signal_transport: NO_SIGNAL
393       input_values:
394         passthrough_config: {get_param: ExtraConfig}