redis_sentinel

Configure redis-sentinels

Kyle Anderson

KyleAnderson

8,792 downloads

7,943 latest version

2.2 quality score

Version information

  • 0.0.8 (latest)
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Dec 20th 2013

Start using this module

Documentation

KyleAnderson/redis_sentinel — version 0.0.8 Dec 20th 2013

#redis_sentinel Build Status

Warning

Only currently works on 2.6. Uses the Old behavior. The newer sentinel in 2.8 writes its own config file, which I not yet know how to handle.

##Overview

This puppet module configures the Redis Sentinel to do automatic master/slave control on a bunch of redis servers. (not to be confused with Redis Cluster.)

##Installation

###What this module affects

  • /etc/redis-sentinel.conf
  • A redis-sentinel service
  • It does not depend or interact with any other redis module

##Usage Examples

A simple usage of a single monitor:

include redis_sentinel
redis_sentinel::monitor { 'mymaster':
  host                    => '127.0.0.1',
  port                    => '6379',
  quorum                  => '2',
  down_after_milliseconds => '60000',
  failover_timeout        => '900000',
  can_failover            => 'yes',
  parallel_syncs          => '1',
}

A complex example with an array of redis servers using quorum:

include redis_sentinel
$redis_servers = [ 'redis1', 'redis2', 'redis3' ]
redis_sentinel::monitor { $redis_servers:
  quorum                  => size($redis_servers) / 2 + 1,
  down_after_milliseconds => '60000',
  failover_timeout        => '900000',
  can_failover            => 'yes',
  parallel_syncs          => size($redis_servers),
}

##Limitations

  • Only Supports Redis 2.6.x
  • Requires Redis to be installed via another module.
  • Not production tested!
  • Probably makes assumptions I'm not thinking about (open an issue!)
  • Only tested on ubuntu

##Requirements

##Development Open an issue or fork and open a Pull Request