一、更改cat /etc/gitlab/gitlab.rb
更改部分
全部代码:
###! that file. It needs to exist so we can check permissions and avoid ###! throwing warnings to the users. # gitlab_shell['git_trace_log_file'] = "/var/log/gitlab/gitlab-shell/gitlab-shell-git-trace.log" ##! **We do not recommend changing this directory.** # gitlab_shell['dir'] = "/var/opt/gitlab/gitlab-shell" ################################################################ ## GitLab PostgreSQL ################################################################ ###! Changing any of these settings requires a restart of postgresql. ###! By default, reconfigure reloads postgresql if it is running. If you ###! change any of these settings, be sure to run `gitlab-ctl restart postgresql` ###! after reconfigure in order for the changes to take effect. # postgresql['enable'] = true # postgresql['listen_address'] = nil # postgresql['port'] = 5432 # postgresql['data_dir'] = "/var/opt/gitlab/postgresql/data" ##! **recommend value is 1/4 of total RAM, up to 14GB.** # postgresql['shared_buffers'] = "256MB" ### Advanced settings # postgresql['ha'] = false # postgresql['dir'] = "/var/opt/gitlab/postgresql" # postgresql['log_directory'] = "/var/log/gitlab/postgresql" # postgresql['username'] = "gitlab-psql" # postgresql['uid'] = nil # postgresql['gid'] = nil # postgresql['shell'] = "/bin/sh" # postgresql['home'] = "/var/opt/gitlab/postgresql" # postgresql['user_path'] = "/opt/gitlab/embedded/bin:/opt/gitlab/bin:$PATH" # postgresql['sql_user'] = "gitlab" # postgresql['max_connections'] = 200 # postgresql['md5_auth_cidr_addresses'] = [] # postgresql['trust_auth_cidr_addresses'] = [] # postgresql['wal_buffers'] = "-1" # postgresql['autovacuum_max_workers'] = "3" # postgresql['autovacuum_freeze_max_age'] = "200000000" # postgresql['track_activity_query_size'] = "1024" # postgresql['shared_preload_libraries'] = nil # postgresql['dynamic_shared_memory_type'] = nil # postgresql['hot_standby'] = "off" ### Replication settings ###! Note, some replication settings do not require a full restart. They are documented below. # postgresql['wal_level'] = "hot_standby" # postgresql['max_wal_senders'] = 5 # postgresql['max_replication_slots'] = 0 # postgresql['max_locks_per_transaction'] = 128 # Backup/Archive settings # default['gitlab']['postgresql']['archive_mode'] = "off" ###! Changing any of these settings only requires a reload of postgresql. You do not need to ###! restart postgresql if you change any of these and run reconfigure. # postgresql['work_mem'] = "16MB" # postgresql['maintenance_work_mem'] = "16MB" # postgresql['checkpoint_segments'] = 10 # postgresql['checkpoint_timeout'] = "5min" # postgresql['checkpoint_completion_target'] = 0.9 # postgresql['checkpoint_warning'] = "30s" # postgresql['effective_cache_size'] = "1MB" # postgresql['shmmax'] = 17179869184 # or 4294967295 # postgresql['shmall'] = 4194304 # or 1048575 # postgresql['autovacuum'] = "on" # postgresql['log_autovacuum_min_duration'] = "-1" # postgresql['autovacuum_naptime'] = "1min" # postgresql['autovacuum_vacuum_threshold'] = "50" # postgresql['autovacuum_analyze_threshold'] = "50" # postgresql['autovacuum_vacuum_scale_factor'] = "0.02" # postgresql['autovacuum_analyze_scale_factor'] = "0.01" # postgresql['autovacuum_vacuum_cost_delay'] = "20ms" # postgresql['autovacuum_vacuum_cost_limit'] = "-1" # postgresql['statement_timeout'] = "60000" # postgresql['idle_in_transaction_session_timeout'] = "60000" # postgresql['log_line_prefix'] = "%a" ### Available in PostgreSQL 9.6 and later # postgresql['min_wal_size'] = 80MB # postgresql['max_wal_size'] = 1GB # Backup/Archive settings # default['gitlab']['postgresql']['archive_command'] = nil # default['gitlab']['postgresql']['archive_timeout'] = "60" ### Replication settings # postgresql['sql_replication_user'] = "gitlab_replicator" # postgresql['wal_keep_segments'] = 10 # postgresql['max_standby_archive_delay'] = "30s" # postgresql['max_standby_streaming_delay'] = "30s" # postgresql['synchronous_commit'] = on # postgresql['synchronous_standby_names'] = '' # postgresql['hot_standby_feedback'] = 'off' # postgresql['random_page_cost'] = 2.0 # postgresql['log_temp_files'] = -1 # postgresql['log_checkpoints'] = 'off' # To add custom entries to pg_hba.conf use the following # postgresql['custom_pg_hba_entries'] = { # APPLICATION: { # APPLICATION should identify what the settings are used for # type: example, # database: example, # user: example, # cidr: example, # method: example, # option: exmple # } # } # See https://www.postgresql.org/docs/9.6/static/auth-pg-hba-conf.html for an explanation # of the values ################################################################################ ## GitLab Redis ##! **Can be disabled if you are using your own Redis instance.** ##! Docs: https://docs.gitlab.com/omnibus/settings/redis.html ################################################################################ # redis['enable'] = true # redis['username'] = "gitlab-redis" # redis['maxclients'] = "10000" # redis['tcp_timeout'] = "60" # redis['tcp_keepalive'] = "300" # redis['uid'] = nil # redis['gid'] = nil ###! **To enable only Redis service in this machine, uncomment ###! one of the lines below (choose master or slave instance types).** ###! Docs: https://docs.gitlab.com/omnibus/settings/redis.html ###! https://docs.gitlab.com/ce/administration/high_availability/redis.html # redis_master_role['enable'] = true # redis_slave_role['enable'] = true ### Redis TCP support (will disable UNIX socket transport) # redis['bind'] = '0.0.0.0' # or specify an IP to bind to a single one # redis['port'] = 6379 # redis['password'] = 'redis-password-goes-here' ### Redis Sentinel support ###! **You need a master slave Redis replication to be able to do failover** ###! **Please read the documentation before enabling it to understand the ###! caveats:** ###! Docs: https://docs.gitlab.com/ce/administration/high_availability/redis.html ### Replication support #### Slave Redis instance # redis['master'] = false # by default this is true #### Slave and Sentinel shared configuration ####! **Both need to point to the master Redis instance to get replication and ####! heartbeat monitoring** # redis['master_name'] = 'gitlab-redis' # redis['master_ip'] = nil # redis['master_port'] = 6379 ####! **Master password should have the same value defined in ####! redis['password'] to enable the instance to transition to/from ####! master/slave in a failover event.** # redis['master_password'] = 'redis-password-goes-here' ####! Increase these values when your slaves can't catch up with master # redis['client_output_buffer_limit_normal'] = '0 0 0' # redis['client_output_buffer_limit_slave'] = '256mb 64mb 60' # redis['client_output_buffer_limit_pubsub'] = '32mb 8mb 60' ################################################################################ ## GitLab Web server ##! Docs: https://docs.gitlab.com/omnibus/settings/nginx.html#using-a-non-bundled-web-server ################################################################################ ##! When bundled nginx is disabled we need to add the external webserver user to ##! the GitLab webserver group. # web_server['external_users'] = [] # web_server['username'] = 'gitlab-www' # web_server['group'] = 'gitlab-www' # web_server['uid'] = nil # web_server['gid'] = nil # web_server['shell'] = '/bin/false' # web_server['home'] = '/var/opt/gitlab/nginx' ################################################################################ ## GitLab NGINX ##! Docs: https://docs.gitlab.com/omnibus/settings/nginx.html ################################################################################ # nginx['enable'] = true # nginx['client_max_body_size'] = '250m' # nginx['redirect_http_to_https'] = false # nginx['redirect_http_to_https_port'] = 80 ##! Most root CA's are included by default # nginx['ssl_client_certificate'] = "/etc/gitlab/ssl/ca.crt" ##! enable/disable 2-way SSL client authentication # nginx['ssl_verify_client'] = "off" ##! if ssl_verify_client on, verification depth in the client certificates chain # nginx['ssl_verify_depth'] = "1" # nginx['ssl_certificate'] = "/etc/gitlab/ssl/#{node['fqdn']}.crt" # nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/#{node['fqdn']}.key" # nginx['ssl_ciphers'] = "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256" # nginx['ssl_prefer_server_ciphers'] = "on" ##! **Recommended by: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html ##! https://cipherli.st/** # nginx['ssl_protocols'] = "TLSv1.1 TLSv1.2" ##! **Recommended in: https://nginx.org/en/docs/http/ngx_http_ssl_module.html** # nginx['ssl_session_cache'] = "builtin:1000 shared:SSL:10m" ##! **Default according to https://nginx.org/en/docs/http/ngx_http_ssl_module.html** # nginx['ssl_session_timeout'] = "5m" # nginx['ssl_dhparam'] = nil # Path to dhparams.pem, eg. /etc/gitlab/ssl/dhparams.pem # nginx['listen_addresses'] = ['*', '[::]'] ##! **Defaults to forcing web browsers to always communicate using only HTTPS** ##! Docs: https://docs.gitlab.com/omnibus/settings/nginx.html#setting-http-strict-transport-security # nginx['hsts_max_age'] = 31536000 # nginx['hsts_include_subdomains'] = false ##! **Override only if you use a reverse proxy** ##! Docs: https://docs.gitlab.com/omnibus/settings/nginx.html#setting-the-nginx-listen-port # nginx['listen_port'] = nil ##! **Override only if your reverse proxy internally communicates over HTTP** ##! Docs: https://docs.gitlab.com/omnibus/settings/nginx.html#supporting-proxied-ssl # nginx['listen_https'] = nil # nginx['custom_gitlab_server_config'] = "location ^~ /foo-namespace/bar-project/raw/ {\n deny all;\n}\n" # nginx['custom_nginx_config'] = "include /etc/nginx/conf.d/example.conf;" # nginx['proxy_read_timeout'] = 3600 # nginx['proxy_connect_timeout'] = 300 # nginx['proxy_set_headers'] = { # "Host" => "$http_host_with_default", # "X-Real-IP" => "$remote_addr", # "X-Forwarded-For" => "$proxy_add_x_forwarded_for", # "X-Forwarded-Proto" => "https", # "X-Forwarded-Ssl" => "on", # "Upgrade" => "$http_upgrade", # "Connection" => "$connection_upgrade" # } # nginx['proxy_cache_path'] = 'proxy_cache keys_zone=gitlab:10m max_size=1g levels=1:2' # nginx['proxy_cache'] = 'gitlab' # nginx['http2_enabled'] = true # nginx['real_ip_trusted_addresses'] = [] # nginx['real_ip_header'] = nil # nginx['real_ip_recursive'] = nil # nginx['custom_error_pages'] = { # '404' => { # 'title' => 'Example title', # 'header' => 'Example header', # 'message' => 'Example message' # } # } ### Advanced settings # nginx['dir'] = "/var/opt/gitlab/nginx" # nginx['log_directory'] = "/var/log/gitlab/nginx" # nginx['worker_processes'] = 4 # nginx['worker_connections'] = 10240 # nginx['log_format'] = '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"' # nginx['sendfile'] = 'on' # nginx['tcp_nopush'] = 'on' # nginx['tcp_nodelay'] = 'on' # nginx['gzip'] = "on" # nginx['gzip_http_version'] = "1.0" # nginx['gzip_comp_level'] = "2" # nginx['gzip_proxied'] = "any" # nginx['gzip_types'] = [ "text/plain", "text/css", "application/x-javascript", "text/xml", "application/xml", "application/xml+rss", "text/javascript", "application/json" ] # nginx['keepalive_timeout'] = 65 # nginx['cache_max_size'] = '5000m' # nginx['server_names_hash_bucket_size'] = 64 ### Nginx status # nginx['status'] = { # "enable" => true, # "listen_addresses" => ["127.0.0.1"], # "fqdn" => "dev.example.com", # "port" => 9999, # "options" => { # "stub_status" => "on", # Turn on stats # "server_tokens" => "off", # Don't show the version of NGINX # "access_log" => "off", # Disable logs for stats # "allow" => "127.0.0.1", # Only allow access from localhost # "deny" => "all" # Deny access to anyone else # } # } ################################################################################ ## GitLab Logging ##! Docs: https://docs.gitlab.com/omnibus/settings/logs.html ################################################################################ # logging['svlogd_size'] = 200 * 1024 * 1024 # rotate after 200 MB of log data # logging['svlogd_num'] = 30 # keep 30 rotated log files # logging['svlogd_timeout'] = 24 * 60 * 60 # rotate after 24 hours # logging['svlogd_filter'] = "gzip" # compress logs with gzip # logging['svlogd_udp'] = nil # transmit log messages via UDP # logging['svlogd_prefix'] = nil # custom prefix for log messages # logging['logrotate_frequency'] = "daily" # rotate logs daily # logging['logrotate_size'] = nil # do not rotate by size by default # logging['logrotate_rotate'] = 30 # keep 30 rotated logs # logging['logrotate_compress'] = "compress" # see 'man logrotate' # logging['logrotate_method'] = "copytruncate" # see 'man logrotate' # logging['logrotate_postrotate'] = nil # no postrotate command by default # logging['logrotate_dateformat'] = nil # use date extensions for rotated files rather than numbers e.g. a value of "-%Y-%m-%d" would give rotated files like production.log-2016-03-09.gz ### UDP log forwarding ##! Docs: http://docs.gitlab.com/omnibus/settings/logs.html#udp-log-forwarding ##! remote host to ship log messages to via UDP # logging['udp_log_shipping_host'] = nil ##! override the hostname used when logs are shipped via UDP, ## by default the system hostname will be used. # logging['udp_log_shipping_hostname'] = nil ##! remote port to ship log messages to via UDP # logging['udp_log_shipping_port'] = 514 ################################################################################ ## Logrotate ##! Docs: https://docs.gitlab.com/omnibus/settings/logs.html#logrotate ##! You can disable built in logrotate feature. ################################################################################ # logrotate['enable'] = true ################################################################################ ## Users and groups accounts ##! Disable management of users and groups accounts. ##! **Set only if creating accounts manually** ##! Docs: https://docs.gitlab.com/omnibus/settings/configuration.html#disable-user-and-group-account-management ################################################################################ # manage_accounts['enable'] = false ################################################################################ ## Storage directories ##! Disable managing storage directories ##! Docs: https://docs.gitlab.com/omnibus/settings/configuration.html#disable-storage-directories-management ################################################################################ ##! **Set only if the select directories are created manually** # manage_storage_directories['enable'] = false # manage_storage_directories['manage_etc'] = false ################################################################################ ## Runtime directory ##! Docs: https://docs.gitlab.com//omnibus/settings/configuration.html#configuring-runtime-directory ################################################################################ # runtime_dir '/run' ################################################################################ ## Git ##! Advanced setting for configuring git system settings for omnibus-gitlab ##! internal git ################################################################################ ##! For multiple options under one header use array of comma separated values, ##! eg.: ##! { "receive" => ["fsckObjects = true"], "alias" => ["st = status", "co = checkout"] } # omnibus_gitconfig['system'] = { # "pack" => ["threads = 1"], # "receive" => ["fsckObjects = true"], # "repack" => ["writeBitmaps = true"], # "transfer" => ["hideRefs=^refs/tmp/", "hideRefs=^refs/keep-around/"], # } ################################################################################ ## GitLab Pages ##! Docs: https://docs.gitlab.com/ce/pages/administration.html ################################################################################ ##! Define to enable GitLab Pages # pages_external_url "http://pages.example.com/" # gitlab_pages['enable'] = false ##! Configure to expose GitLab Pages on external IP address, serving the HTTP # gitlab_pages['external_http'] = [] ##! Configure to expose GitLab Pages on external IP address, serving the HTTPS # gitlab_pages['external_https'] = [] # gitlab_pages['listen_proxy'] = "localhost:8090" # gitlab_pages['redirect_http'] = true # gitlab_pages['use_http2'] = true # gitlab_pages['dir'] = "/var/opt/gitlab/gitlab-pages" # gitlab_pages['log_directory'] = "/var/log/gitlab/gitlab-pages" ##! Prometheus metrics for Pages docs: https://gitlab.com/gitlab-org/gitlab-pages/#enable-prometheus-metrics # gitlab_pages['metrics_address'] = ":9235" ################################################################################ ## GitLab Pages NGINX ################################################################################ # All the settings defined in the "GitLab Nginx" section are also available in this "GitLab Pages NGINX" section # You just have to change the key "nginx['some_settings']" with "pages_nginx['some_settings']" # Below you can find settings that are exclusive to "GitLab Pages NGINX" # pages_nginx['enable'] = false # gitlab_rails['pages_path'] = "/mnt/storage/pages" ################################################################################ ## GitLab CI ##! Docs: https://docs.gitlab.com/ce/ci/quick_start/README.html ################################################################################ # gitlab_ci['gitlab_ci_all_broken_builds'] = true # gitlab_ci['gitlab_ci_add_pusher'] = true # gitlab_ci['builds_directory'] = '/var/opt/gitlab/gitlab-ci/builds' ################################################################################ ## GitLab Mattermost ##! Docs: https://docs.gitlab.com/omnibus/gitlab-mattermost ################################################################################ # mattermost_external_url 'http://mattermost.example.com' # mattermost['enable'] = false # mattermost['username'] = 'mattermost' # mattermost['group'] = 'mattermost' # mattermost['uid'] = nil # mattermost['gid'] = nil # mattermost['home'] = '/var/opt/gitlab/mattermost' # mattermost['database_name'] = 'mattermost_production' # mattermost['env'] = {} # mattermost['service_use_ssl'] = false # mattermost['service_address'] = "127.0.0.1" # mattermost['service_port'] = "8065" # mattermost['service_site_url'] = nil # mattermost['service_maximum_login_attempts'] = 10 # mattermost['service_google_developer_key'] = nil # mattermost['service_enable_incoming_webhooks'] = true # mattermost['service_enable_post_username_override'] = true # mattermost['service_enable_post_icon_override'] = true # mattermost['service_enable_testing'] = false # mattermost['service_enable_security_fix_alert'] = true # mattermost['service_enable_insecure_outgoing_connections'] = false # mattermost['service_allowed_untrusted_internal_connections'] = "" # mattermost['service_allow_cors_from'] = "" # mattermost['service_enable_outgoing_webhooks'] = true # mattermost['service_enable_commands'] = true # mattermost['service_enable_custom_emoji'] = false # mattermost['service_enable_only_admin_integrations'] = true # mattermost['service_enable_oauth_service_provider'] = false # mattermost['service_enable_developer'] = false # mattermost['service_session_length_web_in_days'] = 30 # mattermost['service_session_length_mobile_in_days'] = 30 # mattermost['service_session_length_sso_in_days'] = 30 # mattermost['service_session_cache_in_minutes'] = 10 # mattermost['service_connection_security'] = nil # mattermost['service_tls_cert_file'] = nil # mattermost['service_tls_key_file'] = nil # mattermost['service_use_lets_encrypt'] = false # mattermost['service_lets_encrypt_cert_cache_file'] = "./config/letsencrypt.cache" # mattermost['service_forward_80_to_443'] = false # mattermost['service_read_timeout'] = 300 # mattermost['service_write_timeout'] = 300 # mattermost['service_time_between_user_typing_updates_milliseconds'] = 5000 # mattermost['service_enable_link_previews'] = false # mattermost['service_enable_user_typing_messages'] = true # mattermost['service_enable_post_search'] = true # mattermost['service_enable_user_statuses'] = true # mattermost['service_enable_emoji_picker'] = true # mattermost['service_enable_channel_viewed_messages'] = true # mattermost['service_enable_apiv3'] = true # mattermost['service_goroutine_health_threshold'] = -1 # mattermost['service_user_access_tokens'] = false # mattermost['team_site_name'] = "GitLab Mattermost" # mattermost['team_max_users_per_team'] = 150 # mattermost['team_enable_team_creation'] = true # mattermost['team_enable_user_creation'] = true # mattermost['team_enable_open_server'] = false # mattermost['team_allow_public_link'] = true # mattermost['team_allow_valet_default'] = false # mattermost['team_restrict_creation_to_domains'] = "gmail.com" # mattermost['team_restrict_team_names'] = true # mattermost['team_restrict_direct_message'] = "any" # mattermost['team_max_channels_per_team'] = 2000 # mattermost['team_enable_x_to_leave_channels_from_lhs'] = false # mattermost['team_user_status_away_timeout'] = 300 # mattermost['team_teammate_name_display'] = "full_name" # mattermost['sql_driver_name'] = 'mysql' # mattermost['sql_data_source'] = "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8" # mattermost['sql_data_source_replicas'] = ["mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8"] # mattermost['sql_max_idle_conns'] = 10 # mattermost['sql_max_open_conns'] = 10 # mattermost['sql_trace'] = false # mattermost['sql_data_source_search_replicas'] = [] # mattermost['sql_query_timeout'] = 30 # mattermost['log_file_directory'] = '/var/log/gitlab/mattermost/' # mattermost['log_console_enable'] = true # mattermost['log_console_level'] = 'INFO' # mattermost['log_enable_file'] = false # mattermost['log_file_level'] = 'INFO' # mattermost['log_file_format'] = nil # mattermost['log_enable_diagnostics'] = true # mattermost['gitlab_enable'] = false # mattermost['gitlab_id'] = "12345656" # mattermost['gitlab_secret'] = "123456789" # mattermost['gitlab_scope'] = "" # mattermost['gitlab_auth_endpoint'] = "http://gitlab.example.com/oauth/authorize" # mattermost['gitlab_token_endpoint'] = "http://gitlab.example.com/oauth/token" # mattermost['gitlab_user_api_endpoint'] = "http://gitlab.example.com/api/v4/user" # mattermost['aws'] = {'S3AccessKeyId' => '123', 'S3SecretAccessKey' => '123', 'S3Bucket' => 'aa', 'S3Region' => 'bb'} # mattermost['email_enable_sign_up_with_email'] = true # mattermost['email_enable_sign_in_with_email'] = true # mattermost['email_enable_sign_in_with_username'] = false # mattermost['email_send_email_notifications'] = false # mattermost['email_require_email_verification'] = false # mattermost['email_smtp_username'] = nil # mattermost['email_smtp_password'] = nil # mattermost['email_smtp_server'] = nil # mattermost['email_smtp_port'] = nil # mattermost['email_connection_security'] = nil # mattermost['email_feedback_name'] = nil # mattermost['email_feedback_email'] = nil # mattermost['email_feedback_organization'] = nil # mattermost['email_send_push_notifications'] = true # mattermost['email_push_notification_server'] = "" # mattermost['email_push_notification_contents'] = "generic" # mattermost['email_enable_batching'] = false # mattermost['email_batching_buffer_size'] = 256 # mattermost['email_batching_interval'] = 30 # mattermost['email_skip_server_certificate_verification'] = false # mattermost['email_smtp_auth'] = false # mattermost['email_notification_content_type'] = "full" # mattermost['file_max_file_size'] = 52428800 # mattermost['file_driver_name'] = "local" # mattermost['file_directory'] = "/var/opt/gitlab/mattermost/data" # mattermost['file_enable_public_link'] = true # mattermost['file_initial_font'] = 'luximbi.ttf' # mattermost['file_amazon_s3_access_key_id'] = nil # mattermost['file_amazon_s3_bucket'] = nil # mattermost['file_amazon_s3_secret_access_key'] = nil # mattermost['file_amazon_s3_region'] = nil # mattermost["file_amazon_s3_endpoint"] = nil # mattermost["file_amazon_s3_bucket_endpoint"] = nil # mattermost["file_amazon_s3_location_constraint"] = false # mattermost["file_amazon_s3_lowercase_bucket"] = false # mattermost["file_amazon_s3_ssl"] = true # mattermost["file_amazon_s3_sign_v2"] = false # mattermost['file_enable_file_attachments'] = true # mattermost["file_amazon_s3_trace"] = false # mattermost['ratelimit_enable_rate_limiter'] = false # mattermost['ratelimit_per_sec'] = 10 # mattermost['ratelimit_memory_store_size'] = 10000 # mattermost['ratelimit_vary_by_remote_addr'] = true # mattermost['ratelimit_vary_by_header'] = nil # mattermost['ratelimit_max_burst'] = 100 # mattermost['support_terms_of_service_link'] = "/static/help/terms.html" # mattermost['support_privacy_policy_link'] = "/static/help/privacy.html" # mattermost['support_about_link'] = "/static/help/about.html" # mattermost['support_report_a_problem_link'] = "/static/help/report_problem.html" # mattermost['support_email'] = "[email protected]" # mattermost['privacy_show_email_address'] = true # mattermost['privacy_show_full_name'] = true # mattermost['localization_server_locale'] = "en" # mattermost['localization_client_locale'] = "en" # mattermost['localization_available_locales'] = "en,es,fr,ja,pt-BR" # mattermost['webrtc_enable'] = false # mattermost['webrtc_gateway_websocket_url'] = nil # mattermost['webrtc_gateway_admin_url'] = nil # mattermost['webrtc_gateway_admin_secret'] = nil # mattermost['webrtc_gateway_stun_uri'] = nil # mattermost['webrtc_gateway_turn_uri'] = nil # mattermost['webrtc_gateway_turn_username'] = nil # mattermost['webrtc_gateway_turn_shared_key'] = nil ################################################################################ ## Mattermost NGINX ################################################################################ # All the settings defined in the "GitLab NGINX" section are also available in this "Mattermost NGINX" section # You just have to change the key "nginx['some_settings']" with "mattermost_nginx['some_settings']" # Below you can find settings that are exclusive to "Mattermost NGINX" # mattermost_nginx['enable'] = false # mattermost_nginx['custom_gitlab_mattermost_server_config'] = "location ^~ /foo-namespace/bar-project/raw/ {\n deny all;\n}\n" # mattermost_nginx['proxy_set_headers'] = { # "Host" => "$http_host", # "X-Real-IP" => "$remote_addr", # "X-Forwarded-For" => "$proxy_add_x_forwarded_for", # "X-Frame-Options" => "SAMEORIGIN", # "X-Forwarded-Proto" => "https", # "X-Forwarded-Ssl" => "on", # "Upgrade" => "$http_upgrade", # "Connection" => "$connection_upgrade" # } ################################################################################ ## Registry NGINX ################################################################################ # All the settings defined in the "GitLab NGINX" section are also available in this "Registry NGINX" section # You just have to change the key "nginx['some_settings']" with "registry_nginx['some_settings']" # Below you can find settings that are exclusive to "Registry NGINX" # registry_nginx['enable'] = false # registry_nginx['proxy_set_headers'] = { # "Host" => "$http_host", # "X-Real-IP" => "$remote_addr", # "X-Forwarded-For" => "$proxy_add_x_forwarded_for", # "X-Forwarded-Proto" => "https", # "X-Forwarded-Ssl" => "on" # } ################################################################################ ## Prometheus ##! Docs: https://docs.gitlab.com/ce/administration/monitoring/prometheus/ ################################################################################ # prometheus['enable'] = true # prometheus['monitor_kubernetes'] = true # prometheus['username'] = 'gitlab-prometheus' # prometheus['uid'] = nil # prometheus['gid'] = nil # prometheus['shell'] = '/bin/sh' # prometheus['home'] = '/var/opt/gitlab/prometheus' # prometheus['log_directory'] = '/var/log/gitlab/prometheus' # prometheus['scrape_interval'] = 15 # prometheus['scrape_timeout'] = 15 # prometheus['chunk_encoding_version'] = 2 # ### Custom scrape configs # # Prometheus can scrape additional jobs via scrape_configs. The default automatically # includes all of the exporters supported by the omnibus config. # # See: https://prometheus.io/docs/operating/configuration/#<scrape_config> # # Example: # # prometheus['scrape_configs'] = [ # { # 'job_name': 'example', # 'static_configs' => [ # 'targets' => ['hostname:port'], # ], # }, # ] # ### Prometheus Memory Management # # Prometheus needs to be configured for how much memory is used. # * This sets the target heap size. # * This value accounts for approximately 2/3 of the memory used by the server. # * The recommended memory is 4kb per unique metrics time-series. # See: https://prometheus.io/docs/operating/storage/#memory-usage # # prometheus['target_heap_size'] = ( # # Use 25mb + 2% of total memory for Prometheus memory. # 26_214_400 + (node['memory']['total'].to_i * 1024 * 0.02 ) # ).to_i # # prometheus['flags'] = { # 'storage.local.path' => "#{node['gitlab']['prometheus']['home']}/data", # 'storage.local.chunk-encoding-version' => user_config['chunk-encoding-version'], # 'storage.local.target-heap-size' => node['gitlab']['prometheus']['target-heap-size'], # 'config.file' => "#{node['gitlab']['prometheus']['home']}/prometheus.yml" # } ##! Advanced settings. Should be changed only if absolutely needed. # prometheus['listen_address'] = 'localhost:9090' ################################################################################ ## Prometheus Node Exporter ##! Docs: https://docs.gitlab.com/ce/administration/monitoring/prometheus/node_exporter.html ################################################################################ # node_exporter['enable'] = true # node_exporter['home'] = '/var/opt/gitlab/node-exporter' # node_exporter['log_directory'] = '/var/log/gitlab/node-exporter' # node_exporter['flags'] = { # 'collector.textfile.directory' => "#{node['gitlab']['node-exporter']['home']}/textfile_collector" # } ##! Advanced settings. Should be changed only if absolutely needed. # node_exporter['listen_address'] = 'localhost:9100' ################################################################################ ## Prometheus Redis exporter ##! Docs: https://docs.gitlab.com/ce/administration/monitoring/prometheus/redis_exporter.html ################################################################################ # redis_exporter['enable'] = true # redis_exporter['log_directory'] = '/var/log/gitlab/redis-exporter' # redis_exporter['flags'] = { # 'redis.addr' => "unix://#{node['gitlab']['gitlab-rails']['redis_socket']}", # } ##! Advanced settings. Should be changed only if absolutely needed. # redis_exporter['listen_address'] = 'localhost:9121' ################################################################################ ## Prometheus Postgres exporter ##! Docs: https://docs.gitlab.com/ce/administration/monitoring/prometheus/postgres_exporter.html ################################################################################ # postgres_exporter['enable'] = true # postgres_exporter['home'] = '/var/opt/gitlab/postgres-exporter' # postgres_exporter['log_directory'] = '/var/log/gitlab/postgres-exporter' # postgres_exporter['flags'] = {} # postgres_exporter['listen_address'] = 'localhost:9187' ################################################################################ ## Prometheus Gitlab monitor ##! Docs: https://docs.gitlab.com/ce/administration/monitoring/prometheus/gitlab_monitor_exporter.html ################################################################################ # gitlab_monitor['enable'] = true # gitlab_monitor['log_directory'] = "/var/log/gitlab/gitlab-monitor" # gitlab_monitor['home'] = "/var/opt/gitlab/gitlab-monitor" ##! Advanced settings. Should be changed only if absolutely needed. # gitlab_monitor['listen_address'] = 'localhost' # gitlab_monitor['listen_port'] = '9168' # To completely disable prometheus, and all of it's exporters, set to false # prometheus_monitoring['enable'] = true ################################################################################ ## Gitaly ##! Docs: ################################################################################ # gitaly['enable'] = false # gitaly['dir'] = "/var/opt/gitlab/gitaly" # gitaly['log_directory'] = "/var/log/gitlab/gitaly" # gitaly['bin_path'] = "/opt/gitlab/embedded/bin/gitaly" # gitaly['env_directory'] = "/opt/gitlab/etc/gitaly" # gitaly['env'] = { # 'PATH' => "/opt/gitlab/bin:/opt/gitlab/embedded/bin:/bin:/usr/bin", # 'HOME' => '/var/opt/gitlab' # } # gitaly['socket_path'] = "/var/opt/gitlab/gitaly/gitaly.socket" # gitaly['listen_addr'] = "localhost:8075" # gitaly['prometheus_listen_addr'] = "localhost:9175" # gitaly['logging_format'] = "json" # gitaly['logging_sentry_dsn'] = "https://<key>:<secret>@sentry.io/<project>" # gitaly['prometheus_grpc_latency_buckets'] = "[0.001, 0.005, 0.025, 0.1, 0.5, 1.0, 10.0, 30.0, 60.0, 300.0, 1500.0]" # gitaly['auth_token'] = '<secret>' # gitaly['auth_transitioning'] = false # When true, auth is logged to Prometheus but NOT enforced ################################################################################ ################################################################################ ## Configuration Settings for GitLab EE only ## ################################################################################ ################################################################################ ################################################################################ ## Auxiliary cron jobs applicable to GitLab EE only ################################################################################ # # gitlab_rails['geo_file_download_dispatch_worker_cron'] = "*/10 * * * *" # gitlab_rails['geo_repository_sync_worker_cron'] = "*/5 * * * *" # gitlab_rails['ldap_sync_worker_cron'] = "30 1 * * *" # gitlab_rails['ldap_group_sync_worker_cron'] = "0 * * * *" # gitlab_rails['historical_data_worker_cron'] = "0 12 * * *" ################################################################################ ## Kerberos (EE Only) ##! Docs: https://docs.gitlab.com/ee/integration/kerberos.html#http-git-access ################################################################################ # gitlab_rails['kerberos_enabled'] = true # gitlab_rails['kerberos_keytab'] = /etc/http.keytab # gitlab_rails['kerberos_service_principal_name'] = HTTP/[email protected] # gitlab_rails['kerberos_use_dedicated_port'] = true # gitlab_rails['kerberos_port'] = 8443 # gitlab_rails['kerberos_https'] = true ################################################################################ ## GitLab Sentinel (EE Only) ##! Docs: http://docs.gitlab.com/ce/administration/high_availability/redis.html#high-availability-with-sentinel ################################################################################ ##! **Make sure you configured all redis['master_*'] keys above before ##! continuing.** ##! To enable Sentinel and disable all other services in this machine, ##! uncomment the line below (if you've enabled Redis role, it will keep it). ##! Docs: https://docs.gitlab.com/ce/administration/high_availability/redis.html # redis_sentinel_role['enable'] = true # sentinel['enable'] = true ##! Bind to all interfaces, uncomment to specify an IP and bind to a single one # sentinel['bind'] = '0.0.0.0' ##! Uncomment to change default port # sentinel['port'] = 26379 ##! Quorum must reflect the amount of voting sentinels it take to start a ##! failover. ##! **Value must NOT be greater then the amount of sentinels.** ##! The quorum can be used to tune Sentinel in two ways: ##! 1. If a the quorum is set to a value smaller than the majority of Sentinels ##! we deploy, we are basically making Sentinel more sensible to master ##! failures, triggering a failover as soon as even just a minority of ##! Sentinels is no longer able to talk with the master. ##! 2. If a quorum is set to a value greater than the majority of Sentinels, we ##! are making Sentinel able to failover only when there are a very large ##! number (larger than majority) of well connected Sentinels which agree ##! about the master being down. # sentinel['quorum'] = 1 ### Consider unresponsive server down after x amount of ms. # sentinel['down_after_milliseconds'] = 10000 ### Specifies the failover timeout in milliseconds. ##! It is used in many ways: ##! ##! - The time needed to re-start a failover after a previous failover was ##! already tried against the same master by a given Sentinel, is two ##! times the failover timeout. ##! ##! - The time needed for a slave replicating to a wrong master according ##! to a Sentinel current configuration, to be forced to replicate ##! with the right master, is exactly the failover timeout (counting since ##! the moment a Sentinel detected the misconfiguration). ##! ##! - The time needed to cancel a failover that is already in progress but ##! did not produced any configuration change (SLAVEOF NO ONE yet not ##! acknowledged by the promoted slave). ##! ##! - The maximum time a failover in progress waits for all the slaves to be ##! reconfigured as slaves of the new master. However even after this time ##! the slaves will be reconfigured by the Sentinels anyway, but not with ##! the exact parallel-syncs progression as specified. # sentinel['failover_timeout'] = 60000 ################################################################################ ## GitLab Sidekiq Cluster (EE only) ################################################################################ ##! GitLab Enterprise Edition allows one to start an extra set of Sidekiq processes ##! besides the default one. These processes can be used to consume a dedicated set ##! of queues. This can be used to ensure certain queues always have dedicated ##! workers, no matter the amount of jobs that need to be processed. # sidekiq_cluster['enable'] = false # sidekiq_cluster['ha'] = false # sidekiq_cluster['log_directory'] = "/var/log/gitlab/sidekiq-cluster" # sidekiq_cluster['interval'] = 5 # The number of seconds to wait between worker checks ##! Each entry in the queue_groups array denotes a group of queues that have to be processed by a ##! Sidekiq process. Multiple queues can be processed by the same process by ##! separating them with a comma within the group entry # sidekiq_cluster['queue_groups'] = [ # "process_commit,post_receive", # "gitlab_shell" # ] # ##! If negate is enabled then sidekiq-cluster will process all the queues that ##! don't match those in queue_groups. # sidekiq_cluster['negate'] = false ################################################################################ ## Additional Database Settings (EE only) ##! Docs: https://docs.gitlab.com/ee/administration/database_load_balancing.html ################################################################################ # gitlab_rails['db_load_balancing'] = { 'hosts' => ['secondary1.example.com'] } ################################################################################ ## GitLab Geo ##! Docs: https://docs.gitlab.com/ee/gitlab-geo ################################################################################ # geo_primary_role['enable'] = false # geo_secondary_role['enable'] = false ################################################################################ ## GitLab Geo Secondary (EE only) ################################################################################ # geo_secondary['auto_migrate'] = true # geo_secondary['db_adapter'] = "postgresql" # geo_secondary['db_encoding'] = "unicode" # geo_secondary['db_collation'] = nil # geo_secondary['db_database'] = "gitlabhq_geo_production" # geo_secondary['db_pool'] = 10 # geo_secondary['db_username'] = "gitlab_geo" # geo_secondary['db_password'] = nil # geo_secondary['db_host'] = "/var/opt/gitlab/geo-postgresql" # geo_secondary['db_port'] = 5431 # geo_secondary['db_socket'] = nil # geo_secondary['db_sslmode'] = nil # geo_secondary['db_sslrootcert'] = nil # geo_secondary['db_sslca'] = nil ################################################################################ ## GitLab Geo Secondary Tracking Database (EE only) ################################################################################ # geo_postgresql['enable'] = false # geo_postgresql['ha'] = false # geo_postgresql['dir'] = '/var/opt/gitlab/geo-postgresql' # geo_postgresql['data_dir'] = '/var/opt/gitlab/geo-postgresql/data' ################################################################################ # Pgbouncer (EE only) # See [GitLab PgBouncer documentation](http://docs.gitlab.com/omnibus/settings/database.html#enabling-pgbouncer-ee-only) # See the [PgBouncer page](https://pgbouncer.github.io/config.html) for details ################################################################################ # pgbouncer['enable'] = false # pgbouncer['log_directory'] = '/var/log/gitlab/pgbouncer' # pgbouncer['data_directory'] = '/var/opt/gitlab/pgbouncer' # pgbouncer['listen_addr'] = '0.0.0.0' # pgbouncer['listen_port'] = '6432' # pgbouncer['pool_mode'] = 'session' # pgbouncer['server_reset_query'] = 'DISCARD ALL' # pgbouncer['max_client_conn'] = '100' # pgbouncer['default_pool_size'] = '20' # pgbouncer['min_pool_size'] = '0' # pgbouncer['reserve_pool_size'] = '0' # pgbouncer['reserve_pool_timeout'] = '5.0' # pgbouncer['server_round_robin'] = '0' # pgbouncer['log_connections'] = '0' # pgbouncer['server_idle_timeout'] = '600.0' # pgbouncer['dns_max_ttl'] = '15.0' # pgbouncer['dns_zone_check_period'] = '0' # pgbouncer['dns_nxdomain_ttl'] = '15.0' # pgbouncer['admin_users'] = %w(gitlab-psql postgres pgbouncer) # pgbouncer['stats_users'] = %w(gitlab-psql postgres pgbouncer) # pgbouncer['ignore_startup_parameters'] = 'extra_float_digits' # pgbouncer['databases'] = { # DATABASE_NAME: { # host: HOSTNAME, # port: PORT # user: USERNAME, # password: PASSWORD ###! generate this with `echo -n '$password + $username' | md5sum` # } # ... # } # pgbouncer['logfile'] = nil # pgbouncer['auth_type'] = 'md5' # pgbouncer['auth_hba_file'] = nil # pgbouncer['auth_query'] = 'SELECT username, password FROM public.pg_shadow_lookup($1)' # pgbouncer['users'] = [ # { # name: USERNAME, # password: MD5_PASSWORD_HASH # } # ] # postgresql['pgbouncer_user'] = nil # postgresql['pgbouncer_user_password'] = nil # ################################################################################ # Repmgr (EE only) ################################################################################ # repmgr['enable'] = false # repmgr['cluster'] = 'gitlab_cluster' # repmgr['database'] = 'gitlab_repmgr' # repmgr['host'] = nil # repmgr['node_number'] = nil # repmgr['port'] = 5432 # repmgr['trust_auth_cidr_addresses'] = [] # repmgr['user'] = 'gitlab_repmgr' # repmgr['failover'] = 'automatic' # repmgr['log_directory'] = '/var/log/gitlab/repmgrd' # repmgr['node_name'] = nil # repmgr['pg_bindir'] = '/opt/gitlab/embedded/bin' # repmgr['service_start_command'] = '/opt/gitlab/bin/gitlab-ctl start postgresql' # repmgr['service_stop_command'] = '/opt/gitlab/bin/gitlab-ctl stop postgresql' # repmgr['service_reload_command'] = '/opt/gitlab/bin/gitlab-ctl hup postgresql' # repmgr['service_restart_command'] = '/opt/gitlab/bin/gitlab-ctl restart postgresql' # repmgr['service_promote_command'] = nil # repmgr['promote_command'] = '/opt/gitlab/embedded/bin/repmgr standby promote -f /var/opt/gitlab/postgresql/repmgr.conf' # repmgr['follow_command'] = '/opt/gitlab/embedded/bin/repmgr standby follow -f /var/opt/gitlab/postgresql/repmgr.conf' # repmgr['upstream_node'] = nil # repmgr['use_replication_slots'] = false # repmgr['loglevel'] = 'INFO' # repmgr['logfacility'] = 'STDERR' # repmgr['logfile'] = nil # repmgr['event_notification_command'] = nil # repmgr['event_notifications'] = nil # repmgr['rsync_options'] = nil # repmgr['ssh_options'] = nil # repmgr['priority'] = nil # repmgr['retry_promote_interval_secs'] = 300 # repmgr['witness_repl_nodes_sync_interval_secs'] = 15 # repmgr['reconnect_attempts'] = 6 # repmgr['reconnect_interval'] = 10 # repmgr['monitor_interval_secs'] = 2 # repmgr['master_response_timeout'] = 60 # repmgr['daemon'] = true # repmgrd['enable'] = true ################################################################################ # Consul (EEP only) ################################################################################ # consul['enable'] = false # consul['dir'] = '/var/opt/gitlab/consul' # consul['user'] = 'gitlab-consul' # consul['config_file'] = '/var/opt/gitlab/consul/config.json' # consul['config_dir'] = '/var/opt/gitlab/consul/config.d' # consul['data_dir'] = '/var/opt/gitlab/consul/data' # consul['log_directory'] = '/var/log/gitlab/consul' # consul['script_directory'] = '/var/opt/gitlab/consul/scripts' # consul['configuration'] = { # 'client_addr' => nil, # 'datacenter' => 'gitlab_consul', # 'enable_script_checks' => true, # 'server' => false # } # consul['services'] = [] # consul['service_config'] = { # 'postgresql' => { # 'service' => { # 'name' => "postgresql", # 'address' => '', # 'port' => 5432, # 'checks' => [ # { # 'script' => "/var/opt/gitlab/consul/scripts/check_postgresql", # 'interval' => "10s" # } # ] # } # } # } # consul['watchers'] = { # 'postgresql' => { # enable: false, # handler: 'failover_pgbouncer' # } # }