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