Configure a RHEL server and install the required software for an in-place upgrade.
Outcomes
Configure the required repositories to install the Leapp tool.
Ensure that the system package management tools are not set to a specific version of Red Hat Enterprise Linux.
As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.
[student@workstation ~]$ lab start upgrade-prepare
Instructions
In this activity, you prepare a system for an in-place upgrade. This preparation involves updating the server to the latest minor release, configuring repositories so that you can install upgrade tooling, and identifying your content view. In future activities, you run a pre-upgrade analysis, execute the upgrade, and verify its success.
Ensure that the serverc machine is updated to the latest minor version.
Log in to the serverc machine as the student user.
Switch to the root user.
Use student as the password.
[student@workstation ~]$ssh servercstudent@serverc's password:student[student@serverc ~]$sudo -i[sudo] password for student:student[root@serverc ~]#
Verify the current release version of the serverc machine.
[root@serverc ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)RHEL 7.9 is installed on the serverc machine, which is the latest minor release for RHEL 7.
Even so, the machine might not have the latest packages applied for the minor release.
Ensure that the serverc machine is subscribed to Red Hat Satellite Server with the correct activation key.
In your classroom environment, the leapp-upgrade activation key is linked to the leapp-upgrade content view, which contains the required repositories for the upgrade process.
The subscription-manager command displays information about the machine's registration.
[root@serverc ~]#subscription-manager identitysystem identity: 7b36d575-c923-4b4f-a689-886890f9acc3 name: serverc org name: Operations org ID: Operations environment name:Library/leapp-upgrade
The information in the environment name field shows that the system uses the leapp-upgrade content view, which is the correct content view for the upgrade.
Ensure that the serverc machine includes the latest packages for the RHEL 7.9 release.
When prompted, accept any repository GPG keys to continue with the update.
[root@serverc ~]#yum update...output omitted... Is this ok [y/d/N]:y...output omitted... Complete!
Reboot the serverc machine.
[root@serverc ~]# reboot
Connection to serverc closed by remote host.
Connection to serverc closed.
[student@workstation ~]$Wait a minute for the machine to reboot.
Enable the rhel-7-server-rpms and rhel-7-server-extras-rpms repositories to install the Leapp tool.
Log in to the serverc machine as the student user.
Switch to the root user.
Use student as the password.
[student@workstation ~]$ssh servercstudent@serverc's password:student[student@serverc ~]$sudo -i[sudo] password for student:student[root@serverc ~]#
List the currently enabled repositories in the machine.
[root@serverc ~]# yum repolist
...output omitted...
repo id repo name status
!rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 34,270
repolist: 34,270The rhel-7-server-rpms repository is enabled, but the rhel-7-server-extras-rpms repository is not enabled.
Enable the rhel-7-server-extras-rpms repository.
[root@serverc ~]# subscription-manager repos --enable rhel-7-server-extras-rpms
Repository 'rhel-7-server-extras-rpms' is enabled for this system.Verify that both the rhel-7-server-rpms and the rhel-7-server-extras-rpms repositories are enabled.
[root@serverc ~]# yum repolist
...output omitted...
repo id repo name status
rhel-7-server-extras-rpms/x86_64 Red Hat Enterprise Linux 7 Server - Extras (RPMs) 1,468
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 34,270
repolist: 35,738Ensure that the serverc machine is not locked to a specific version in the package manager tools.
Remove the system version lock in the subscription-manager utility.
[root@serverc ~]# subscription-manager release --unset
Release preference has been unsetRemove the package version lock in the YUM utility.
The version lock plug-in is installed on the serverc machine but might not be installed on your organization's machines.
If this plug-in is not installed in your organization, then you can omit this step.
[root@serverc ~]# yum versionlock clear
Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
versionlock clearedInstall the Leapp tool.
Then, review the leapp command version, help information, and man page.
Install the Leapp tool.
[root@serverc ~]#yum install leapp-upgrade...output omitted... Is this ok [y/d/N]:y...output omitted... Complete!
Review the leapp command version.
[root@serverc ~]# leapp --version
leapp version 0.16.0The command version number might differ on your system. Review the release notes for the Leapp tool version to identify new requirements or changes.
Review the leapp command help information.
[root@serverc ~]# leapp --help
...output omitted...
answer
Manage answerfile generation: register persistent user choices
for specific dialog sections
upgrade
Upgrade the current system to the next available major version.
list-runs
List previous Leapp upgrade executions
preupgrade
Generate preupgrade report
rerun
Re-runs the upgrade from the given phase and using the
information and progress from the last invocation of leapp
upgrade.The help information describes the supported subcommands.
Review the leapp command man page.
[root@serverc ~]# man leapp
...output omitted...
ENVIRONMENT
If the argument for the environment variables below is not specified,
it is possible to set them to either 1 (true) or 0 (false).
They default to 0.
LEAPP_CONFIG
Overrides the default location of leapp.conf.
If not specified, .leapp/leapp.conf is used when the command
is executed inside a leapp repository, otherwise the default
/etc/leapp/leapp.conf is used.
LEAPP_LOGGER_CONFIG
Overrides the default location of logger.conf.
If not specified, the default /etc/leapp/logger.conf is used.
LEAPP_ENABLE_REPOS
Specify repositories (repoids) split by comma, that should be used
during the in-place upgrade to the target system.
It's overwritten automatically in case the --enablerepo option of the
leapp utility is used.
It's recommended to use the --enablerepo option instead of the envar.The man page describes the options that you can use with the leapp command.
The man page also includes information about environment variables that you can use to change the command's behavior.
Exit the serverc machine.
[root@serverc ~]#exitlogout [student@serverc ~]$exitlogout Connection to serverc closed.