Gitlab server OS upgrade

Hi All,

I am planning to upgrade the gitlab installed server redhat version from 6.9 to 7.5 , Could you please guide me, what are the steps needs to follow?

Any challenges during this activity?

I went through this recently. Similar to you (6.10 to 7.6). It was fairly smooth. Some general advice:

  • The version of GitLab on RHEL 7 should be kept the same version as the RHEL 6. So the only difference is your OS not GitLab.

  • Evaluate all the setup you have on RHEL6. The settings within GitLab all can be carried over, but make a list of the external configs:

    1. Any external systems you’ve integrated with (if any), Any CI runners.
    2. Virus, Monitor agents, Backup agents …etc.
    3. Any firewall exceptions, ensure it’s on the new box.
    4. Any load balance, DNS alias if front of your gitlab instance.
    5. Any certificate settings
    6. Carry over the gitlab.rb settings (if ominibus)
    7. Do a code search in pipeline to ensure no one hard coded the RHEL6 server name directly (use something like a DNS alias or load balance url).
  • Install Gitlab (fresh) on RHEL7 same version. Then do a data restore. You can setup all the basic stuff in advance, like any backup jobs, mail, firewall, hook into LDAP, work out those kinks. Makes the data cutover faster.

  • Then restore the DB snapshot from RHEL 6 to RHE7. For the cutover the backup should be everything. So if in RHEL6, you SKIP certain things like container registry (for size), the one that’s coming over to RHEL 7 should be the full thing, no SKIP.

Double check free disk space, allow at least two times the size of the DB snapshot on the RHEL 6 box. It has to expand (extract temporarily) before it gets gzipped/tar. Can be big if containers.

Follow the documentation on the GitLab site on restore.

Plan the cutover timeline accordingly (not sure on the outage for your users). GitLab has a broadcast message feature, it’s useful to spread maintenance awareness. If you have any auto deployment integrated systems. Shut that off on RHEL 6 before backup (and the RHEL 7 before restore) .

Depending on your outage tolerance, Budget you CHANGE window accordingly, this may depends on the size of your Gitlab for the cutover.

Make a project plan of the steps (rough outline)

  1. Server build (new server, team access, mounts, mail setup, firewall)
  2. Install Gitlab (bare) on new.
  3. Configuration
  4. Data (import data)
  5. Integration cut over. (point other systems from old to new)
2 Likes

@sirmuttonchop, Thank you so much for the info. Really appreciate the answers and its very useful information for me to have a run book.

One more query: Have seen Rhel 7 gitlab packages are available , Is there any dependency or any challenges if i install the Rhel 6 package in Rhel 7 OS ?

Should definitely use the RHEL7 GitLab package on the RHEL7 server. (not rhel6 gitlab pkg on rhel7 box)

Can find the appropriate one here: https://packages.gitlab.com/gitlab/

No major challenges. I used yum install for the Gitlab pkg. During the install it lists any missing dependency packages. I forgot if it ‘auto-installs’ it for you (like after a prompt) or if have to manual install. For me on the new server (rhel7), I had to install the python one myself.

Example cmd to check for rpm pkgs:
rpm -qa | grep ‘openssh-server|policycoreutils-python’
sudo yum install policycoreutils-python

root@rhel7server$ sudo yum localinstall gitlab-ce-11.xx.x-ce.x.el7.x86_64.rpm

Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id, search-disabled-repos, subscription-manager
Examining gitlab-ce-11.xx.x-ce.0.el7.x86_64.rpm: gitlab-ce-11.xx.x-ce.0.el7.x86_64
Marking gitlab-ce-11.xx.x-ce.0.el7.x86_64.rpm to be installed
Resolving Dependencies
–> Running transaction check
—> Package gitlab-ce.x86_64 0:11.xx.x-ce.0.el7 will be installed
–> Finished Dependency Resolution

1 Like

Great info. Thank you so much