Add passthrough configuration glue.
[apex-tripleo-heat-templates.git] / overcloud-source.yaml
1 Description: Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL
2   server,Dedicated RabbitMQ Server,Group of Nova Computes
3 HeatTemplateFormatVersion: '2012-12-12'
4 Parameters:
5   AdminPassword:
6     Default: unset
7     Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
8     Type: String
9     NoEcho: true
10   AdminToken:
11     Default: unset
12     Description: The keystone auth secret.
13     Type: String
14     NoEcho: true
15   CinderPassword:
16     Default: unset
17     Description: The password for the cinder service account, used by cinder-api.
18     Type: String
19     NoEcho: true
20   CinderISCSIHelper:
21     Default: tgtadm
22     Description: The iSCSI helper to use with cinder.
23     Type: String
24   ExtraConfig:
25     Default: {}
26     Description: |
27       Additional configuration to inject into the cluster. The JSON should have
28       the following structure:
29         {"FILEKEY":
30           {"config":
31             [{"section": "SECTIONNAME",
32               "values":
33                 [{"option": "OPTIONNAME",
34                   "value": "VALUENAME"
35                  }
36                 ]
37              }
38             ]
39           }
40         }
41       For instance:
42         {"nova":
43           {"config":
44             [{"section": "default",
45               "values":
46                 [{"option": "compute_manager",
47                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
48                  }
49                 ]
50              },
51              {"section": "cells",
52               "values":
53                 [{"option": "driver",
54                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
55                  }
56                 ]
57              }
58             ]
59           }
60         }
61     Type: Json
62   OvercloudControlFlavor:
63     Default: baremetal
64     Description: Flavor for control nodes to request when deploying.
65     Type: String
66   OvercloudComputeFlavor:
67     Default: baremetal
68     Description: Flavor for compute nodes to request when deploying.
69     Type: String
70   GlancePassword:
71     Default: unset
72     Description: The password for the glance service account, used by the glance services.
73     Type: String
74     NoEcho: true
75   GlanceNotifierStrategy:
76     Description: Strategy to use for Glance notification queue
77     Type: String
78     Default: noop
79   GlanceLogFile:
80     Description: The filepath of the file to use for logging messages from Glance.
81     Type: String
82     Default: ''
83   HeatPassword:
84     Default: unset
85     Description: The password for the Heat service account, used by the Heat services.
86     Type: String
87     NoEcho: true
88   ImageUpdatePolicy:
89     Default: 'REBUILD_PRESERVE_EPHEMERAL'
90     Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
91     Type: String
92   KeyName:
93     Default: default
94     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
95     Type: String
96   NeutronBridgeMappings:
97     Description: The OVS logical->physical bridge mappings to use.
98     Type: String
99     Default: ''
100   NeutronPassword:
101     Default: unset
102     Description: The password for the neutron service account, used by neutron agents.
103     Type: String
104     NoEcho: true
105   CeilometerComputeAgent:
106     Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
107     Type: String
108     Default: ''
109     AllowedValues: ['', Present]
110   CeilometerMeteringSecret:
111     Default: unset
112     Description: Secret shared by the ceilometer services.
113     Type: String
114     NoEcho: true
115   CeilometerPassword:
116     Default: unset
117     Description: The password for the ceilometer service account.
118     Type: String
119     NoEcho: true
120   CloudName:
121     Default: ''
122     Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
123     Type: String
124   NovaComputeDriver:
125     Default: libvirt.LibvirtDriver
126     Type: String
127   NovaComputeLibvirtType:
128     Default: ''
129     Type: String
130   NovaImage:
131     Type: String
132     Default: overcloud-compute
133   NovaPassword:
134     Default: unset
135     Description: The password for the nova service account, used by nova-api.
136     Type: String
137     NoEcho: true
138   NeutronFlatNetworks:
139     Type: String
140     Default: ''
141     Description: If set, flat networks to configure in neutron plugins.
142   HypervisorNeutronPhysicalBridge:
143     Default: ''
144     Description: An OVS bridge to create on each hypervisor.
145     Type: String
146   HypervisorNeutronPublicInterface:
147     Default: ''
148     Description: What interface to add to the HypervisorNeutronPhysicalBridge.
149     Type: String
150   NeutronPublicInterface:
151     Default: eth0
152     Description: What interface to bridge onto br-ex for network nodes.
153     Type: String
154   NeutronPublicInterfaceDefaultRoute:
155     Default: ''
156     Description: A custom default route for the NeutronPublicInterface.
157     Type: String
158   NeutronPublicInterfaceIP:
159     Default: ''
160     Description: A custom IP address to put onto the NeutronPublicInterface.
161     Type: String
162   NeutronPublicInterfaceRawDevice:
163     Default: ''
164     Description: If set, the public interface is a vlan with this device as the raw device.
165     Type: String
166   controllerImage:
167     Type: String
168     Default: overcloud-control
169   NtpServer:
170     Type: String
171     Default: ''
172   RabbitUserName:
173     Default: guest
174     Description: The username for RabbitMQ
175     Type: String
176   RabbitPassword:
177     Default: guest
178     Description: The password for RabbitMQ
179     Type: String
180     NoEcho: true
181   RabbitCookieSalt:
182     Type: String
183     Default: unset
184     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
185   HeatStackDomainAdminPassword:
186     Description: Password for heat_domain_admin user.
187     Type: String
188     Default: ''
189     NoEcho: true
190   LiveUpdateUserName:
191     Type: String
192     Description: The live-update username for the undercloud Glance API.
193     Default: ''
194   LiveUpdateTenantName:
195     Type: String
196     Description: The live-update tenant name for the undercloud Glance API.
197     Default: ''
198   LiveUpdateHost:
199     Type: String
200     Description: The IP address for the undercloud Glance API.
201     Default: ''
202   LiveUpdatePassword:
203     Type: String
204     Default: ''
205     Description: The live-update password for the undercloud Glance API.
206     NoEcho: true
207   LiveUpdateComputeImage:
208     Type: String
209     Description: The image ID for live-updates to the overcloud compute nodes.
210     Default: ''
211   MysqlInnodbBufferPoolSize:
212     Description: Specifies the size of the buffer pool in megabytes.
213     Type: Number
214     Default: 100
215 Resources:
216   RabbitCookie:
217     Type: OS::Heat::RandomString
218     Properties:
219       length: 20
220       salt:
221         Ref: RabbitCookieSalt
222   NovaCompute0Config:
223     Type: FileInclude
224     Path: nova-compute-instance.yaml
225     SubKey: Resources.NovaCompute0Deploy
226     Parameters:
227         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
228         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
229         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
230         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
231         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
232         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/nova']]}
233         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/ceilometer']]}
234         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/neutron']]}
235         NeutronNetworkType: "gre"
236         NeutronEnableTunnelling: "True"
237         NeutronFlatNetworks:
238             Ref: NeutronFlatNetworks
239         NeutronNetworkVLANRanges: ""
240         NeutronPhysicalBridge:
241             Ref: HypervisorNeutronPhysicalBridge
242         NeutronPublicInterface:
243             Ref: HypervisorNeutronPublicInterface
244         NeutronBridgeMappings:
245             Ref: NeutronBridgeMappings
246         StaticHosts:
247           Fn::Join:
248           - "\n"
249           - - Fn::Join:
250               - "\n"
251               - Merge::Map:
252                   NovaCompute0:
253                     Fn::Join:
254                     - ' '
255                     - - Fn::Select:
256                         - 0
257                         - Fn::Select:
258                           - ctlplane
259                           - Fn::GetAtt:
260                             - NovaCompute0
261                             - networks
262                       - Fn::Select:
263                         - name
264                         - Fn::GetAtt:
265                           - NovaCompute0
266                           - show
267                       - Fn::Join:
268                         - '.'
269                         - - Fn::Select:
270                             - name
271                             - Fn::GetAtt:
272                               - NovaCompute0
273                               - show
274                           - 'novalocal'
275             - Fn::Join:
276               - ' '
277               - - Fn::Select:
278                   - 0
279                   - Fn::Select:
280                     - ctlplane
281                     - Fn::GetAtt:
282                       - controller0
283                       - networks
284                 - {Ref: CloudName}
285                 # If CloudName is unset, make the hosts line still valid
286                 - unused
287   NovaCompute0Passthrough:
288     Type: OS::Heat::StructuredDeployment
289     Properties:
290       config: {Ref: NovaComputePassthrough}
291       server: {Ref: NovaCompute0}
292       signal_transport: NO_SIGNAL
293       input_values:
294         passthrough_config: {Ref: ExtraConfig}
295   NovaCompute0:
296     Type: FileInclude
297     Path: nova-compute-instance.yaml
298     SubKey: Resources.NovaCompute0
299   controllerConfig:
300     Type: OS::Heat::StructuredConfig
301     Properties:
302       config:
303         completion-signal: {get_input: deploy_signal_id}
304         admin-password:
305           Ref: AdminPassword
306         admin-token:
307           Ref: AdminToken
308         bootstack:
309           public_interface_ip:
310             Ref: NeutronPublicInterfaceIP
311         cinder:
312           db: mysql://cinder:unset@localhost/cinder
313           volume_size_mb: '5000'
314           service-password:
315             Ref: CinderPassword
316           iscsi-helper:
317             Ref: CinderISCSIHelper
318         controller-address:
319           get_input: controller_host
320         db-password: unset
321         glance:
322           backend: swift
323           db: mysql://glance:unset@localhost/glance
324           host:
325             get_input: controller_host
326           service-password:
327             Ref: GlancePassword
328           swift-store-user: service:glance
329           swift-store-key:
330             Ref: GlancePassword
331           notifier-strategy:
332             Ref: GlanceNotifierStrategy
333           log-file:
334             Ref: GlanceLogFile
335         heat:
336           admin_password:
337             Ref: HeatPassword
338           admin_tenant_name: service
339           admin_user: heat
340           auth_encryption_key: unset___________
341           db: mysql://heat:unset@localhost/heat
342           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
343           watch_server_url: {get_input: heat.watch_server_url}
344           metadata_server_url: {get_input: heat.metadata_server_url}
345           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
346         hosts: {get_input: hosts}
347         keystone:
348           db: mysql://keystone:unset@localhost/keystone
349           host:
350             get_input: controller_host
351         mysql:
352           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
353         neutron:
354           flat-networks: {Ref: NeutronFlatNetworks}
355           host:
356             get_input: controller_host
357           metadata_proxy_shared_secret: unset
358           ovs:
359             enable_tunneling: 'True'
360             local_ip:
361               get_input: controller_host
362             bridge_mappings: {Ref: NeutronBridgeMappings}
363             public_interface:
364               Ref: NeutronPublicInterface
365             public_interface_raw_device:
366               Ref: NeutronPublicInterfaceRawDevice
367             public_interface_route:
368               Ref: NeutronPublicInterfaceDefaultRoute
369             physical_bridge: br-ex
370             tenant_network_type: gre
371           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
372           service-password:
373             Ref: NeutronPassword
374         ceilometer:
375           db: mysql://ceilometer:unset@localhost/ceilometer
376           metering_secret: {Ref: CeilometerMeteringSecret}
377           service-password:
378             Ref: CeilometerPassword
379         nova:
380           compute_driver: libvirt.LibvirtDriver
381           db: mysql://nova:unset@localhost/nova
382           default_floating_pool:
383             ext-net
384           host:
385             get_input: controller_host
386           metadata-proxy: true
387           service-password:
388             Ref: NovaPassword
389         rabbit:
390           host:
391             get_input: controller_host
392           username:
393             Ref: RabbitUserName
394           password:
395             Ref: RabbitPassword
396           cookie:
397             Fn::GetAtt:
398             - RabbitCookie
399             - value
400         ntp:
401           servers:
402               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
403   controllerPassthrough:
404     Type: OS::Heat::StructuredConfig
405     Properties:
406       config: {get_input: passthrough_config}
407   controller0:
408     Type: OS::Nova::Server
409     Properties:
410       image:
411         Ref: controllerImage
412       image_update_policy:
413         Ref: ImageUpdatePolicy
414       flavor:
415         Ref: OvercloudControlFlavor
416       key_name:
417         Ref: KeyName
418       user_data_format: SOFTWARE_CONFIG
419   controller0Deployment:
420     Type: OS::Heat::StructuredDeployment
421     Properties:
422       config: {Ref: controllerConfig}
423       server: {Ref: controller0}
424       input_values:
425         controller_host:  
426           Fn::Select:
427             - 0
428             - Fn::Select:
429               - ctlplane
430               - Fn::GetAtt:
431                 - controller0
432                 - networks
433         heat.watch_server_url:
434           Fn::Join:
435             - ''
436             - - 'http://'
437               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
438               - ':8003'
439         heat.metadata_server_url:
440           Fn::Join:
441             - ''
442             - - 'http://'
443               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
444               - ':8000'
445         heat.waitcondition_server_url:
446           Fn::Join:
447             - ''
448             - - 'http://'
449               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
450               - ':8000/v1/waitcondition'
451         hosts:
452           Fn::Join:
453           - ' '
454           - - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]}
455             - {Ref: CloudName}
456   controller0SSLDeployment:
457     Type: OS::Heat::StructuredDeployment
458     Properties:
459       config: {Ref: SSLConfig}
460       server: {Ref: controller0}
461       signal_transport: NO_SIGNAL
462       input_values:
463         ssl_certificate: {Ref: SSLCertificate}
464         ssl_key: {Ref: SSLKey}
465   controller0Passthrough:
466     Type: OS::Heat::StructuredDeployment
467     Properties:
468       config: {Ref: controllerPassthrough}
469       server: {Ref: controller0}
470       signal_transport: NO_SIGNAL
471       input_values:
472         passthrough_config: {Ref: ExtraConfig}
473 Outputs:
474   KeystoneURL:
475     Description: URL for the Overcloud Keystone service
476     Value:
477       Fn::Join:
478       - ''
479       - - http://
480         - Fn::Select:
481           - 0
482           - Fn::Select:
483             - ctlplane
484             - Fn::GetAtt:
485               - controller0
486               - networks
487         - :5000/v2.0/