Upgrade omnibus 13.12.12 to 16

Hi

i have Ubuntu 18.04 and omnibus installation 13.12.12 and i need to upgrade to 16

i see upgrade path :

  • 13.12.15
    
  • 14.0.12
    
  • 14.3.6
    
  • 14.9.5
    
  • 14.10.5
    
  • 15.0.5
    
  • 15.4.6
    
  • 15.11.6
    
  • 16.01
    

What is the best way, for upgrade ?
Doing upgrade to ubuntu 20.04 first and then i upgrade Gitlab ?
Do i need to split go to 14.10.5 wait some day and go to 15.11.6 etc… ?
Does PSQL upgrade at same time or need to do it myself ?
How long it s take around for going to 16 ?

Thanks a lot for your’s REX and answer

If you have omnibus installation, the included postgres will upgrade itself when it needs to if a specific version of gitlab requires a higher version.

Best way to upgrade is upgrade to the latest Gitlab that Ubuntu 18.04 supports. Then, and only at this point once you have the latest possible on 18.04, then you can think about upgrading it to Ubuntu 20.04. Then once on Ubuntu 20.04 you can continue to upgrade to the latest Gitlab available on Ubuntu 20.04.

As per the Gitlab upgrade documentation, you have to ensure that background migrations are finished before you start the next upgrade on the Gitlab upgrade path. Also you need to ensure that once at the latest version on Ubuntu 18.04 make sure background migrations have finished, and everything is working with your Gitlab. Then you can do the Ubuntu upgrade to 20.04.

And also very important, make sure to backup your server before you start any upgrades in case anything goes wrong. Otherwise it will be difficult or impossible to recover from if you do not have a backup. See Gitlab Backup and Restore documentation for this.

Thanks

If i understand well what iread here : Supported operating systems | GitLab

ubuntu 18.04 is supported by the latest gitlab version so i don t need to upgrade Ubuntu yet

Yes that’s correct, I tend to search here: gitlab/gitlab-ce - Results for 'gitlab-ce_16' and bionic in gitlab/gitlab-ce there is also an equivalent search for gitlab-ee since the one I posted was for ce version.

You can use that for future reference, so if you start seeing packages not appearing or don’t see upgrades for a long time on your system, then it could mean that either none are being released, or there is a problem with the repo not refreshing properly (I had this once and was stuck on 12.9.3 for ages until I forced refresh by reinstalling the repo again).

Note Ubuntu 18.04 went EOL in April 2023, so it’s not receiving updates any more, so for security of the Linux server itself, you need to look at upgrading to Ubuntu 20.04 sometime soon, and even switching to Ubuntu 22.04 for even longer support. Ubuntu 20.04 finishes in April 2025.

1 Like

yes it why i want upgrade ubuntu

So in the path it s better to upgrade gitlab to version 16 first and at the end if all is good upgrade Ubuntu ?

Yes exactly.

There have been situations when someone upgraded Debian/Ubuntu or whatever underneath only later to find that the version of Gitlab on the server was way too old. Gitlab versions on the upgrade path didn’t exist for the newer version of Linux. So now the upgrade was a problem.

Best way is always upgrade to the latest possible version of Gitlab for the version of Linux you have, so for you Ubuntu 18.04 Bionic. Then once at latest, you upgrade to Ubuntu 20.04 Focal. The last version you got to on 18.04 will exist for 20.04, so you then have all the packages for Ubuntu 20.04 to continue upgrading (if ever in that same scenario as I wrote above). Then when at latest for Ubuntu 20.04 Focal, you’ll then also have versions of Gitlab that match to continue upgrading to say Ubuntu 22.04 Jammy.

If you want to go to Ubuntu 20.04. Upgrade Ubuntu 18.04 to Gitlab 15.11.6. Then upgrade to Ubuntu 20.04 and upgrade to Gitlab 16.01. Then you have the Gitlab 20.04 package installed, and not the one from Ubuntu 18.04.

If you want to go to Ubuntu 22.04, then upgrade 18.04 to Gitlab 15.4.6. Then upgrade to Ubuntu 20.04, then Gitlab 15.11.6, then Ubuntu 22.04, then Gitlab 16.01. That way you run Ubuntu 22.04 with the correct package and not an older one. Older versions of Gitlab can have Ubuntu dependencies which could cause problems if you tried to upgrade to Ubuntu 22.04 with Gitlab 16 for 18.04 installed.

Key point, leave last Gitlab upgrade to be done on the new OS. Unless of course it doesn’t exist because the OS is too new (like when Ubuntu 22.04 was first released, no Gitlab packages existed).

1 Like

Thanks you so much i have a better vision now

1 Like

Hi

i make the gitlab update to the 15.11.6 version, during this process i need to download my self package because apt-get install gitlab-ce= don’t find the package

gitlab-ce_14.9.5-ce.0_amd64.deb
gitlab-ce_14.10.5-ce.0_amd64.deb
gitlab-ce_15.0.5-ce.0_amd64.deb
gitlab-ce_15.4.6-ce.0_amd64.deb
gitlab-ce_15.11.6-ce.0_amd64.deb

When i arrive to 15.11.6, i try to upgrade Ubuntu 18.04 to 20.04 and when it s done i lost gitlab services, i can t use gitlab CLI command

I revert to my snapshot

Do i have something to do after ubuntu upgrade to 20.04 ?

How were you doing the upgrade? If you were using do-release-upgrade you are better not using this. Better is to edit /etc/apt/sources.list manually from bionic to focal and the same for any other repositories in /etc/apt/sources.list.d/xxxxx.list (where xxxxx is whatever the files are called in this directory). Then do:

apt-get clean all
apt-get update
apt-get upgrade
apt-get dist-upgrade

yes i did use do-release-upgrade commande

Ok i will make a try soon

Thank bro, i will upgrade gitlab 13.6.1 (1b6a590b197) on last week.

hi update my citlab CE to the latest version 16.1.4

now il tried to upgrade ubuntu i did step you give to me but when i do apt-get upgrade i have this error :

/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /opt/gitlab/embedded/lib/libruby.so.3.0)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /opt/gitlab/embedded/lib/libruby.so.3.0)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /opt/gitlab/embedded/lib/libruby.so.3.0)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /opt/gitlab/embedded/lib/libjemalloc.so.2)
dpkg: erreur de traitement du paquet gitlab-ce (--configure) :
 installed gitlab-ce package post-installation script subprocess returned error exit status 1
Des erreurs ont été rencontrées pendant l'exécution :
 gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

@giulian , I think that maybe you can try this other option.

As I understand you can move your gitlab from one server to another using backup/restore tools but you have to be sure that you will be using the same version of Gitlab where you backup and then where you restore the data. What do you think if you upgrade your Gitlab to the latest allowed version and do a full backup, then you launch your new server on Ubuntu 22.04 , install the same version of Gitlab where you created the backup, restore the data and test the installation. If it is working fine, access your repos, developers con work, etc, then you continue upgrading Gitlab to the latest version you need.

It might work, what do you think??

i think is t complicated because our gitlab is very big so backup and restore option will take very longtime i will try to find away for upgrade OS

Did you find a solution to this? I’ve just come across the same issue trying to upgrade from 16.6.6 to 16.6.7.

Solution for ubuntu upgrade ?