redis container with auto-clustering capabilities (kind of super powers)!
10K+
[WIP] WORK IN PROGRESS Please don't pull this repo until clustering methods are solved!
redis container with auto-clustering capabilities (kind of super powers)!
This image relies on two main variables for clustering: CLUSTER_NAME and CLUSTER_HOSTS.
CLUSTER_NAME - You should give a name to your cluster and place it here.
RUNNING_MODE - This variable could be set with values: cluster and standalone.
cluster if CLUSTER_NAME is set and non-empty, otherwise it will always default to cluster.CLUSTER_HOSTS - Here you should place a cluster fqdn or IP plus port, separated.
(empty string).10.0.0.10:4423,10.0.0.11:4423,10.0.0.12:4423local.skydns.redis.clustername:1234CLUSTER_CONNECT_TIMEOUT - seconds it should wait for each host before elects itself as the first one on the cluster.
5.CLUSTER_REPLICAS - number of replica servers
1.PORT - port where redis should be listening on.
6379.LOG_LEVEL - log level to be specified on servers configs.
notice;RUNNING_MODE is set as clusterCLUSTER_HOSTS
RUNNING_MODE is set to clusterredis configs are updated and service is startedRUNNING_MODE is cluster
redis-sentinel configs are updated and service is startedredis/tool/clusterI've added [email protected] fleet unit file on this repo in case you want to use with CoreOS. This unit relies on skydns for service discovery, so it will only work with it, sorry. :)
Submit this unit into CoreOS before starting launching instances:
fleetctl submit [email protected]
We use unit instance id variable to pass also CLUSTER_NAME configuration.
# redis@{CLUSTER_NAME}:{ID}
# Launching 4 nodes cluster for gitlab service.
fleetctl launch redis@gitlab:1;
fleetctl launch redis@gitlab:2;
fleetctl launch redis@gitlab:3;
fleetctl launch redis@gitlab:4;
# Now, if your dig your domain, it should return all instances:
dig @sky.dns.srv.ip gitlab.redis.skydns.local;
docker build -t cusspvz/redis .
Content type
Image
Digest
sha256:29c8bbefb…
Size
44 MB
Last updated
about 11 years ago
docker pull cusspvz/redis