blob: eb17afec76a8cc76204562b2c2b2fd3297c8e5fa [file] [log] [blame]
Ales Komarekcba48ac2015-04-30 11:40:44 +02001# All files in this package is subject to the GPL v2 license
2# More information is in the COPYING file in the top directory of this package.
3# Copyright (C) 2011 severalnines.com
4{%- if pillar.galera.master is defined %}
5{%- from "galera/map.jinja" import master with context %}
6{%- set service = master %}
7{%- endif %}
8{%- if pillar.galera.slave is defined %}
9{%- from "galera/map.jinja" import slave with context %}
10{%- set service = slave %}
11{%- endif %}
12[MYSQLD]
13user=mysql
14basedir=/usr/
15datadir=/var/lib/mysql
Filip Pytlounca245cc2016-02-16 14:49:45 +010016socket={{ service.socket }}
Ales Komarekcba48ac2015-04-30 11:40:44 +020017pid_file=mysqld.pid
18port=3306
Filip Pytloune40d54c2016-02-16 14:22:02 +010019log_error={{ service.log_file }}
Ales Komarekcba48ac2015-04-30 11:40:44 +020020log_warnings=2
21#log_output=FILE
22### INNODB OPTIONS
23innodb_buffer_pool_size=9211M
24innodb_flush_log_at_trx_commit=2
25innodb_file_per_table=1
26innodb_data_file_path = ibdata1:100M:autoextend
27## You may want to tune the below depending on number of cores and disk sub
28innodb_read_io_threads=4
29innodb_write_io_threads=4
30innodb_io_capacity=200
31innodb_doublewrite=1
32innodb_log_file_size=1024M
33innodb_log_buffer_size=96M
34innodb_buffer_pool_instances=8
35innodb_log_files_in_group=2
36innodb_thread_concurrency=64
37#innodb_file_format=barracuda
38innodb_flush_method = O_DIRECT
39innodb_autoinc_lock_mode=2
40## avoid statistics update when doing e.g show tables
41innodb_stats_on_metadata=0
42default_storage_engine=innodb
43
44bind-address={{ service.bind.address }}
45
46# CHARACTER SET
47#collation_server = utf8_unicode_ci
48#init_connect='SET NAMES utf8'
49character_set_server = utf8
50
51# REPLICATION SPECIFIC
52#server_id must be unique across all mysql servers participating in replication.
53#server_id=SERVERID
54binlog_format=ROW
55#log_slave_updates=1
56#log_bin=binlog
57#relay_log=relay-bin
58#expire_logs_days=7
59#gtid_mode=ON
60#enforce_gtid_consistency=1
61# OTHER THINGS, BUFFERS ETC
62key_buffer_size = 24M
63tmp_table_size = 64M
64max_heap_table_size = 64M
65max_allowed_packet = 512M
66#sort_buffer_size = 256K
67#read_buffer_size = 256K
68#read_rnd_buffer_size = 512K
69#myisam_sort_buffer_size = 8M
70skip_name_resolve
71memlock=0
72sysdate_is_now=1
marcob47411d2015-09-30 22:01:44 +020073max_connections={{ service.get('max_connections', 20000) }}
Ales Komarekcba48ac2015-04-30 11:40:44 +020074thread_cache_size=512
75query_cache_type = 0
76query_cache_size = 0
77table_open_cache=1024
78lower_case_table_names=0
79# 5.6 backwards compatibility
80#explicit_defaults_for_timestamp=1
81##
82## WSREP options
83##
84
85# Full path to wsrep provider library or 'none'
Filip Pytlouna3567b82016-02-16 14:39:22 +010086wsrep_provider={{ service.wsrep_provider }}
Ales Komarekcba48ac2015-04-30 11:40:44 +020087
88wsrep_node_address={{ service.bind.address }}
89# Provider specific configuration options
90wsrep_provider_options="gcache.size=8192M"
91
92# Logical cluster name. Should be the same for all nodes.
93wsrep_cluster_name="my_wsrep_cluster"
94
95# Group communication system handle
96#wsrep_cluster_address=gcomm://10.0.0.3:4567,10.0.0.4:4567,10.0.0.2:4567
97wsrep_cluster_address=gcomm://{% for member in service.members %}{{ member.host}}{% if not loop.last %},{% endif %}{% endfor %}
98
99# Human_readable node name (non-unique). Hostname by default.
100wsrep_node_name={{ service.bind.address }}
101
102# Address for incoming client connections. Autodetect by default.
103#wsrep_node_incoming_address=
104
105# How many threads will process writesets from other nodes
106wsrep_slave_threads=8
107
108# DBUG options for wsrep provider
109#wsrep_dbug_option
110
111# Generate fake primary keys for non-PK tables (required for multi-master
112# and parallel applying operation)
113wsrep_certify_nonPK=1
114
115# Location of the directory with data files. Needed for non-mysqldump
116# state snapshot transfers. Defaults to mysql_real_data_home.
117#wsrep_data_home_dir=
118
119# Maximum number of rows in write set
120wsrep_max_ws_rows=131072
121
122# Maximum size of write set
123wsrep_max_ws_size=1073741824
124
125# to enable debug level logging, set this to 1
126wsrep_debug=0
127
128# convert locking sessions into transactions
129wsrep_convert_LOCK_to_trx=0
130
131# how many times to retry deadlocked autocommits
132wsrep_retry_autocommit=1
133
134# change auto_increment_increment and auto_increment_offset automatically
135wsrep_auto_increment_control=1
136
137# replicate myisam
138wsrep_replicate_myisam=1
139# retry autoinc insert, which failed for duplicate key error
140wsrep_drupal_282555_workaround=0
141
142# enable "strictly synchronous" semantics for read operations
143wsrep_causal_reads=0
144
145# Command to call when node status or cluster membership changes.
146# Will be passed all or some of the following options:
147# --status - new status of this node
148# --uuid - UUID of the cluster
149# --primary - whether the component is primary or not ("yes"/"no")
150# --members - comma-separated list of members
151# --index - index of this node in the list
152#wsrep_notify_cmd=
153
154##
155## WSREP State Transfer options
156##
157
158# State Snapshot Transfer method
159# ClusterControl currently DOES NOT support wsrep_sst_method=mysqldump
160wsrep_sst_method=xtrabackup
161
162# Address on THIS node to receive SST at. DON'T SET IT TO DONOR ADDRESS!!!
163# (SST method dependent. Defaults to the first IP of the first interface)
164#wsrep_sst_receive_address=
165
166# SST authentication string. This will be used to send SST to joining nodes.
167# Depends on SST method. For mysqldump method it is root:<root password>
168wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
169
170# Desired SST donor name.
171#wsrep_sst_donor=
172
173# Protocol version to use
174# wsrep_protocol_version=
175[MYSQL]
Filip Pytlounca245cc2016-02-16 14:49:45 +0100176socket={{ service.socket }}
Ales Komarekcba48ac2015-04-30 11:40:44 +0200177#default_character_set=utf8
178[client]
Filip Pytlounca245cc2016-02-16 14:49:45 +0100179socket={{ service.socket }}
Ales Komarekcba48ac2015-04-30 11:40:44 +0200180default_character_set=utf8
181[mysqldump]
182max_allowed_packet = 512M
Filip Pytlounca245cc2016-02-16 14:49:45 +0100183socket={{ service.socket }}
Ales Komarekcba48ac2015-04-30 11:40:44 +0200184default_character_set=utf8
185[MYSQLD_SAFE]
186pid_file=mysqld.pid
Filip Pytloune40d54c2016-02-16 14:22:02 +0100187log_error={{ service.log_file }}
Ales Komarekcba48ac2015-04-30 11:40:44 +0200188basedir=/usr/
189datadir=/var/lib/mysql