Welcome to this video on using Leapp to upgrade a system running the current release Oracle
Linux 7 to the current release of Oracle Linux 8.
The Leapp utility is used to upgrade the operating systems only, specifically, from the Oracle
Linux 7 to the Oracle Linux 8.
It is not supported for any other operating systems or versions.
The tool enables the creation of different workflows into profiles for updating software.
You can find more about the supported systems, kernels and requirements for upgrading with
Leapp at this documentation link.
Take time to carefully read through the supported requirements and kernel upgrade information
before beginning the process to upgrade your Oracle Linux 7 system.
Leapp can be used to upgrade an Oracle Linux 7 system as well as Oracle Linux 7 Oracle
Cloud Infrastructure instances.
So let's look at upgrading an Oracle Linux 7 system built from an instance in Oracle
Cloud Infrastructure to Oracle Linux 8.
Before starting the preupgrade or the upgrade, make a backup or snapshot of your system so
you can restore if there is any issue with the upgrade.
Shutdown any running workloads, as the upgrade process will carry out multiple reboots.
If Secure boot is enabled, disable it.
You can check status of Secure Boot with the command sudo bootctl status.
If you need to disable it you can use the command sudo mokutil --sb-state.
The system I am using today is an Oracle Cloud Infrastructure VM instance, so secure boot
is not something I can modify here.
We use with the command cat /etc/locale.conf to verify that the system locale is set to
en_US.UTF-8
The locale is correctly set on this system, but if we needed to change it we could use
the command sudo localectl set-locale LANG=en_US.UTF-8.
If we have any mounted network file systems (NFS), we must unmount them and comment them
out in /etc/fstab file.
These can be remounted after the upgrade.
If using a proxy, we make sure yum is configured with the proxy setting.
To do this we configure the file /etc/yum.conf by editing the file and inserting the option
proxy equals, the proxy url, colon and port number.
If the yum-plugin-versionlock package is installed, we must clear any packages with locked versions.
The command sudo yum versionlock clear can be used for this.
We run the command sudo yum update -y to ensure all system packages are up to date.
This takes a few minutes so I will fast forward through the sequence.
Check if there are any virtual machines running with the command sudo virsh list --all.
Any found to be running can be stopped with the command sudo virsh shutdown and inserting
the VM guest-name.
If the system is registered with ULN, it must be unregistered.
With all these steps completed reboot the system.
For example use sudo reboot, or you can use the reboot button from the cloud console instance
details page.
If you have a console connection you can monitor the reboot.
After a few minutes we can reconnect with our SSH session back to the system.
We check our current yum repolist with the command sudo yum repolist.
With our packages up to date we can now install the Leapp utility, and enable the required
repositories to support the install.
We use the command sudo yum install -y leapp --enablerepo=ol7_leapp,ol7_latest.
If you are using a proxy server, edit the /etc/yum.repos.d/leapp-upgrade-repos-ol8.repo
file by adding the proxy setting for each repository entry.
To add the setting in a single operation, you can run the sudo sed -i command and insert
the proxy host, port and repos.
We can now run the preupgrade process which allows us to assess if a system is prepared
for a successful upgrade, or identifies potential issues that may affect or prevent the upgrade
process.
When running the preupgrade command, there are two command switches used for convenience,
--oraclelinux and --oci.
These identify whether you are upgrading an on premise system --oraclelinux, or an Oracle
Cloud Infrastructure instance --oci.
We have a cloud instance so we will be using the --oci switch with the preupgrade and upgrade
commands.
We can also identify any additional repositories that are to be enabled for the updated system
with the --enablerepo option.
You can find more detailed information about the arguments used with the preupgrade command
at this link.
Our system is a cloud instance so to run the preupgrade we use the command sudo leapp preupgrade
--oci.
This process takes some time so I'll fast forward to the end.
You can see the onscreen result and the process generates a process log, a report, and a file
called answerfile.
The files are stored in the /var/log/leapp/ directory.
Using the command sudo cat /var/log/leapp/leapp-report.txt to see the report file, we see it identifies
potential risks to the upgrade, and classifies them as high, medium, or low.
A high risk also marked as inhibitor would prevent an upgrade from completing, normal
high and lower severities may not.
The report provides a summary of the issues and offers ways to resolve them.
You must clear any risks that are labeled high and can inhibit the upgrade process.
The preupgrade provides a good view into your system, regardless of whether you will upgrade
or not.
Leapp can be useful as an introspection tool for a system, where users could get a view
of what is configured and where any potential conflicts may be.
The /var/log/leapp/answerfile consists of specific verification checks that Leapp performs
on the system.
A verification check contains information about the system and also prompts you for
confirmation on the action to be performed.
Modifications needed to the answerfile can be made by directly editing the specific section
of the file, or by using the sudo leapp answer command as seen in our example here.
You can find more information about interpreting the issues found in the report file and how
to resolve typical issues found at this link.
Checking the answerfile, it shows the True setting in place.
In addition to completing the recommendations of leapp-report.txt file, you must provide
answers to all of the items in answerfile.
Always examine and address the issues in both files to ensure a successful upgrade.
After addressing at a minimum the reported inhibitor high risks, run the preupgrade command
again.
The preupgrade check can be used anytime to assess the status of a system and identify
where conflicts may occur.
We first check our OS version so we can see the upgrade change to the new OS release.
We use the command sudo cat /etc/oracle-release to check the current Oracle Linux version,
which is 7.9.
And the command uname -r to check the kernel version, which shows the el7 reference for
our kernel.
We can now run the upgrade process using the sudo leapp upgrade command with the same instance
switch --oci.
If you run the upgrade and have not addressed the answerile and inhibiting high risks in
the leapp-report file, then the process will terminate back to command line at the relevant
point of issue.
When the upgrade is completed we reboot the system either from the cloud console or with
the sudo reboot command.
If you have a console connection you can monitor the reboot progress on it.
At the end of the boot process, the utility automatically proceeds with upgrading packages.
This operation takes a while to complete and also includes multiple automatic reboots.
Note that after the upgrade of a system or instance is completed, network configurations
and settings are not transformed to be managed by Network Manager, but continue to operate
based on legacy network scripts, as in the preupgrade state.
When the process is complete we can log in again.
We verify the new Oracle Linux version is now used.
We use the command sudo cat /etc/oracle-release.
It is now Oracle Linux 8.5.
And the command uname -r to check to the kernel version.
And the version shows el8.
The upgrade process also updates the answerfile and leapp-report.txt files.
These should be examined as they may include post upgrade recommendations.
Oracle provides an extensive number of resources which you can use to learn about this subject
and others.
Use the links here to find more content about this video as well as Oracle Linux and using
Linux on Oracle Cloud Infrastructure.
That's the end of this video, thank's for watching.