Redis Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. Learn More at the introduction.
This cookbook provides a method to host a dedicated redis instance. This recipe should NOT be used on your Database instance as it is not designed for that instance. Additionally it will not change nor modify your database instance in anyway what so ever.
When the environment variable EY_REDIS_ENABLED
is set to "true", this recipe will be enabled and setup up Redis on a utility instance named redis
by default.
To install a version of Redis other than the default on Ubuntu 18.04 (4.0.9),
the environment variable EY_REDIS_VERSION
allows setting a custom version
(available from https://github.com/antirez/redis/releases).
Since this is an optional recipe, it can be installed by simply including it via a depends
in your ey-custom/metadata.rb
file and an include_recipe
in the appropriate hook file. For more details on optional recipes see the [redis example]. (Yes, how convenient that the example is for the exact recipe you wanted)
This recipe will only activate on instances with the exact name redis
.
- 1+ utility instances
- over-commit is enabled by default to ensure the least amount of problems saving your database.
- 64-bit is required for storing over 2gigabytes worth of keys.
- /etc/hosts mapping for
redis-instance
so that a hard config can be used to connect
This cookbook does not automate nor facilitate any backup method currently. By default there is a snapshot enabled for your environment and that should provide a viable backup to recover from. If you have any backup concerns open a ticket with our Support Team.
A large portion of the defaults of this recipe have been moved to a attribute file; if you need to change how often you save; review the attribute file and modify.
This recipe installs Redis 4.0.9, which is the Ubuntu 18.04 default version.
To install a different version of Redis, set :install_from_source
to true,
override the :version
attribute, and set the correct :download_url
.
You can do this with a new file in cooobooks/redis/attributes
such as overrides.rb
which sets the attribute like so:
node['redis']['install_from_source'] = true
node['redis']['version'] = '5.0-r6'
node['redis']['download_url'] = "https://github.com/antirez/redis/archive/#{node['redis']['version']}.tar.gz"
- Please be aware these are default config files and will likely need to be updated :)
- This recipe will put in place a
redis.yml
on/data/{app_name}/shared/config/
.
- irc://irc.freenode.net/#redis
- This Github repository.
- This Cookbook provides a technology that is listed in the Engine Yard Technology Stack