Merge "Fix bash env var conditionals in merge.py call to be consistent"
[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   undercloudConfig:
192     type: OS::Heat::StructuredConfig
193     properties:
194       config:
195         completion-signal: {get_input: deploy_signal_id}
196         admin-password:
197           get_param: AdminPassword
198         admin-token:
199           get_param: AdminToken
200         bootstrap_host:
201           bootstrap_nodeid:
202             Fn::Select:
203             - 0
204             - Fn::Select:
205               - 0
206               - Merge::Map:
207                   undercloud:
208                   - Fn::Select:
209                     - name
210                     - get_attr:
211                       - undercloud
212                       - show
213           nodeid: {get_input: bootstack_nodeid}
214         bootstack:
215           public_interface_ip:
216             get_param: NeutronPublicInterfaceIP
217         controller-address:
218           get_input: controller_host
219         corosync:
220           bindnetaddr: {get_input: controller_host}
221           mcastport: 5577
222           nodes:
223             Merge::Map:
224               controller0:
225                 ip: {get_attr: [undercloud, networks, ctlplane, 0]}
226         pacemaker:
227           stonith_enabled : false
228           recheck_interval : 5
229           quorum_policy : ignore
230         ceilometer:
231           db: mysql://ceilometer:unset@localhost/ceilometer
232           metering_secret: {get_param: CeilometerMeteringSecret}
233           snmpd_readonly_user_name:
234             get_param: SnmpdReadonlyUserName
235           snmpd_readonly_user_password:
236             get_param: SnmpdReadonlyUserPassword
237           service-password:
238             get_param: CeilometerPassword
239         db-password: unset
240         glance:
241           backend: file
242           db: mysql://glance:unset@localhost/glance
243           host: 127.0.0.1
244           port:
245             get_param: GlancePort
246           protocol:
247             get_param: GlanceProtocol
248           service-password:
249             get_param: GlancePassword
250           notifier-strategy:
251             get_param: GlanceNotifierStrategy
252           log-file:
253             get_param: GlanceLogFile
254         heat:
255           admin_password:
256             get_param: HeatPassword
257           admin_tenant_name: service
258           admin_user: heat
259           auth_encryption_key: unset___________
260           db: mysql://heat:unset@localhost/heat
261           stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
262           watch_server_url: {get_input: heat.watch_server_url}
263           metadata_server_url: {get_input: heat.metadata_server_url}
264           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
265         keystone:
266           db: mysql://keystone:unset@localhost/keystone
267           host: 127.0.0.1
268           ca_certificate: {get_param: KeystoneCACertificate}
269           signing_key: {get_param: KeystoneSigningKey}
270           signing_certificate: {get_param: KeystoneSigningCertificate}
271         mysql:
272           innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
273         neutron:
274           host: 127.0.0.1
275           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
276           ovs:
277             public_interface:
278               get_param: NeutronPublicInterface
279             public_interface_raw_device:
280               get_param: NeutronPublicInterfaceRawDevice
281             public_interface_route:
282               get_param: NeutronPublicInterfaceDefaultRoute
283             physical_bridge: br-ctlplane
284             physical_network: ctlplane
285             network_vlan_ranges: ctlplane
286             bridge_mappings: ctlplane:br-ctlplane
287             tenant_network_type: vlan
288             enable_tunneling: 'False'
289           service-password:
290             get_param: NeutronPassword
291         rabbit:
292           host: 127.0.0.1
293           username:
294             get_param: RabbitUserName
295           password:
296             get_param: RabbitPassword
297           cookie:
298             get_attr:
299             - RabbitCookie
300             - value
301         ntp:
302           servers:
303             - {server: {get_param: NtpServer}, fudge: "stratum 0"}
304   undercloudPassthroughConfig:
305     type: OS::Heat::StructuredConfig
306     properties:
307       config: {get_input: passthrough_config}
308   undercloud:
309     type: OS::Nova::Server
310     properties:
311       image:
312         get_param: undercloudImage
313       flavor:
314         get_param: Flavor
315       key_name:
316         get_param: KeyName
317       image_update_policy:
318         get_param: ImageUpdatePolicy
319       networks:
320         - network: ctlplane
321       user_data_format: SOFTWARE_CONFIG
322   undercloudDeployment:
323     depends_on: [undercloudPassthroughDeployment]
324     type: OS::Heat::StructuredDeployment
325     properties:
326       config: {get_resource: undercloudConfig}
327       server: {get_resource: undercloud}
328       input_values:
329         bootstack_nodeid:
330           get_attr:
331           - undercloud
332           - show
333           - name
334         controller_host:
335           get_attr:
336           - undercloud
337           - networks
338           - ctlplane
339           - 0
340         heat.watch_server_url:
341           Fn::Join:
342             - ''
343             - - 'http://'
344               - get_attr: [undercloud, networks, ctlplane, 0]
345               - ':8003'
346         heat.metadata_server_url:
347           Fn::Join:
348             - ''
349             - - 'http://'
350               - {get_attr: [undercloud, networks, ctlplane, 0]}
351               - ':8000'
352         heat.waitcondition_server_url:
353           Fn::Join:
354             - ''
355             - - 'http://'
356               - {get_attr: [undercloud, networks, ctlplane, 0]}
357               - ':8000/v1/waitcondition'
358   undercloudPassthroughDeployment:
359     depends_on: [undercloudNovaDeployment]
360     type: OS::Heat::StructuredDeployment
361     properties:
362       config: {get_resource: undercloudPassthroughConfig}
363       server: {get_resource: undercloud}
364       signal_transport: NO_SIGNAL
365       input_values:
366         passthrough_config: {get_param: ExtraConfig}