Commit abc512ab authored by Marin Jankovski's avatar Marin Jankovski

Extract redis instalation in a separate recipe.

parent 3a620288
......@@ -14,22 +14,6 @@ end
include_recipe "apt" if platform?("ubuntu", "debian")
include_recipe "yum-epel" if platform_family?("rhel")
include_recipe "gitlab::git"
include_recipe "redisio::install"
directory "create_redis_socket_dir" do
path gitlab['redis_socket_directory']
owner node['redisio']['default_settings']['user']
group gitlab['group']
mode 0750
action :create
end
include_recipe "redisio::enable"
service "redis#{gitlab['redis_port']}" do
action :nothing
subscribes :restart, "directory['create_redis_socket_dir']", :immediately
end
## Install the required packages.
gitlab['packages'].each do |pkg|
......
#
# Cookbook Name:: gitlab
# Recipe:: redis
#
gitlab = node['gitlab']
include_recipe "redisio::install"
directory gitlab['redis_socket_directory'] do
path gitlab['redis_socket_directory']
owner node['redisio']['default_settings']['user']
group gitlab['group']
mode 0750
action :create
end
include_recipe "redisio::enable"
service "redis#{gitlab['redis_port']}" do
action :nothing
subscribes :restart, "directory[#{gitlab['redis_socket_directory']}]", :immediately
end
......@@ -16,5 +16,9 @@ include_recipe "gitlab::ruby" if gitlab['compile_ruby']
# Setup GitLab user
include_recipe "gitlab::users"
# Setup Redis
include_recipe "gitlab::redis"
# Setup chosen database
include_recipe "gitlab::database_#{gitlab['database_adapter']}"
......@@ -15,4 +15,5 @@ service "gitlab" do
action :nothing
subscribes :start, "execute[rake db:migrate]"
subscribes :reload, "execute[rake assets:precompile]"
subscribes :restart, "directory[#{gitlab['redis_socket_directory']}]"
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment