Problem:
I currently have an instance of Foreman that’s running on CentOS 7 and version 3.3.1. I would like to migrate the instance to AlmaLinux 8.8 and version 3.8.0. What is the proper way to accomplish this? I tried using foreman-maintain to take a full backup, then on a fresh AlmaLinux 8.8 system, I installed a vanilla version of Foreman 3.8.0 then used foreman-maintain there to perform a restore. This somewhat worked, but it was missing all the configurations such as Puppet ENC, hostgroup, networks, compute resources, authentication etc.
Expected outcome:
The foreman-maintain backup and restore should re-create the instance as it was from the source Foreman instance.
I do not recommend doing a new installation if you have not automated it somehow and know where to adjust it for changes made in the last releases.
While on Foreman 3.3 it would run ELevate to update the OS (and migrate to another derivate if you wish): Upgrading and Updating Foreman
Afterwards I would run the Foreman upgrades step by step with a quick verification everything works fine in between.
This may take you a day but is typically faster than doing a rebuild, fixing all the oversights and getting all in afterwards again.
I can say I did this last week with an instance and it went relatively well.
The only technical issue I had outside the typical notes was an issue with a puppet package being listed twice just before the leap upgrade, and that broke my first attempt. VM snapshot saved the day there. My second attempt I updated to puppet7, removed the duplicated package, and did a reinstall on the one version of the package that should exist. I believe this was the puppet-oauth package.
I did this a few months ago. I also had 3.3 on CentOS 7. I upgraded it to CentOS 8 before upgrading foreman further. I had to pretty much uninstall most of the foreman RPMs in order to get the VM to upgrade to CentOS 8. But once that was done, reinstalling foreman on it went well (since all the underlying data was still there and foreman-install put everything that was missing back). Then I upgraded foreman one version at a time until I got to 3.7.
Uninstallation of Packages should not be needed, if you follow the instructions I linked above and add the Foreman repos so ELevate does know about. If you can find your notes I would be interested if you missed this step or if something went wrong.
For converting the host to AlmaLinux, I had a similar discussion with a colleague and I would recommend waiting for Foreman supporting EL9 and then decide which route to go when the operating system upgrade is required/possible. Of course if you switched all your systems as a strategic decision just go on and migrate, but if not this will be a good point to make such a decision.
I did it from centos 7 to Alma 8 with the elevate system it worked easily. The foreman parts upgraded correctly, I had 2 proxies and about 1000 vms. Your issue will be that the foreman repos will be now the archived ones but I guess that can still work
@mattatjgi Thanks, so this looks like you did the manual way via dnf which is not a support way to update. Of course it will work but cause additional manual work introducing more possibilities for something going wrong. This is what Leapp / ELevate is trying to mitigate by showing possible problems in advance and apply solutions automatically where possible.
@stephenc Thanks for also confirming Elevate worked smooth, perhaps we reach the number where people believe that this is a better solution than a re-installation.