Enabling metering for Red Hat Enterprise Linux with Extended Lifecycle Support in your cloud environment

Updated -

Introduction

If you have done one (or both) of the following, you will also need to configure metered billing for your Red Hat subscriptions in order to remain in compliance.

  • Converted a Pay-As-You-Go CentOS Linux or another Linux to Red Hat Enterprise Linux (RHEL)
  • Added the Extended Lifecycle Support (ELS) add-on to your Pay-As-You-Go Red Hat Enterprise Linux host in the cloud.

A note on metering methods

You can choose whether to report your usage via Red Hat Insights Cost Management, or through the host-metering agent. Which choice is right for you depends on your use case.

If you operate in an environment where you are unable to share cloud data with Red Hat Insights Cost Management, the host-metering agent is likely a better choice.

However, if you are able to connect to Insights Cost Management, this method enables metering without a running process on the system, but systems must be appropriately tagged.

Enabling Metering using Insights Cost Management

The following sections will help you enable cost metering through Insights Cost Management on various cloud providers.

AWS

Buy the RHEL for 3rd party migration listing

This step is performed at the AWS console. You’ll need to access the marketplace, and purchase the RHEL for 3rd Party Migrations item (Global Listing, EMEA Listing). This adds the offering to your account at AWS, and enables the billing features you’ll need in the next steps.

Set up a reporting source

AWS tracks your costs, of course, Red Hat needs access to some of that reporting in order to properly bill you for your new Red Hat Enterprise Linux subscription. Luckily there is a way to export this reporting and store it in a place that can be accessed automatically. This is done by setting up an S3 bucket to be used as a source for these reports. You can find the documentation on how to set this up in our cost management documentation.

Tag your systems

In order to properly label which systems are now RHEL, and which addons they consume, you’ll need to tag them properly using AWS Cost Allocation Tags. This is what the cost management system will use to identify the instances it needs to track in the report. Some tags are required, they identify the system as RHEL, others are optional, like add-on subscriptions that you may have elected to add to your systems. You can find a list of these tags, in the following article.

If you would like Information on how to add tags to systems, you can view the following documentation: Configuring tags on your integrations

Enabling Metering on your AWS Integration

Metering will also need to be enabled in your AWS integration on the Hybrid Cloud Console. You can follow the steps in this documentation to achieve this.

Azure

Buy the RHEL for 3rd party migration listing

This step is performed at the Microsoft Azure console. You’ll need to access the marketplace, and purchase the RHEL for 3rd Party Migrations item (Global Listing, EMEA Listing). This adds the offering to your account at Microsoft Azure, and enables the billing features you’ll need in the next steps.

Set up a reporting source

Red Hat needs access to some of your Azure Cost reporting in order to properly bill you for your new Red Hat Enterprise Linux subscription. Luckily, there is a way to export this reporting and store it in a place that can be accessed automatically. You can find the documentation on how to set this up in our cost management documentation.

Tag your systems

In order to properly label which systems are now RHEL, and which add-ons they consume, you’ll need to tag them properly using Azure Tags for Cost Management. This is what the cost management system will use to identify the instances it needs to track in the report. Some tags are required as they identify the system as RHEL, and others are optional, like add-on subscriptions that you may have elected to add to your systems. You can find a list of these tags, in the following article.

If you would like Information on how to add tags to systems, you can view the following documentation: Configuring tags on your integrations

Enabling Metering on your Azure Integration

Metering will also need to be enabled in your Azure integration on the Hybrid Cloud Console. You can follow the steps in this documentation to achieve this.

Metered billing through the host-metering service

This method will report your usage via a dedicated local service on your RHEL system.

Buy the RHEL for 3rd party migration listing

The first step is to buy the RHEL for 3rd party migration listing on any cloud provider.

Install required packages

The host-metering tools are installed as part of the host-metering package.

NOTE: subscription-manager rpm version >= 1.24.53-1 is required for host-metering. This dependency will be updated into the package itself, but manual checks are currently required.

$ sudo yum -y update subscription-manager
$ sudo yum -y install host-metering

Install the RHEL Extended Lifecycle Services (ELS) certificate

If you are enabling ELS you will need to retrieve the certificate that entitles your system to use that addon.

  1. Visit the Red Hat Product Certificates site
  2. Select Red Hat Enterprise Linux in the drop-down list
  3. In the filter box, enter Red Hat Enterprise Linux Server - Extended Life Cycle Support(copy and paste to prevent typos)
  4. Select 7.9 in the Select a version drop-down, and x86_64 in the Select an architecture drop-down.
  5. Press the Generate button, and you will be presented with several options for downloading the certificate. Follow the one that works best for you.

Refresh your subscription

Once the certificate is in place, you will need to initiate a refresh in order for your system to acknowledge the add-on.

$ sudo subscription-manager refresh

Start the host-metering service

With the package installed, the certificate in place, and your subscriptions up to date, all that's left is to start the reporting service. This is done by enabling and starting the service in systemd.

sudo systemctl enable --now host-metering.service

If the service was already running, restart the service so it picks up the certificate change.

sudo systemctl restart host-metering.service

Note: If you purchased the RHEL for 3rd Party Migrations offering but want a subset of your systems to utilize an existing 1 year or 3 year subscription make sure that host-metering is not running on those systems.

sudo systemctl stop --now host-metering.service
sudo systemctl disable host-metering.service

Comments