I followed the document from the link:
Step 1: Prepare for upgrade
sudo ./ctlscript.sh stop
Create a backup of your current data. In order to perform the backup, the database servers should be running. Start the PostgreSQL and Redis servers with the following commands:
sudo installdir/ctlscript.sh start postgresql
sudo installdir/ctlscript.sh start redis
Change the working directory to the GitLab application repository:
Change to use the git user:
sudo su git
Execute the following command to perform the backup:
bundle exec rake gitlab:backup:create RAILS_ENV=production
The backups are stored in the directory installdir/apps/gitlab/htdocs/tmp/backups.
NOTE: there is no error when I did the first step
Step 2: Update GitLab code
git fetch --all
git checkout -- db/schema.rb Gemfile.lock
checkout with latest gitlab
git checkout v8.14.3
NOTE: no error till here
Step 3: Update GitLab Shell
git stash save "GitLab Shell before upgrade"
git checkout v`cat installdir/apps/gitlab/htdocs/GITLAB_SHELL_VERSION` -b v`cat installdir/apps/gitlab/htdocs/GITLAB_SHELL_VERSION`
git stash apply
NOTE: I got error here with checkout, so I change the variable to number
git checkout v4.0.2
Step 4: Update Gitlab-workhorse (requires compilation)
Compile this component from source to get the latest version. It is required to install Go.
NOTE: I got Go installed with last bitnami image, so I didn't install Go.
NOTE: I got gitlab-workhorse 1.0.1 and because https://gitlab.com/gitlab-org/gitlab-workhorse.git only provide v0.7.2 which older than the
installdir/apps/gitlab/htdocs/GITLAB_WORKHORSE_VERSION said, so I didn't clone it and remain what I had installed with last bitnami image.
sudo mv installdir/apps/gitlab-workhorse/gitlab-workhorse installdir/apps/gitlab-workhorse/gitlab-workhorse.back
Adjust the permissions:
sudo chown git:git installdir/apps/gitlab-workhorse/gitlab-workhorse
NOTE: the document is not correct here
Step 5: Update gitlab-ci-multi-runner
Backup the previous gitlab-ci-multi-runner binary:
sudo mv gitlab-ci-multi-runner gitlab-ci-multi-runner.back
Download the already compiled gitlab-ci-multi-runner from the following URL.
For Linux x64, run the following command:
sudo wget -O gitlab-ci-multi-runner https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-linux-amd64
sudo chmod 775 gitlab-ci-multi-runner
sudo chown gitlab_ci:gitlab_ci gitlab-ci-multi-runner
NOTE: nothing wrong here, but all other files are below to root expect new gitlab-ci-multi-runner
Step 6: Install new gems and database migration
Run bundle install to install new gems:
bundle install --without development test mysql --deployment
QUESTION:Should I run bundle under user git by
sudo su git
sudo -u git -H bundle install --without development test mysql --deployment
I am confused here, and got lots of errors about the gem install include
with the error like
linux_inet_diag.c:24:1: error: static declaration of ‘rb_thread_blocking_region’ follows non-static declaration
such things with lots different gems
At this point I found that my ruby is 2.1.9 and I decided to upgrade it.
I upgrade the ruby under user bitnami firstly and found no help at all, then I upgrade it under root and git. Then the gem instalation all good.
Run the database migration:
bundle exec rake db:migrate RAILS_ENV=production
Step 7: Update configuration files (optional) -- since this is optional, so I skip it
Step 8: Check results
Exit from git user session if it is still in use:
Start the rest of the services with the general script:
sudo installdir/ctlscript.sh start
I got the
-su: 28: [[: not found
at this point and sidekiq won't run.