Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section for RHEL8to9 in-place upgrade using LEAPP #3070

Merged
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
74ad234
Add section for RHEL8to9 in-place upgrade using LEAPPwq
Jun 7, 2024
2488715
Add `PulpcoreVersion` attribute
Jun 10, 2024
f0c9673
Apply changes suggested in the PR
Jun 12, 2024
99b995b
Apply changes suggested in PR
Jun 19, 2024
258551e
Apply changes suggested in PR
Jun 19, 2024
32d9d84
Fix endif syntax
Jun 19, 2024
611d671
Add conditional for locking and unlocking
Jun 20, 2024
6423415
Apply changes suggested in PR
Jun 21, 2024
750f160
Apply changes suggested in PR
Jun 25, 2024
db0ef22
Apply changes suggested in PR
Jul 1, 2024
7b36c25
Apply changes suggested in PR
Jul 2, 2024
fdf814f
Move doc links from prerequisites
Jul 2, 2024
aa98bc3
Apply changes suggested in PR
Jul 10, 2024
722795e
Apply changes suggested in PR
Jul 12, 2024
2f4d3ac
Remove unnecessary article
Jul 12, 2024
068d006
Use attribute for Foreman URL
Jul 15, 2024
676cfb7
Apply changes suggested in PR
Jul 16, 2024
6be5e9f
Apply changes suggested in PR
Jul 17, 2024
72bca82
Apply changes suggested in PR
Jul 18, 2024
b02dfa1
Add attribute 'EL-abbr'
Jul 18, 2024
a8d8e87
Apply changes suggested in PR
Jul 19, 2024
365e557
Change URL to specific chapter
Jul 22, 2024
200b013
Apply changes suggested in PR
Aug 6, 2024
93ef876
Fix vale error
Aug 7, 2024
42b0ed7
Update guides/common/modules/proc_upgrading-project-or-proxy-in-place…
Lennonka Aug 9, 2024
ca28c7f
Update guides/common/modules/proc_upgrading-project-or-proxy-in-place…
Lennonka Aug 9, 2024
c5c080f
Fix typo
Lennonka Aug 12, 2024
d0a512c
Modify ifdef
Lennonka Aug 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions guides/common/attributes-base.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
:DL: Debian/Ubuntu
:DL-ID: Debian-Ubuntu
:EL: Enterprise Linux
:EL-abbr: EL
:foreman-example-com: foreman.example.com
:foreman-installer: foreman-installer
:foreman-installer-package: foreman-installer
Expand Down
1 change: 1 addition & 0 deletions guides/common/attributes-satellite.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
:customssl: custom SSL
:DocState: satellite
:EL: {RHEL}
:EL-abbr: RHEL
:fdi-package-name: foreman-discovery-image
:foreman-example-com: satellite.example.com
:foreman-installer-package: satellite-installer
Expand Down
2 changes: 2 additions & 0 deletions guides/common/attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
:ProjectVersion: nightly
:ProjectVersionPrevious: 3.11
:KatelloVersion: nightly
:PulpcoreVersion: 3.49
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
:CandlepinVersion: 4.4

//
// WHERE ARE MY ATTRIBUTES?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
[id="upgrading-{project-context}-or-{smart-proxy-context}-in-place-using-leapp_{context}"]
= Upgrading {Project} or {SmartProxy} to {EL-abbr} 9 in-place by using Leapp

{Project} and {SmartProxy} are supported on both {EL} 8 and {EL} 9.
You can upgrade your {Project} and {SmartProxy} operating system from {EL} 8 to {EL} 9.
Use the Leapp tool to upgrade as well as to help detect and resolve issues that could prevent you from upgrading successfully.

.Prerequisites
ifdef::satellite[]
* Review Known Issues before you begin an upgrade.
For more information, see {ReleaseNotesDocURL}ref_known-issues_assembly_introducing-red-hat-satellite[Known Issues in {ProjectName} {ProjectVersion}].
endif::[]
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
ifdef::foreman-el,foreman-deb,katello[]
* Review upgrade warnings before you begin an upgrade.
For more information, see {ReleaseNotesDocURL}[Release notes].
endif::[]
* {Project} {ProjectVersion} or {SmartProxy} {ProjectVersion} running on {EL} 8.
ifndef::satellite[]
* Access to available repositories or a local mirror of repositories.
endif::[]
ifeval::["{mode}" == "disconnected"]
* You require access to {RHEL} and {Project} packages.
Obtain the ISO files for {RHEL}{nbsp}9 and {Project}.
For more information, see {InstallingServerDisconnectedDocURL}downloading-the-binary-dvd-images_satellite[Downloading the Binary DVD Images] procedure in _{InstallingServerDisconnectedDocTitle}_.
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
* Leapp completes part of the upgrade in a container that has no access to additional ISO mounts.
The required repositories cannot be served from a locally mounted ISO but must be delivered over the network from a different machine.
endif::[]

.Procedure
ifndef::satellite[]
. Enable the https://copr.fedorainfracloud.org/coprs/g/theforeman/leapp/[@theforeman/leapp COPR Repository], which contains Leapp packages with patches to support {Project} or {SmartProxy} upgrades:
+
----
# dnf copr enable @theforeman/leapp
----
Note that this is not required for {RHEL} installations.
endif::[]
. Install required packages:
[options="nowrap", subs="+quotes,verbatim,attributes"]
+
----
# {project-package-install} leapp leapp-upgrade-el8toel9
----
ifdef::satellite[]
ifeval::["{mode}" == "disconnected"]
. Set up the following repositories to perform the upgrade in a disconnected environment:
.. Add the following lines to `/etc/yum.repos.d/rhel9.repo`:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
[BaseOS]
name={RepoRHEL9BaseOS}

Check failure on line 52 in guides/common/modules/proc_upgrading-project-or-proxy-in-place-using-leapp.adoc

View workflow job for this annotation

GitHub Actions / linter

[vale] reported by reviewdog 🐶 [RedHat.CaseSensitiveTerms] Use 'operating system' rather than 'OS'. Raw Output: {"message": "[RedHat.CaseSensitiveTerms] Use 'operating system' rather than 'OS'.", "location": {"path": "guides/common/modules/proc_upgrading-project-or-proxy-in-place-using-leapp.adoc", "range": {"start": {"line": 52, "column": 20}}}, "severity": "ERROR"}
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
baseurl=http://_server.example.com_/rhel9/BaseOS/

[AppStream]
name={RepoRHEL9AppStream}
baseurl=http://_server.example.com_/rhel9/AppStream/
----
.. Add the following lines to `/etc/yum.repos.d/{project-context}.repo:`
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
[{RepoRHEL9ServerSatelliteServerProjectVersion}]
name={RepoRHEL9ServerSatelliteServerProjectVersion}
baseurl=http://_server.example.com_/sat6/Satellite/

[{RepoRHEL9ServerSatelliteMaintenanceProjectVersion}]
name={RepoRHEL9ServerSatelliteMaintenanceProjectVersion}
baseurl=http://_server.example.com_/sat6/Maintenance/
----
endif::[]
endif::[]
ifndef::satellite[]
. Install additional OS specific packages (`leapp-data-almalinux` for AlmaLinux, `leapp-data-centos` for CentOS Stream, or `leapp-data-rocky` for Rocky Linux).
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
See `ID` in `/etc/os-release` for your operating system code.
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
# {project-package-install} leapp-data-$ID
----
Note that this is not required for {RHEL} installations.
. Add {Project} specific repositories to `/etc/leapp/files/leapp_upgrade_repositories.repo`:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
[leapp-foreman]
name=Foreman {ProjectVersion}
baseurl=https://yum.theforeman.org/releases/{ProjectVersion}/el9/$basearch
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-foreman
enabled=1
gpgcheck=1

[leapp-foreman-plugins]
name=Foreman plugins {ProjectVersion}
baseurl=https://yum.theforeman.org/plugins/{ProjectVersion}/el9/$basearch
enabled=1
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
gpgcheck=0

[leapp-puppet7]
name=Puppet 7 Repository el 9 - $basearch
baseurl=http://yum.puppetlabs.com/puppet7/el/9/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-2025-04-06-puppet7-release
enabled=1
gpgcheck=1

ifdef::katello[]
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
[leapp-katello]
name=Katello {KatelloVersion}
baseurl=https://yum.theforeman.org/katello/{KatelloVersion}/katello/el9/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-foreman
enabled=1
gpgcheck=1

[leapp-candlepin]
name=Candlepin: an open source entitlement management system.
baseurl=https://yum.theforeman.org/candlepin/{CandlepinVersion}/el9/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-candlepin
enabled=1
gpgcheck=1

[leapp-pulpcore]
name=pulpcore: Fetch, Upload, Organize, and Distribute Software Packages.
baseurl=https://yum.theforeman.org/pulpcore/{PulpcoreVersion}/el9/$basearch/
gpgkey=https://yum.theforeman.org/pulpcore/{PulpcoreVersion}/GPG-RPM-KEY-pulpcore
enabled=1
gpgcheck=1
endif::[]
----
endif::[]
. Let Leapp analyze your system:
ifeval::["{mode}" == "connected"]
+
----
# leapp preupgrade
----
endif::[]
ifdef::satellite[]
ifeval::["{mode}" == "disconnected"]
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# leapp preupgrade \
--no-rhsm \
--enablerepo BaseOS \
--enablerepo AppStream \
--enablerepo {RepoRHEL9ServerSatelliteServerProjectVersion} \
--enablerepo {RepoRHEL9ServerSatelliteMaintenanceProjectVersion}
----
endif::[]
endif::[]
+
The first run will most likely report issues and inhibit the upgrade.
Examine the report in the `/var/log/leapp/leapp-report.txt` file, answer all questions by using `leapp answer`, and manually resolve other reported problems.
. Run `leapp preupgrade` again and make sure that it does not report any more issues.
. Let Leapp create the upgrade environment:
ifeval::["{mode}" == "connected"]
+
----
# leapp upgrade
----
endif::[]
ifdef::satellite[]
ifeval::["{mode}" == "disconnected"]
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# leapp upgrade \
--no-rhsm \
--enablerepo BaseOS \
--enablerepo AppStream \
--enablerepo {RepoRHEL9ServerSatelliteServerProjectVersion} \
--enablerepo {RepoRHEL9ServerSatelliteMaintenanceProjectVersion}
----
endif::[]
endif::[]
. Reboot the system to start the upgrade.
+
After the system reboots, a live system conducts the upgrade, reboots to fix SELinux labels and then reboots into the final {EL} 9 system.

. Wait for Leapp to finish the upgrade.
You can monitor the process with `journalctl`:
+
----
# journalctl -u leapp_resume -f
----

ifdef::satellite[]
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
. Unlock packages:
+
[options="nowrap" subs="+quotes,attributes"]
----
# {foreman-maintain} packages unlock
----
endif::[]
. Verify the post-upgrade state.
For more information, see link:{RHELDocsBaseURL}9/html/upgrading_from_rhel_8_to_rhel_9/verifying-the-post-upgrade-state_upgrading-from-rhel-8-to-rhel-9[Verifying the post-upgrade state] in _Upgrading from RHEL{nbsp}8 to RHEL{nbsp}9_.
. Perform post-upgrade tasks on the RHEL{nbsp}9 system.
For more information, see link:{RHELDocsBaseURL}9/html/upgrading_from_rhel_8_to_rhel_9/performing-post-upgrade-tasks-on-the-rhel-9-system_upgrading-from-rhel-8-to-rhel-9[Performing post-upgrade tasks on the RHEL{nbsp}9 system] in _Upgrading from RHEL{nbsp}8 to RHEL{nbsp}9_.
ifdef::satellite[]
. Lock packages:
+
[options="nowrap" subs="+quotes,attributes"]
----
# {foreman-maintain} packages lock
----
endif::[]
. Change SELinux to enforcing mode.
For more information, see link:{RHELDocsBaseURL}9/html/upgrading_from_rhel_8_to_rhel_9/applying-security-policies_upgrading-from-rhel-8-to-rhel-9#changing-selinux-mode-to-enforcing_applying-security-policies[Changing SELinux mode to enforcing] in _Upgrading from RHEL{nbsp}8 to RHEL{nbsp}9_.
ifeval::["{mode}" == "disconnected"]
ifdef::satellite[]
AkshayGadhaveRH marked this conversation as resolved.
Show resolved Hide resolved
. Unset the `subscription-manager` release:
endif::[]
ifndef::satellite[]
. For {EL} installations, unset the `subscription-manager` release:
endif::[]
+
[options="nowrap" subs="+quotes,attributes"]
----
# subscription-manager release --unset
----
endif::[]

ifeval::["{mode}" == "disconnected"]
.Additional Resources
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
* For more information on customizing the Leapp upgrade for your environment, see https://access.redhat.com/articles/4977891[Customizing your {RHEL} in-place upgrade].
* For more information, see https://access.redhat.com/solutions/7030156[How to in-place upgrade an offline / disconnected RHEL 8 machine to RHEL 9 with Leapp?]
endif::[]
3 changes: 3 additions & 0 deletions guides/doc-Upgrading_Project/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ ifdef::foreman-el,katello,satellite,orcharhino[]
// Upgrading the External database
include::common/modules/proc_upgrading-the-external-database.adoc[leveloffset=+2]
endif::[]

// Upgrading Project and Smart Proxy RHEL8to9 Using LEAPP
include::common/modules/proc_upgrading-project-or-proxy-in-place-using-leapp.adoc[leveloffset=+1]
endif::[]
3 changes: 3 additions & 0 deletions guides/doc-Upgrading_Project_Disconnected/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ ifdef::foreman-el,katello,satellite,orcharhino[]
// Upgrading the External database
include::common/modules/proc_upgrading-the-external-database.adoc[leveloffset=+2]
endif::[]

// Upgarding Project and Smart Proxy RHEL8to9 Using LEAPP
Lennonka marked this conversation as resolved.
Show resolved Hide resolved
include::common/modules/proc_upgrading-project-or-proxy-in-place-using-leapp.adoc[leveloffset=+1]
endif::[]
Loading