Add compose file for arbiter and update amria compose file for clustering
This commit is contained in:
parent
88a68cb421
commit
3c3566a4dd
2 changed files with 34 additions and 21 deletions
|
|
@ -9,31 +9,32 @@ services:
|
||||||
- MARIADB_USER=${DB_ADMIN_USER}
|
- MARIADB_USER=${DB_ADMIN_USER}
|
||||||
- MARIADB_PASSWORD=${DB_ADMIN_PASSWORD}
|
- MARIADB_PASSWORD=${DB_ADMIN_PASSWORD}
|
||||||
- MARIADB_DATABASE=initial_db
|
- MARIADB_DATABASE=initial_db
|
||||||
# Pass these through for the init script
|
|
||||||
- APP_REGISTRY=${APP_REGISTRY}
|
|
||||||
- REPL_USER=${REPL_USER}
|
|
||||||
- REPL_PASSWORD=${REPL_PASSWORD}
|
|
||||||
# Dynamic password variables for your apps
|
|
||||||
- FORGEJO_DB_PASS=${FORGEJO_DB_PASS}
|
|
||||||
- GUACAMOLE_DB_PASS=${GUACAMOLE_DB_PASS}
|
|
||||||
- GRAFANA_DB_PASS=${GRAFANA_DB_PASS}
|
|
||||||
volumes:
|
volumes:
|
||||||
- /docker/maria/data:/var/lib/mysql
|
- /docker/maria/data:/var/lib/mysql
|
||||||
- /docker/maria/conf:/etc/mysql/conf.d
|
- /docker/maria/conf:/etc/mysql/conf.d
|
||||||
- /docker/maria/init:/docker-entrypoint-initdb.d
|
- /docker/maria/init:/docker-entrypoint-initdb.d
|
||||||
command:
|
command:
|
||||||
- mariadbd
|
- mariadbd
|
||||||
# NETWORK BINDING
|
- --wsrep-on=ON
|
||||||
|
- --wsrep-provider=/usr/lib/galera/libgalera_smm.so
|
||||||
|
- --wsrep-cluster-name=mgdev1
|
||||||
- --bind-address=0.0.0.0
|
- --bind-address=0.0.0.0
|
||||||
# ASYNC REPLICATION CONFIG
|
- --wsrep-cluster-address=gcomm://172.16.201.206,172.16.201.106,172.16.201.250
|
||||||
- --log-bin=mysql-bin
|
- --wsrep-node-address=${CLUSTER_KEEPALIVED_IP}
|
||||||
- --binlog-format=ROW
|
- --wsrep-node-name=node${MGDB_NODE_NUMBER}
|
||||||
- --server-id=${MGDB_NODE_NUMBER}
|
- --binlog-format=row
|
||||||
- --log-slave-updates=ON
|
- --innodb-autoinc-lock-mode=2
|
||||||
- --gtid-strict-mode=ON
|
- --wsrep-sst-method=mariabackup
|
||||||
# COLLISION PREVENTION (Odds vs Evens)
|
- --wsrep-sst-auth=sstuser:${SST_PASSWORD}
|
||||||
- --auto-increment-increment=2
|
# No manual weights needed anymore. Default weight=1 is perfect.
|
||||||
- --auto-increment-offset=${MGDB_NODE_NUMBER}
|
- --wsrep-provider-options=pc.ignore_sb=true;pc.npvo=true
|
||||||
# PERFORMANCE
|
|
||||||
- --innodb-buffer-pool-size=1G # Adjust based on your RAM
|
|
||||||
- --innodb-flush-log-at-trx-commit=2 # 1=Safest, 2=Faster
|
# Pass these through for the init script
|
||||||
|
#- APP_REGISTRY=${APP_REGISTRY}
|
||||||
|
#- REPL_USER=${REPL_USER}
|
||||||
|
#- REPL_PASSWORD=${REPL_PASSWORD}
|
||||||
|
# Dynamic password variables for your apps
|
||||||
|
#- FORGEJO_DB_PASS=${FORGEJO_DB_PASS}
|
||||||
|
#- GUACAMOLE_DB_PASS=${GUACAMOLE_DB_PASS}
|
||||||
|
#- GRAFANA_DB_PASS=${GRAFANA_DB_PASS}
|
||||||
12
~host-setups/pi5/garbd.yml
Normal file
12
~host-setups/pi5/garbd.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
services:
|
||||||
|
garbd:
|
||||||
|
image: mariadb:11.4
|
||||||
|
container_name: galera-arbitrator
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
command:
|
||||||
|
- garbd
|
||||||
|
- --group=mgdev1
|
||||||
|
# Must list ALL cluster nodes: PVE1, PVE2, and ITSELF (optional but good practice)
|
||||||
|
- --address=gcomm://172.16.201.206,172.16.201.106,172.16.201.250
|
||||||
|
- --options=pc.wait_prim=no
|
||||||
Loading…
Reference in a new issue