From 16a49e0f4702845b8135af13b1a1ffafeb535454 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Thu, 23 Apr 2015 18:53:10 -0300 Subject: [PATCH] Configuring gitlab to use remote redis --- cookbooks/gitlab/recipes/default.rb | 14 +++++++++----- cookbooks/gitlab/templates/resque.yml.erb | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 cookbooks/gitlab/templates/resque.yml.erb diff --git a/cookbooks/gitlab/recipes/default.rb b/cookbooks/gitlab/recipes/default.rb index bc0cc4a..8da5920 100644 --- a/cookbooks/gitlab/recipes/default.rb +++ b/cookbooks/gitlab/recipes/default.rb @@ -5,11 +5,6 @@ if node['platform'] == 'centos' end end -package 'redis' -service 'redis' do - action [:enable, :start] -end - package 'gitlab' template '/etc/gitlab/database.yml' do @@ -40,6 +35,15 @@ template '/etc/gitlab-shell/config.yml' do notifies :restart, 'service[gitlab]' end +# gitlab redis configuration +template '/usr/lib/gitlab/config/resque.yml' do + owner 'root' + group 'root' + mode 0644 + + notifies :restart, 'service[gitlab]' +end + #################################################### # Run under /gitlab #################################################### diff --git a/cookbooks/gitlab/templates/resque.yml.erb b/cookbooks/gitlab/templates/resque.yml.erb new file mode 100644 index 0000000..1c89b77 --- /dev/null +++ b/cookbooks/gitlab/templates/resque.yml.erb @@ -0,0 +1 @@ +production: redis://<%= node['peers']['database'] %>:6379 -- libgit2 0.21.2