How to install and configure hammer cli on Red Hat Enterprise Linux 8 or 9 client?

Solution Verified - Updated

Environment

  • Red Hat® Satellite 6.11
  • Red Hat® Capsule 6.11
  • Red Hat® Enterprise Linux 8
  • Red Hat® Enterprise Linux 9

Issue

  • How to install and configure hammer CLI on Red Hat Enterprise Linux 8: client of Red Hat Satellite or Red Hat Capsule 6.X ?
  • Is hammer CLI available for RHEL8?
  • Can hammer be installed on RHEL8 clients?
  • What are the steps to install and set up hammer CLI on a Red Hat Enterprise Linux 8 or 9 clients?

Resolution

  • At present, the hammer Cli tool can be installed on Red Hat Enterprise Linux 7 and 8 clients.

  • To install the hammer tools on the Red Hat Satellite registered client perform the below steps.

  • Refresh the manifest on the Satellite server.

     On the Satellite WEBUI --> navigate to Content --> Subscriptions --> Manage Manifest --> Refresh
    
  • To activate and synchronize the Red Hat Satellite Utils repository on the Red Hat Satellite WebUI, follow the steps that correspond to the version of your satellite.

     Red Hat Satellite Utils 6.11 for RHEL 8 x86_64 RPMs 
     satellite-utils-6.11-for-rhel-8-x86_64-rpms
    
     Red Hat Satellite Utils 6.12 for RHEL 8 x86_64 RPMs 
     satellite-utils-6.12-for-rhel-8-x86_64-rpms
    
  • To Enable/Sync Repository:

        * On the Satellite WEBUI --> navigate to Content --> Red Hat Repository --> search the "satellite-utils-6.11-for-rhel-8-x86_64-rpms" --> Click on '+' to enable it.
    
        * On the Satellite WEBUI --> navigate to Content --> Sync Status --> Select the checkbox for the "Red Hat Satellite Utils 6.11 for RHEL 8 x86_64 RPMs" repository  --> Click on Synchronize Now.
    

On a client:

  • To enable the required repository on a Client System use the below commands.

        # subscription-manager refresh
    
        # subscription-manager repos --enable=satellite-utils-6.11-for-rhel-8-x86_64-rpms
     
        # yum clean all; yum repolist
    
        # dnf module enable satellite-utils
    
        # yum install rubygem-hammer_cli rubygem-hammer_cli_katello 
    
  • Edit: /etc/hammer/cli.modules.d/foreman.yml and add your satellite hostname instead of localhost

     # Add Your Satellite server address
     :host: 'https://satellite.example.com/'
    
  • For Red Hat Enterprise Linux 7: the repo rhel-7-server-satellite-tools-6.x-rpms contains the hammer cli packages (tfm-rubygem-hammer_cli) which can be installed on clients.
    How to install and configure hammer cli on any remote clients of Red Hat Satellite or Capsule 6.X ?

  • For more KB articles/solutions related to Red Hat Satellite 6.x hammer Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x hammer-related Issues

Root Cause

  • Red Hat Satellite Utils repository for RHEL 9 client is not available to enable and sync.
  • Since we do not provide support for Red Hat Satellite 6 installations on RHEL 9, it would not be feasible for us to release the satellite-utils repositories for RHEL 9.

Diagnostic Steps

  • To verify the Hammer basic functionality, please use the below command

     # hammer ping
    
SBR
Product(s)
Components
Category

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.