Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.43 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.43 KB

Redis Cluster Docker Images for Rancher 1.6

This set of images and configurations is tailored to run a cluster of Redis instances for High Availability on Rancher 1.6.

The redis-server image (ahfeel/rancher-redis-cluster-node on Docker hub) is a simple Redis 7 image with enough logic to safely determine itself as a master or slave on startup.

The redis-sentinel image (ahfeel/rancher-redis-cluster-sentinel on Docker hub) starts Redis 7 Sentinel nodes that will automatically find the Redis instances, monitor them and most importantly, create/update automatically a "Rancher External Service" with the current IP of the Redis Master node. This allows to automatically target your traffic to the Redis Master Node without any additional software proxy.

Warning: The Redis Instances are actually running in a Master/Slave mode, not a Multi Master Redis Cluster

Rancher Redis Cluster Screenshot

Optional environment variables:

Redis-Server

REDIS_TIMEOUT=3600 (0 by default)
REDIS_APPENDONLY=yes (no by default)
REDIS_MASTER_GROUPNAME=mymaster
REDIS_SENTINEL_SERVICE_HOSTNAME=redis-sentinel
REDIS_SENTINEL_SERVICE_PORT=26379
REDIS_DISABLE_DANGEROUS_COMMANDS=1 (1 by default)

Redis-Sentinel

REDIS_SERVICE=redis-server
REDIS_MASTER_GROUPNAME=mymaster
REDIS_MASTER_SERVICE_HOSTNAME=redis-master
SENTINEL_DOWN_AFTER_MILLISECONDS=5000
SENTINEL_FAILOVER_TIMEOUT=60000