a78e069b943fbb924715e79d3c275c7dff4a6cb2
[apex-tripleo-heat-templates.git] / undercloud-source.yaml
1 Description: All-in-one baremetal OpenStack and all dependencies.
2 HeatTemplateFormatVersion: '2012-12-12'
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     NoEcho: true
9   AdminToken:
10     Default: unset
11     Description: The keystone auth secret.
12     Type: String
13     NoEcho: 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     NoEcho: true
27   CeilometerPassword:
28     Default: unset
29     Description: The password for the ceilometer service account.
30     Type: String
31     NoEcho: 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     NoEcho: 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   GlancePassword:
84     Default: unset
85     Description: The password for the glance service account, used by the glance services.
86     Type: String
87     NoEcho: true
88   GlanceNotifierStrategy:
89     Description: Strategy to use for Glance notification queue
90     Type: String
91     Default: noop
92   GlanceLogFile:
93     Description: The filepath of the file to use for logging messages from Glance.
94     Type: String
95     Default: ''
96   KeyName:
97     Default: default
98     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
99     Type: String
100   HeatPassword:
101     Default: unset
102     Description: The password for the Heat service account, used by the Heat services.
103     Type: String
104     NoEcho: true
105   ImageUpdatePolicy:
106     Default: REBUILD_PRESERVE_EPHEMERAL
107     Description: What policy to use when reconstructing instances. REBUILD for rebuilds,
108       REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
109     Type: String
110   undercloudImage:
111     Default: undercloud
112     Type: String
113   NeutronPassword:
114     Default: unset
115     Description: The password for the neutron service account, used by neutron agents.
116     Type: String
117     NoEcho: true
118   NovaPassword:
119     Default: unset
120     Description: The password for the nova service account, used by nova-api.
121     Type: String
122     NoEcho: true
123   NeutronPublicInterfaceDefaultRoute:
124     Default: ''
125     Description: A custom default route for the NeutronPublicInterface.
126     Type: String
127   NeutronPublicInterfaceIP:
128     Default: ''
129     Description: A custom IP address to put onto the NeutronPublicInterface.
130     Type: String
131   NeutronPublicInterfaceRawDevice:
132     Default: ''
133     Description: If set, the public interface is a vlan with this device as the raw device.
134     Type: String
135   NtpServer:
136     Type: String
137     Default: ''
138   RabbitUserName:
139     Default: guest
140     Description: The username for RabbitMQ
141     Type: String
142   RabbitPassword:
143     Default: guest
144     Description: The password for RabbitMQ
145     Type: String
146     NoEcho: true
147   RabbitCookieSalt:
148     Type: String
149     Default: unset
150     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
151   HeatStackDomainAdminPassword:
152     Description: Password for heat_domain_admin user.
153     Type: String
154     Default: ''
155     NoEcho: true
156   MysqlInnodbBufferPoolSize:
157     Description: >
158         Specifies the size of the buffer pool in megabytes. Setting to
159         zero should be interpreted as "no value" and will defer to the
160         lower level default.
161     Type: Number
162     Default: 0
163   KeystoneCACertificate:
164     Default: ''
165     Description: Keystone self-signed certificate authority certificate.
166     Type: String
167   KeystoneSigningCertificate:
168     Default: ''
169     Description: Keystone certificate for verifying token validity.
170     Type: String
171   KeystoneSigningKey:
172     Default: ''
173     Description: Keystone key for signing tokens.
174     Type: String
175     NoEcho: true
176 Resources:
177   RabbitCookie:
178     Type: OS::Heat::RandomString
179     Properties:
180       length: 20
181       salt:
182         Ref: RabbitCookieSalt
183   undercloudConfig:
184     Type: OS::Heat::StructuredConfig
185     Properties:
186       config:
187         completion-signal: {get_input: deploy_signal_id}
188         admin-password:
189           Ref: AdminPassword
190         admin-token:
191           Ref: AdminToken
192         bootstrap_host:
193           bootstrap_nodeid:
194             Fn::Select:
195             - 0
196             - Fn::Select:
197               - 0
198               - Merge::Map:
199                   undercloud:
200                   - Fn::Select:
201                     - name
202                     - Fn::GetAtt:
203                       - undercloud
204                       - show
205           nodeid: {get_input: bootstack_nodeid}
206         bootstack:
207           public_interface_ip:
208             Ref: NeutronPublicInterfaceIP
209         controller-address:
210           get_input: controller_host
211         ceilometer:
212           db: mysql://ceilometer:unset@localhost/ceilometer
213           metering_secret: {Ref: CeilometerMeteringSecret}
214           snmpd_readonly_user_name:
215             Ref: SnmpdReadonlyUserName
216           snmpd_readonly_user_password:
217             Ref: SnmpdReadonlyUserPassword
218           service-password:
219             Ref: CeilometerPassword
220         db-password: unset
221         glance:
222           backend: file
223           db: mysql://glance:unset@localhost/glance
224           host: 127.0.0.1
225           service-password:
226             Ref: GlancePassword
227           notifier-strategy:
228             Ref: GlanceNotifierStrategy
229           log-file:
230             Ref: GlanceLogFile
231         heat:
232           admin_password:
233             Ref: HeatPassword
234           admin_tenant_name: service
235           admin_user: heat
236           auth_encryption_key: unset___________
237           db: mysql://heat:unset@localhost/heat
238           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
239           watch_server_url: {get_input: heat.watch_server_url}
240           metadata_server_url: {get_input: heat.metadata_server_url}
241           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
242         keystone:
243           db: mysql://keystone:unset@localhost/keystone
244           host: 127.0.0.1
245           ca_certificate: {Ref: KeystoneCACertificate}
246           signing_key: {Ref: KeystoneSigningKey}
247           signing_certificate: {Ref: KeystoneSigningCertificate}
248         mysql:
249           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
250         neutron:
251           host: 127.0.0.1
252           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
253           ovs:
254             public_interface:
255               Ref: NeutronPublicInterface
256             public_interface_raw_device:
257               Ref: NeutronPublicInterfaceRawDevice
258             public_interface_route:
259               Ref: NeutronPublicInterfaceDefaultRoute
260             physical_bridge: br-ctlplane
261             physical_network: ctlplane
262             network_vlan_ranges: ctlplane
263             bridge_mappings: ctlplane:br-ctlplane
264             tenant_network_type: vlan
265             enable_tunneling: 'False'
266           service-password:
267             Ref: NeutronPassword
268         rabbit:
269           host: 127.0.0.1
270           username:
271             Ref: RabbitUserName
272           password:
273             Ref: RabbitPassword
274           cookie:
275             Fn::GetAtt:
276             - RabbitCookie
277             - value
278         ntp:
279           servers:
280             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
281   undercloudPassthroughConfig:
282     Type: OS::Heat::StructuredConfig
283     Properties:
284       config: {get_input: passthrough_config}
285   undercloud:
286     Type: OS::Nova::Server
287     Properties:
288       image:
289         Ref: undercloudImage
290       flavor:
291         Ref: Flavor
292       key_name:
293         Ref: KeyName
294       image_update_policy:
295         Ref: ImageUpdatePolicy
296       user_data_format: SOFTWARE_CONFIG
297   99_undercloudDeployment:
298     Type: OS::Heat::StructuredDeployment
299     Properties:
300       config: {Ref: undercloudConfig}
301       server: {Ref: undercloud}
302       input_values:
303         bootstack_nodeid:
304           Fn::Select:
305             - name
306             - Fn::GetAtt:
307               - undercloud
308               - show
309         controller_host:
310           Fn::Select:
311             - 0
312             - Fn::Select:
313               - ctlplane
314               - Fn::GetAtt:
315                 - undercloud
316                 - networks
317         heat.watch_server_url:
318           Fn::Join:
319             - ''
320             - - 'http://'
321               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
322               - ':8003'
323         heat.metadata_server_url:
324           Fn::Join:
325             - ''
326             - - 'http://'
327               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
328               - ':8000'
329         heat.waitcondition_server_url:
330           Fn::Join:
331             - ''
332             - - 'http://'
333               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
334               - ':8000/v1/waitcondition'
335   00_undercloudPassthroughDeployment:
336     Type: OS::Heat::StructuredDeployment
337     Properties:
338       config: {Ref: undercloudPassthroughConfig}
339       server: {Ref: undercloud}
340       signal_transport: NO_SIGNAL
341       input_values:
342         passthrough_config: {Ref: ExtraConfig}