Merge branch 'gitlab-git-http-server-fixes' into 'master'

Gitlab git http server fixes

- git_data_dir support
- enable gitlab-git-http-server by default
- bump gitlab-git-http-server to 0.2.9 (profiler support)

See merge request !450
This commit is contained in:
Marin Jankovski 2015-08-31 15:31:57 +00:00
commit e6fa1b77c9
5 changed files with 5 additions and 6 deletions

View File

@ -16,7 +16,7 @@
#
name "gitlab-git-http-server"
default_version "c08b8fae49c41563aa7c7ad8a319841ad7e6be9a" # 0.2.8
default_version "ffd46d3adeb1ebaf88eaedf4d4845834cfe8b385" # 0.2.9
source :git => "https://gitlab.com/gitlab-org/gitlab-git-http-server.git"

View File

@ -328,13 +328,14 @@ default['gitlab']['web-server']['external_users'] = []
# gitlab-git-http-server
####
default['gitlab']['gitlab-git-http-server']['enable'] = false
default['gitlab']['gitlab-git-http-server']['enable'] = true
default['gitlab']['gitlab-git-http-server']['ha'] = false
default['gitlab']['gitlab-git-http-server']['repo_root'] = "/var/opt/gitlab/git-data/repositories"
default['gitlab']['gitlab-git-http-server']['listen_network'] = "unix"
default['gitlab']['gitlab-git-http-server']['listen_umask'] = 000
default['gitlab']['gitlab-git-http-server']['listen_addr'] = "/var/opt/gitlab/gitlab-git-http-server/socket"
default['gitlab']['gitlab-git-http-server']['auth_backend'] = "http://localhost:8080"
default['gitlab']['gitlab-git-http-server']['pprof_listen_addr'] = "''" # put an empty string on the command line
default['gitlab']['gitlab-git-http-server']['dir'] = "/var/opt/gitlab/gitlab-git-http-server"
default['gitlab']['gitlab-git-http-server']['log_dir'] = "/var/log/gitlab/gitlab-git-http-server"

View File

@ -130,6 +130,7 @@ module Gitlab
Gitlab['gitlab_shell']['git_data_directory'] ||= git_data_dir
Gitlab['gitlab_rails']['gitlab_shell_repos_path'] ||= File.join(git_data_dir, "repositories")
Gitlab['gitlab_rails']['satellites_path'] ||= File.join(git_data_dir, "gitlab-satellites")
Gitlab['gitlab_git_http_server']['repo_root'] ||= File.join(git_data_dir, "repositories")
end
def parse_udp_log_shipping

View File

@ -34,11 +34,9 @@ upstream gitlab {
server unix:<%= @socket %> fail_timeout=0;
}
<% if node['gitlab']['gitlab-git-http-server']['enable'] %>
upstream gitlab-git-http-server {
server unix:<%= node['gitlab']['gitlab-git-http-server']['listen_addr'] %>;
}
<% end %>
<% if @https && @redirect_http_to_https %>
## Redirects all HTTP traffic to the HTTPS host
@ -151,7 +149,6 @@ server {
proxy_pass http://gitlab;
}
<% if node['gitlab']['gitlab-git-http-server']['enable'] %>
location ~ [-\/\w\.]+\.git\/ {
## If you use HTTPS make sure you disable gzip compression
## to be safe against BREACH attack.
@ -173,7 +170,6 @@ server {
proxy_pass http://gitlab-git-http-server;
}
<% end %>
## Enable gzip compression as per rails guide:
## http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression

View File

@ -18,4 +18,5 @@ exec chpst -P \
-listenUmask <%= node['gitlab']['gitlab-git-http-server']['listen_umask'] %> \
-listenAddr <%= node['gitlab']['gitlab-git-http-server']['listen_addr'] %> \
-authBackend <%= node['gitlab']['gitlab-git-http-server']['auth_backend'] %> \
-pprofListenAddr <%= node['gitlab']['gitlab-git-http-server']['pprof_listen_addr'] %> \
<%= node['gitlab']['gitlab-git-http-server']['repo_root'] %>