Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitlab: how to update to latest minor version

I tried to update my gitlab-CE from 10.3.2 to the latest one (currently the 11.4). And it gives me this honestly safe error.

[...]
gitlab preinstall: It seems you are upgrading from 10.x version series
gitlab preinstall: to 11.x series. It is recommended to upgrade
gitlab preinstall: to the last minor version in a major version series first before
gitlab preinstall: jumping to the next major version.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
gitlab preinstall: and upgrade to 10.8 first.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_11.2.3-ce.0_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/gitlab-ce_11.2.3-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@this-vm# apt-cache policy gitlab-ce | grep Installed
  Installed: 10.3.2-ce.0

But how to install to the latest minor version ? The documentation they are referring to, doesn't say how to do it. Do you guys encounter any problem like this ?

like image 773
salvob Avatar asked Sep 10 '18 09:09

salvob


People also ask

How often does GitLab update?

GitLab releases a new version every single month on the 22nd. The list is an outline of tentpole features – the most important features of upcoming releases – and doesn't include most contributions from volunteers outside the company.


3 Answers

Try to update to the latest minor version as suggested here:

apt-get update
apt-get install gitlab-ce=<YOUR-LATEST-MINOR-VERSION>-ce.0
gitlab-ctl reconfigure
gitlab-ctl restart

In your case latest minor is: 10.8.6 [as of today].

You can check the release list. Remember to check the changes between your initial and target versions.

like image 160
ggagliano Avatar answered Sep 29 '22 06:09

ggagliano


For CentOS/RHEL reference:

To install minor version on (CentOS/RHEL). Follow below steps.

To update minor version on 11.xx to latest version of 11.11.5:

sudo yum install gitlab-ce-11.11.5-ce.0.el6.x86_64

Similarly for all other version, You can find the specific version/install command you need to use at https://packages.gitlab.com/gitlab/gitlab-ce. Search for a version string such as gitlab-ce-11. Click on the RPM or Deb package for your OS version, then you will see all version of gitlab where you can findout latest version name and install it as stated above but just replace it with your minor version name i,e. gitlab-ce-11.11.5-ce.0.el6.x86_64

Upgrading from one version to another version should be followed as per the recommendation below or official page here.

12.7.5 -> 12.10.5
11.3.4 -> 11.11.1
10.6.6 -> 10.8.3
11.3.4 -> 11.11.8
10.6.6 -> 10.8.7
9.2.3 -> 9.5.5
8.9.4 -> 8.12.3 

Always recommended that first upgrade to the latest available minor version within your major version and then upgrade it next stable version.

like image 25
Mohamed Ayas Avatar answered Sep 29 '22 06:09

Mohamed Ayas


I was trying to update our existing gitlab-ce version 11.2.1 to latest gitlab-ce 12.2.0. After installing the 12.2.0 using yum update when I tried gitlab-ctl reconfigure. I got the error saying you need to install gitlab 11.0.0 first.

So, I removed the gitlab 12.2.0 and installed the 11.0.0 version using

yum remove gitlab-ce-12.2.0-ce.0.el7.x86_64.rpm
wget https://ftp.sjtu.edu.cn/sites/gitlab-ce/yum/el7/gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
rpm -Uvh gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
gitlab-ctl reconfigure
sudo gitlab-ctl restart

The process was successful, My old data was there and I could login with my old credentials. The version in front-end was showing 11.0.0. Now to get to latest version I did

gitlab-ctl stop
yum remove gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
wget https://ftp.sjtu.edu.cn/sites/gitlab-ce/yum/el7/gitlab-ce-12.2.0-ce.0.el7.x86_64.rpm
rpm -Uvh gitlab-ce-12.2.0-ce.0.el7.x86_64.rpm
gitlab-ctl reconfigure
gitlab-ctl restart

I got on version 12 but then I got another error the alermanager service was not starting so I added the following block to /etc/gitlab/gitlab.rb

alertmanager['flags'] = {
  'cluster.advertise-address' => "127.0.0.1:9093",
}

I restarted the gitlab and everything was running.

gitlab-ctl restart
like image 37
Mian Asbat Ahmad Avatar answered Sep 29 '22 05:09

Mian Asbat Ahmad