When hosting the Gitlab service, you will be required to perform migrations on each upgrade. These migrations are executed by the post installation scripts of the respective packages. In this post, we will learn what is required when upgrading of Gitlab and how to perform them.
According to the official Upgrade Recommendations, you should only ever perform subsequent major version upgrades. In addition, you should upgrade to the latest available version within your current major version before upgrading to the next major version.
A valid upgrade path may look something like the following:
8.13.4 -> 8.17.7 -> 9.5.8 -> 10.1.4
I found the upgrade process to be particularly easy, especially using the debian based repositories available for Gitlab CE.
If you require previous versions not available through your distributions repositories, you will need to manually download and install the packages. The packages in rpm and deb formats can be found at https://packages.gitlab.com/gitlab/gitlab-ce/.
After downloading the appopriate package, you will need to install it manually.
$ dpkg -i gitlab-ce_10.8.5-ce.0_amd64.deb
With the advent of the purchase of Github by Microsoft, hosting projects on-premises with Gitlab has become a very attractive option. The benefit being that you will no longer be giving your sensitive information away within your private repositories hosted by a third party provider.
Using this process, we are able to move our installation forward and benefit from the excellent new features in the newer versions of the services.