Coder Social home page Coder Social logo

ukhomeoffice / docker-redis Goto Github PK

View Code? Open in Web Editor NEW
2.0 27.0 4.0 43 KB

Docker Redis image with sentinel clustering in kubernetes support

Home Page: https://quay.io/repository/ukhomeofficedigital/redis

License: MIT License

Shell 74.45% Dockerfile 25.55%

docker-redis's Introduction

docker-redis

Build Status

Docker image for redis. This image is designed to be used with kubernetes, it may work outside kubernetes as well.

It is highly recommended to read through redis sentinel documentation.

Launching it in kubernetes

First of all create a single replica pod of redis and redis-sentinel. Both containers will notice that ${REDIS_SENTINEL_SERVICE_HOST} and ${REDIS_SENTINEL_SERVICE_PORT} are empty and assume that this is an initial bootstrap of redis. Redis sentinel will connect to the master at $(hostname -i) and start monitoring it.

kubectl create -f kube/redis-controller.yaml

Then you need to create redis sentinel service, which will become your redis sentinel endpoint for the following redis pods.

kubectl create -f kube/redis-sentinel-service.yaml

Once the service is up and running, you can check whether it is working properly. Run the following command in some temporary container.

redis-cli -h ${REDIS_SENTINEL_SERVICE_HOST} -p 26379 INFO

Next, we can start scaling our redis out. It is recommended to add redis and redis-sentinel replicas one by one.

kubectl scale rc redis --replicas=2

Wait a minute and check on the sentinel service redis-cli -h ${REDIS_SENTINEL_SERVICE_HOST} -p 26379 INFO, then scale to --replicas=3.

docker-redis's People

Contributors

vaijab avatar easternbloc avatar purplebooth avatar asmith030 avatar kashifsaadat avatar sulthan-ahmed avatar willemveerman avatar

Stargazers

Kevin Hatfield avatar Shane O'Grady avatar

Watchers

Marcin Ciszak avatar  avatar Rustem Suniev avatar Luke Ashe-Browne avatar Simon Loader avatar Mark Miller avatar Douglas Gardner avatar James Cloos avatar Oliver Sterzel avatar Leigh Eyles avatar Colin Gallagher avatar Samuel.Hughes avatar  avatar Paul Miles avatar Mohammud Yassine Jaffoo avatar Leon de Jager avatar Martin Devlin avatar Iqbal Shaikh avatar Giles Hinchcliff avatar Geoffrey Martin avatar  avatar Vijay Jadhav avatar Syed Rafiq avatar  avatar Ben Eustace avatar Tasharn Brown avatar  avatar

docker-redis's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.