8f041f9890a258e3bddcc716cc6cbfb1d6b254aa
[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   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: >
138       A custom IP address to put onto the NeutronPublicInterface bridge.
139       See also NeutronPublicInterfaceTagIP for adding a VLAN tagging IP.
140       NeutronPublicInterfaceIP is deprecated in the context of deploying
141       underclouds - its only needed for the seed bootstrap process.
142     type: string
143   NeutronPublicInterfaceTag:
144     default: ''
145     description: >
146       VLAN tag for creating a public VLAN. The tag will be used to
147       create an access port on the exterior bridge, and that port will be
148       given the IP address returned by neutron from the public network.
149     type: string
150   NeutronPublicInterfaceRawDevice:
151     default: ''
152     description: If set, the public interface is a vlan with this device as the raw device.
153     type: string
154   NtpServer:
155     type: string
156     default: ''
157   RabbitUserName:
158     default: guest
159     description: The username for RabbitMQ
160     type: string
161   RabbitPassword:
162     default: guest
163     description: The password for RabbitMQ
164     type: string
165     hidden: true
166   RabbitCookieSalt:
167     type: string
168     default: unset
169     description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
170   HeatStackDomainAdminPassword:
171     description: Password for heat_domain_admin user.
172     type: string
173     default: ''
174     hidden: true
175   MysqlInnodbBufferPoolSize:
176     description: >
177         Specifies the size of the buffer pool in megabytes. Setting to
178         zero should be interpreted as "no value" and will defer to the
179         lower level default.
180     type: number
181     default: 0
182   KeystoneCACertificate:
183     default: ''
184     description: Keystone self-signed certificate authority certificate.
185     type: string
186   KeystoneSigningCertificate:
187     default: ''
188     description: Keystone certificate for verifying token validity.
189     type: string
190   KeystoneSigningKey:
191     default: ''
192     description: Keystone key for signing tokens.
193     type: string
194     hidden: true
195   DefaultSignalTransport:
196     default: CFN_SIGNAL
197     description: Transport to use for software-config signals.
198     type: string
199     constraints:
200       - allowed_values: [ CFN_SIGNAL, HEAT_SIGNAL, NO_SIGNAL ]
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         neutron:
298           debug: {get_param: Debug}
299           host: 127.0.0.1
300           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
301           ovs:
302             public_interface:
303               get_param: NeutronPublicInterface
304             public_interface_raw_device:
305               get_param: NeutronPublicInterfaceRawDevice
306             public_interface_route:
307               get_param: NeutronPublicInterfaceDefaultRoute
308             public_interface_tag:
309               get_param: NeutronPublicInterfaceTag
310             physical_bridge: br-ctlplane
311             physical_network: ctlplane
312             network_vlan_ranges: ctlplane
313             bridge_mappings: ctlplane:br-ctlplane
314             tenant_network_type: vlan
315             enable_tunneling: 'False'
316           service-password:
317             get_param: NeutronPassword
318         rabbit:
319           host: 127.0.0.1
320           username:
321             get_param: RabbitUserName
322           password:
323             get_param: RabbitPassword
324           cookie:
325             get_attr:
326             - RabbitCookie
327             - value
328         ntp:
329           servers:
330             - {server: {get_param: NtpServer}, fudge: "stratum 0"}
331   undercloudPassthroughConfig:
332     type: OS::Heat::StructuredConfig
333     properties:
334       config: {get_input: passthrough_config}
335   undercloud:
336     type: OS::Nova::Server
337     properties:
338       image:
339         get_param: undercloudImage
340       flavor:
341         get_param: Flavor
342       key_name:
343         get_param: KeyName
344       image_update_policy:
345         get_param: ImageUpdatePolicy
346       networks:
347         - network: ctlplane
348       user_data_format: SOFTWARE_CONFIG
349   undercloudDeployment:
350     depends_on: [undercloudPassthroughDeployment]
351     type: OS::Heat::StructuredDeployment
352     properties:
353       config: {get_resource: undercloudConfig}
354       server: {get_resource: undercloud}
355       signal_transport: {get_param: DefaultSignalTransport}
356       input_values:
357         bootstack_nodeid:
358           get_attr:
359           - undercloud
360           - name
361         controller_host:
362           get_attr:
363           - undercloud
364           - networks
365           - ctlplane
366           - 0
367         heat.watch_server_url:
368           Fn::Join:
369             - ''
370             - - 'http://'
371               - get_attr: [undercloud, networks, ctlplane, 0]
372               - ':8003'
373         heat.metadata_server_url:
374           Fn::Join:
375             - ''
376             - - 'http://'
377               - {get_attr: [undercloud, networks, ctlplane, 0]}
378               - ':8000'
379         heat.waitcondition_server_url:
380           Fn::Join:
381             - ''
382             - - 'http://'
383               - {get_attr: [undercloud, networks, ctlplane, 0]}
384               - ':8000/v1/waitcondition'
385   undercloudPassthroughDeployment:
386     depends_on: [undercloudNovaDeployment]
387     type: OS::Heat::StructuredDeployment
388     properties:
389       config: {get_resource: undercloudPassthroughConfig}
390       server: {get_resource: undercloud}
391       signal_transport: NO_SIGNAL
392       input_values:
393         passthrough_config: {get_param: ExtraConfig}