|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- # All files in this package is subject to the GPL v2 license
- # More information is in the COPYING file in the top directory of this package.
- # Copyright (C) 2011 severalnines.com
- {%- if pillar.galera.get('master',{}).get('enabled', False) %}
- {%- from "galera/map.jinja" import master with context %}
- {%- set service = master %}
- {%- endif %}
- {%- if pillar.galera.get('slave',{}).get('enabled', False) %}
- {%- from "galera/map.jinja" import slave with context %}
- {%- set service = slave %}
- {%- endif %}
-
- [mysql]
- {% if service.get('ssl', {}).get('enabled', False) %}
- ssl-ca={{ service.ssl.ca_file }}
- ssl-cert={{ service.ssl.cert_file }}
- ssl-key={{ service.ssl.key_file }}
- {% endif %}
-
- [mysqld_safe]
- syslog
-
- [mysqld]
- datadir=/var/lib/mysql
- bind-address={{ service.bind.address }}
- port=3306
- max_connections={{ service.max_connections }}
- default-storage-engine=innodb
- binlog_format=ROW
- collation-server=utf8_general_ci
- init-connect='SET NAMES utf8'
- character-set-server=utf8
- default-storage-engine=innodb
- #log_error=/var/log/mysql/error.log
- skip-external-locking
- skip-name-resolve
- socket = /var/run/mysqld/mysqld.sock
-
- myisam_sort_buffer_size=64M
- wait_timeout=1800
- open_files_limit=102400
- table_open_cache=10000
- key_buffer_size=64M
- max_allowed_packet=256M
- query_cache_size=0
- query_cache_type=0
-
- innodb_file_format=Barracuda
- innodb_file_per_table=1
- innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
- innodb_log_file_size=627M
- innodb_read_io_threads=8
- innodb_write_io_threads=8
- innodb_io_capacity=500
- innodb_flush_log_at_trx_commit=2
- innodb_flush_method=O_DIRECT
- innodb_doublewrite=0
- innodb_autoinc_lock_mode=2
- innodb_locks_unsafe_for_binlog=1
- wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host}}:4567{% if not loop.last %},{% endif %}{% endfor %}/?pc.wait_prim=no"
- wsrep_provider={{ service.wsrep_provider }}
- wsrep_cluster_name="openstack"
-
- wsrep_slave_threads=8
- wsrep_sst_method=xtrabackup-v2
- wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
- wsrep_node_address={{ service.bind.address }}
- wsrep_provider_options="gcache.size = 256M"
- wsrep_provider_options="gmcast.listen_addr = tcp://{{ service.bind.address }}:4567"
-
- {% if service.get('ssl', {}).get('enabled', False) %}
- wsrep_provider_options="socket.ssl=yes;socket.ssl_key={{ service.ssl.key_file }};socket.ssl_cert={{ service.ssl.cert_file }};socket.ssl_ca={{ service.ssl.ca_file }}"
- ssl-ca={{ service.ssl.ca_file }}
- ssl-cert={{ service.ssl.cert_file }}
- ssl-key={{ service.ssl.key_file }}
- {% endif %}
-
- [xtrabackup]
- parallel=4
-
- [sst]
- streamfmt=xbstream
- transferfmt=socat
- sockopt=,nodelay,sndbuf=1048576,rcvbuf=1048576
|