Set up Redis using the latest version of redisio
This replaces the deprecated redis cookbook. Compiles the latest version of Redis, currently 7.0.11 Refs #488
This commit is contained in:
20
site-cookbooks/kosmos_redis/LICENSE
Normal file
20
site-cookbooks/kosmos_redis/LICENSE
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2019 Kosmos Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
5
site-cookbooks/kosmos_redis/README.md
Normal file
5
site-cookbooks/kosmos_redis/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
kosmos_redis Cookbook
|
||||
=====================
|
||||
|
||||
redis wrapper cookbook
|
||||
Sets up the Redis version set in the default attributes
|
||||
1
site-cookbooks/kosmos_redis/attributes/default.rb
Normal file
1
site-cookbooks/kosmos_redis/attributes/default.rb
Normal file
@@ -0,0 +1 @@
|
||||
node.override["redisio"]["version"] = "7.0.11"
|
||||
10
site-cookbooks/kosmos_redis/metadata.rb
Normal file
10
site-cookbooks/kosmos_redis/metadata.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
name 'kosmos_redis'
|
||||
maintainer 'Kosmos'
|
||||
maintainer_email 'mail@kosmos.org'
|
||||
license 'MIT'
|
||||
description 'redis wrapper cookbook'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '0.2.0'
|
||||
|
||||
depends 'redisio'
|
||||
depends 'backup'
|
||||
16
site-cookbooks/kosmos_redis/recipes/default.rb
Normal file
16
site-cookbooks/kosmos_redis/recipes/default.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Cookbook Name:: kosmos_redis
|
||||
# Recipe:: default
|
||||
#
|
||||
|
||||
include_recipe 'redisio::default'
|
||||
include_recipe 'redisio::enable'
|
||||
|
||||
unless node.chef_environment == "development"
|
||||
# Backup the databases to S3
|
||||
databases = node['redisio']['servers'].map do |server, _|
|
||||
"dump-#{server['port']}"
|
||||
end
|
||||
node.override["backup"]["redis"]["databases"] = databases
|
||||
include_recipe "backup"
|
||||
end
|
||||
Reference in New Issue
Block a user