Updating to RHEL8 from RHEL7

Hey Everyone. We have an on-prem instance of Gitlab EE currently running on RHEL7. We are looking to upgrade to RHEL8 in the coming months. My question is, is it recommended to update the current instance directly to RHEL8, or create a RHEL8 server and use the import/export tool to move our instance over? I’ve noticed a few posts on here saying they ran into repository issues after the upgrade. Thanks in advance!

Whilst Red Hat do provide a tool that allows for distro upgrades, the results do vary, and in some cases it may attempt to remove things that you might not want removing - packages, or perhaps repositories related to Gitlab. Also, whilst they do have the tool, the general recommendation from Red Hat is to make a clean server install and migrate your application across to it.

Depending on how much data you have, the Gitlab Backup/Restore procedures should help you. You will have to ensure that the same version of Gitlab is installed on RHEL8 as to what you have on RHEL7 - this is because backups can only be restored to the same version. Eg: if you have Gitlab 15.9.2 then it can only be restored to 15.9.2. That said, you may find that your RHEL7 if it hasn’t been upgraded regularly is on an older version that might not exist for RHEL8. In which case, you’d have to upgrade Gitlab on RHEL7 until you get to a version that exists for RHEL8. At which point you can make the backup from RHEL7, and then copy the backup to the RHEL8 system as outlined in the Gitlab Backup/Restore documentation. Also, copy /etc/gitlab/gitlab.rb from the old server, along with /etc/gitlab/gitlab-secrets.json. In a summary, your process on the new server looks like this:

  1. Install Gitlab on RHEL8 - ensuring it’s the same version as on RHEL7 (CE or EE, as well as version number).
  2. Copy gitlab.rb and gitlab-secrets.json from old server to /etc/gitlab/ on RHEL8.
  3. Run gitlab-ctl reconfigure to get Gitlab configured and ready.
  4. Copy backup from /var/opt/gitlab/backups on RHEL7 to the RHEL8 server, same location, so /var/opt/gitlab/backups.
  5. Run restore process for Gitlab as per the docs.

More details can be found here: Back up and restore GitLab | GitLab

Thank you! that’s what I was leaning towards judging from other posts and things. Luckily, we keep up with upgrades every month, so we should be good.

1 Like