From 26b611e9732ae655c47f768fa5b8771cb69572f2 Mon Sep 17 00:00:00 2001 From: Andy McCurdy Date: Wed, 15 Jul 2020 15:15:03 -0700 Subject: update configs to bind to explicit addresses. configure sentinel --- docker/master/redis.conf | 2 +- docker/sentinel_1/Dockerfile | 4 ++-- docker/sentinel_1/redis.conf | 10 +++++----- docker/sentinel_2/Dockerfile | 4 ++-- docker/sentinel_2/redis.conf | 10 +++++----- docker/sentinel_3/Dockerfile | 4 ++-- docker/sentinel_3/redis.conf | 10 +++++----- docker/slave/redis.conf | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docker/master/redis.conf b/docker/master/redis.conf index 271bfaa..ed00766 100644 --- a/docker/master/redis.conf +++ b/docker/master/redis.conf @@ -1,3 +1,3 @@ -bind * +bind master 127.0.0.1 port 6379 save "" diff --git a/docker/sentinel_1/Dockerfile b/docker/sentinel_1/Dockerfile index e3c3e7b..3c3f8c2 100644 --- a/docker/sentinel_1/Dockerfile +++ b/docker/sentinel_1/Dockerfile @@ -1,7 +1,7 @@ FROM redis-py-base:latest -COPY redis.conf /etc/conf/redis/redis.conf +COPY redis.conf /usr/local/etc/redis/redis.conf EXPOSE 26379 -CMD redis-server +CMD [ "redis-sentinel", "/usr/local/etc/redis/redis.conf" ] diff --git a/docker/sentinel_1/redis.conf b/docker/sentinel_1/redis.conf index d12979f..fc9aa68 100644 --- a/docker/sentinel_1/redis.conf +++ b/docker/sentinel_1/redis.conf @@ -1,7 +1,7 @@ -pidfile /var/run/sentinel-1.pid +bind sentinel_1 127.0.0.1 port 26379 -daemonize yes -logfile /var/log/redis-sentinel-1 -# short timeout for sentinel tests -sentinel down-after-milliseconds mymaster 500 +sentinel monitor redis-py-test master 6379 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 diff --git a/docker/sentinel_2/Dockerfile b/docker/sentinel_2/Dockerfile index cd59777..dc3c332 100644 --- a/docker/sentinel_2/Dockerfile +++ b/docker/sentinel_2/Dockerfile @@ -1,7 +1,7 @@ FROM redis-py-base:latest -COPY redis.conf /etc/conf/redis/redis.conf +COPY redis.conf /usr/local/etc/redis/redis.conf EXPOSE 26380 -CMD redis-server +CMD [ "redis-sentinel", "/usr/local/etc/redis/redis.conf" ] diff --git a/docker/sentinel_2/redis.conf b/docker/sentinel_2/redis.conf index 9ab8934..264443c 100644 --- a/docker/sentinel_2/redis.conf +++ b/docker/sentinel_2/redis.conf @@ -1,7 +1,7 @@ -pidfile /var/run/sentinel-2.pid +bind sentinel_2 127.0.0.1 port 26380 -daemonize yes -logfile /var/log/redis-sentinel-2 -# short timeout for sentinel tests -sentinel down-after-milliseconds mymaster 500 +sentinel monitor redis-py-test master 6379 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 diff --git a/docker/sentinel_3/Dockerfile b/docker/sentinel_3/Dockerfile index 2e81a15..f0d48c9 100644 --- a/docker/sentinel_3/Dockerfile +++ b/docker/sentinel_3/Dockerfile @@ -1,7 +1,7 @@ FROM redis-py-base:latest -COPY redis.conf /etc/conf/redis/redis.conf +COPY redis.conf /usr/local/etc/redis/redis.conf EXPOSE 26381 -CMD redis-server +CMD [ "redis-sentinel", "/usr/local/etc/redis/redis.conf" ] diff --git a/docker/sentinel_3/redis.conf b/docker/sentinel_3/redis.conf index b971b2f..b0827f1 100644 --- a/docker/sentinel_3/redis.conf +++ b/docker/sentinel_3/redis.conf @@ -1,7 +1,7 @@ -pidfile /var/run/sentinel-3.pid +bind sentinel_3 127.0.0.1 port 26381 -daemonize yes -logfile /var/log/redis-sentinel-3 -# short timeout for sentinel tests -sentinel down-after-milliseconds mymaster 500 +sentinel monitor redis-py-test master 6379 2 +sentinel down-after-milliseconds redis-py-test 5000 +sentinel failover-timeout redis-py-test 60000 +sentinel parallel-syncs redis-py-test 1 diff --git a/docker/slave/redis.conf b/docker/slave/redis.conf index e2d8aba..629ac70 100644 --- a/docker/slave/redis.conf +++ b/docker/slave/redis.conf @@ -1,4 +1,4 @@ -bind * +bind slave 127.0.0.1 port 6380 save "" slaveof master 6379 -- cgit v1.2.1