Merge branch 'gitlab_shell_configuration_options' into 'master'

Gitlab shell configuration options

Fixes #291

`http_settings` has a default value of `{}` in gitlab-shell and `self_signed_cert` is [only used in if statement](https://gitlab.com/gitlab-org/gitlab-shell/blob/master/lib/gitlab_net.rb#L57).

`audit_usernames` and `log_level` all have default values in gitlab-shell.

See merge request !252
This commit is contained in:
Marin Jankovski 2014-11-25 12:48:07 +00:00
commit 5e4310442a
3 changed files with 11 additions and 4 deletions

View File

@ -198,7 +198,10 @@ default['gitlab']['sidekiq']['shutdown_timeout'] = 4
# gitlab-shell
###
default['gitlab']['gitlab-shell']['log_directory'] = "/var/log/gitlab/gitlab-shell/"
default['gitlab']['gitlab-shell']['log_level'] = nil
default['gitlab']['gitlab-shell']['audit_usernames'] = nil
default['gitlab']['gitlab-shell']['git_data_directory'] = "/var/opt/gitlab/git-data"
default['gitlab']['gitlab-shell']['http_settings'] = nil
###

View File

@ -94,7 +94,10 @@ template_symlink File.join(gitlab_shell_var_dir, "config.yml") do
:redis_host => node['gitlab']['gitlab-rails']['redis_host'],
:redis_port => redis_port,
:redis_socket => redis_socket,
:log_file => File.join(log_directory, "gitlab-shell.log")
:log_file => File.join(log_directory, "gitlab-shell.log"),
:log_level => node['gitlab']['gitlab-shell']['log_level'],
:audit_usernames => node['gitlab']['gitlab-shell']['audit_usernames'],
:http_settings => node['gitlab']['gitlab-shell']['http_settings']
)
end

View File

@ -9,11 +9,12 @@ user: <%= @user %>
gitlab_url: "<%= @api_url %>"
http_settings:
<%= @http_settings.to_json if @http_settings %>
# user: someone
# password: somepass
# ca_file: /etc/ssl/cert.pem
# ca_path: /etc/pki/tls/certs
self_signed_cert: false
# self_signed_cert: false
# Repositories path
# Give the canonicalized absolute pathname,
@ -40,9 +41,9 @@ redis:
log_file: "<%= @log_file %>"
# Log level. INFO by default
log_level: INFO
log_level: <%= @log_level %>
# Audit usernames.
# Set to true to see real usernames in the logs instead of key ids, which is easier to follow, but
# incurs an extra API call on every gitlab-shell command.
audit_usernames: false
audit_usernames: <%= @audit_usernames %>