colinmollenhour / mariadb-galera-swarm

MariaDb Galera Cluster container based on official mariadb image which can auto-bootstrap and recover cluster state.
https://hub.docker.com/r/colinmollenhour/mariadb-galera-swarm
Apache License 2.0
219 stars 103 forks source link

Quick start for Docker Swarm might fail #75

Closed xenuser closed 5 years ago

xenuser commented 5 years ago

(Thank you so much for your awesome work!)

The documentation provides a quick start for Docker Swarm through running multiple CLI commandos:

$ docker service create --name galera-seed --replicas 1 -e XTRABACKUP_PASSWORD=<pass> \
     colinmollenhour/mariadb-galera-swarm seed
 $ docker service create --name galera --replicas 2 -e XTRABACKUP_PASSWORD=<pass> \
     colinmollenhour/mariadb-galera-swarm node tasks.galera-seed,tasks.galera
 $ docker service rm galera-seed
 $ docker service scale galera=3

In my case, running Docker 18.09 CE on Ubuntu 18.04 on Digital Ocean, all Galera Tasks will be assigned the same container IP, resulting in a situation where the Galera nodes will not find each other, looping around in "waiting for 2nd IP.."

In my test setup, I created an overlay galled "galera" first and attached all services to this network. The Galera main service will start up then.

Suggestion: Enhance the docs accordingly.

colinmollenhour commented 5 years ago

Thanks for the suggestion. Docs updated!