Merge "Add custom public IP support to the undercloud."
[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 Resources:
164   RabbitCookie:
165     Type: OS::Heat::RandomString
166     Properties:
167       length: 20
168       salt:
169         Ref: RabbitCookieSalt
170   undercloudConfig:
171     Type: OS::Heat::StructuredConfig
172     Properties:
173       config:
174         completion-signal: {get_input: deploy_signal_id}
175         admin-password:
176           Ref: AdminPassword
177         admin-token:
178           Ref: AdminToken
179         bootstrap_host:
180           bootstrap_nodeid:
181             Fn::Select:
182             - 0
183             - Fn::Select:
184               - 0
185               - Merge::Map:
186                   undercloud:
187                   - Fn::Select:
188                     - name
189                     - Fn::GetAtt:
190                       - undercloud
191                       - show
192           nodeid: {get_input: bootstack_nodeid}
193         bootstack:
194           public_interface_ip:
195             Ref: NeutronPublicInterfaceIP
196         controller-address:
197           get_input: controller_host
198         ceilometer:
199           db: mysql://ceilometer:unset@localhost/ceilometer
200           metering_secret: {Ref: CeilometerMeteringSecret}
201           snmpd_readonly_user_name:
202             Ref: SnmpdReadonlyUserName
203           snmpd_readonly_user_password:
204             Ref: SnmpdReadonlyUserPassword
205           service-password:
206             Ref: CeilometerPassword
207         db-password: unset
208         glance:
209           backend: file
210           db: mysql://glance:unset@localhost/glance
211           host: 127.0.0.1
212           service-password:
213             Ref: GlancePassword
214           notifier-strategy:
215             Ref: GlanceNotifierStrategy
216           log-file:
217             Ref: GlanceLogFile
218         heat:
219           admin_password:
220             Ref: HeatPassword
221           admin_tenant_name: service
222           admin_user: heat
223           auth_encryption_key: unset___________
224           db: mysql://heat:unset@localhost/heat
225           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
226           watch_server_url: {get_input: heat.watch_server_url}
227           metadata_server_url: {get_input: heat.metadata_server_url}
228           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
229         keystone:
230           db: mysql://keystone:unset@localhost/keystone
231           host: 127.0.0.1
232         mysql:
233           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
234         neutron:
235           host: 127.0.0.1
236           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
237           ovs:
238             public_interface:
239               Ref: NeutronPublicInterface
240             public_interface_raw_device:
241               Ref: NeutronPublicInterfaceRawDevice
242             public_interface_route:
243               Ref: NeutronPublicInterfaceDefaultRoute
244             physical_bridge: br-ctlplane
245             physical_network: ctlplane
246             network_vlan_ranges: ctlplane
247             bridge_mappings: ctlplane:br-ctlplane
248             tenant_network_type: vlan
249             enable_tunneling: 'False'
250           service-password:
251             Ref: NeutronPassword
252         rabbit:
253           host: 127.0.0.1
254           username:
255             Ref: RabbitUserName
256           password:
257             Ref: RabbitPassword
258           cookie:
259             Fn::GetAtt:
260             - RabbitCookie
261             - value
262         ntp:
263           servers:
264             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
265   undercloudPassthroughConfig:
266     Type: OS::Heat::StructuredConfig
267     Properties:
268       config: {get_input: passthrough_config}
269   undercloud:
270     Type: OS::Nova::Server
271     Properties:
272       image:
273         Ref: undercloudImage
274       flavor:
275         Ref: Flavor
276       key_name:
277         Ref: KeyName
278       image_update_policy:
279         Ref: ImageUpdatePolicy
280       user_data_format: SOFTWARE_CONFIG
281   99_undercloudDeployment:
282     Type: OS::Heat::StructuredDeployment
283     Properties:
284       config: {Ref: undercloudConfig}
285       server: {Ref: undercloud}
286       input_values:
287         bootstack_nodeid:
288           Fn::Select:
289             - name
290             - Fn::GetAtt:
291               - undercloud
292               - show
293         controller_host:
294           Fn::Select:
295             - 0
296             - Fn::Select:
297               - ctlplane
298               - Fn::GetAtt:
299                 - undercloud
300                 - networks
301         heat.watch_server_url:
302           Fn::Join:
303             - ''
304             - - 'http://'
305               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
306               - ':8003'
307         heat.metadata_server_url:
308           Fn::Join:
309             - ''
310             - - 'http://'
311               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
312               - ':8000'
313         heat.waitcondition_server_url:
314           Fn::Join:
315             - ''
316             - - 'http://'
317               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
318               - ':8000/v1/waitcondition'
319   00_undercloudPassthroughDeployment:
320     Type: OS::Heat::StructuredDeployment
321     Properties:
322       config: {Ref: undercloudPassthroughConfig}
323       server: {Ref: undercloud}
324       signal_transport: NO_SIGNAL
325       input_values:
326         passthrough_config: {Ref: ExtraConfig}