Question

So, I'm trying to install gitlab on a subdirectory. A lot of articles online suggest it is now possible to do so.
I installed omnibus-gitlab but it didn't seem to contain the files required to make gitlab run in a subdirectory like application.rb and stuff. Did a little research and discovered it is not yet supported on omnibus.
So why the differences? I actually thought they were all different ways of getting the same thing. My question again: difference between cookbook, omnibus and normal manual installation. Thanks!

Was it helpful?

Solution

  • Cookbook : the installation is done by Chef recipes

  • Manual : you install all the components one by one, manually, with a lot of pain and suffering

  • Omnibus : The installation in simplified with a .RPM (red hat) or a .deb (Debian), much more simple.

The results are differents: with a manual install, the home dir of gitlab will be somehting like /home/git/... while it will be /opt/gitlab/... in omnibus. Also, the commands to manage your GitLab instance are a little differents. By example, in manual install to seed an external DB you have to type sudo -u git -H bundle exec rake gitlab:setup while gitlab omnibus will need a sudo gitlab-rake gitlab:setup.

From what I tested, they all leed to the same GitLab features, but with a different way to manage it.

Now for the subdirectory (it doesn't works for me, but that's what the documentation say) : after an omnibus install, modifiy the non_root_url in the following files :

  • /opt/gitlab/embedded/service/gitlab-rails/conf/gitlab.yml
  • /opt/gitlab/embedded/service/gitlab-rails/conf/application.rb (read the comments at the bottom of the file)
  • /opt/gitlab/embedded/service/gitlab-rails/conf/unicorn.rb
  • /opt/gitlab/embedded/service/gitlab-shell/config.yml

And then restart GitLab. I repeat: that's what the gitlab's doc say, but it doesn't works for me. In my case it just create a redirection. Look:

#gitlab is configured to run in subdirectory "/gitlab" :
curl -v http:127.0.0.1:3000/gitlab
    ----> Error 404
curl -v http://127.0.0.1:3000
    ----> <html><body>You are being <a href="http://127.0.0.1:3000/gitlab/users/sign_in">redirected</a>.</body></html>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top