diff --git a/Changelog.md b/Changelog.md index 6af36756..f9ad653a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,7 @@ https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) for the list o **10.7.0** - gitlab: upgrade CE to v10.7.0 +- ADD `GITLAB_SIDEKIQ_LOG_FORMAT` **10.6.4** - gitlab: upgrade CE to v10.6.4 diff --git a/README.md b/README.md index cbdad52f..e9afa4ae 100644 --- a/README.md +++ b/README.md @@ -914,6 +914,7 @@ Below is the complete list of available options that can be used to customize yo | `SIDEKIQ_CONCURRENCY` | The number of concurrent sidekiq jobs to run. Defaults to `25` | | `SIDEKIQ_SHUTDOWN_TIMEOUT` | Timeout for sidekiq shutdown. Defaults to `4` | | `SIDEKIQ_MEMORY_KILLER_MAX_RSS` | Non-zero value enables the SidekiqMemoryKiller. Defaults to `1000000`. For additional options refer [Configuring the MemoryKiller](http://doc.gitlab.com/ce/operations/sidekiq_memory_killer.html) | +| `GITLAB_SIDEKIQ_LOG_FORMAT` | Sidekiq log format that will be used. Defaults to `default` | | `DB_ADAPTER` | The database type. Possible values: `mysql2`, `postgresql`. Defaults to `postgresql`. | | `DB_ENCODING` | The database encoding. For `DB_ADAPTER` values `postresql` and `mysql2`, this parameter defaults to `unicode` and `utf8` respectively. | | `DB_COLLATION` | The database collation. Defaults to `utf8_general_ci` for `DB_ADAPTER` `mysql2`. This parameter is not supported for `DB_ADAPTER` `postresql` and will be removed. | diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index 02481124..23c2f28b 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -194,6 +194,11 @@ production: &base plain_url: "{{GITLAB_GRAVATAR_HTTP_URL}}" # default: https://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon ssl_url: "{{GITLAB_GRAVATAR_HTTPS_URL}}" # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon + + ## Sidekiq + sidekiq: + log_format: {{GITLAB_SIDEKIQ_LOG_FORMAT}} # (json is also supported) + ## Auxiliary jobs # Periodically executed jobs, to self-heal GitLab, do external synchronizations, etc. # Please read here for more information: https://github.com/ondrejbartas/sidekiq-cron#adding-cron-job diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index e2270d53..0abcfe85 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -57,6 +57,7 @@ REDIS_DB_NUMBER=${REDIS_DB_NUMBER:-0} SIDEKIQ_SHUTDOWN_TIMEOUT=${SIDEKIQ_SHUTDOWN_TIMEOUT:-4} SIDEKIQ_CONCURRENCY=${SIDEKIQ_CONCURRENCY:-25} SIDEKIQ_MEMORY_KILLER_MAX_RSS=${SIDEKIQ_MEMORY_KILLER_MAX_RSS:-1000000} +GITLAB_SIDEKIQ_LOG_FORMAT=${GITLAB_SIDEKIQ_LOG_FORMAT:-default} ## UNICORN UNICORN_WORKERS=${UNICORN_WORKERS:-3} diff --git a/assets/runtime/functions b/assets/runtime/functions index 6c6a1f2b..5255aba3 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -294,7 +294,6 @@ gitlab_configure_monitoring() { GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED \ GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS \ GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT - } gitlab_configure_gitlab_workhorse() { @@ -742,6 +741,10 @@ gitlab_configure_secrets() { gitlab_configure_sidekiq() { echo "Configuring gitlab::sidekiq..." + # configure gitlab sidekiq log format + update_template ${GITLAB_CONFIG} \ + GITLAB_SIDEKIQ_LOG_FORMAT + # configure sidekiq update_template /etc/supervisor/conf.d/sidekiq.conf \ SIDEKIQ_CONCURRENCY \