Skip to content

Automatically create additional databases and run migrations

What does this MR do?

Automatically create additional databases and run migrations. Followup to !5480 (merged)

Testing

  1. Install GitLab using the package from this MR, run reconfigure, and ensure it is up and running
  2. Add the following to /etc/gitlab/gitlab.rb and run reconfigure
    gitlab_rails['databases']['ci']['enable'] = true
    gitlab_rails['databases']['ci']['db_database'] = 'gitlabhq_production_ci'
  3. See in reconfigure logs that the database is getting created and migrations are getting run.
  4. Start a pipeline in a project.
  5. Run the following command and see it returns valid output, thus confirming CI related stuff now goes to the new DB.
    $ sudo gitlab-psql -d 'gitlabhq_production_ci' -c 'select * from ci_builds;'

Related issues

Closes: #6638 (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
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened
Edited by Balasankar 'Balu' C

Merge request reports

Loading