I’m planning on doing a foreman install on CentOS 8 stream bearing in mind that support for 8 stream is nearing its end what are my options to migrate to 9 ?
Full backup of foreman pre support end and restore to a new build on 9 when foreman is supported
EL9 is generally not yet supported as a base for Foreman installation, so EL8 is your best bet currently.
The options you have to later migrate to EL9 are:
Installating a new Foreman on EL9 and recovering the DB there (this has been done by quite some people in the past, and generally should work if you deploy the same setup and the same Foreman version)
In-Place upgrading using leapp. This was the officially supported way for migrating from EL7 → EL8 and I assume that will be the way to go for a later EL9 migration as well.
Totally agree and I would recommend the later as it worked like a charm, but not sure about for the CentOS Stream 8 to 9 as it is not available upstream yet (see ELevate Quickstart Guide | AlmaLinux Wiki), so it is another issue that needs to be solved.
Leapp itself is the original project by Red Hat and includes migration data for RHEL only, but ELevate from AlmaLinux is adding migration data for the derivates (while Oracle is doing the same for OEL). Evgeni has added the necessary bits and pieces in code and documentation needed to support also Foreman, so it worked like a charm for EL7 to 8. If you are interested the documentation is at Upgrading and Updating Foreman