Text file `default/mariadb-galera-cluster.cnf'

Configuration for MariaDB Galera Cluster

[mysqld] character_set_server = utf8mb4 collation_server = utf8mb4_unicode_ci skip-external-locking log-error = /var/log/mysql.err skip-log-bin server-id = {{ server.id }} innodb_file_per_table = 1 innodb_file_format = Barracuda innodb_flush_method = O_DIRECT long_query_time = 1 skip-name-resolve max_allowed_packet=256M bind_address = 0.0.0.0 [galera] wsrep_on=ON wsrep_provider=/usr/lib/galera/libgalera_smm.so wsrep_cluster_name=clustermin_{{ cluster.id }} {% set nodeIps = '' %} {% for eachServer in cluster.servers if eachServer != server and eachServer.location <= 255 %} {% set nodeIp = eachServer.location == server.location ? eachServer.privateIp : eachServer.publicIp %} {% set nodeIps = nodeIps ? nodeIps ~ ',' ~ nodeIp : nodeIp %} {% endfor %} wsrep_cluster_address=gcomm://{{ nodeIps }} wsrep_node_name=mariadb-{{ server.id }} wsrep_node_address={{ server.privateIp }} {% set hasOtherDc = false %} {% for eachServer in cluster.servers if eachServer.location <= 255 and eachServer.location != server.location %} {% set hasOtherDc = true %} {% endfor %} {% if hasOtherDc %} wsrep_sst_receive_address={{ server.publicIp }} {% endif %} binlog_format=ROW innodb_flush_log_at_trx_commit=0 innodb_autoinc_lock_mode=2 wsrep_provider_options="pc.recovery=TRUE; gcache.size=3G; gcache.keep_pages_size=5G; gmcast.segment={{ server.location }}{{ hasOtherDc ? '; evs.keepalive_period = PT3S; evs.suspect_timeout = PT30S; evs.inactive_timeout = PT1M; evs.install_timeout = PT1M; ist.recv_addr=' ~ server.publicIp }}" wsrep_retry_autocommit=4 # Authentication for SST method wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth=sstuser:{{ randomize('sst_password' ~ cluster.uuid) }} [SST] compressor=gzip decompressor='gzip -dc'