Commit 477a7870 authored by Marin Jankovski's avatar Marin Jankovski

Use a custom dir for redis socket.

parent fc6ee3c2
......@@ -33,10 +33,13 @@ default['gitlab']['satellites_timeout'] = 30
default['gitlab']['shell_repository'] = "https://github.com/gitlabhq/gitlab-shell.git"
# GitLab shell configuration
include_attribute 'redisio'
default['gitlab']['repos_path'] = "#{node['gitlab']['home']}/repositories"
default['gitlab']['shell_path'] = "#{node['gitlab']['home']}/gitlab-shell"
default['gitlab']['redis_path'] = "/usr/local/bin/redis-cli"
default['gitlab']['redis_unixsocket'] = "/var/lib/redis/redis.sock" # To disable redis using Unix sockets set this value to nil
default['gitlab']['redis_socket_directory'] = "#{default['redisio']['base_piddir']}/sockets"
default['gitlab']['redis_unixsocket'] = "#{default['gitlab']['redis_socket_directory']}/redis.sock" # To disable redis using Unix sockets set this value to nil
if node['gitlab']['redis_unixsocket']
default['gitlab']['redis_port'] = "0"
default['gitlab']['redis_unixsocketperms'] = "0770"
......@@ -50,7 +53,6 @@ default['gitlab']['namespace'] = "resque:gitlab"
default['gitlab']['self_signed_cert'] = false
# Redis
include_attribute 'redisio'
default['gitlab']['redis']['configure'] = true
if node['gitlab']['redis']['configure']
default['redisio']['servers'] = [{'port' => node['gitlab']['redis_port'], 'address' => node['gitlab']['redis_host']}]
......
......@@ -16,13 +16,13 @@ include_recipe "yum-epel" if platform_family?("rhel")
include_recipe "gitlab::git"
include_recipe "redisio::install"
file "#{gitlab['redis_unixsocket']}" do
directory "make the redis socket directory" do
path gitlab['redis_socket_directory']
owner node['redisio']['default_settings']['user']
group node['redisio']['default_settings']['group']
mode gitlab['redis_unixsocketperms']
action :create_if_missing
notifies :reload, "service[redis#{gitlab['redis_port']}]", :immediately
not_if gitlab['redis_unixsocket'].nil?
group gitlab['group']
mode 0750
notifies :restart, "service[redis#{gitlab['redis_port']}]", :immediately
action :create
end
include_recipe "redisio::enable"
......
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