summaryrefslogtreecommitdiffstats
path: root/root-galera/usr/share/container-scripts/mysql/galera-init
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-19 06:21:30 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-19 06:21:30 +0100
commit9d9925ec86bb779c60655bbf487d7921f22a36eb (patch)
treea91c886a7aa65ace740dae91596d99517e1c27d9 /root-galera/usr/share/container-scripts/mysql/galera-init
parent13c354cf70004f24570b81cc8f291af98ed7380c (diff)
downloadmysql-galera-9d9925ec86bb779c60655bbf487d7921f22a36eb.tar.gz
mysql-galera-9d9925ec86bb779c60655bbf487d7921f22a36eb.tar.bz2
mysql-galera-9d9925ec86bb779c60655bbf487d7921f22a36eb.tar.xz
mysql-galera-9d9925ec86bb779c60655bbf487d7921f22a36eb.zip
Include peer-finder and modify to match also IPs in order to support hostNetwork configuration
Diffstat (limited to 'root-galera/usr/share/container-scripts/mysql/galera-init')
-rw-r--r--root-galera/usr/share/container-scripts/mysql/galera-init/60-galera-config.sh2
-rw-r--r--root-galera/usr/share/container-scripts/mysql/galera-init/galera.cnf.template8
2 files changed, 8 insertions, 2 deletions
diff --git a/root-galera/usr/share/container-scripts/mysql/galera-init/60-galera-config.sh b/root-galera/usr/share/container-scripts/mysql/galera-init/60-galera-config.sh
index 3b9fa31..e6cce5a 100644
--- a/root-galera/usr/share/container-scripts/mysql/galera-init/60-galera-config.sh
+++ b/root-galera/usr/share/container-scripts/mysql/galera-init/60-galera-config.sh
@@ -1,5 +1,5 @@
if [ -v POD_NAMESPACE ]; then
- export MYSQL_GALERA_CLUSTER="$(hostname -f | cut -d'.' -f2)"
+ [ -v MYSQL_GALERA_CLUSTER ] || export MYSQL_GALERA_CLUSTER="$(hostname -f | cut -d'.' -f2)"
log_info 'Processing basic Galera configuration files ...'
envsubst < ${CONTAINER_SCRIPTS_PATH}/galera-init/galera.cnf.template > /etc/my.cnf.d/galera.cnf
diff --git a/root-galera/usr/share/container-scripts/mysql/galera-init/galera.cnf.template b/root-galera/usr/share/container-scripts/mysql/galera-init/galera.cnf.template
index e1013d7..b45dc85 100644
--- a/root-galera/usr/share/container-scripts/mysql/galera-init/galera.cnf.template
+++ b/root-galera/usr/share/container-scripts/mysql/galera-init/galera.cnf.template
@@ -3,11 +3,17 @@ wsrep_on = ON
wsrep_provider = /usr/lib64/galera-3/libgalera_smm.so
wsrep_sst_auth=${MYSQL_GALERA_USER}:${MYSQL_GALERA_PASSWORD}
wsrep_cluster_name=${MYSQL_GALERA_CLUSTER}
-#wsrep_provider_options="gcache.size=300M; gcache.page_size=300M"
+#wsrep_provider_options="gcache.size=500M; gcache.page_size=500M"
wsrep_sst_method = xtrabackup-v2
default_storage_engine = innodb
binlog_format = row
+#MySQL tuning
+#max_threads = 128
+#key_buffer_size = 1024K
+#sort_buffer_size = 1024K
+#read_buffer_size = 1024K
+
# Performance settings
innodb_autoinc_lock_mode = 2
innodb_flush_log_at_trx_commit = 0