Gitlab server OS upgrade from Red Hat Enterprise Linux 6 to 7

Hi all,

I need to upgrade a Red Hat Enterprise Linux (RHEL) 6 gitlab server to RHEL 7. I plan on using the redhat-upgrade-tool tool to do the OS upgrade. Once upgraded to RHEL 7, I plan on upgrading gitlab to switch from the installed el6 gitlab package to a more recent el7 gitlab package.

The upgrade steps I have in mind are:
Current state: RHEL 6 gitlab-ce-8.17.8-ce.0.el6.x86_64.rpm
After OS upgrade: RHEL 7 gitlab-ce-8.17.8-ce.0.el6.x86_64.rpm
After gitlab upgrade: RHEL 7 gitlab-ce-9.5.10-ce.0.el7.x86_64.rpm

So far I’ve tested the gitlab version upgrade on a CentOS 7 and that seemed to work okay. I installed the gitlab-ce-8.17.8-ce.0.el6.x86_64.rpm rpm on the CentOS 7 VM, then I did the upgrade using the gitlab-ce-9.5.10-ce.0.el7.x86_64.rpm rpm.

Does anyone know if this upgrade path is an acceptable one?

Does anyone see any issues with this upgrade plan?

Thanks very much,


Hi @beach42

I don’t recommend doing in-place upgrade using the redhat-upgrade-tool. In general RHEL6->7 in-place upgrade is limited and never worked for me unless the server was really simple almost default-like installation. You can see the supported stuff on RHEL official docs.

IMHO doing a clean install and migrating stuff between GitLab instances would be much less painfull.

I’m curious why 9.x is being used, with 15.x coming in May. 9.x does not receive security updates anymore, recommend adding an upgrade step to the latest 14.9+ release too.

Hi @balonik. Thanks for your reply. I’ve done many upgrades using the redhat-upgrade-tool and never had any issues since the servers are pretty standard uncomplicated rhel 6 systems.

My question was more about if it’s okay or not to initially run the el6 gitlab package on rhel 7. Do you know if it’s okay?

Hi @dnsmichi, I plan on upgrading to 14.x as well, but this post was just about upgrading to rhel 7 while still using the el6 package, then upgrading to the next version of gitlab to switch from the el6 package to the el7 package.

Do you know if running the el6 version of gitlab on rhel 7 initially will be okay?

Thanks for confirming. I care a lot about security and maintained packages, hence my additional question to keep everyone safe.

I have never done that before with the GitLab package, and a transition on a major OS upgrade. From my experience with generally migrating from RHEL6 to RHEL7 a lot of packages broke, and it was not fun trying to fix them. The overall suggestion I heard from friends and customers in my past job was to start with a fresh RHEL7 install, use automation tools (Ansible, Puppet, etc.) to provision the base system and applications.

Specifically for GitLab, I’d follow @balonik 's advice to do the same.

  • Spin up a RHEL7 server, and prepare all settings (Postfix MTA, etc.)
  • Install GitLab with the same version as the old server
  • Export the data from the RHEL6 GitLab server, and import into the RHEL7 GitLab
  • Proceed with upgrade steps until GitLab 14.x (there are a lot, plan time for that)

I have never done a migration from GitLab 8 to 14. I don’t think that exporting data from GitLab 8 works well with importing directly into 14.x - that said, the upgrade procedure to run data migrations will be needed afterward.

For migration and export/import, I’d suggest keeping the exact same version of GitLab on RHEL6 and RHEL7 to avoid problems: Project import/export | GitLab

I’d start with 8.17.8, both RPM packages are still available on the package server.

After the RHEL7 server has imported all data, and you’ve verified it working, start with the upgrading steps in Upgrading GitLab | GitLab

For testing before touching the production systems, you could start with a RHEL7 VM and a test setup e.g. in VirtualBox to verify the commands and steps while keeping production intact. If that works as intended, either make the RHEL7 VM the new production host, or repeat all steps on an approved RHEL7 server (depends on company policies and access to infrastructure).



Thanks very much for the info Michael.



To finish off this topic, and simply as a test because I was curious, I used the following steps to upgrade to rhel 7, and the gitlab UI was available after each rpm command completed and each rpm command (which does the upgrade) seemed to complete correctly:

  1. redhat-upgrade-tool --iso /rhel-server-7.6-x86_64-dvd.iso --addrepo rhel-7-server-optional-rpms=http:///rhel-7-server-optional-rpms --cleanup-post
  2. rpm -Uvh gitlab-ce-8.17.8-ce.0.el6.x86_64.rpm
  3. rpm -Uvh gitlab-ce-8.17.8-ce.0.el7.x86_64.rpm
  4. rpm -Uvh ./gitlab-ce-9.5.10-ce.0.el7.x86_64.rpm
  5. rpm -Uvh ./gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm



1 Like

Glad it worked for you, thanks for sharing :slight_smile: