Skip to content

Isolate Omnibus dependencies from GitLab Rails dependencies

Currently with Omnibus GitLab we mix Omnibus-related gems with GitLab Rails gems. Omnibus GitLab gems are installed via gem install invocations in config/software (e.g. acme-client, etc.)

The problem, however, is that RubyGems doesn't always gracefully handle the case where multiple versions of the gems are present, such as net-http (https://github.com/rubygems/rubygems/issues/7374).

There are a couple ways to improve this situation:

  1. Define a separate Gemfile and Gemfile.lock for gitlab-ctl: https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/config/software/gitlab-ctl.rb. Then wrap omnibus-ctl commands with a bundle exec command.
  2. Install the Omnibus gems and GitLab Rails gems in a different path. This will increase disk space usage since gems will be duplicated.

I think we should consider the first since this is what Bundler is designed for.

In addition, instead of using gem install in config/software, we should just update Gemfile and Gemfile.lock to ensure dependencies are locked.

Edited by Stan Hu