Enable Gitaly (9.0)
This cookbook diff against a recent nightly shows how it works, roughly.
diff --git a/gitlab/attributes/default.rb b/gitlab/attributes/default.rb
index 605c06a..ca9c74c 100644
--- a/gitlab/attributes/default.rb
+++ b/gitlab/attributes/default.rb
@@ -467,7 +467,7 @@ default['gitlab']['web-server']['external_users'] = []
####
# gitaly
####
-default['gitlab']['gitaly']['enable'] = false
+default['gitlab']['gitaly']['enable'] = true
default['gitlab']['gitaly']['ha'] = false
default['gitlab']['gitaly']['dir'] = "/var/opt/gitlab/gitaly"
default['gitlab']['gitaly']['log_directory'] = "/var/log/gitlab/gitaly"
diff --git a/gitlab/recipes/gitaly.rb b/gitlab/recipes/gitaly.rb
index c8aeb3e..0074998 100644
--- a/gitlab/recipes/gitaly.rb
+++ b/gitlab/recipes/gitaly.rb
@@ -32,8 +32,11 @@ directory log_directory do
recursive true
end
+env = node['gitlab']['gitaly']['env'].to_hash
+env['GITALY_SOCKET_PATH'] = '/var/opt/gitlab/gitaly/gitaly.socket'
+
env_dir env_directory do
- variables node['gitlab']['gitaly']['env']
+ variables env
restarts ["service[gitaly]"]
end
diff --git a/gitlab/templates/default/gitlab.yml.erb b/gitlab/templates/default/gitlab.yml.erb
index 082cd1e..fc4dfa3 100644
--- a/gitlab/templates/default/gitlab.yml.erb
+++ b/gitlab/templates/default/gitlab.yml.erb
@@ -412,6 +412,9 @@ production: &base
# 5. Extra customization
# ==========================
+ gitaly:
+ socket_path: /var/opt/gitlab/gitaly/gitaly.socket
+
extra:
<% if @extra_google_analytics_id %>
## Google analytics. Uncomment if you want it
I am not suggesting we hard-code the socket path ;) This just shows how it works.
The 'gitaly' section is being added to gitlab.yml in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9858