fsalum / puppet-redis Goto Github PK
View Code? Open in Web Editor NEWRedis Server Module for Puppet
License: Apache License 2.0
Redis Server Module for Puppet
License: Apache License 2.0
Would it be possible to add a license to this module so that it may be redistributed?
I want to get your thoughts on how to handle the 'vm.overcommit_memory=1' Linux kernel option that is pretty much required when running Redis on a production server. I had a server the other day that was missing this and the cause of writes not being persisted by the Redis server.
Are you against putting this kernel option in this module in favor of handling it in something else like the sysctl Puppet module or was this option/setting simply overlooked? Ideally, it would be nice to have less moving parts and thus I was wondering if you would be willing to add the setting of this kernel parameter within one of the classes of this Redis Puppet module?
The Redis admin guide details the kernel parameter here: http://redis.io/topics/admin
Let me know what you think, I can gladly contribute a PR - just wanted to chat about it first.
Cheers,
Tehmasp
https://travis-ci.org/fsalum/puppet-redis/jobs/9443240
$ .forge-releng/publish
Environment variable PUBLISHER_PASSWORD must be set
Not really clear on best solution; some kind of "only publish if on master" or something...
Hello,
On Debian stable, with redis-server 2.4.14, shared objects directive doesn't works.
root@gitlab:# /etc/init.d/redis-server start
Starting redis-server:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 197
>>> 'shareobjects no'
Bad directive or wrong number of arguments
failed
root@gitlab:# dpkg -l |grep redis
ii redis-server 2:2.4.14-1 amd64 Persistent key-value database with network interface
I'm not sure if this is an issue with librarian-puppet, or this module. When I try installing this module, I get the following error from librarian-puppet:
[Librarian] Checking redis/0.0.12 <https://github.com/fsalum/puppet-redis.git#master>
[Librarian] Post-Cached Sources:
[Librarian] [:git, "git://github.com/fsalum/puppet-redis.git", {}]
[Librarian] Cycle with redis/0.0.12 <https://github.com/fsalum/puppet-redis.git#master>
[Librarian] Backtracking from redis/0.0.12 <https://github.com/fsalum/puppet-redis.git#master>
[Librarian] Failed to resolve redis (>= 0) <https://github.com/fsalum/puppet-redis.git#master>
Could not resolve the dependencies.
Hello,
On Ubuntu systems the logrotate file is placed under "/etc/logrotate.d/redis-server" and then the file added causes a duplication error:
The location of file on Ubuntu 12.04:
# dpkg -L redis-server | grep logrotate
/etc/logrotate.d/redis-server
The error caused by logrotate crontab:
/etc/cron.daily/logrotate:
error: redis-server:1 duplicate log entry for /var/log/redis/redis-server.log
error: found error in /var/log/redis/*.log , skipping
Trying to have some options for redis and also configure Sentinel, but If I declare the class configs for Redis and Sentinel, I get
Duplicate declaration: Package[redis] is already declared in file
because both installs it. am I missing how to pass the same config with only sentinel?
class { 'redis':
conf_tcp_keepalive => '60',
conf_slaveof => $conf_slaveof,
system_sysctl => true
}
class { 'redis::sentinel' :
conf_port => '26379',
sentinel_confs => {
'redis_master' => {
'monitor' => $redis_master_monitor,
'down-after-milliseconds' => '60000',
'failover-timeout' => 180000,
'parallel-syncs' => '3',
}
}
}
Hi. I really like this module except for the lookup of the redis version. This fact gets executed on every server regardless of its redis intentions and the yum command can be very inefficient. Anyway I can convince you to remove it and just require a version be provided?
When I try to use puppet-redis in docker (base devopsil/puppet), I get strange error.
Trace:
$ make
docker ps -a | grep -v IMAGE | awk '{ print $1 }' | xargs docker rm -f
b6778c29580b
docker build -t mcandre/docker-redis:latest .
Sending build context to Docker daemon 34.49 MB
Step 0 : FROM devopsil/puppet
---> 40e40fcab8f6
Step 1 : MAINTAINER Andrew Pennebaker <[email protected]>
---> Using cache
---> dd3d73313578
Step 2 : COPY site.pp /etc/puppet/manifests/site.pp
---> ec13bbe93838
Removing intermediate container f97b7533fbe0
Step 3 : RUN yum install -y tar && puppet module install fsalum-redis && puppet apply /etc/puppet/manifests/site.pp --verbose --detailed-exitcodes || [ $? -eq 2 ]
---> Running in e4c4236d6508
Loaded plugins: fastestmirror
Setting up Install Process
Determining fastest mirrors
* base: centos.netnitco.net
* centosplus: mirror.tzulo.com
* extras: mirror.sanctuaryhost.com
* updates: centos.chi.host-engine.com
Resolving Dependencies
--> Running transaction check
---> Package tar.x86_64 2:1.23-13.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
tar x86_64 2:1.23-13.el6 base 809 k
Transaction Summary
================================================================================
Install 1 Package(s)
Total download size: 809 k
Installed size: 2.5 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 2:tar-1.23-13.el6.x86_64 1/1
Verifying : 2:tar-1.23-13.el6.x86_64 1/1
Installed:
tar.x86_64 2:1.23-13.el6
Complete!
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
└─┬ fsalum-redis (v1.0.3)
└── thias-sysctl (v1.0.6)
Info: Loading facts
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for 12ef887a9000.shoutlet.vpc in environment production in 0.56 seconds
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
(at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')
Info: Applying configuration version '1455294160'
Notice: /Stage[main]/Redis/File[/etc/logrotate.d/redis]/ensure: defined content as '{md5}7b5aef50c388783e67cb48f50ec270f4'
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list redis' returned 1: Error: No matching Packages to list
Error: /Stage[main]/Redis/Package[redis]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list redis' returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Redis/Exec[/var/lib/redis/]: Dependency Package[redis] has failures: true
Warning: /Stage[main]/Redis/Exec[/var/lib/redis/]: Skipping because of failed dependencies
Notice: /Stage[main]/Redis/File[/etc/redis.conf]: Dependency Package[redis] has failures: true
Warning: /Stage[main]/Redis/File[/etc/redis.conf]: Skipping because of failed dependencies
Notice: /Stage[main]/Redis/File[/var/lib/redis/]: Dependency Package[redis] has failures: true
Warning: /Stage[main]/Redis/File[/var/lib/redis/]: Skipping because of failed dependencies
Notice: /Stage[main]/Redis/Service[redis]: Dependency Package[redis] has failures: true
Warning: /Stage[main]/Redis/Service[redis]: Skipping because of failed dependencies
Info: Creating state file /var/lib/puppet/state/state.yaml
Notice: Finished catalog run in 0.40 seconds
The command '/bin/sh -c yum install -y tar && puppet module install fsalum-redis && puppet apply /etc/puppet/manifests/site.pp --verbose --detailed-exitcodes || [ $? -eq 2 ]' returned a non-zero code: 1
Source:
I've tried this with and without the system_sysctl option. Both will hang.
Puppet Code:
require epel
class { 'redis':
system_sysctl => true
}
Class['epel']->
Class['redis']
Last few lines of puppet output before it hangs:
==> masterofpuppets: Info: /Stage[main]/Redis/File[/etc/redis.conf]: Filebucketed /etc/redis.conf to puppet with sum 1b59697dc32ec93399fb1828553e5f97
==> masterofpuppets: Notice: /Stage[main]/Redis/File[/etc/redis.conf]/content: content changed '{md5}1b59697dc32ec93399fb1828553e5f97' to '{md5}68b329da9893e34099c7d8ad5cb9c940'
==> masterofpuppets: Info: /Stage[main]/Redis/File[/etc/redis.conf]: Scheduling refresh of Service[redis]
==> masterofpuppets: Notice: /Stage[main]/Redis/File[/var/lib/redis/]/group: group changed 'root' to 'redis'
--> hangs here
If I kill the puppet process and run it again, it completes very quickly.
I saw the same issue raised in ticket #38.
I quite like this module, as it seems quite feature complete, but for the time being I may have to start using a different one if I can't get this installed properly. Is there a work-around ?
Environment:
Yum info:
yum info redis
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.ca.planethoster.net
* epel: mirror.clarkson.edu
* extras: centos.bhs.mirrors.ovh.net
* updates: mirror.its.dal.ca
Installed Packages
Name : redis
Arch : x86_64
Version : 2.4.10
Release : 1.el6
After upgrading to Redis 3.2, puppet runs are now deleting the entire contents of Redis.conf. The heart of the issue if the redis.conf.erb template does not contain a block for Redis 3.x versions.
Here is the relevant bit of code in init.pp:
https://github.com/fsalum/puppet-redis/blob/master/manifests/init.pp#L118
And here in redis_version.rb:
https://github.com/fsalum/puppet-redis/blob/master/lib/facter/redis_version.rb#L18
When you go through the case statement in redis_version.rb, and you get the default of nil
because 3.x versions have no matching case, and the value of $::redis_version
of nil
causes the problem with your redis.conf getting nuked.
Hi, I just wondered why I had a Redis 2.2 config # Redis 2.2 configuration file example
although I have 2.8 running.
It turns out the apt-cache call returns 2 lines on my machine and the fact chooses the wrong one.
I do agree this might be some local apt fuckup, but still worth mentioning.
# apt-cache show redis-server 2> /dev/null | /bin/grep -i 'version:' | /usr/bin/awk '{print $2}'
2:2.8.17-rwky1~precise
2:2.2.12-1build1
The easy fix might be to add | sort -rV | head -n 1
to the end.
Could puppet-redis automatically install tar on behalf of the puppet user? Believe it or not, some puppet setups actually don't come with tar out of the box (e.g., devopsil/puppet).
unfortunately module does not ensure that /var/lib/redis is writable by redis user - even though it configures redis to write to that folder.. :(
needs a mode => 0755..
i've been trying 'redis_version_override', 'version', 'redis_version' => 2.8
i keep getting 'Invalid parameter'. how do i ensure the version of redis that i want.
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.