Version information
This version is compatible with:
- Archlinux , , , ,
This module has been deprecated by its author since Mar 15th 2019.
The author has suggested puppet-redis as its replacement.
Tasks:
- redis_cli
Start using this module
Documentation
Puppet Redis
Build status
Example usage
Standalone
include ::redis
Master node
class { '::redis':
bind => '10.0.1.1',
}
With authentication
class { '::redis':
bind => '10.0.1.1',
masterauth => 'secret',
}
Slave node
class { '::redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
}
With authentication
class { '::redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
masterauth => 'secret',
}
Redis 3.0 Clustering
class { '::redis':
bind => '10.0.1.2',
appendonly => true,
cluster_enabled => true,
cluster_config_file => 'nodes.conf',
cluster_node_timeout => 5000,
}
Manage repositories
Disabled by default but if you really want the module to manage the required repositories you can use this snippet:
class { '::redis':
manage_repo => true,
}
On Ubuntu, "chris-lea/redis-server" ppa repo will be added. You can change it by using ppa_repo parameter:
class { '::redis':
manage_repo => true,
ppa_repo => 'ppa:rwky/redis',
}
Redis Sentinel
Optionally install and configuration a redis-sentinel server.
With default settings:
include ::redis::sentinel
With adjustments:
class { '::redis::sentinel':
master_name => 'cow',
redis_host => '192.168.1.5',
failover_timeout => 30000,
}
redisget()
function
redisget()
takes two or three arguments that are strings. The first is the key
to be looked up, the second is the URL to the Redis service and the
optional third argument is a default value to use if the key is not
found or connection to the Redis service cannot be made.
Example of basic usage.
$version = redisget('version.myapp', 'redis://redis.example.com:6379')
Example with default value specified. This is useful to allow for cached data in case Redis is not available.
$version = redisget('version.myapp', 'redis://redis.example.com:6379', $::myapp_version)
You must have the 'redis' gem installed on your puppet master.
Unit testing
Plain RSpec:
$ rake spec
Using bundle:
$ bundle exec rake spec
Test against a specific Puppet or Facter version:
$ PUPPET_VERSION=3.2.1 bundle update && bundle exec rake spec
$ PUPPET_VERSION=4.10.0 bundle update && bundle exec rake spec
$ FACTER_VERSION=1.6.8 bundle update && bundle exec rake spec
Puppet 3 Support
Puppet 3 is EOL as-of January 2017. The last release of this module that will support Puppet 3.X and earlier will be the 3.X.X module releases.
Module versions from 4.X.X onwards will use Puppet 4 only features and will not work with earlier versions.
We would recommend upgrading your Puppet agent to the latest release, as Puppet 4 comes with a load of awesome new features.
If you're stuck with older Puppet, you could also fork the module from 3.0.0 and use your fork as a Puppet 3 supported version.
Contributing
- Fork it
- Create a feature branch (
git checkout -b my-new-feature
) - Run rspec tests (
bundle exec rake spec
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
Change Log
3.3.0 (2018-06-19)
Closed issues:
- output_buffer_limit_pubsub and output_buffer_limit_slave #263
- Can't release - Require Forge Credential Refresh #262
- Module v3.2.0 not published to forge #255
- Inconsistent sentinel_package_name handling on Debian #253
- No pidfile for sentinel #238
- puppet-redis requires outdated puppetlabs-apt module #232
- Can't use as slave bound to localhost #229
- [Feature Request] Redis::Instance - Set default unixsocket #226
- Travis Forge Password Changed #216
Merged pull requests:
- Bump Version #266 (petems)
- Adds logic for installing redid-sentinel package #254 (petems)
- Update redis mode on wheezy #252 (petems)
- Fix spec for sentinel #251 (petems)
- get rid of getvar_emptystring function #249 (vicinus)
- Added log_level to sentinel. #248 (hp197)
- Adds redis_cli task #245 (petems)
- Bump Puppet version for acceptance to 4.10.8 #244 (petems)
- protected-mode configuration option (Redis 3.2+) #243 (Dan70402)
- Switch to using simp-beaker suites #241 (petems)
- Bumped apt version dependency to version \< 5.0.0 #237 (c4m4)
- Updates for EL6 #236 (petems)
- Pin version of redis gem #235 (petems)
- Added configuration options for client-output-buffer-limit #233 (Mike-Petersen)
- Allow
slaveof
when binding to localhost #231 (joshuaspence) - Fix issues with missing locale for Debian box #224 (petems)
- Instance service improvements #222 (kwevers)
- Make sure the service is en/disabled per user request #221 (kwevers)
- Split Redis instance socket files #220 (kwevers)
- Split Redis workdir #219 (kwevers)
- fix package_ensure version on ubuntu when it is in the 3:3.2.1 format #218 (sp-joseluis-ledesma)
- Split the redis instance logfiles by default #217 (kwevers)
- Use package_ensure if it specifies a version instead of the minimum_version #215 (sp-joseluis-ledesma)
v3.2.0 (2017-07-11)
Implemented enhancements:
- Cluster Support #62
Closed issues:
Merged pull requests:
- updated redis systemd unit file for better use with instances #214 (bostrowski13)
- Updates docker images for CentOS 6 and 7 #213 (petems)
- Update EPEL module #212 (petems)
- Refactor redisget() method #211 (petems)
- Update docs for puppet-strings #206 (petems)
- Add redis::instance defined type #200 (petems)
- Adding note about Puppet 3 support #153 (petems)
v3.1.1 (2017-05-19)
v3.1.0 (2017-05-19)
Implemented enhancements:
Fixed bugs:
- Sort problem in v1.2.4 template #195
Merged pull requests:
- Add an optional third parameter to redisget() to specify a default value #209 (petems)
- Updates docs for puppet functions #208 (petems)
- Add switch to manage File[/var/run/redis] #204 (petems)
- Ignore selinux default context for /etc/systemd/system/redis.service.d #202 (amoralej)
- Make TravisCI push to the Forge #191 (arioch)
v3.0.0 (2017-05-11)
Implemented enhancements:
- Ubuntu 16.04 support? #146
- [Whishlist] Extend ulimit parameter to support limits.conf and systemd #130
- Add overcommit.pp to deal with
Can't save in background: fork: Cannot allocate memory
? #105
Fixed bugs:
- The fix for issue #192 broke service_managed false #197
- Ubuntu 16.04 changed sentinel config filename #175
- sentinel support broken? #166
- Ownership problem with Ubuntu redis-server #150
- Parameters not valid for older Redis in config #111
Merged pull requests:
- Update sort to specify key #199 (petems)
- Adds tests for when Redis service is unmanaged #198 (petems)
- Changing Travis back to Trusty #194 (petems)
- Remove service notification #193 (petems)
- Improves ulimit configuration #192 (petems)
- Updates metadata supported versions #190 (petems)
- Adds tests for Ubuntu 1404 and Trusty package #189 (petems)
- Adds redis::administration class #188 (petems)
- Adds logic for managing redis-sentinel package #187 (petems)
- Bump to version 3.0.0 #186 (petems)
- Moves location of redis-sentinel file #184 (petems)
- (testing) Simplify command run by TravisCI #183 (ghoneycutt)
- Style #182 (ghoneycutt)
- Adds acceptance tests for the redisget() function #181 (petems)
- Add redisget() #179 (ghoneycutt)
- Fixes ordering of Apt repos #178 (petems)
- Add 2.4.10 config file for CentOS 6 #177 (petems)
- Refactoring common code patterns #174 (petems)
- Changes permission on /var/run/ directory #173 (petems)
- Bump Beaker Ruby versions #172 (petems)
- Fixes sentinel installation on Debian flavours #171 (petems)
- Adds vagrant beaker images #170 (petems)
- Adds acceptance test for master/slave testing #168 (petems)
- Renames spec file #165 (petems)
- Adds specific versions to fixtures #164 (petems)
- Changes for RHEL-ish specific configuration #162 (petems)
- Changes CentOS Docker images #160 (petems)
- Updates fact for CentOS 6 #159 (petems)
- Fixes lint arrow errors #158 (petems)
- Fixes ownership issue on Ubuntu #157 (petems)
- README lint #155 (matonb)
- Archlinux: Added tests and update config_dir parameter #149 (bartjanssens92)
- Add CHANGELOG #148 (petems)
- Added Archlinux as supported OS #147 (bartjanssens92)
1.2.4 (2016-12-05)
Implemented enhancements:
- Speed up Travis #118
Fixed bugs:
- Wrong redis.conf after c45049986a7fcb1c9a0591de123c6bf97c761355 #142
- powerstack.org - No longer hosted #103
Closed issues:
- redis.conf under /etc/redis.conf #81
- Add socket option #79
- preinstall.pp fails on CEntOS 6.5 and Puppet Enterprise 2.7. #72
- How do I change from powerstack.org repo if I need to? Should I just edit manifests/preinstall.pp? #68
- puppet-redis || every time when puppet runs, the service restarts #59
- 'manage_repo => true' causes run to fail because add-apt-repository command isn't available #49
Merged pull requests:
- For folks that do not use redis to cache to disk #144 (petems)
- Revert "Changes templates to use scope" #143 (petems)
- Update sentinel.pp #141 (xprntl)
- Manage workdir and permissions #138 (petems)
- Adds minimum versions parameters #137 (petems)
- Adds redis-server version fact #136 (petems)
- adding /var/run/redis for Debian based hosts #135 (petems)
- Refactor unit tests #134 (petems)
- Update acceptance tests #133 (petems)
- Move Repo for RHEL systems to EPEL #127 (petems)
- Fix beaker #126 (petems)
- Speed up Travis even more #125 (petems)
- Add fast finish to Travis #124 (petems)
- Changes package installation #123 (petems)
- Fix Beaker settings #122 (petems)
- Fixes gpg key for DotDeb #121 (petems)
- Sent bind address rebase #120 (petems)
- Changes templates to use scope #119 (petems)
- Add save interval squash #117 (petems)
- FreeBSD fixes #116 (petems)
- Consolidate travis and testing #115 (petems)
- Fix specs #114 (Phil-Friderici)
- Changed default service_hasstatus variable from false to true for Debian params. #106 (mlipiec)
- Remove single quotes around variable #101 (rorybrowne)
1.2.3 (2016-09-19)
Merged pull requests:
- Adds spec for unixsocket and perms #99 (petems)
- Added the ability to configure Unix socket binding #97 (gcelestine)
- Lint and English cleanup in the redis.conf #93 (ryayon)
- Added more configuration options to redis.conf #90 (hanej)
- Make notification of service optional #89 (michaeltchapman)
1.2.2 (2016-03-17)
Closed issues:
- Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type redis #86
- Potential bug:
64min
should read64mb
#73 - Typo on sentinel.pp on if defined #69
- Does't configure EPEL repository on CentOS 7 #61
1.2.1 (2015-12-09)
Merged pull requests:
1.2.0 (2015-12-03)
Closed issues:
- $daemonize is defaulted to 'false' on Redhat OS, which causes service command to hang #64
- Redis service start fail on Debian stable (Wheezy 7.0) #52
Merged pull requests:
- Redis Cluster 3.0 Feature #71 (claudio-walser)
- Fix Support for EL7 and Puppet 4 #66 (trlinkin)
- Add a option to override the service provider #63 (nerzhul)
- add support for hz option #50 (nerzhul)
1.1.3 (2015-08-19)
Closed issues:
- Unable to bring in as a dependency #47
Merged pull requests:
1.1.2 (2015-08-06)
Closed issues:
- Error on CentOS 7 when manage_repo: true #44
1.1.1 (2015-08-04)
Closed issues:
- Commit edd7cb55931fe0336bfee475c738ac4b91308f98 seems to be pasting undef params into redis.conf #41
Merged pull requests:
- Save db to disk #46 (adrian-balcan-ygt)
- Use puppetlabs_spec_helper for testing #45 (jlyheden)
- copy variables used in template to local scope #42 (eoly)
1.1.0 (2015-06-22)
Merged pull requests:
1.0.7 (2015-06-02)
Fixed bugs:
- Sentinel init/upstart file doesn't exist #18
Closed issues:
- Default config_owner of redis #39
- Duplicate decleration Package[redis] when both include redis and redis::sentinel #36
- Does not work with Debian 7.8 with redis version 2.4.14-1 #24
Merged pull requests:
- Fixed duplicate declaration of package #38 (raiblue)
- fix issue with params.pp with strict_variables enabled #35 (eoly)
- Enable to not manage the Redis service #34 (Spredzy)
- Suse conf file fix #33 (christofhaerens)
- added Suse osfamily #32 (christofhaerens)
1.0.6 (2015-05-05)
1.0.5 (2015-03-30)
Merged pull requests:
- adding anchors to make the ensure_resource behaive #30 (shawn-sterling)
- Sentinel auth pass #29 (Vincent--)
- More specific include and class chaining. #27 (systemsathomesdotcom)
- Support notification script #26 (Spredzy)
- Add basic FreeBSD support #25 (arioch)
1.0.4 (2015-01-19)
Merged pull requests:
- Add an initscript for sentinel on apt-based systems #23 (cdent)
- fix trailing comma in metadata.json #22 (fivetanley)
- metadata: add stdlib as a requirement #21 (EmilienM)
- Avoid resource dependency when having both Redis Server & Sentinel #20 (EmilienM)
- Make config file owner dependency on redis package explicit #17 (cdent)
- Make sentinel maninfest ensure the redis package #16 (cdent)
- Ensure the permissions of a new redis-sentinel.conf #15 (cdent)
1.0.3 (2015-01-05)
Implemented enhancements:
- Feature Request: support for redis-sentinel #13
1.0.2 (2014-12-17)
Merged pull requests:
1.0.1 (2014-10-22)
1.0.0 (2014-10-22)
0.0.10 (2014-08-29)
0.0.9 (2014-08-29)
Closed issues:
- Amazon AMI Installation/Initialization Issue #11
Merged pull requests:
0.0.8 (2014-03-27)
Closed issues:
Merged pull requests:
- Syslog #9 (zebzeb)
- add extra config file parameter #8 (zebzeb)
- pass conf template as a parameter #7 (zebzeb)
0.0.7 (2014-01-13)
Merged pull requests:
0.0.6 (2013-08-07)
Merged pull requests:
0.0.5 (2013-07-22)
Closed issues:
- Redis config 2.6 not compatible with EPELs 2.4 on Centos6 #2
0.0.4 (2013-07-17)
Closed issues:
- Default config path wrong for RedHat #1
0.0.3 (2013-07-08)
0.0.2 (2013-06-19)
0.0.1 (2013-06-19)
* This Change Log was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/apt (>= 2.3.0 <5.0.0)
- puppetlabs/stdlib (>= 1.0.2 <5.0.0)
- stahnma/epel (>= 1.2.2 <2.0.0)
- herculesteam/augeasproviders_sysctl (>=2.1.0 < 3.0.0)
- herculesteam/augeasproviders_core (>=2.1.0 < 3.0.0)
Copyright (C) 2012 Tom De Vylder Copyright (C) 2017 Garrett Honeycutt <code@garretthoneycutt.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.