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:
@@ -1,9 +1,9 @@
|
||||
packages_to_install = case node['platform']
|
||||
when 'debian', 'ubuntu'
|
||||
packages_to_install = case node['platform_family']
|
||||
when 'debian'
|
||||
%w(
|
||||
tar
|
||||
)
|
||||
when 'redhat', 'centos', 'fedora', 'scientific', 'suse', 'amazon'
|
||||
when 'rhel', 'fedora'
|
||||
%w(
|
||||
tar
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
include_recipe 'redisio::default'
|
||||
include_recipe 'ulimit::default'
|
||||
include_recipe 'redisio::ulimit'
|
||||
|
||||
redis = node['redisio']
|
||||
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
# debian 6.0.x fails the build_essential recipe without an apt-get update prior to run
|
||||
if platform?('debian', 'ubuntu')
|
||||
execute 'apt-get-update-periodic' do
|
||||
command 'apt-get update'
|
||||
ignore_failure true
|
||||
only_if do
|
||||
!File.exist?('/var/lib/apt/periodic/update-success-stamp') ||
|
||||
File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - 86400
|
||||
end
|
||||
end
|
||||
end
|
||||
apt_update
|
||||
|
||||
unless node['redisio']['package_install']
|
||||
include_recipe 'redisio::_install_prereqs'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# disable the default OS redis init script
|
||||
service_name = case node['platform']
|
||||
when 'debian', 'ubuntu'
|
||||
service_name = case node['platform_family']
|
||||
when 'debian'
|
||||
'redis-server'
|
||||
when 'redhat', 'centos', 'fedora', 'scientific', 'suse', 'amazon'
|
||||
when 'rhel', 'fedora'
|
||||
'redis'
|
||||
end
|
||||
|
||||
|
||||
@@ -19,4 +19,4 @@ else
|
||||
end
|
||||
end
|
||||
|
||||
include_recipe 'ulimit::default'
|
||||
include_recipe 'redisio::ulimit'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
include_recipe 'redisio::_install_prereqs'
|
||||
include_recipe 'redisio::install'
|
||||
include_recipe 'ulimit::default'
|
||||
include_recipe 'redisio::ulimit'
|
||||
|
||||
redis = node['redisio']
|
||||
|
||||
|
||||
25
cookbooks/redisio/recipes/ulimit.rb
Normal file
25
cookbooks/redisio/recipes/ulimit.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
# Pulled from the now replaced ulimit cookbook
|
||||
# TODO: find a more tidy way to do this
|
||||
ulimit = node['ulimit']
|
||||
|
||||
if platform_family?('debian')
|
||||
template '/etc/pam.d/su' do
|
||||
cookbook ulimit['pam_su_template_cookbook']
|
||||
end
|
||||
|
||||
cookbook_file '/etc/pam.d/sudo' do
|
||||
cookbook node['ulimit']['ulimit_overriding_sudo_file_cookbook']
|
||||
source node['ulimit']['ulimit_overriding_sudo_file_name']
|
||||
mode '0644'
|
||||
end
|
||||
end
|
||||
|
||||
if ulimit.key?('users')
|
||||
ulimit['users'].each do |user, attributes|
|
||||
user_ulimit user do
|
||||
attributes.each do |a, v|
|
||||
send(a.to_sym, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user