/leapp-supplements

Supplementary actors for the Leapp project (https://github.com/oamg/leapp). It aims to handle common 3rd party use cases during the upgrade process.

Primary LanguagePythonApache License 2.0Apache-2.0

leapp-supplements

This repository contains custom actors for the Leapp project that enable in-place upgrades to the next major version of the Red Hat Enterprise Linux system. It aims to handle common 3rd party use cases during the upgrade process.

Table of Contents

Actor list

The following actors are currently available in this repository:

  • checkreboothygiene

These actors are listed in actor-list.txt file by default.

Actor description

CheckRebootHygiene

The CheckRebootHygiene actor will report an inhibitor in case of conditions that may be prohibited by an organization's reboot hygiene policy.

The actor will report inhibitor risk when:

  • The host uptime is greater than the maximum defined by the policy.
  • The running kernel version does not match the default kernel version configured in the bootloader.
  • Any files are found under /boot that have been modified since the last reboot.

Parameterizing excessive uptime limit

The actor can be parameterized to set the maximum uptime limit in days after which the upgrade is inhibited. The default value is 30 days. To change it to 60 days, for example, call the make rpmbuild command with the EXCESSIVE_UPTIME_LIMIT_DAYS parameter:

make rpmbuild EXCESSIVE_UPTIME_LIMIT_DAYS=60

Building the Custom Actors RPM

In order to bundle the custom actors from this Git repository, follow the instructions below.

Prerequisites

  • A system running Red Hat Enterprise Linux 7 or 8
  • git installed on your system
  • make package installed
  • rpm-build package installed
  • Appropriate Python development package

You can install these prerequisites by running the following command:

  • On RHEL 7:

    sudo yum install git make rpm-build python2-devel
  • On RHEL 8:

    sudo dnf install git make rpm-build python3-devel

Building the RPM

  1. Clone the repository to your local machine:
git clone https://github.com/oamg/leapp-supplements.git
  1. Change to the leapp-supplements directory:
cd leapp-supplements
  1. Ensure the actor-list.txt file contains the actors you want to bundle. Each actor should be listed on a separate line. Lines starting with # are treated as comments and will be ignored. Feel free to add or remove actors as needed for your specific needs.

  2. Build the RPM package by running the following command:

  • For upgrade between RHEL 7 and RHEL 8:

    make rpmbuild DIST_VERSION=7
  • For upgrade between RHEL 8 and RHEL 9:

    make rpmbuild DIST_VERSION=8

After the process is complete, you should see the generated RPM files in the current directory.

Installing the RPM

To install the custom actors RPM, run the following command:

sudo yum install ./<generated_rpm_file>

Replace <generated_rpm_file> with the actual RPM file generated in the previous step. Its name should end with .noarch.rpm.

Using the Custom Actors

Once the RPM is installed, the custom actors are automatically integrated with the Leapp project. You can now perform in-place upgrades using the Leapp command-line interface. The custom actors from this repository will be used during the upgrade process. For more details, they can be seen installed under /usr/share/leapp-repository/custom-repositories/system_upgrade_supplements.

For more information on using Leapp and performing in-place upgrades, please refer to the Leapp documentation and relevant Red Hat documentation regarding RHEL upgrades.

Contributing

See CONTRIBUTING.md