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