Giter VIP home page Giter VIP logo

playing-redis's Introduction

Redis Master-Slave Setup.

This playbook will setup a Redis Master, and Redis Slaves to that Master.

How to Start

First have launch the 3 or 4 Ubuntu 14.04 servers(Yes, this playbook only works with Ubuntu 14.04). Designate one as the redis-master(Redis Master), and rest of them as redis-slaves(Redis Slaves), appropriately list them in the ./hosts file.

[redis-master]
rmaster ansible_ssh_host=10.10.0.6

[redis-slaves]
10.10.0.7
10.10.0.8
10.10.0.9

NOTE: You might have to setup proxies on the ./base-redis/tasks/main.yml and ./common/tasks/main.yml, remove it if you do not need it.

...
  environment:
    http_proxy: http://myproxy.in:8080
    https_proxy: http://myproxy.in:8080

Once you have done the edits, you are ready to go.

$ ansible-playbook -i hosts site.yml

This should setup the redis cluster with single redis-master and 3 redis-slaves. If you want add sentinels to the picture. You just need to modify the hosts file, and something like this.

...
...
[redis-sentinels]
10.10.0.6
10.10.0.7
10.10.0.8
10.10.0.9

Now you should rerun the, ansible-playbook -i hosts site.yml.

playing-redis's People

Contributors

dhruv-samuel avatar

Watchers

Samuel Vijaykumar M avatar James Cloos avatar

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.