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