Added Archlinux as supported OS (#147)
* Added Archlinux as supported OS Signed-off-by: bjanssens <bjanssens@inuits.eu>
Archlinux: Added tests and update config_dir parameter
Signed-off-by: bjanssens <bjanssens@inuits.eu>
Fixes ownership issue on Ubuntu (#157)
* "On Ubuntu 14.04, redis has an init script that does chown redis:redis $RUNDIR $PIDFILE (where RUNDIR=/var/run/redis and PIDFILE=$RUNDIR/redis-server.pid) at startup. This causes puppet to "fix" the ownership of /var/run/redis (to redis:root unless config_owner and config_group have been set differently), which triggers a restart of redis-server, which changes the ownership of /var/run/redis, etc. forever. * Closes #150
Fixes lint arrow errors (#158)
* New style guide rule: https://docs.puppet.com/puppet/latest/style_guide.html#chaining-arrow-syntax
Updates fact for CentOS 6 (#159)
* Older Redis has different version string * Updated with spec and tests
Changes CentOS Docker images (#160)
* Upstream CentOS images run slowly on mac * These images have no issues
Changes for RHEL-ish specific configuration (#162)
* Previously we were changing some of the default configurations from the upstream packages * This causes issues with CentOS 6 services, and needlessly clutters logs. * Change to follow ownership patterns of original packages: * Changes service group to be root * Change workdir permission * Change pid file location back to package default * Adds failing Travis check for CentOS 6
Changes permission on /var/run/ directory (#173)
* rundir directories are 2775
* e.g. from the postgres init.d script:
```
if [ -d /var/run/postgresql ]; then
chmod 2775 /var/run/postgresql
else
install -d -m 2775 -o postgres -g postgres /var/run/postgresql
fi
```Fixes sentinel installation (#171)
* When installing sentinel on the same node as redis, duplicate declaration error occurs * This is because it was originally wrapped in an ensure_resource * This was removed in b5174b2 * We should also remove the sentinel ensure_resource * This was originally added because Debian machines have a dedicated redid-sentinel package, whereas RedHat flavour machines do not * Instead, include the redis class so we have the variables we need * Add logic installing the redid-sentinel package on Debian-flavour * See #18 for more context
Refactoring common code patterns (#174)
* Slight refactoring and DRY-ing up of code * No logic changes
Fixes ordering of Apt repos (#178)
* Explicitly set packages after apt install * Change includes to contains
Add the redisget() function which can get a value for a specified key from a specified redis URL.
Add 2.4.10 config file for CentOS 6 (#177)
* Redis 2.4.10 is old in software terms (2014) * Redis will refuse to start * The amount of logic that would have to be added to the template to isolate new config values would be hard to maintain * For now, lets just have a CentOS 6 specific erb * Adds spec to check also * Changes acceptance test for sentinel to not run on CentOS 6 * Adds function for Puppet 3/4 compatibility with the fact
* Ignore more of the usual bits * (style) Remove unused exceptions for puppet-lint * (style) puppet-lint to ignore lines with more than 140 characters * (style) README to comply with style
(testing) Simplify command run by TravisCI (#183)
Instead of anding all the commands together, we can pass them each to bundle exec, which achieves the same results.
Moves location of redis-sentinel file (#184)
* Location on Debian-like systems is `/etc/redis/sentinel.conf`
Adds logic for managing redis-sentinel package (#187)
* redis-sentinel is present in upstream repos * It's also present for 16.04/xenial onwards * So lets only manage that package if we're on Ubuntu newer or if we're managing the repo
Adds redis::administration class (#188)
* Allows modification of common redis kernel tweaks and requirements * The ones that antirez (redis creator) mentions and that are mentioned specifically in redis when running it in the logs are: * Disable THP: https://redis.io/topics/latency * Enable Overcommit Memory: https://redis.io/topics/admin * somaxconnL http://download.redis.io/redis-stable/redis.conf
Adds tests for Ubuntu 1404 and Trusty package (#189)
* We say we support 1404, but aren't testing * But 1404 has an older package, and certain config settings aren't present (See #111) * Add 2.8.X config file and logic to fix that * Add to CI, add docker and vagrant SUTs
Bump to version 3.0.0-RC (#186)
Release candidate for the 3.0.0 release This will be the last release that supports Puppet 3.X Version 4.x of the module onward will remove 3.X support
Remove service notification (#193)
* This is done at a class level in init.pp * Do not need to specify individual service
Improves ulimit configuration (#192)
* Changing Travis back to Trusty * Improves ulimit configuration * Moves to a dedicated class to DRY up config.pp * Adds support for systemd systems: - /etc/systemd/system/redis.service.d/limit.conf * Add support for redis when used with a cluster manager such as pacemaker or rgmanager * New parameter `managed_by_cluster_manager` * This manages the file under: ``` /etc/security/limits.d/redis.conf ``` * Closes #130
Adds tests for when Redis service is unmanaged (#198)
* If the redis service is unmanaged, like so: ``` redis::managed_by_cluster_manager": true redis::service_manage": false redis::notify_service": false ``` then you get a compilation failure as it tries to look for the redis service to notify: ``` But now an 'include ::redis' gives me: Error: Could not find dependent Service[redis] for Augeas[Systemd redis ulimit] at /etc/puppet/modules/redis/manifests/ulimit.pp:44 ``` * In fact, we don't need any service notification in the redis::ulimit class, as it's already in the redis::config class, which notifies the service class anyways * Adds spec for this use-case to avoid regression Closes #197
Update sort to specify key (#199)
* With the previous approach, error on 1.8.7 Ruby: ``` Error: Failed to parse template redis/redis.conf.2.4.10.erb: Filepath: /etc/puppet/modules/redis/templates/redis.conf.2.4.10.erb Line: 87 Detail: undefined method `<=>' for nil:NilClass at /etc/puppet/modules/redis/manifests/config.pp:91 on node master ``` * For ruby 1.8 compatibility * Should fix older Puppet on systems that have 1.8.7 Ruby (RHEL6/CentOS6) * We're not officially supporting 1.8.7 as it's EOL, but since this is a minor change, isn't too much of a maintenance cost, lets do it! 💃