CentOS to Rocky migration tooling

Hello all,

When rockylinux is available and people are willing to switch to it there will be a humongous task waiting for many sysadmins.

This will entail a bit more than simply replacing the centos-release.rpm with rocky-release.rpm
Especially if you need to do it to dozens/hundreds if not thousands installations.

We must facilitate them in the migration to rocky linux.

I think ansible is very suited for this.
We need come up with a list with as many of possible issues that could occur.

A simpe example of an issue when replacing the centos-release rpm with the rocky-release.

  • Handle customizations of the repo configuration files.

Rob

9 Likes

Bulk RHEL -> CentOS migration automation is something I work on at $dayjob. I think we should keep a migration path (and the required tooling) in mind, for sure!

4 Likes

I donā€™t think there will be any issue. The code is mostly the same and itā€™s just replacing the branding, wording, links and other texts.

It most cases people will just need to add the repo and start replacing the packages.

This will probably just need to be a part of a documentation site. If anyone wants to work on testing/create documentation (and /or ansible playbooks as suggested) - you can use Springdale Linux to test it. Iā€™m in the middle of a CentOS -> Springdale migration right now on a test VM and it seems pretty straightforward.

Update: Just as an example hereā€™s working commands to go to Springdale 8:

dnf update -y
rpm -e --nodeps centos-backgrounds centos-indexhtml centos-gpg-keys centos-linux-release centos-linux-repos centos-logos
rpm -ivh \
    http://springdale.princeton.edu/data/springdale/8/x86_64/os/BaseOS/Packages/springdale-appstream-8-0.sdl8.2.noarch.rpm \
    http://springdale.princeton.edu/data/springdale/8/x86_64/os/BaseOS/Packages/springdale-core-8-0.sdl8.2.noarch.rpm \
    http://springdale.princeton.edu/data/springdale/8/x86_64/os/BaseOS/Packages/springdale-release-8.3-0.42.el8.x86_64.rpm
dnf distro-sync -y
2 Likes

if your centos system is a client of a katello server then this is not trivial

Rob

What about places that donā€™t use Ansible? I am sure there are numerous places where Ansible is not in use. Those places would probably like the steps to follow for such a migration.

Perhaps the documentation can include the steps to actually perform the migration, and the playbook can be provided as an additional help for those that have Ansible to make it even easier for them.

3 Likes

using ansible has almost no requirements

The only real requirement is an ssh server running on the system that you wish to manage.

Having python installed on that system makes things a lot easier.
It works best if it is python3.6 or up.

python 2 will work to, but your mileage may vary
Use the ansible network_cli for direct ssh when python2 fails you

Then you could spin up one vm to act as an ansible-controller
You could run all the ansible jobs from that system.
As long as it can reach the centos servers via ssh

Once you have migrated all you can throw away the ansible controller

1 Like

I think it would be great. Most people wasted time to migrate from CentOS 6 and 7 to 8 and now 8 abruptly gets the axe. They wouldnā€™t like to do it all again to migrate to Rocky or whatever.

I agree with this ā€˜other-way-aroundā€™ approach.

  • Create the step-by-step howto
  • Add scripts for different orchestration tools based on the howto.
3 Likes

Iā€™m not participating on the relevant team but I am 98% certain I have seen this addressed in one of the GitHub or Slack conversations as a goal. I will try to find that and report back in the next 48 hours. Someone else is welcome to beat me to that, and if Iā€™m misremembering or imagining things, please correct me. :slight_smile:

Hey all ā€“ Iā€™m back as I promised. I canā€™t find any specific commitment, but that doesnā€™t mean it wonā€™t happen! Either I imagined it, it was in Slack more than 10,000 messages ago, or my search abilities have failed. In any event, CentOS 8 still has a year until EOL, and based on the current timeline that the project is currently striving for, I assume there will be a migration script. The goal of Rocky Linux is to be a stable rebuild of RHEL like CentOS Linux was/is, and as with all such distributions, as @esw points out, itā€™s normally quite easy.

I do see in Slack (which anyone can join from the invite link on the Rocky Linux site) that those of you in this thread arenā€™t the only ones interested in this :slight_smile:

Iā€™ve been searching the web for this as well, and I was kinda surprised to find a solution from red hat.

a paywalled article 2360841, for those who donā€™t have that access.
Check out this epel package : convert2rhel.noarch

dnf info convert2rhel.noarch
Last metadata expiration check: 1:07:36 ago on Tue Dec 15 09:20:28 2020.
Available Packages
Name : convert2rhel
Version : 0.13
Release : 1.el8
Architecture : noarch
Size : 87 k
Source : convert2rhel-0.13-1.el8.src.rpm
Repository : epel
Summary : Automates the conversion of RHEL derivative distributions to RHEL
URL : https://github.com/oamg/convert2rhel
License : GPLv3+
Description : The purpose of the convert2rhel tool is to provide an automated way of
: converting the installed other-than-RHEL OS distribution to Red Hat Enterprise
: Linux (RHEL). The tool replaces all the original OS-signed packages with the
: RHEL ones. Available are conversions of CentOS 6/7 and Oracle Linux 6/7 to
: the respective major version of RHEL.

I think this is a very nice place to start.

After some serious heavy thought I even came up with a new name :stuck_out_tongue:

convert2rocky.noarch

Rob

6 Likes

A related discussion is here: Transition from CentOS to Rocky

1 Like

With 63 CentOS servers (Release 6-8) that I look after, a smooth migration would be wonderful. I am old school so will always do a fresh install of an OS then just sync/splice in the bits I need (passwd, group, shadow, crontab etc).
I know it will probably be a while off but canā€™t wait to run up my first install of Rocky in-house. Desktops choice would be great as not everyone is in love with Gnome - XFCE I have settled on after KDE, then Cinnamon, so this is important for me.
As for actual ā€˜toolingā€™ I find detailed ā€˜how-to/walk-thoughā€™ much better so users appreciate what live where etc.

As I have lived at a UNIX (then Linux) based command line prompt since 1987, the desktop will always be a secondary consideration.

4 Likes

Replacing all the packages so that no packages remain that say ā€œRHELā€ or ā€œCentOSā€ is not too difficult (we also did this internally for thousands of machines). But, as long as the starting point is CentOS, Iā€™m thinking there is no need to replace ā€œallā€ the packages. CentOS is still legal for use. Depending upon timing, it may be easiest to align this with an upgrade program. For example, let us say that RHEL 8.4 is released, and CentOS 8.4 is never released, but users are forced to upgrade to CentOS 8 Stream. Then, a Rocky 8.4 might be a convenient point to apply all the re-branding packages along with anything else that gets updated.

5 Likes

Based on Oracleā€™s script to move from CentOS to OEL, it may not be terribly difficult:

3 Likes

I ran that on a CentOS-6 (Stella) and a CentOS-8 installation. Only issues I had were some dependency issues with abrt packages that I got around with --skip-broken and fixed when they were the only problems left. Other issue was the script did not replace centos-indexhtml that provides the home page when firefox starts up. I tried to install redhat-indexhtml (which is the OL replacement) but firefox had a dependency on centos-indexhtml preventing that. Had to remove centos-indexhtml which also removed firefox. Then I installed both - no problems. No other issues noticed so far.

As a thought - as soon as packages are available, the migration script should enable migration to Rocky Linux even before installation media are available!

Reason this is a big deal: it is no small feat to get anaconda working properly. I am still trying to get the OL-8.3 installation media to work and nothing seems to like my video cards - screen goes black soon after the system starts loading. I know it is not the media because it installs on an older box. Tried 3 different Radeon video cards (RX5704, Radeon Pro WX100 and an HP branded something or other) all with different GPU hardware, R7-2700X CPU and MSI X470 Gaming Plus Max motherboard. The CentOS anaconda handles this OK but not so the OL anaconda. I see similar problems looming for Rocky anaconda.

This would be perfect