Add support in omnibus to auto-generate ci connection (behind a flag)
requested to merge 7386-add-support-in-omnibus-to-auto-generate-ci-connection-behind-a-flag into master
What does this MR do?
This MR adds documentation and sample configuration for optional multiple database support.
How to test:
Change the line # gitlab_rails['databases']['ci']['enable'] = false
into gitlab_rails['databases']['ci']['enable'] = true
and run sudo gitlab-ctl reconfigure
This will change /opt/gitlab/embedded/service/gitlab-rails/config/database.yml
to include a section for ci
that is a copy of main
Example:
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
production:
main:
adapter: postgresql
encoding: unicode
collation:
database: gitlabhq_production
username: "gitlab"
password:
host: "/var/opt/gitlab/postgresql"
port: 5432
socket:
sslmode:
sslcompression: 0
sslrootcert:
sslca:
load_balancing: {"hosts":[]}
prepared_statements: false
database_tasks: true
statement_limit: 1000
connect_timeout:
keepalives:
keepalives_idle:
keepalives_interval:
keepalives_count:
tcp_user_timeout:
application_name:
variables:
statement_timeout:
ci:
adapter: postgresql
encoding: unicode
collation:
database: gitlabhq_production
username: "gitlab"
password:
host: "/var/opt/gitlab/postgresql"
port: 5432
socket:
sslmode:
sslcompression: 0
sslrootcert:
sslca:
load_balancing: {"hosts":[]}
prepared_statements: false
database_tasks: false
statement_limit: 1000
connect_timeout:
keepalives:
keepalives_idle:
keepalives_interval:
keepalives_count:
tcp_user_timeout:
application_name:
variables:
statement_timeout:
Related issues
Closes #7386 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com -
Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks -
trigger-package
has a green pipeline running against latest commit
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added (covered by spec/chef/cookbooks/gitlab/recipes/gitlab-rails/database_yml_spec.rb
) -
Integration tests added to GitLab QA -
Equivalent MR/issue for the GitLab Chart opened
Edited by Rutger Wessels