Configures Redis via Opscode Chef
It can handle multiple instances with different configurations on the same machine.
Currently only one redis version is supported.
- Ubuntu 12.04+
- Debian 7.0+
L7-redis
- The default no-op recipe.
L7_redis_pool
- Configures redis instance
###Provider parameters:
port
: listen port (default 6379)bind
: listen address (default "127.0.0.1")unixsocketperm
: Unix socket permission (default 755)timeout
: timeout interval (default 0, no timeout)tcp_keepalive
: tcp keepalive interval (default 0, no keepalive)loglevel
: log level (default "notice")databases
: number of databases (default 16)datadir
: directory for storing data (default "/usr/lib/redis-poolname")maxmemory
: maximum memory to use (default "1gb")maxmemory_policy
: eviction policy (default "volatile-lru")maxmemory_samples
: memory samples (default 3)slaveof
: master server ip address and port (default "no master")slave_read_only
: is slave read only? (default "yes")masterauth
: password for master serversnapshotting
: snapshotting (default true)requirepass
: authentication password (default nil)snapshot_rules
: snapshot rules (default [ "900 1", "300 10", "60 10000" ])stop_writes_on_bgsave_error
: stop writes on error (default "yes")appendonly
: persistence type (default "yes")appendfsync
: persistence flush (default "everysec")no_appendfsync_on_rewrite
: (default "no")auto_aof_rewrite_percentage
: (default 100)auto_aof_rewrite_min_size
: (default "64mb")aof_rewrite_incremental_fsync
: (default: "yes")config
: configuration hash with parameters like above
L7_redis_pool 'basic_example'
L7_redis_pool 'extended_example' do
port '6390'
bind '0.0.0.0'
databases 2
datadir '/opt/custom_redis'
end
node.override['L7-redis']['config']['databases'] = 16
node.override['L7-redis']['config']['repl-backlog-size'] = '256mb'
L7_redis_pool 'redis6379' do
config ({
'port' => '6379',
'bind' => '0.0.0.0',
'maxmemory' => '100mb'
})
end
L7_redis_pool 'redis6380' do
config ({
'port' => '6380',
'bind' => '127.0.0.1',
'maxmemory' => '10mb',
'slaveof' => '127.0.0.1 6379'
})
end
Implement multiversion support.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Freely distributable and licensed under the MIT license.
- Copyright (c) 2016 Gabor Szelcsanyi