Skip to content
Snippets Groups Projects
Commit 02b4634c authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Add option to specify redis database. Fixes #67

parent 2403682a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -38,6 +38,7 @@ default['gitlab']['shell_path'] = "#{node['gitlab']['home']}/gitlab-shell"
default['gitlab']['redis_path'] = "/usr/local/bin/redis-cli"
default['gitlab']['redis_host'] = "127.0.0.1"
default['gitlab']['redis_port'] = "6379"
default['gitlab']['redis_database'] = nil # Default value is 0
default['gitlab']['namespace'] = "resque:gitlab"
default['gitlab']['self_signed_cert'] = false
 
Loading
Loading
Loading
Loading
@@ -18,6 +18,7 @@ template File.join(gitlab['shell_path'], "config.yml") do
:redis_path => gitlab['redis_path'],
:redis_host => gitlab['redis_host'],
:redis_port => gitlab['redis_port'],
:redis_database => gitlab['redis_database'],
:namespace => gitlab['namespace'],
:self_signed_cert => gitlab['self_signed_cert']
})
Loading
Loading
Loading
Loading
@@ -23,6 +23,7 @@ describe "gitlab::gitlab_shell_install" do
redis_path: "/usr/local/bin/redis-cli",
redis_host: "127.0.0.1",
redis_port: "6379",
redis_database: nil,
namespace: "resque:gitlab",
self_signed_cert: false
}
Loading
Loading
@@ -62,6 +63,7 @@ describe "gitlab::gitlab_shell_install" do
runner = ChefSpec::Runner.new(platform: "ubuntu", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['home'] = "/data/git"
runner.node.set['gitlab']['redis_database'] = 2
runner.converge("gitlab::gitlab_shell_install")
end
 
Loading
Loading
@@ -76,6 +78,7 @@ describe "gitlab::gitlab_shell_install" do
redis_path: "/usr/local/bin/redis-cli",
redis_host: "127.0.0.1",
redis_port: "6379",
redis_database: 2,
namespace: "resque:gitlab",
self_signed_cert: false
}
Loading
Loading
@@ -102,6 +105,7 @@ describe "gitlab::gitlab_shell_install" do
let(:chef_run) do
runner = ChefSpec::Runner.new(platform: "centos", version: version)
runner.node.set['gitlab']['env'] = "production"
runner.node.set['gitlab']['redis_database'] = 3
runner.converge("gitlab::gitlab_shell_install")
end
 
Loading
Loading
@@ -116,6 +120,7 @@ describe "gitlab::gitlab_shell_install" do
redis_path: "/usr/local/bin/redis-cli",
redis_host: "127.0.0.1",
redis_port: "6379",
redis_database: 3,
namespace: "resque:gitlab",
self_signed_cert: false
}
Loading
Loading
@@ -169,6 +174,7 @@ describe "gitlab::gitlab_shell_install" do
redis_path: "/usr/local/bin/redis-cli",
redis_host: "127.0.0.1",
redis_port: "6379",
redis_database: nil,
namespace: "resque:gitlab",
self_signed_cert: false
}
Loading
Loading
Loading
Loading
@@ -29,6 +29,9 @@ redis:
bin: <%= @redis_path %>
host: <%= @redis_host %>
port: <%= @redis_port %>
<% if @redis_database %>
database: <%= @redis_database %>
<% end %>
# socket: /tmp/redis.socket # Only define this if you want to use sockets
namespace: <%= @namespace %>
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment