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:
- Define a separate
Gemfile
andGemfile.lock
forgitlab-ctl
: https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/config/software/gitlab-ctl.rb. Then wrapomnibus-ctl
commands with abundle exec
command. - 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