How to switch dnf repository configuration from SAP Hana to SAP Apps on RHEL 8 or vice versa from SAP Apps to SAP HANA in Microsoft Azure

Solution Verified - Updated -

Environment

Microsoft Azure, PAYG images.

Issue

  • Is there a way to allow an Azure instance to use SAP Apps repositories instead of configured SAP HA and US (Hana) repositories?
  • Is there a way to allow an Azure instance to use SAP HA and US (HANA) repositories instead of configured SAP Apps repositories?

Resolution

Contents

1. How to switch dnf repository configuration from SAP Hana to SAP Apps on RHEL 8 in Microsoft Azure

Create a file with the required client configuration RPM repositories for SAP Apps, /root/repo.config, with the following contents:

[microsoft-azure-rhel8-sapapps]
baseurl=https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel8-sapapps
name=Apps
enabled=1
gpgcheck=1
gpgkey=https://rhelimage.blob.core.windows.net/repositories/RPM-GPG-KEY-microsoft-azure-release
sslverify=1
[microsoft-azure-rhel8-eus]
baseurl=https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel8-eus
name=EUS
enabled=1
gpgcheck=1
gpgkey=https://rhelimage.blob.core.windows.net/repositories/RPM-GPG-KEY-microsoft-azure-release
sslverify=1

Then install the necessary client configuration RPMs as follows:

# dnf --config /root/repo.config install rhui-azure-rhel8-sapapps

Finally, remove the original HA and US configuration RPM by running this command:

# rpm -e rhui-azure-rhel8-sap-ha

Also remove the temporary yum configuration file:

# rm -f /root/repo.config

Verify that the dnf version lock is set according to the desired RHEL minor version. For example, in the case of RHEL 8.6, you should see:

# cat /etc/yum/vars/releasever 
8.6

Verify that the repolist matches the desired configuration. For example, in the case of RHEL 8.6 SAP Apps, you should see:

# yum repolist
repo id                                                 repo name
microsoft-azure-rhel8-eus                               Microsoft Azure RPMs for RHEL8 Extended Update Support
microsoft-azure-rhel8-sapapps                           Microsoft Azure RPMs for RHEL8 SAP
rhel-8-for-x86_64-appstream-eus-rhui-rpms               Red Hat Enterprise Linux 8 for x86_64 - AppStream - Extended Update Support from RHUI (RPMs)
rhel-8-for-x86_64-baseos-eus-rhui-rpms                  Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs)
rhel-8-for-x86_64-sap-netweaver-eus-rhui-rpms           Red Hat Enterprise Linux 8 for x86_64 - SAP NetWeaver - Extended Update Support from RHUI (RPMs)

If you wish to update to a newer RHEL minor version, change this version lock by editing the /etc/yum/vars/releasever file accordingly. Then update the system by running dnf update, and reboot it by running the reboot command in the end.

2. How to switch dnf repository configuration from SAP Apps to SAP HA and US (HANA) on RHEL 8 in Microsoft Azure

Create a file with the required client configuration RPM repositories for SAP HA and US (HANA), /root/repo.config, with the following contents:

[microsoft-azure-rhel8-sap-ha]
name=Microsoft Azure RPMs for RHEL8 High Availability SAP Solutions
baseurl=https://rhui-1.microsoft.com/pulp/repos/microsoft-azure-rhel8-sap-ha
        https://rhui-2.microsoft.com/pulp/repos/microsoft-azure-rhel8-sap-ha
        https://rhui-3.microsoft.com/pulp/repos/microsoft-azure-rhel8-sap-ha
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-microsoft-azure-release

Then install the necessary client configuration RPMs as follows:

# dnf --config /root/repo.config install rhui-azure-rhel8-sap-ha

Finally, remove the original SAP Apps and EUS configuration RPM by running this command:

# rpm -e rhui-azure-rhel8-sapapps 
# rpm -e rhui-azure-rhel8-eus

Also remove the temporary yum configuration file:

# rm -f /root/repo.config

Verify that the dnf version lock is set according to the desired RHEL minor version. For example, in the case of RHEL 8.6, you should see:

# cat /etc/yum/vars/releasever 
8.6

Verify that the repolist matches the desired configuration. For example, in the case of RHEL 8.6 SAP HA and US (HANA) , you should see:

# yum repolist 
repo id                                           repo name
microsoft-azure-rhel8-sap-ha                      Microsoft Azure RPMs for RHEL8 High Availability SAP Solutions
rhel-8-for-x86_64-appstream-e4s-rhui-rpms         Red Hat Enterprise Linux 8 for x86_64 - AppStream - Update Services for SAP Solutions from RHUI (RPMs)
rhel-8-for-x86_64-baseos-e4s-rhui-rpms            Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Update Services for SAP Solutions from RHUI (RPMs)
rhel-8-for-x86_64-highavailability-e4s-rhui-rpms  Red Hat Enterprise Linux 8 for x86_64 - High Availability - Update Services for SAP Solutions from RHUI (RPMs)
rhel-8-for-x86_64-sap-netweaver-e4s-rhui-rpms     Red Hat Enterprise Linux 8 for x86_64 - SAP NetWeaver - Update Services for SAP Solutions from RHUI (RPMs)
rhel-8-for-x86_64-sap-solutions-e4s-rhui-rpms     Red Hat Enterprise Linux 8 for x86_64 - SAP Solutions - Update Services for SAP Solutions from RHUI (RPMs)

If you wish to update to a newer RHEL minor version, change this version lock by editing the /etc/yum/vars/releasever file accordingly. Then update the system by running dnf update, and reboot it by running the reboot command in the end.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.