<commit_before>**Please read the changelog when upgrading from the 1.x series to the 2.x series**

![cookbook version](http://img.shields.io/badge/cookbook%20version-2.2.4-blue.svg)
Description
===========

Website:: https://github.com/brianbianco/redisio

Installs and configures Redis server instances

Requirements
============

This cookbook builds redis from source, so it should work on any architecture for the supported distributions.  Init scripts are installed into /etc/init.d/

It depends on the ulimit cookbook: https://github.com/bmhatfield/chef-ulimit and the build-essentials cookbook: https://github.com/opscode-cookbooks/build-essential


Platforms
---------

* Debian, Ubuntu
* CentOS, Red Hat, Fedora, Scientific Linux

Testing
-------
This cookbook is tested with rspec/chefspec and test-kitchen/serverspec.  Run `bundle install` to install required gems.

* rake spec
* rake integration
* knife cookbook test redisio -o ../
* kitchen test

Tested on:

* Ubuntu 12.04
* Debian 6.0.8
* Fedora 20
* Centos 6.4

Usage
=====

The redisio cookbook contains LWRP for installing, configuring and managing redis and redis_sentinel.

The install recipe will only build, compile and install redis. The configure recipe will configure redis and setup service resources.  These resources will be named for the port of the redis server, unless a "name" attribute was specified.  Example names would be: service["redis6379"] or service["redismaster"] if the name attribute was "master".

The most common use case for the redisio cookbook is to use the default recipe, followed by the enable recipe.  

Another common use case is to use the default, and then call the service resources created by it from another cookbook.  

It is important to note that changing the configuration options of redis does not make them take effect on the next chef run.  Due to how redis works, you cannot reload a configuration without restarting the redis service.  Redis does not offer a reload option, in order to have new options be used redis must be stopped and started.

You should make sure to set the ulimit for the user you want to run redis as to be higher than the max connections you allow.

The disable recipe just stops redis and removes it from run levels.

The cookbook also contains a recipe to allow for the installation of the redis ruby gem.

Redis-sentinel will write configuration and state data back into its configuration file.  This creates obvious problems when that config is managed by chef.  There is an attribute set to true which controls if chef manages the redis-sentinel config.  By default chef will write out this config file and manage it.  If deploying sentenel it is recommened that you set the node[:redisio][:sentinel][:manage_config] to false allowing chef to write out the initial config and then allow redis-sentiniel to manage.  If running sentinel it is only advices to have node[:redisio][:sentinel][:manage_config] = true when you are pushing new changes to the config file as it will create a flapping state between chef and sentinel when sentinel writes out state to the file.

Recipes
-------

* configure - This recipe is used to configure redis.
* default - This is used to install the pre-requisites for building redis, and to make the LWRPs available
* disable - This recipe can be used to disable the redis service and remove it from runlevels
* enable - This recipe can be used to enable the redis services and add it to runlevels
* install - This recipe is used to install redis.
* redis_gem - This recipe can be used to install the redis ruby gem
* uninstall - This recipe can be used to remove the configuration files and redis binaries
* sentinel - This recipe can be used to install and configure sentinel
* sentinel_enable - This recipe can be used to enable the sentinel service(s)
<commit_msg>remove uninstall recipe from readme.<commit_after>**Please read the changelog when upgrading from the 1.x series to the 2.x series**

![cookbook version](http://img.shields.io/badge/cookbook%20version-2.2.4-blue.svg)
Description
===========

Website:: https://github.com/brianbianco/redisio

Installs and configures Redis server instances

Requirements
============

This cookbook builds redis from source, so it should work on any architecture for the supported distributions.  Init scripts are installed into /etc/init.d/

It depends on the ulimit cookbook: https://github.com/bmhatfield/chef-ulimit and the build-essentials cookbook: https://github.com/opscode-cookbooks/build-essential


Platforms
---------

* Debian, Ubuntu
* CentOS, Red Hat, Fedora, Scientific Linux

Testing
-------
This cookbook is tested with rspec/chefspec and test-kitchen/serverspec.  Run `bundle install` to install required gems.

* rake spec
* rake integration
* knife cookbook test redisio -o ../
* kitchen test

Tested on:

* Ubuntu 12.04
* Debian 6.0.8
* Fedora 20
* Centos 6.4

Usage
=====

The redisio cookbook contains LWRP for installing, configuring and managing redis and redis_sentinel.

The install recipe will only build, compile and install redis. The configure recipe will configure redis and setup service resources.  These resources will be named for the port of the redis server, unless a "name" attribute was specified.  Example names would be: service["redis6379"] or service["redismaster"] if the name attribute was "master".

The most common use case for the redisio cookbook is to use the default recipe, followed by the enable recipe.  

Another common use case is to use the default, and then call the service resources created by it from another cookbook.  

It is important to note that changing the configuration options of redis does not make them take effect on the next chef run.  Due to how redis works, you cannot reload a configuration without restarting the redis service.  Redis does not offer a reload option, in order to have new options be used redis must be stopped and started.

You should make sure to set the ulimit for the user you want to run redis as to be higher than the max connections you allow.

The disable recipe just stops redis and removes it from run levels.

The cookbook also contains a recipe to allow for the installation of the redis ruby gem.

Redis-sentinel will write configuration and state data back into its configuration file.  This creates obvious problems when that config is managed by chef.  There is an attribute set to true which controls if chef manages the redis-sentinel config.  By default chef will write out this config file and manage it.  If deploying sentenel it is recommened that you set the node[:redisio][:sentinel][:manage_config] to false allowing chef to write out the initial config and then allow redis-sentiniel to manage.  If running sentinel it is only advices to have node[:redisio][:sentinel][:manage_config] = true when you are pushing new changes to the config file as it will create a flapping state between chef and sentinel when sentinel writes out state to the file.

Recipes
-------

* configure - This recipe is used to configure redis.
* default - This is used to install the pre-requisites for building redis, and to make the LWRPs available
* disable - This recipe can be used to disable the redis service and remove it from runlevels
* enable - This recipe can be used to enable the redis services and add it to runlevels
* install - This recipe is used to install redis.
* redis_gem - This recipe can be used to install the redis ruby gem
* sentinel - This recipe can be used to install and configure sentinel
* sentinel_enable - This recipe can be used to enable the sentinel service(s)

{'fraction_non_alphanumeric': 0.05886208704771893, 'fraction_numerical': 0.0057682223387519665, 'mean_word_length': 4.193328795098707, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2291092', 'n_tokens_mistral': 2065, 'n_tokens_neox': 1951, 'n_words': 1106}