When setting up an Omnibus Gitlab 12.7.5 Enterprise Edition, on the step where ElasticSearch is integrated, the indexer setup fails with "Could not locate Gemfile or .bundle/ directory" when issuing the command:
sudo -u git -H bundle exec rake gitlab:indexer:install[/home/git/gitlab-elasticsearch-indexer] RAILS_ENV=production
At first, it complained of git not owning some subdirectories of /var/opt/gitlab. That warning disappeared when I chowned
them to git
Then it started complaining about "Could not locate Gemfile or .bundle/ directory"
Being a complete Ruby iliterate, here are the steps taken to solve it:
sudo apt install ruby-bundler
, it appears installed but the error persists:XXX@gitlab:~$ sudo dpkg -l ruby-bundler
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================-====================-====================-====================================================================
ii ruby-bundler 1.16.1-1 all Manage Ruby application dependencies (runtime)
sudo gem install bundler
, appears to setup OK, but the error persistsFetching: bundler-2.1.4.gem (100%)
Successfully installed bundler-2.1.4
Parsing documentation for bundler-2.1.4
Installing ri documentation for bundler-2.1.4
Done installing documentation for bundler after 3 seconds
1 gem installed
/var/opt/gitlab/.bundle is empty, I do not know it that is a clue of some mis-setup
Any help welcome with the issue, it is surely caused by my lack of Ruby command
[EDIT:] Following this question I have found that my disk is almost full (28.3 GiB used out of 30). I will increase it while waiting for some real knowledge on the issue => no luck there, clearly it is not a space issue
[EDIT2:]
Given that the home dir specified for user git in passwd is /var/opt/gitlab I have tried executing the command using that dir as installation dir, that is: sudo -u git -H bundle exec rake gitlab:indexer:install[/var/opt/gitlab/gitlab-elasticsearch-indexer] RAILS_ENV=production
but the "Could not locate Gemfile or .bundle/ directory" error is still there
[EDIT3:] Seems that in the product features page the ElasticSearch integration is a "Bronze"(paid) feature. That might be the cause why the indexer refuses to install on my "Core" (free) system. I had set a post on Gitlab Forums to confirm, hope to get some useful info soon!
Finally I found the answer.
Gitlab takes out of the UI the fields to properly configure this unless you pay a license -you can run an Enterprise Version without paying a license-
I understand the business logic behind it but nevertheless it should be more documented