Commit 64e2d666 authored by Kirill Smelkov's avatar Kirill Smelkov

gitlab: Sync upstream configs from omnibus-gitlab 8.7.9+ce.1-0-gf589ad7

Like f6f97d72 - pristine copy from omnibus-gitlab 8.7.9+ce.1-0-gf589ad7

Changes are:

    - database.yml.erb

      * db_sslca option to specify CA for cases when DB is accessed via
        SSL (we do not need it as we access DB over unix:// only)

    - gitconfig.erb

      * turns gc.auto=0

        This is questionable to me. What they needed is to adjust
        warning reporting in git, not completely disable gc.auto and control it
        with their hands from rails.

        context: https://gitlab.com/gitlab-org/gitlab-ce/issues/14357

    - gitlab-rails-config.ru.erb removed

      with unicorn OOM killer settings moved to unicorn.rb. See:

      https://gitlab.com/gitlab-org/omnibus-gitlab/commit/cfbe6c55
      https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/672

    - gitlab.yml.erb

      * +geo_bulk_notify_worker (EE only, we do not use gitlab geo)
      * +repository_archive_cache_worker.cron   (gitlab-ce defaults to "0 * * * *")
        https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3663
      * +update_all_remote_mirrors_worker.cron  (EE only ?)
      * +omniauth.external_providers (we do not use omniauth)
      * +trusted_proxies

        this adds ability to let gitlab know trusted proxies addresses
        from which it can get and trust things like X-Forwarded-For and the
        like.

    - nginx-gitlab-http.conf.erb

      * add support for using nginx's realip module
        (http://nginx.org/en/docs/http/ngx_http_realip_module.html) for
        configuring trusted proxies and letting requests from them to
        pass through nginx with e.g. X-Forwarded-For header.

    - smtp_settings.rb.erb

      * +ssl option

        https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/730

    - unicorn.rb: see above about "gitlab-rails-config.ru.erb removed"

The following files stay the same:

    - gitlab-shell-config.yml.erb
    - nginx.conf.erb
    - rack_attack.rb.erb
    - resque.yml.erb
parent f6f97d72
...@@ -14,4 +14,5 @@ production: ...@@ -14,4 +14,5 @@ production:
port: <%= @db_port %> port: <%= @db_port %>
socket: <%= single_quote(@db_socket) %> socket: <%= single_quote(@db_socket) %>
sslmode: <%= single_quote(@db_sslmode) %> sslmode: <%= single_quote(@db_sslmode) %>
sslrootcert: <%= single_quote(@db_sslrootcert) %> sslrootcert: <%= single_quote(@db_sslrootcert) || single_quote(@db_sslca) %>
sslca: <%= single_quote(@db_sslca) || single_quote(@db_sslrootcert) %>
...@@ -7,3 +7,5 @@ ...@@ -7,3 +7,5 @@
email = <%= node['gitlab']['user']['git_user_email'] %> email = <%= node['gitlab']['user']['git_user_email'] %>
[core] [core]
autocrlf = input autocrlf = input
[gc]
auto = 0
# This file is used by Rack-based servers to start the application.
if defined?(Unicorn)
require 'unicorn'
if ENV['RAILS_ENV'] == 'production' || ENV['RAILS_ENV'] == 'staging'
# Unicorn self-process killer
require 'unicorn/worker_killer'
# Max memory size (RSS) per worker
use Unicorn::WorkerKiller::Oom, (<%= @worker_memory_limit_min %>), (<%= @worker_memory_limit_max %>)
end
end
require ::File.expand_path('../config/environment', __FILE__)
map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
run Gitlab::Application
end
...@@ -23,6 +23,14 @@ production: &base ...@@ -23,6 +23,14 @@ production: &base
# other files that need to be changed for relative url support # other files that need to be changed for relative url support
relative_url_root: <%= @gitlab_relative_url %> relative_url_root: <%= @gitlab_relative_url %>
# Trusted Proxies
# Customize if you have GitLab behind a reverse proxy which is running on a different machine.
# Add the IP address for your reverse proxy to the list, otherwise users will appear signed in from that address.
trusted_proxies:
<% @trusted_proxies.each do |proxy| %>
- <%= proxy %>
<% end %>
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git') # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
user: <%= node['gitlab']['user']['username'] %> user: <%= node['gitlab']['user']['username'] %>
...@@ -82,7 +90,7 @@ production: &base ...@@ -82,7 +90,7 @@ production: &base
enabled: <%= @incoming_email_enabled %> enabled: <%= @incoming_email_enabled %>
# The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to. # The email address including the `%{key}` placeholder that will be replaced to reference the item being replied to.
# The `%{key}` placeholder is added after the user part, after a `+` character, before the `@`. # The placeholder can be omitted but if present, it must appear in the "user" part of the address (before the `@`).
address: <%= single_quote(@incoming_email_address) %> address: <%= single_quote(@incoming_email_address) %>
# Email account username # Email account username
...@@ -149,6 +157,10 @@ production: &base ...@@ -149,6 +157,10 @@ production: &base
stuck_ci_builds_worker: stuck_ci_builds_worker:
cron: <%= @stuck_ci_builds_worker_cron %> cron: <%= @stuck_ci_builds_worker_cron %>
# Remove outdated repository archives
repository_archive_cache_worker:
cron: <%= @repository_archive_cache_worker_cron %>
## ##
# GitLab EE only jobs: # GitLab EE only jobs:
...@@ -160,12 +172,21 @@ production: &base ...@@ -160,12 +172,21 @@ production: &base
update_all_mirrors_worker: update_all_mirrors_worker:
cron: <%= @update_all_mirrors_worker_cron %> cron: <%= @update_all_mirrors_worker_cron %>
# Update remote mirrors
update_all_remote_mirrors_worker:
cron: <%= @update_all_remote_mirrors_worker_cron %>
# In addition to refreshing users when they log in, # In addition to refreshing users when they log in,
# periodically refresh LDAP users membership. # periodically refresh LDAP users membership.
# NOTE: This will only take effect if LDAP is enabled # NOTE: This will only take effect if LDAP is enabled
ldap_sync_worker: ldap_sync_worker:
cron: <%= @ldap_sync_worker_cron %> cron: <%= @ldap_sync_worker_cron %>
# Gitlab Geo nodes notification worker
# NOTE: This will only take effect if Geo is enabled
geo_bulk_notify_worker:
cron: <%= @geo_bulk_notify_worker_cron %>
# #
# 2. GitLab CI settings # 2. GitLab CI settings
# ========================== # ==========================
...@@ -265,6 +286,12 @@ production: &base ...@@ -265,6 +286,12 @@ production: &base
# (default: false) # (default: false)
auto_link_saml_user: <%= @omniauth_auto_link_saml_user.to_json %> auto_link_saml_user: <%= @omniauth_auto_link_saml_user.to_json %>
# Set different Omniauth providers as external so that all users creating accounts
# via these providers will not be able to have access to internal projects. You
# will need to use the full name of the provider, like `google_oauth2` for Google.
# Refer to the examples below for the full names of the supported providers.
# (default: [])
external_providers: <%= @omniauth_external_providers.to_json %>
## Auth providers ## Auth providers
# Uncomment the following lines and fill in the data of the auth provider you want to use # Uncomment the following lines and fill in the data of the auth provider you want to use
......
...@@ -86,6 +86,18 @@ server { ...@@ -86,6 +86,18 @@ server {
<% end %> <% end %>
<% end %> <% end %>
## Real IP Module Config
## http://nginx.org/en/docs/http/ngx_http_realip_module.html
<% if @real_ip_header %>
real_ip_header <%= @real_ip_header %>;
<% end %>
<% if @real_ip_recursive %>
real_ip_recursive <%= @real_ip_recursive %>;
<% end %>
<% @real_ip_trusted_addresses.each do |trusted_address| %>
set_real_ip_from <%= trusted_address %>;
<% end %>
## Individual nginx logs for this GitLab vhost ## Individual nginx logs for this GitLab vhost
access_log <%= @log_directory %>/gitlab_access.log gitlab_access; access_log <%= @log_directory %>/gitlab_access.log gitlab_access;
error_log <%= @log_directory %>/gitlab_error.log; error_log <%= @log_directory %>/gitlab_error.log;
......
...@@ -10,7 +10,7 @@ if Rails.env.production? ...@@ -10,7 +10,7 @@ if Rails.env.production?
ActionMailer::Base.smtp_settings = { ActionMailer::Base.smtp_settings = {
authentication: <%= @smtp_authentication.to_s.to_sym.inspect %>, authentication: <%= @smtp_authentication.to_s.to_sym.inspect %>,
<% %w{ address port user_name password domain enable_starttls_auto tls openssl_verify_mode ca_path ca_file }.each do |key| %> <% %w{ address port user_name password domain enable_starttls_auto tls ssl openssl_verify_mode ca_path ca_file }.each do |key| %>
<% value = node['gitlab'][container]["smtp_#{key}"] %> <% value = node['gitlab'][container]["smtp_#{key}"] %>
<%= "#{key}: #{value.inspect}," unless value.nil? %> <%= "#{key}: #{value.inspect}," unless value.nil? %>
<% end %> <% end %>
......
...@@ -55,3 +55,13 @@ stdout_path '<%= @stdout_path %>' ...@@ -55,3 +55,13 @@ stdout_path '<%= @stdout_path %>'
ENV['RAILS_RELATIVE_URL_ROOT'] = "<%= @relative_url %>" ENV['RAILS_RELATIVE_URL_ROOT'] = "<%= @relative_url %>"
<%- end %> <%- end %>
<%- if @worker_memory_limit_min %>
# Min memory size (RSS) per worker
ENV['GITLAB_UNICORN_MEMORY_MIN'] = (<%= @worker_memory_limit_min %>).to_s
<%- end %>
<%- if @worker_memory_limit_max %>
# Max memory size (RSS) per worker
ENV['GITLAB_UNICORN_MEMORY_MAX'] = (<%= @worker_memory_limit_max %>).to_s
<%- end %>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment