How to configure a high-availability cluster of MariaDB and Redis in Mesos or CoreOS How to configure a high-availability cluster of MariaDB and Redis in Mesos or CoreOS docker docker

How to configure a high-availability cluster of MariaDB and Redis in Mesos or CoreOS


After posting the question, I was lucky and came across a few repositories that have achieved what I am looking for:

Redis

https://github.com/mdevilliers/docker-rediscluster - A Redis cluster with two Redis instances and three Redis Sentinel monitors. If the Master fails, the Sentinels promote the Slave as a Master. Mark has also created a project that configures HAProxy to use the promoted Master - https://github.com/mdevilliers/redishappy

Percona/Galera cluster

An out-of-the-box working docker image - https://github.com/paulczar/docker-percona_galera


You could use CoreOS (or any other plattform where Docker can run) and Kubernetes with SkyDNS integration this would you allow to fetch the IP-address of the master. Also Kubernetes comes with a proxy (for service discovery) which sets environmental variables in your pods. You could access them at runtime. I think the best way (and a way you need to go) is to use a service discovery tool like SkyDNS or something similar. Here is a simple Kubernetes example.

Also you could do this with fleet and side-kicks but I think Kuberentes does somethings a little bit easier for you and is better to use. It is just a little bit tricky to set it up :)

I didn't used Mesos and Marathon so far but I think they should do this too. They (https://github.com/mesosphere/marathon#features) have all the tools you need to set your cluster up.