diff --git a/lxc1/p0-infrastructure/mgdb.yml b/lxc1/p0-infrastructure/mgdb.yml index 7640c21..07946ce 100644 --- a/lxc1/p0-infrastructure/mgdb.yml +++ b/lxc1/p0-infrastructure/mgdb.yml @@ -9,31 +9,32 @@ services: - MARIADB_USER=${DB_ADMIN_USER} - MARIADB_PASSWORD=${DB_ADMIN_PASSWORD} - 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: - /docker/maria/data:/var/lib/mysql - /docker/maria/conf:/etc/mysql/conf.d - /docker/maria/init:/docker-entrypoint-initdb.d command: - mariadbd - # NETWORK BINDING + - --wsrep-on=ON + - --wsrep-provider=/usr/lib/galera/libgalera_smm.so + - --wsrep-cluster-name=mgdev1 - --bind-address=0.0.0.0 - # ASYNC REPLICATION CONFIG - - --log-bin=mysql-bin - - --binlog-format=ROW - - --server-id=${MGDB_NODE_NUMBER} - - --log-slave-updates=ON - - --gtid-strict-mode=ON - # COLLISION PREVENTION (Odds vs Evens) - - --auto-increment-increment=2 - - --auto-increment-offset=${MGDB_NODE_NUMBER} - # PERFORMANCE - - --innodb-buffer-pool-size=1G # Adjust based on your RAM - - --innodb-flush-log-at-trx-commit=2 # 1=Safest, 2=Faster \ No newline at end of file + - --wsrep-cluster-address=gcomm://172.16.201.206,172.16.201.106,172.16.201.250 + - --wsrep-node-address=${CLUSTER_KEEPALIVED_IP} + - --wsrep-node-name=node${MGDB_NODE_NUMBER} + - --binlog-format=row + - --innodb-autoinc-lock-mode=2 + - --wsrep-sst-method=mariabackup + - --wsrep-sst-auth=sstuser:${SST_PASSWORD} + # No manual weights needed anymore. Default weight=1 is perfect. + - --wsrep-provider-options=pc.ignore_sb=true;pc.npvo=true + + + # 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} \ No newline at end of file diff --git a/~host-setups/pi5/garbd.yml b/~host-setups/pi5/garbd.yml new file mode 100644 index 0000000..17c7d64 --- /dev/null +++ b/~host-setups/pi5/garbd.yml @@ -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 \ No newline at end of file