Add galera clustering properties
[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   CinderLVMLoopDeviceSize:
25     Default: 5000
26     Description: The size of the loopback file used by the cinder LVM driver.
27     Type: Number
28   ExtraConfig:
29     Default: {}
30     Description: |
31       Additional configuration to inject into the cluster. The JSON should have
32       the following structure:
33         {"FILEKEY":
34           {"config":
35             [{"section": "SECTIONNAME",
36               "values":
37                 [{"option": "OPTIONNAME",
38                   "value": "VALUENAME"
39                  }
40                 ]
41              }
42             ]
43           }
44         }
45       For instance:
46         {"nova":
47           {"config":
48             [{"section": "default",
49               "values":
50                 [{"option": "compute_manager",
51                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
52                  }
53                 ]
54              },
55              {"section": "cells",
56               "values":
57                 [{"option": "driver",
58                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
59                  }
60                 ]
61              }
62             ]
63           }
64         }
65     Type: Json
66   OvercloudControlFlavor:
67     Default: baremetal
68     Description: Flavor for control nodes to request when deploying.
69     Type: String
70   OvercloudComputeFlavor:
71     Default: baremetal
72     Description: Flavor for compute nodes to request when deploying.
73     Type: String
74   GlancePassword:
75     Default: unset
76     Description: The password for the glance service account, used by the glance services.
77     Type: String
78     NoEcho: true
79   GlanceNotifierStrategy:
80     Description: Strategy to use for Glance notification queue
81     Type: String
82     Default: noop
83   GlanceLogFile:
84     Description: The filepath of the file to use for logging messages from Glance.
85     Type: String
86     Default: ''
87   HeatPassword:
88     Default: unset
89     Description: The password for the Heat service account, used by the Heat services.
90     Type: String
91     NoEcho: true
92   ImageUpdatePolicy:
93     Default: 'REBUILD_PRESERVE_EPHEMERAL'
94     Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
95     Type: String
96   KeyName:
97     Default: default
98     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
99     Type: String
100   NeutronBridgeMappings:
101     Description: The OVS logical->physical bridge mappings to use.
102     Type: String
103     Default: ''
104   NeutronPassword:
105     Default: unset
106     Description: The password for the neutron service account, used by neutron agents.
107     Type: String
108     NoEcho: true
109   CeilometerComputeAgent:
110     Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
111     Type: String
112     Default: ''
113     AllowedValues: ['', Present]
114   CeilometerMeteringSecret:
115     Default: unset
116     Description: Secret shared by the ceilometer services.
117     Type: String
118     NoEcho: true
119   CeilometerPassword:
120     Default: unset
121     Description: The password for the ceilometer service account.
122     Type: String
123     NoEcho: true
124   SnmpdReadonlyUserName:
125     Default: ro_snmp_user
126     Description: The user name for SNMPd with readonly rights running on all Overcloud nodes
127     Type: String
128   SnmpdReadonlyUserPassword:
129     Default: unset
130     Description: The user password for SNMPd with readonly rights running on all Overcloud nodes
131     Type: String
132     NoEcho: true
133   CloudName:
134     Default: ''
135     Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
136     Type: String
137   NovaComputeDriver:
138     Default: libvirt.LibvirtDriver
139     Type: String
140   NovaComputeLibvirtType:
141     Default: ''
142     Type: String
143   NovaImage:
144     Type: String
145     Default: overcloud-compute
146   NovaPassword:
147     Default: unset
148     Description: The password for the nova service account, used by nova-api.
149     Type: String
150     NoEcho: true
151   NeutronFlatNetworks:
152     Type: String
153     Default: ''
154     Description: If set, flat networks to configure in neutron plugins.
155   HypervisorNeutronPhysicalBridge:
156     Default: ''
157     Description: An OVS bridge to create on each hypervisor.
158     Type: String
159   HypervisorNeutronPublicInterface:
160     Default: ''
161     Description: What interface to add to the HypervisorNeutronPhysicalBridge.
162     Type: String
163   NeutronPublicInterface:
164     Default: eth0
165     Description: What interface to bridge onto br-ex for network nodes.
166     Type: String
167   NeutronPublicInterfaceDefaultRoute:
168     Default: ''
169     Description: A custom default route for the NeutronPublicInterface.
170     Type: String
171   NeutronPublicInterfaceIP:
172     Default: ''
173     Description: A custom IP address to put onto the NeutronPublicInterface.
174     Type: String
175   NeutronPublicInterfaceRawDevice:
176     Default: ''
177     Description: If set, the public interface is a vlan with this device as the raw device.
178     Type: String
179   NeutronControlPlaneID:
180     Default: ''
181     Type: String
182     Description: Neutron ID for ctlplane network.
183   NeutronDnsmasqOptions:
184     Default: 'dhcp-option-force=26,1400'
185     Description: Dnsmasq options for neutron-dhcp-agent. The default value here forces MTU to be set to 1400 to account for the gre tunnel overhead.
186     Type: String
187   controllerImage:
188     Type: String
189     Default: overcloud-control
190   NtpServer:
191     Type: String
192     Default: ''
193   RabbitUserName:
194     Default: guest
195     Description: The username for RabbitMQ
196     Type: String
197   RabbitPassword:
198     Default: guest
199     Description: The password for RabbitMQ
200     Type: String
201     NoEcho: true
202   RabbitCookieSalt:
203     Type: String
204     Default: unset
205     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
206   HeatStackDomainAdminPassword:
207     Description: Password for heat_domain_admin user.
208     Type: String
209     Default: ''
210     NoEcho: true
211   LiveUpdateUserName:
212     Type: String
213     Description: The live-update username for the undercloud Glance API.
214     Default: ''
215   LiveUpdateTenantName:
216     Type: String
217     Description: The live-update tenant name for the undercloud Glance API.
218     Default: ''
219   LiveUpdateHost:
220     Type: String
221     Description: The IP address for the undercloud Glance API.
222     Default: ''
223   LiveUpdatePassword:
224     Type: String
225     Default: ''
226     Description: The live-update password for the undercloud Glance API.
227     NoEcho: true
228   LiveUpdateComputeImage:
229     Type: String
230     Description: The image ID for live-updates to the overcloud compute nodes.
231     Default: ''
232   MysqlInnodbBufferPoolSize:
233     Description: >
234         Specifies the size of the buffer pool in megabytes. Setting to
235         zero should be interpreted as "no value" and will defer to the
236         lower level default.
237     Type: Number
238     Default: 0
239   ControlVirtualInterface:
240     Default: 'br-ex'
241     Description: Interface where virtual ip will be assigned.
242     Type: String
243   ControlFixedIPs:
244     Default: []
245     Description: Should be used for arbitrary ips.
246     Type: Json
247   KeystoneCACertificate:
248     Default: ''
249     Description: Keystone self-signed certificate authority certificate.
250     Type: String
251   KeystoneSigningCertificate:
252     Default: ''
253     Description: Keystone certificate for verifying token validity.
254     Type: String
255   KeystoneSigningKey:
256     Default: ''
257     Description: Keystone key for signing tokens.
258     Type: String
259     NoEcho: true
260 Resources:
261   ControlVirtualIP:
262     Type: OS::Neutron::Port
263     Properties:
264       name: control_virtual_ip
265       network_id: {Ref: NeutronControlPlaneID}
266       fixed_ips:
267         Ref: ControlFixedIPs
268   MysqlClusterUniquePart:
269     Type: OS::Heat::RandomString
270     Properties:
271       length: 10
272   RabbitCookie:
273     Type: OS::Heat::RandomString
274     Properties:
275       length: 20
276       salt:
277         Ref: RabbitCookieSalt
278   NovaCompute0Config:
279     Type: FileInclude
280     Path: nova-compute-instance.yaml
281     SubKey: Resources.NovaCompute0Deploy
282     Parameters:
283         NovaApiHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
284         KeystoneHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
285         RabbitHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
286         NeutronHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
287         GlanceHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
288         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/nova']]}
289         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/ceilometer']]}
290         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/neutron']]}
291         NeutronNetworkType: "gre"
292         NeutronEnableTunnelling: "True"
293         NeutronFlatNetworks:
294             Ref: NeutronFlatNetworks
295         NeutronNetworkVLANRanges: ""
296         NeutronPhysicalBridge:
297             Ref: HypervisorNeutronPhysicalBridge
298         NeutronPublicInterface:
299             Ref: HypervisorNeutronPublicInterface
300         NeutronBridgeMappings:
301             Ref: NeutronBridgeMappings
302         StaticHosts:
303           Fn::Join:
304           - "\n"
305           - - Fn::Join:
306               - "\n"
307               - Merge::Map:
308                   NovaCompute0:
309                     Fn::Join:
310                     - ' '
311                     - - Fn::Select:
312                         - 0
313                         - Fn::Select:
314                           - ctlplane
315                           - Fn::GetAtt:
316                             - NovaCompute0
317                             - networks
318                       - Fn::Select:
319                         - name
320                         - Fn::GetAtt:
321                           - NovaCompute0
322                           - show
323                       - Fn::Join:
324                         - '.'
325                         - - Fn::Select:
326                             - name
327                             - Fn::GetAtt:
328                               - NovaCompute0
329                               - show
330                           - 'novalocal'
331             - Fn::Join:
332               - "\n"
333               - Merge::Map:
334                   controller0:
335                     Fn::Join:
336                     - ' '
337                     - - Fn::Select:
338                         - 0
339                         - Fn::Select:
340                           - ctlplane
341                           - Fn::GetAtt:
342                             - controller0
343                             - networks
344                       - Fn::Select:
345                         - name
346                         - Fn::GetAtt:
347                           - controller0
348                           - show
349                       - Fn::Join:
350                         - '.'
351                         - - Fn::Select:
352                             - name
353                             - Fn::GetAtt:
354                               - controller0
355                               - show
356                           - 'novalocal'
357                       - {Ref: CloudName}
358   NovaCompute0Passthrough:
359     Type: OS::Heat::StructuredDeployment
360     Properties:
361       config: {Ref: NovaComputePassthrough}
362       server: {Ref: NovaCompute0}
363       signal_transport: NO_SIGNAL
364       input_values:
365         passthrough_config: {Ref: ExtraConfig}
366   NovaCompute0:
367     Type: FileInclude
368     Path: nova-compute-instance.yaml
369     SubKey: Resources.NovaCompute0
370   controllerConfig:
371     Type: OS::Heat::StructuredConfig
372     Properties:
373       group: os-apply-config
374       config:
375         completion-signal: {get_input: deploy_signal_id}
376         admin-password:
377           Ref: AdminPassword
378         admin-token:
379           Ref: AdminToken
380         bootstack:
381           public_interface_ip:
382             Ref: NeutronPublicInterfaceIP
383         bootstrap_host:
384           bootstrap_nodeid:
385             Fn::Select:
386             - 0
387             - Fn::Select:
388               - 0
389               - Merge::Map:
390                   controller0:
391                   - Fn::Select:
392                     - name
393                     - Fn::GetAtt:
394                       - controller0
395                       - show
396           nodeid: {get_input: bootstack_nodeid}
397         cinder:
398           db: mysql://cinder:unset@localhost/cinder
399           volume_size_mb:
400             Ref: CinderLVMLoopDeviceSize
401           service-password:
402             Ref: CinderPassword
403           iscsi-helper:
404             Ref: CinderISCSIHelper
405         controller-address:
406           get_input: controller_host
407         db-password: unset
408         glance:
409           registry:
410             host: {get_input: controller_virtual_ip}
411           backend: swift
412           db: mysql://glance:unset@localhost/glance
413           host:
414             get_input: controller_host
415           service-password:
416             Ref: GlancePassword
417           swift-store-user: service:glance
418           swift-store-key:
419             Ref: GlancePassword
420           notifier-strategy:
421             Ref: GlanceNotifierStrategy
422           log-file:
423             Ref: GlanceLogFile
424         heat:
425           admin_password:
426             Ref: HeatPassword
427           admin_tenant_name: service
428           admin_user: heat
429           auth_encryption_key: unset___________
430           db: mysql://heat:unset@localhost/heat
431           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
432           watch_server_url: {get_input: heat.watch_server_url}
433           metadata_server_url: {get_input: heat.metadata_server_url}
434           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
435         hosts: {get_input: hosts}
436         keystone:
437           db: mysql://keystone:unset@localhost/keystone
438           host:
439             get_input: controller_host
440           ca_certificate: {Ref: KeystoneCACertificate}
441           signing_key: {Ref: KeystoneSigningKey}
442           signing_certificate: {Ref: KeystoneSigningCertificate}
443         mysql:
444           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
445           nodes:
446             Merge::Map:
447               controller0:
448                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
449           cluster_name:
450             Fn::Join:
451               - '-'
452               - - 'tripleo'
453                 - {Ref: MysqlClusterUniquePart}
454         neutron:
455           flat-networks: {Ref: NeutronFlatNetworks}
456           host: {get_input: controller_virtual_ip}
457           metadata_proxy_shared_secret: unset
458           ovs:
459             enable_tunneling: 'True'
460             local_ip:
461               get_input: controller_host
462             bridge_mappings: {Ref: NeutronBridgeMappings}
463             public_interface:
464               Ref: NeutronPublicInterface
465             public_interface_raw_device:
466               Ref: NeutronPublicInterfaceRawDevice
467             public_interface_route:
468               Ref: NeutronPublicInterfaceDefaultRoute
469             physical_bridge: br-ex
470             tenant_network_type: gre
471           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
472           service-password:
473             Ref: NeutronPassword
474           dnsmasq-options:
475             Ref: NeutronDnsmasqOptions
476         ceilometer:
477           db: mysql://ceilometer:unset@localhost/ceilometer
478           metering_secret: {Ref: CeilometerMeteringSecret}
479           service-password:
480             Ref: CeilometerPassword
481         snmpd:
482           export_MIB: UCD-SNMP-MIB
483           readonly_user_name:
484             Ref: SnmpdReadonlyUserName
485           readonly_user_password:
486             Ref: SnmpdReadonlyUserPassword
487         nova:
488           compute_driver: libvirt.LibvirtDriver
489           db: mysql://nova:unset@localhost/nova
490           default_floating_pool:
491             ext-net
492           host: {get_input: controller_virtual_ip}
493           metadata-proxy: true
494           service-password:
495             Ref: NovaPassword
496         rabbit:
497           host:
498             get_input: controller_host
499           username:
500             Ref: RabbitUserName
501           password:
502             Ref: RabbitPassword
503           cookie:
504             Fn::GetAtt:
505             - RabbitCookie
506             - value
507         ntp:
508           servers:
509               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
510         keepalived:
511           keepalive_interface:
512             Ref: NeutronPublicInterface
513           priority: 101
514         virtual_ips:
515             -
516               ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
517               interface:
518                 Ref: ControlVirtualInterface
519         haproxy:
520           nodes:
521             Merge::Map:
522               controller0:
523                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
524                 name: {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
525           net_binds:
526             - ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
527           services:
528             - name: keystone_admin
529               port: 35357
530             - name: keystone_public
531               port: 5000
532             - name: horizon
533               port: 80
534             - name: neutron
535               port: 9696
536             - name: cinder
537               port: 8776
538             - name: glance_api
539               port: 9292
540             - name: glance_registry
541               port: 9191
542             - name: heat_api
543               port: 8004
544             - name: heat_cloudwatch
545               port: 8003
546             - name: heat_cfn
547               port: 8000
548             - name: nova_ec2
549               port: 8773
550             - name: nova_osapi
551               port: 8774
552             - name: nova_metadata
553               port: 8775
554             - name: ceilometer
555               port: 8777
556             - name: swift_proxy_server
557               port: 8080
558   controllerPassthrough:
559     Type: OS::Heat::StructuredConfig
560     Properties:
561       group: os-apply-config
562       config: {get_input: passthrough_config}
563   controller0:
564     Type: OS::Nova::Server
565     Properties:
566       image:
567         Ref: controllerImage
568       image_update_policy:
569         Ref: ImageUpdatePolicy
570       flavor:
571         Ref: OvercloudControlFlavor
572       key_name:
573         Ref: KeyName
574       user_data_format: SOFTWARE_CONFIG
575   controller0Deployment:
576     Type: OS::Heat::StructuredDeployment
577     Properties:
578       config: {Ref: controllerConfig}
579       server: {Ref: controller0}
580       input_values:
581         bootstack_nodeid:
582           Fn::Select:
583           - name
584           - Fn::GetAtt:
585             - controller0
586             - show
587         controller_host:
588           Fn::Select:
589             - 0
590             - Fn::Select:
591               - ctlplane
592               - Fn::GetAtt:
593                 - controller0
594                 - networks
595         heat.watch_server_url:
596           Fn::Join:
597             - ''
598             - - 'http://'
599               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
600               - ':8003'
601         heat.metadata_server_url:
602           Fn::Join:
603             - ''
604             - - 'http://'
605               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
606               - ':8000'
607         heat.waitcondition_server_url:
608           Fn::Join:
609             - ''
610             - - 'http://'
611               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
612               - ':8000/v1/waitcondition'
613         hosts:
614           Fn::Join:
615           - "\n"
616           - - Fn::Join:
617               - "\n"
618               - Merge::Map:
619                   NovaCompute0:
620                     Fn::Join:
621                     - ' '
622                     - - Fn::Select:
623                         - 0
624                         - Fn::Select:
625                           - ctlplane
626                           - Fn::GetAtt:
627                             - NovaCompute0
628                             - networks
629                       - Fn::Select:
630                         - name
631                         - Fn::GetAtt:
632                           - NovaCompute0
633                           - show
634                       - Fn::Join:
635                         - '.'
636                         - - Fn::Select:
637                             - name
638                             - Fn::GetAtt:
639                               - NovaCompute0
640                               - show
641                           - 'novalocal'
642             - Fn::Join:
643               - "\n"
644               - Merge::Map:
645                   controller0:
646                     Fn::Join:
647                     - ' '
648                     - - Fn::Select:
649                         - 0
650                         - Fn::Select:
651                           - ctlplane
652                           - Fn::GetAtt:
653                             - controller0
654                             - networks
655                       - Fn::Select:
656                         - name
657                         - Fn::GetAtt:
658                           - controller0
659                           - show
660                       - Fn::Join:
661                         - '.'
662                         - - Fn::Select:
663                             - name
664                             - Fn::GetAtt:
665                               - controller0
666                               - show
667                           - 'novalocal'
668                       - {Ref: CloudName}
669         controller_virtual_ip:
670           {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
671   controller0SSLDeployment:
672     Type: OS::Heat::StructuredDeployment
673     Properties:
674       config: {Ref: SSLConfig}
675       server: {Ref: controller0}
676       signal_transport: NO_SIGNAL
677       input_values:
678         ssl_certificate: {Ref: SSLCertificate}
679         ssl_key: {Ref: SSLKey}
680         ssl_ca_certificate: {Ref: SSLCACertificate}
681   controller0Passthrough:
682     Type: OS::Heat::StructuredDeployment
683     Properties:
684       config: {Ref: controllerPassthrough}
685       server: {Ref: controller0}
686       signal_transport: NO_SIGNAL
687       input_values:
688         passthrough_config: {Ref: ExtraConfig}
689 Outputs:
690   KeystoneURL:
691     Description: URL for the Overcloud Keystone service
692     Value:
693       Fn::Join:
694       - ''
695       - - http://
696         - Fn::Select:
697           - ip_address
698           - Fn::Select:
699             - 0
700             - Fn::GetAtt:
701               - ControlVirtualIP
702               - fixed_ips
703         - :5000/v2.0/