Leapp RHUI packages for Google Cloud

Updated

To in-place upgrade a RHEL system on Google Cloud by using Red Hat Update Infrastructure (RHUI), you need to install the required Leapp RHUI package prior to Leapp execution.

NOTE: Because Red Hat does not have an option to serve the packages via Google Cloud client repositories, we provide them via this article.

For details about upgrading by using RHUI on public clouds, see the official documentation for your upgrade path:

Installing the Leapp RHUI packages

NOTE: The following scripts download the corresponding tarball for the system, decompress the RPM file inside, and install it on the system if the package has not been installed yet.

Procedure

  1. Save one of the following scripts into a file:

    • For RHEL with SAP:

      MAJOR_VERSION="$(grep -o '^VERSION="[0-9]\+\.' /etc/os-release | grep -o "[0-9]\+")"
      SAP_INFFIX="-sap"
      TARNAME="leapp-rhui-google-v4-rhel${MAJOR_VERSION}${SAP_INFFIX}.tar.gz"
      RPMNAME="leapp-rhui-google${SAP_INFFIX}"
      URL="https://access.redhat.com/sites/default/files/attachments/$TARNAME"
      PKG_MANAGER=dnf
      [ "$MAJOR_VERSION" = "7" ] && PKG_MANAGER=yum
      [ "$MAJOR_VERSION" = "9" ] &&  { echo >&2 "Error: At this moment upgrades to RHEL 10 with SAP HANA is not available on Google Cloud."; exit 1; }
      
      rpm -q $RPMNAME && { echo >&2 "Info: The $RPMNAME package is already installed."; exit 0; }
      rm -f "$TARNAME"
      curl -LO "$URL" || { echo >&2 "Error: cannot download $TARNAME"; exit 1; }
      
      RPMFILE="$(tar -tf "$TARNAME")"
      rm -f "$RPMFILE"
      tar -xzf "$TARNAME"
      $PKG_MANAGER install -y "./$RPMFILE"
      
    • For RHEL without SAP:

              MAJOR_VERSION="$(grep -o '^VERSION="[0-9]\+\.' /etc/os-release | grep -o "[0-9]\+")"
              SAP_INFFIX=""
              TARNAME="leapp-rhui-google-v4-rhel${MAJOR_VERSION}${SAP_INFFIX}.tar.gz"
              RPMNAME="leapp-rhui-google${SAP_INFFIX}"
              URL="https://access.redhat.com/sites/default/files/attachments/$TARNAME"
              PKG_MANAGER=dnf
              [ "$MAJOR_VERSION" = "7" ] && PKG_MANAGER=yum
      
              rpm -q $RPMNAME && { echo >&2 "Info: The $RPMNAME package is already installed."; exit 0; }
              rm -f "$TARNAME"
              curl -LO "$URL" || { echo >&2 "Error: cannot download $TARNAME"; exit 1; }
              
              RPMFILE="$(tar -tf "$TARNAME")"
              rm -f "$RPMFILE"
              tar -xzf "$TARNAME"
              $PKG_MANAGER install -y "./$RPMFILE"
      
  2. Execute the saved script to install the required packages:

    $ bash -x $<file_name> 
    
Category
Components
Article Type