Consider this a POC and not a production ready system!
Built for use with Docker 17.05.0-ce+ in Swarm Mode
Swarm Master:
docker swarm init
Additional Swarm Node(s):
docker swarm join <MasterNodeIP>:2377 + join-tokens shown at swarm init
To get the tokens at a later time, run docker swarm join-token (manager|worker)
docker network create -d overlay --ingress rancher-ingress
docker network create -d overlay --opt encrypted rancherntw
Docker Compose isn't required if you use swarm, if you need version 3 please show docker-compose documentation
docker stack deploy --compose-file docker-compose.yml ha
docker service scale ha_dbcluster=3
docker service scale ha_rancher=2
docker stack services ha
ID NAME MODE REPLICAS IMAGE PORTS
2rnkf52mmd7x ha_rancher replicated 2/2 rancher/server:latest *:8080->8080/tcp
ism0wiqtgrls ha_dbcluster replicated 3/3 sysc0d/mariadb-cluster:latest
docker exec -it dbcluster.<RN>.<ID> mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 3 |
+--------------------+-------+