Contents

Foreman & Katello 2.x Full Setup Guide - Part 1

Foreman is one of my favourite sysadmin tools, it’s described as a complete lifecycle management tool for physical and virtual servers. We give system administrators the power to easily automate repetitive tasks, quickly deploy applications, and proactively manage servers, on-premise or in the cloud and, very important, it’s an open source software (or better a bunch of software). It’s the real evolution of Spacewalk and the free version of Red Hat Satellite (who is Foreman based - yes, we’re Red Hat Satellite testers). Foreman have a lot and really useful plugins, one of the most important one is Katello (a life cycle management plugin) and this guide will help you to install a Foreman istance with Katello, Ansible, VMware, Remote Execution and many other plugins. Just in case, the Foreman official documentation is available here. Foreman helps me and my team since day one, it’s a little bit tricky sometimes and bugs are present (of course) but the community and devs are really really helpful and present.

This articles will be really really long and verbose, it’ll be different from the ones who are available around on the Internet. These articles are pretty good and useful but they are not verbose or with a proper explanation.

In this first article I’ll explain how to install and do a first setup Foreman and Katello from scratch. What I’ll do is:

  • Installation of Foreman and Katello
  • Creation of a Organization and a Location
  • Creation of a Sync Plan
  • Creation of a Product, Content View and Activation Key for CentOS 7/8 with EPEL7/8
  • Creation of a Product, Content View and Activation Key for RHEL 7/8 with EPEL7/8
  • How to add the client to Foreman

In the next article I’ll explain how to continue the setup. What I’ll do is:

  • Creation of Katello Product
  • Configuration of Ansible, Puppet and Remote Execution
  • Configuration of VMWare and virt-who
  • Configuration of Provisioning
  • Provisioning of new server and KickStart configuration
  • Configuration of OpenSCAP
  • Final Setup

Requirements

from this point when I write Foreman I’ll mean Foreman and Katello

To run a proper istance of Foreman I need:

OS : CentOS 7 or RHEL 7
CPU : 2 at least (4 is a good option)
RAM : 12GB at least
Disk OS-/ : 50 GB (LVM is better)
Disk for Pulp-/var/lib/pulp : ~200 GB (LVM is better)

Before starting I’ll disable SELinux and firewalld, I’ll enable it after installation. For this installation I’m using a CentOS 7. Last but least, I need a root account.

My server will be named foreman.kraba.lan and it will have 192.168.1.100 as IP.

Katello 3.15 with Foreman 2.0 installation

Tip
Check the Katello documentation for this release (3.15), I’m using a CentOS 7 server and the installation it’s a little bit different for RHEL 7. If you’re trying to install a different (newest or older) version check the installation doc.

On console as root run:

1
2
3
4
5
6
7
8
yum -y localinstall https://yum.theforeman.org/releases/2.0/el7/x86_64/foreman-release.rpm
yum -y localinstall https://fedorapeople.org/groups/katello/releases/yum/3.15/katello/el7/x86_64/katello-repos-latest.rpm
yum -y localinstall https://yum.puppet.com/puppet6-release-el-7.noarch.rpm
yum -y localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install foreman-release-scl
yum -y update
yum -y install katello tfm-rubygem-hammer_cli_* foreman-proxy-content
echo "192.168.1.100  foreman.kraba.lan foreman" >> /etc/hosts

Now I’m ready to install Katello, before that I want to check which options are available during the installation process:

1
foreman-installer --scenario katello --help

And all available installation options will appear. I’ll start just with few settings, only setting up admin user and pass.

1
foreman-installer --scenario katello --foreman-initial-admin-username admin --foreman-initial-admin-password 'admin'

after few minutes the installation is done and I can check if https://foreman.kraba.lan/ is available and running. During the setup I’ll explain how I’m doing and how I can do it with cli command through hammer and/or via web GUI.

Organization & Location

First of all I’ve to create an organisation (eg. my company) and a location (eg. my DC, my VMWare DC). I’m using kraba.lan as organisation and krabaDC as location.

Via cli:

1
2
3
hammer organization create --name kraba.lan
hammer location create --name krabaDC
hammer location add-organization --name krabaDC --organization kraba.lan

and I can check it with these two commands:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
hammer location list
---|------------------|------------------|------------
ID | TITLE            | NAME             | DESCRIPTION
---|------------------|------------------|------------
2  | Default Location | Default Location |            
4  | krabaDC          | krabaDC          |            
---|------------------|------------------|------------

hammer organization list
---|----------------------|----------------------|-------------|---------------------
ID | TITLE                | NAME                 | DESCRIPTION | LABEL               
---|----------------------|----------------------|-------------|---------------------
1  | Default Organization | Default Organization |             | Default_Organization
3  | kraba.lan            | kraba.lan            |             | kraba_lan           
---|----------------------|----------------------|-------------|---------------------

and I’ll update my admin user settings and set as default kraba.lan and krabaDC after the login:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
hammer user update --id admin --default-organization kraba.lan --default-location krabaDC
hammer user info --id admin

Id:                    4
Login:                 admin
Name:                  Admin User
Email:                 root@kraba.lan
Admin:                 yes
Last login:            2020/04/24 18:51:03
Authorised by:         Internal
Effective admin:       yes
Locale:                en_GB
Timezone:              default
Description:           
Default organisation:  kraba.lan
Default location:      krabaDC
Roles:                 

User groups:           

Inherited User groups:

Locations:             
    Default Location
Organisations:         
    Default Organization
Created at:            2020/04/24 16:05:09
Updated at:            2020/04/24 18:49:46

Organization via web GUI:

  • Default Organisation (top left)
  • Manage Organisation
  • New Organisation
  • Add Name, Label and Submit

Location via web GUI:

  • Default Location (top left)
  • Manage Location
  • New Location
  • Add Name and Submit

Change default Organization and Location via web GUI:

  • Admin User (top right)
  • My Account
  • Locations Tab
  • Default on login select kraba.lan
  • Organisation Tab
  • Default on login select krabaDC

I’ll configure other stuff of the admin later.

Creating a Sync Plan

Before adding the repositories of CentOS, RHEL, Debian, etc I’ll create a synchronization plan, who will run every week. My idea is running it automatically every Saturday morning at 2 AM.

I’m creating a plan named Weekly_Sync for the organization kraba.lan who will run next saturday at 2 AM (next saturday from today…)

1
2
3
4
5
6
7
8
9
hammer sync-plan create --name 'Weekly_Sync' --interval weekly --enabled true \
       --organization 'kraba.lan' --sync-date '2020-05-02 02:00:00'
hammer sync-plan list --organization kraba.lan

---|-------------|---------------------|----------|---------|-----------------|-------------------
ID | NAME        | START DATE          | INTERVAL | ENABLED | CRON EXPRESSION | RECURRING LOGIC ID
---|-------------|---------------------|----------|---------|-----------------|-------------------
1  | Weekly_Sync | 2020/05/02 02:00:00 | weekly   | yes     |                 | 1                 
---|-------------|---------------------|----------|---------|-----------------|-------------------

Creating a Sync Plan via web GUI:

  • Content -> Sync Plans
  • Create Sync Plan
  • Add Name, Interval, Start Date and Save

I can check my sync plan into the web GUI in Content -> Sync applications

CentOS 8 Product

I’ll add now the CentOS 8 repositories to my Foreman, the steps will be:

Importing the CentOS 8 GPG key:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
wget https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
hammer content-credentials create --organization 'kraba.lan' \
       --key 'RPM-GPG-KEY-CentOS-Official' --name 'RPM-GPG-KEY-CentOS-8' \
       --content-type gpg_key
hammer content-credentials list --organization kraba.lan

---|---------------------
ID | NAME                
---|---------------------
1  | RPM-GPG-KEY-CentOS-8
---|---------------------

Creating the Content Credential via web GUI:

  • Content -> Content Credentials
  • Create Content Credential
  • Add Name, Type, paste/import the downloaded key and Save

Creating a CentOS 8 Product:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hammer product create --name 'CentOS8' --organization 'kraba.lan' \
       --description 'CentOS 8 Repos' --gpg-key 'RPM-GPG-KEY-CentOS-8' \
       --sync-plan 'Weekly_Sync'
hammer product list --organization 'kraba.lan'

---|---------|----------------|--------------|--------------|-----------
ID | NAME    | DESCRIPTION    | ORGANISATION | REPOSITORIES | SYNC STATE
---|---------|----------------|--------------|--------------|-----------
1  | CentOS8 | CentOS 8 Repos | kraba.lan    | 0            |           
---|---------|----------------|--------------|--------------|-----------

Creating the Product via web GUI:

  • Content -> Products
  • Create Product
  • Add Name, Label, GPG Key, Sync Plan and Save

I can check my Product into the web GUI in Content -> Products

Adding the CentOS8 repositories to the Product:

I’ll add now the CentOS 8 repositories to my CentOS8 Product: BaseOS, AppStream, PowerTools, Centosplus and Extras. I’m using a UK based mirror: http://mirrors.ukfast.co.uk/

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
hammer repository create --organization 'kraba.lan' --product 'CentOS8' \
  --name 'CentOS 8 BaseOS' --label 'CentOS8_BaseOS' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-8' \
  --url 'http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/BaseOS/x86_64/os/' \
  --mirror-on-sync 'no'

hammer repository create --organization 'kraba.lan' --product 'CentOS8' \
  --name 'CentOS 8 AppStream' --label 'CentOS8_AppStream' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-8' \
  --url 'http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/AppStream/x86_64/os/' \
  --mirror-on-sync 'no'

hammer repository create --organization 'kraba.lan' --product 'CentOS8' \
  --name 'CentOS 8 PowerTools' --label 'CentOS8_PowerTools' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-8' \
  --url 'http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/PowerTools/x86_64/os/' \
  --mirror-on-sync 'no'

hammer repository create --organization 'kraba.lan' --product 'CentOS8' \
  --name 'CentOS 8 CentOSPlus' --label 'CentOS8_CentOSPlus' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-8' \
  --url 'http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/centosplus/x86_64/os/' \
  --mirror-on-sync 'no'

hammer repository create --organization 'kraba.lan' --product 'CentOS8' \
  --name 'CentOS 8 Extras' --label 'CentOS8_Extras' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-8' \
  --url 'http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/extras/x86_64/os/' \
  --mirror-on-sync 'no'

hammer repository list --organization 'kraba.lan' --product 'CentOS8'

---|---------------------|---------|--------------|-------------------------------------------------------------------------
ID | NAME                | PRODUCT | CONTENT TYPE | URL                                                                     
---|---------------------|---------|--------------|-------------------------------------------------------------------------
4  | CentOS 8 AppStream  | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/AppStream/x86_64/os/
3  | CentOS 8 BaseOS     | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/BaseOS/x86_64/os/    
6  | CentOS 8 CentOSPlus | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/centosplus/x86_64/os/
2  | CentOS 8 Extras     | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/extras/x86_64/os     
5  | CentOS 8 PowerTools | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/PowerTools/x86_64/os/
---|---------------------|---------|--------------|-------------------------------------------------------------------------

Creating the repositories via web GUI:

  • Content -> Products -> CentOS8
  • New Repository
  • Add Name, Label, Type yum
  • Upstream URL: the URL (cut & paste the one from hammer command)
  • Verify SSL : ticked
  • Download Policy: On Demand (or immediate if you’ve enough space)
  • GPG Key: RPM-GPG-KEY-CentOS-8
  • Save (and repeat for all the repos)

I can check my repositories into the web GUI in Content -> Products -> CentOS8

Syncing the CentOS8 repositories:

I’ll now synchronize all the repositories for the first time. I take note of the IDs of the repositories from the last hammer command, my repos IDs are from 2 to 6.

I’ll run the sync automatically

1
2
3
4
for repoid in $(seq 2 6); do \
  hammer repository synchronize --async --organization 'kraba.lan' \
  --product 'CentOS8' --id "$repoid"; \
  done;

or I can do it one by one:

1
2
3
4
5
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS8' --id 2
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS8' --id 3
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS8' --id 4
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS8' --id 5
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS8' --id 6

I can check the sync on the web GUI:

  • Content -> Sync Status -> Expand ALL

or manually with hammer I can check if it’s finished:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
hammer repository info --id 3

ID:                 3
Name:               CentOS 8 BaseOS
Label:              CentOS8_BaseOS
Organisation:       kraba.lan
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     no
URL:                http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/BaseOS/x86_64/os/
Publish Via HTTP:   yes
Published At:       http://foreman.kraba.lan/pulp/repos/kraba_lan/Library/custom/CentOS8/CentOS8_BaseOS/
Relative Path:      kraba_lan/Library/custom/CentOS8/CentOS8_BaseOS
Download Policy:    on_demand
HTTP Proxy:         
    HTTP Proxy Policy: global_default_http_proxy
Product:            
    ID:   1
    Name: CentOS8
GPG Key:            
    ID:   1
    Name: RPM-GPG-KEY-CentOS-8
Sync:               
    Status:         Success
    Last Sync Date: 3 minutes
Created:            2020/04/25 16:55:16
Updated:            2020/04/25 16:55:18
Content Counts:     
    Packages:       1663
    Source RPMS:    0
    Package Groups: 35
    Errata:         0
    Module Streams: 0

The Sync part is ok and I’ve synced the repo with id 3 (the BaseOS one).

I can check the product list:

1
2
3
4
5
6
7
hammer product list  --name CentOS8 --organization kraba.lan

---|---------|----------------|--------------|--------------|------------------
ID | NAME    | DESCRIPTION    | ORGANISATION | REPOSITORIES | SYNC STATE       
---|---------|----------------|--------------|--------------|------------------
1  | CentOS8 | CentOS 8 Repos | kraba.lan    | 5            | Syncing Complete.
---|---------|----------------|--------------|--------------|------------------

Syncing the repositories via web GUI:

  • Content -> Sync Status -> Expand All
  • Select All or Select the ones you want
  • Synchronize now

CentOS 7 Product

I’ll add now the CentOS 7 repositories to my Foreman, the steps will be:

Importing the CentOS 7 GPG key:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
wget https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
hammer content-credentials create --organization 'kraba.lan' \
       --key 'RPM-GPG-KEY-CentOS-Official' --name 'RPM-GPG-KEY-CentOS-7' \
       --content-type gpg_key
hammer content-credentials list --organization kraba.lan --name RPM-GPG-KEY-CentOS-7

---|---------------------
ID | NAME                
---|---------------------
1  | RPM-GPG-KEY-CentOS-7
---|---------------------

Creating the Content Credential via web GUI:

  • Content -> Content Credentials
  • Create Content Credential
  • Add Name, Type, paste/import the downloaded key and Save

Creating a CentOS 7 Product:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
hammer product create --name 'CentOS7' --organization 'kraba.lan' \
       --description 'CentOS 7 Repos' --gpg-key 'RPM-GPG-KEY-CentOS-7' \
       --sync-plan 'Weekly_Sync'
hammer product list --organization 'kraba.lan' --name CentOS7

---|---------|----------------|--------------|--------------|-----------
ID | NAME    | DESCRIPTION    | ORGANISATION | REPOSITORIES | SYNC STATE
---|---------|----------------|--------------|--------------|-----------
2  | CentOS7 | CentOS 7 Repos | kraba.lan    | 0            |           
---|---------|----------------|--------------|--------------|-----------

Creating the Product via web GUI:

  • Content -> Products
  • Create Product
  • Add Name, Label, GPG Key, Sync Plan and Save

I can check my Product into the web GUI in Content -> Products

Adding the CentOS7 repositories to the Product:

I’ll add now the CentOS 7 repositories to my CentOS7 Product: OS, Extras, Updates, SCL I’m using the typical mirror http://mirror.centos.org

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
hammer repository create --organization 'kraba.lan' --product 'CentOS7' \
  --name 'CentOS 7 OS' --label 'CentOS7_OS' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-7' \
  --url 'http://mirror.centos.org/centos-7/7/os/x86_64/' \
  --mirror-on-sync 'no'

hammer repository create --organization 'kraba.lan' --product 'CentOS7' \
  --name 'CentOS 7 Extras' --label 'CentOS7_Extras' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-7' \
  --url 'http://mirror.centos.org/centos-7/7/extras/x86_64/' \
  --mirror-on-sync 'no'

hammer repository create --organization 'kraba.lan' --product 'CentOS7' \
  --name 'CentOS 7 Updates' --label 'CentOS7_Updates' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-7' \
  --url 'http://mirror.centos.org/centos-7/7/updates/x86_64/' \
  --mirror-on-sync 'no'

hammer repository create --organization 'kraba.lan' --product 'CentOS7' \
  --name 'CentOS 7 SCL' --label 'CentOS7_SCL' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-CentOS-7' \
  --url 'http://mirror.centos.org/centos-7/7/sclo/x86_64/rh/' \
  --mirror-on-sync 'no'

hammer repository list --organization 'kraba.lan' --product 'CentOS7'

---|------------------|---------|--------------|----------------------------------------------------
ID | NAME             | PRODUCT | CONTENT TYPE | URL                                                
---|------------------|---------|--------------|----------------------------------------------------
7  | CentOS 7 OS      | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/os/x86_64/     
8  | CentOS 7 Extras  | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/extras/x86_64/
10 | CentOS 7 SCL     | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/sclo/x86_64/rh/
9  | CentOS 7 Updates | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/updates/x86_64/
---|------------------|---------|--------------|----------------------------------------------------

Creating the repositories via web GUI:

  • Content -> Products -> CentOS7
  • New Repository
  • Add Name, Label, Type yum
  • Upstream URL: the URL (cut & paste the one from hammer command)
  • Verify SSL : ticked
  • Download Policy: On Demand (or immediate if you’ve enough space)
  • GPG Key: RPM-GPG-KEY-CentOS-8
  • Save (and repeat for all the repos)

I can check my repositories into the web GUI in Content -> Products -> CentOS7

Syncing the CentOS 7 repositories:

I’ll now synchronize all the repositories for the first time. I take note of the IDs of the repositories from the last hammer command, my repos IDs are from 7 to 10.

I’ll run the sync automatically

1
2
3
4
for repoid in $(seq 7 10); do \
  hammer repository synchronize --async --organization 'kraba.lan' \
  --product 'CentOS7' --id "$repoid"; \
  done;

or I can do it one by one:

1
2
3
4
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS7' --id 7
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS7' --id 8
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS7' --id 9
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS7' --id 10

I can check the sync on the web GUI:

  • Content -> Sync Status -> Expand ALL

or manually with hammer I can check if it’s finished:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
hammer repository info --id 7

ID:                 3
Name:               CentOS 8 BaseOS
Label:              CentOS8_BaseOS
Organisation:       kraba.lan
Red Hat Repository: no
Content Type:       yum
Mirror on Sync:     no
URL:                http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/BaseOS/x86_64/os/
Publish Via HTTP:   yes
Published At:       http://foreman.kraba.lan/pulp/repos/kraba_lan/Library/custom/CentOS8/CentOS8_BaseOS/
Relative Path:      kraba_lan/Library/custom/CentOS8/CentOS8_BaseOS
Download Policy:    on_demand
HTTP Proxy:         
    HTTP Proxy Policy: global_default_http_proxy
Product:            
    ID:   1
    Name: CentOS8
GPG Key:            
    ID:   1
    Name: RPM-GPG-KEY-CentOS-8
Sync:               
    Status:         Success
    Last Sync Date: 3 minutes
Created:            2020/04/25 16:55:16
Updated:            2020/04/25 16:55:18
Content Counts:     
    Packages:       1663
    Source RPMS:    0
    Package Groups: 35
    Errata:         0
    Module Streams: 0

The Sync part is ok and I’ve synced the repo with id 7 (the OS one).

I can check the product list:

1
2
3
4
5
6
7
hammer product list  --name CentOS7 --organization kraba.lan

---|---------|----------------|--------------|--------------|-----------
ID | NAME    | DESCRIPTION    | ORGANISATION | REPOSITORIES | SYNC STATE
---|---------|----------------|--------------|--------------|-----------
2  | CentOS7 | CentOS 7 Repos | kraba.lan    | 4            | Running   
---|---------|----------------|--------------|--------------|-----------

Syncing the repositories via web GUI:

  • Content -> Sync Status -> Expand All
  • Select All or Select the ones you want
  • Synchronize now

EPEL Product

I’ll add now a new Product just for EPEL for CentOS 7/8 and RHEL 7/8, two different products and I’ll add them to the proper Content View later.

Importing the EPEL 7/8 GPG keys:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
wget https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
wget https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8
hammer content-credentials create --organization 'kraba.lan' \
       --key RPM-GPG-KEY-EPEL-7 --name 'RPM-GPG-KEY-EPEL-7' \
       --content-type gpg_key
hammer content-credentials list --organization kraba.lan --name RPM-GPG-KEY-EPEL-7

---|-------------------
ID | NAME              
---|-------------------
3  | RPM-GPG-KEY-EPEL-7
---|-------------------

hammer content-credentials create --organization 'kraba.lan' \
       --key RPM-GPG-KEY-EPEL-8 --name 'RPM-GPG-KEY-EPEL-8' \
       --content-type gpg_key
hammer content-credentials list --organization kraba.lan --name RPM-GPG-KEY-EPEL-8

---|-------------------
ID | NAME              
---|-------------------
4  | RPM-GPG-KEY-EPEL-8
---|-------------------

Creating the Content Credential via web GUI:

  • Content -> Content Credentials
  • Create Content Credential
  • Add Name, Type, paste/import the downloaded key and Save

Creating the EPEL Products:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
hammer product create --name 'EPEL7' --organization 'kraba.lan' \
       --description 'EPEL 7 Repos' --gpg-key 'RPM-GPG-KEY-EPEL-7' \
       --sync-plan 'Weekly_Sync'
hammer product list --organization 'kraba.lan' --name EPEL7

---|-------|--------------|--------------|--------------|-----------
ID | NAME  | DESCRIPTION  | ORGANISATION | REPOSITORIES | SYNC STATE
---|-------|--------------|--------------|--------------|-----------
3  | EPEL7 | EPEL 7 Repos | kraba.lan    | 0            |           
---|-------|--------------|--------------|--------------|-----------

hammer product create --name 'EPEL8' --organization 'kraba.lan' \
       --description 'EPEL 8 Repos' --gpg-key 'RPM-GPG-KEY-EPEL-8' \
       --sync-plan 'Weekly_Sync'
hammer product list --organization 'kraba.lan' --name EPEL8

---|-------|--------------|--------------|--------------|-----------
ID | NAME  | DESCRIPTION  | ORGANISATION | REPOSITORIES | SYNC STATE
---|-------|--------------|--------------|--------------|-----------
4  | EPEL8 | EPEL 8 Repos | kraba.lan    | 0            |           
---|-------|--------------|--------------|--------------|-----------

Creating the Product via web GUI:

  • Content -> Products
  • Create Product
  • Add Name, Label, GPG Key, Sync Plan and Save

I can check my Product into the web GUI in Content -> Products

Adding the EPEL repositories to the Product:

I’ll add now the EPEL 7/8 repositories to my EPEL Products. I’m using the typical mirror https://dl.fedoraproject.org/

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
hammer repository create --organization 'kraba.lan' --product 'EPEL7' \
  --name 'EPEL7' --label 'EPEL7' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-EPEL-7' \
  --url 'https://dl.fedoraproject.org/pub/epel/7/x86_64/' \
  --mirror-on-sync 'no'

hammer repository list --organization 'kraba.lan' --product 'EPEL7'

---|-------|---------|--------------|------------------------------------------------
ID | NAME  | PRODUCT | CONTENT TYPE | URL                                            
---|-------|---------|--------------|------------------------------------------------
11 | EPEL7 | EPEL7   | yum          | https://dl.fedoraproject.org/pub/epel/7/x86_64/
---|-------|---------|--------------|------------------------------------------------

hammer repository create --organization 'kraba.lan' --product 'EPEL8' \
  --name 'EPEL8' --label 'EPEL8' \
  --content-type 'yum' --download-policy 'on_demand' \
  --gpg-key 'RPM-GPG-KEY-EPEL-8' \
  --url 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64' \
  --mirror-on-sync 'no'

hammer repository list --organization 'kraba.lan' --product 'EPEL8'

---|-------|---------|--------------|----------------------------------------------------
ID | NAME  | PRODUCT | CONTENT TYPE | URL                                                
---|-------|---------|--------------|----------------------------------------------------
12 | EPEL8 | EPEL8   | yum          | https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64
---|-------|---------|--------------|----------------------------------------------------

Creating the repositories via web GUI:

  • Content -> Products -> EPEL7 + EPEL 8
  • New Repository
  • Add Name, Label, Type yum
  • Upstream URL: the URL (cut & paste the one from hammer command)
  • Verify SSL : ticked
  • Download Policy: On Demand (or immediate if you’ve enough space)
  • GPG Key: RPM-GPG-KEY-EPEL-7 or RPM-GPG-KEY-EPEL-8
  • Save (and repeat for all the repos)

I can check my repositories into the web GUI in Content -> Products

Syncing the EPEL repositories:

I’ll now synchronize all the repositories for the first time. I take note of the IDs of the repositories from the last hammer command, my repos IDs are from 7 to 10.

I’ll run the sync automatically

1
2
3
for repoid in $(seq 11 12); do \
  hammer repository synchronize --async --organization 'kraba.lan' --id "$repoid"; \
  done;

or I can do it one by one:

1
2
3
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS7' --id 11
hammer repository synchronize --async --organization 'kraba.lan' --product 'CentOS8' --id 12

I can check the sync on the web GUI:

  • Content -> Sync Status -> Expand ALL

or I can check the product list:

1
2
3
4
5
6
7
hammer product list  --name EPEL7 --organization kraba.lan

---|-------|--------------|--------------|--------------|-----------
ID | NAME  | DESCRIPTION  | ORGANISATION | REPOSITORIES | SYNC STATE
---|-------|--------------|--------------|--------------|-----------
3  | EPEL7 | EPEL 7 Repos | kraba.lan    | 1            | Running   
---|-------|--------------|--------------|--------------|-----------

Syncing the repositories via web GUI:

  • Content -> Sync Status -> Expand All
  • Select All or Select the ones you want
  • Synchronize now

Creating a Content View for CentOS 8

I’ll now create and publish a Content View (CV) for the repos of CentOS 8.

First step is creating the CV

1
2
3
hammer content-view create --organization kraba.lan \
  --name "CentOS8_CV" \
  --description 'CentOS 8 Content View'

Second step is adding the repos to the CV. I want to add all the CentOS 8 repos plus the EPEL for CentOS 8. I need the IDs of the repos and add them with a cycle or manually to the CV.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
hammer repository list --organization 'kraba.lan' --product 'CentOS8'

---|---------------------|---------|--------------|-------------------------------------------------------------------------
ID | NAME                | PRODUCT | CONTENT TYPE | URL                                                                     
---|---------------------|---------|--------------|-------------------------------------------------------------------------
4  | CentOS 8 AppStream  | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/AppStream/x86_64/os/
3  | CentOS 8 BaseOS     | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/BaseOS/x86_64/os/    
6  | CentOS 8 CentOSPlus | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/centosplus/x86_64/os/
2  | CentOS 8 Extras     | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/extras/x86_64/os     
5  | CentOS 8 PowerTools | CentOS8 | yum          | http://mirrors.ukfast.co.uk/sites/ftp.centos.org/8/PowerTools/x86_64/os/
---|---------------------|---------|--------------|-------------------------------------------------------------------------

hammer repository list --organization 'kraba.lan' --product 'EPEL8'

---|-------|---------|--------------|----------------------------------------------------
ID | NAME  | PRODUCT | CONTENT TYPE | URL                                                
---|-------|---------|--------------|----------------------------------------------------
12 | EPEL8 | EPEL8   | yum          | https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64
---|-------|---------|--------------|----------------------------------------------------


for i in $(seq 2 6); do \
  hammer content-view add-repository --organization kraba.lan \
  --name CentOS8_CV --product CentOS8 --repository-id "$i"; \
  done;

hammer content-view add-repository --organization kraba.lan --name CentOS8_CV \
  --product 'EPEL8' --repository-id 12

hammer content-view list --name CentOS8_CV

----------------|------------|------------|-----------|----------------|------------------
CONTENT VIEW ID | NAME       | LABEL      | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS   
----------------|------------|------------|-----------|----------------|------------------
3               | CentOS8_CV | CentOS8_CV | false     |                | 2, 3, 4, 5, 6, 12
----------------|------------|------------|-----------|----------------|------------------

And last step is publishing the CV:

1
2
hammer content-view publish --organization kraba.lan --name CentOS8_CV \
  --description "Publishing first CentOS8 CV"

Creating the CV via web GUI:

  • Content -> Content Views -> Create Content View
  • Add Name CentOS8_CV, Description and Save
  • Content -> Content Views -> Select Content View
  • Yum Content tab -> Repositories
  • Add tab -> Tick the repos
  • Click Publish New Version (up right)

Creating a Content View for CentOS 7

I’ll now create and publish a Content View (CV) for the repos of CentOS 7.

First step is creating the CV

1
2
3
hammer content-view create --organization kraba.lan \
  --name "CentOS7_CV" \
  --description 'CentOS 7 Content View'

Second step is adding the repos to the CV. I want to add all the CentOS 7 repos plus the EPEL for CentOS 7. I need the IDs of the repos and add them with a cycle or manually to the CV.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
hammer repository list --organization 'kraba.lan' --product 'CentOS7'

---|------------------|---------|--------------|----------------------------------------------------
ID | NAME             | PRODUCT | CONTENT TYPE | URL                                                
---|------------------|---------|--------------|----------------------------------------------------
7  | CentOS 7 OS      | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/os/x86_64/     
8  | CentOS 8 Extras  | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/extras/x86_64/
10 | CentOS 8 SCL     | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/sclo/x86_64/rh/
9  | CentOS 8 Updates | CentOS7 | yum          | http://mirror.centos.org/centos-7/7/updates/x86_64/
---|------------------|---------|--------------|----------------------------------------------------

hammer repository list --organization 'kraba.lan' --product 'EPEL7'

---|-------|---------|--------------|------------------------------------------------
ID | NAME  | PRODUCT | CONTENT TYPE | URL                                            
---|-------|---------|--------------|------------------------------------------------
11 | EPEL7 | EPEL7   | yum          | https://dl.fedoraproject.org/pub/epel/7/x86_64/
---|-------|---------|--------------|------------------------------------------------

for i in $(seq 7 10); do \
  hammer content-view add-repository --organization kraba.lan \
  --name CentOS7_CV --product CentOS7 --repository-id "$i"; \
  done;

hammer content-view add-repository --organization kraba.lan --name CentOS7_CV \
    --product EPEL7 --repository-id 11

hammer content-view list --name CentOS7_CV

----------------|------------|------------|-----------|----------------|----------------
CONTENT VIEW ID | NAME       | LABEL      | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS
----------------|------------|------------|-----------|----------------|----------------
4               | CentOS7_CV | CentOS7_CV | false     |                | 7, 8, 9, 10, 11
----------------|------------|------------|-----------|----------------|----------------

And last step is publishing the CV:

1
2
hammer content-view publish --organization kraba.lan --name CentOS7_CV \
  --description "Publishing first CentOS7 CV"

Creating the CV via web GUI:

  • Content -> Content Views -> Create Content View
  • Add Name CentOS7_CV, Description and Save
  • Content -> Content Views -> Select Content View
  • Yum Content tab -> Repositories
  • Add tab -> Tick the repos
  • Click Publish New Version (up right)

Creating an Activation Key for CentOS 8

Now I’ll create/activate the activation key for CentOS8. The activation key is the one who will be used to register the server/client to Foreman and it will associate the proper subscription and repos to the server/client.

First step is checking the ID/Name of our Lifecycle Environment and after I’ll create the Activation Key

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
hammer lifecycle-environment list --organization kraba.lan

---|---------|------
ID | NAME    | PRIOR
---|---------|------
2  | Library |      

hammer activation-key create --organization kraba.lan --name 'CentOS8_Key' \
  --description 'CentOS 8 Activation Key' --lifecycle-environment Library \
  --content-view CentOS8_CV --unlimited-hosts

hammer activation-key list --organization kraba.lan

---|-------------|----------------|-----------------------|-------------
ID | NAME        | HOST LIMIT     | LIFECYCLE ENVIRONMENT | CONTENT VIEW
---|-------------|----------------|-----------------------|-------------
1  | CentOS8_Key | 0 of Unlimited | Library               | CentOS8_CV  
---|-------------|----------------|-----------------------|-------------

Second step is checking the Content Credentials and adding them to the Activation Key. In this I’ll add the CentOS8 - RPM-GPG-KEY-CentOS-8 and EPEL8 - RPM-GPG-KEY-EPEL-8 content credentials.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hammer subscription list --organization kraba.lan

---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------
ID | UUID                             | NAME    | TYPE     | CONTRACT | ACCOUNT | SUPPORT | START DATE          | END DATE            | QUANTITY  | CONSUMED
---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------
2  | 402881e471b0d8130171b3116c240061 | CentOS7 | Physical |          |         |         | 2020/04/25 20:39:55 | 2049/12/01 00:00:00 | Unlimited | 0       
1  | 402881e471b0d8130171b20eafbe0010 | CentOS8 | Physical |          |         |         | 2020/04/25 15:57:19 | 2049/12/01 00:00:00 | Unlimited | 0       
3  | 402881e471b0d8130171b38cc4380093 | EPEL7   | Physical |          |         |         | 2020/04/25 22:54:39 | 2049/12/01 00:00:00 | Unlimited | 0       
4  | 402881e471b0d8130171b38d6fb40095 | EPEL8   | Physical |          |         |         | 2020/04/25 22:55:23 | 2049/12/01 00:00:00 | Unlimited | 0       
---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------

The IDs I need are the 1 and the 4 and I’ll add them to my Activation Key:

1
2
3
4
5
hammer activation-key add-subscription --organization kraba.lan --name 'CentOS8_Key' \
  --quantity '1' --subscription-id 1

hammer activation-key add-subscription --organization kraba.lan --name 'CentOS8_Key' \
    --quantity '1' --subscription-id 4

Now my Activation Key is ready to be used into a CentOS 8 and it will be register a server into Foreman with all the CentOS 8 repos and the EPEL one.

Creating the CV via web GUI:

  • Content -> Activation Keys -> Create Activation Keys
  • Add Name CentOS8_Key, tick Library and Save
  • Content -> Activation Keys -> Subscription tab -> Add
  • Select CentOS8 and EPEL8
  • Details tab -> select the CentOS8_CV as Content View

Creating an Activation Key for CentOS 7

Now I’ll create/activate the activation key for CentOS7. The activation key is the one who will be used to register the server/client to Foreman and it will associate the proper subscription and repos to the server/client.

First step is checking the ID/Name of our Lifecycle Environment and after I’ll create the Activation Key

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
hammer lifecycle-environment list --organization kraba.lan

---|---------|------
ID | NAME    | PRIOR
---|---------|------
2  | Library |      

hammer activation-key create --organization kraba.lan --name 'CentOS7_Key' \
  --description 'CentOS 7 Activation Key' --lifecycle-environment Library \
  --content-view CentOS7_CV --unlimited-hosts

hammer activation-key list --organization kraba.lan

---|-------------|----------------|-----------------------|-------------
ID | NAME        | HOST LIMIT     | LIFECYCLE ENVIRONMENT | CONTENT VIEW
---|-------------|----------------|-----------------------|-------------
2  | CentOS7_Key | 0 of Unlimited | Library               | CentOS7_CV  
---|-------------|----------------|-----------------------|-------------

Second step is checking the Content Credentials and adding them to the Activation Key. In this I’ll add the CentOS7 - RPM-GPG-KEY-CentOS-7 and EPEL7 - RPM-GPG-KEY-EPEL-7 content credentials.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hammer subscription list --organization kraba.lan

---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------
ID | UUID                             | NAME    | TYPE     | CONTRACT | ACCOUNT | SUPPORT | START DATE          | END DATE            | QUANTITY  | CONSUMED
---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------
2  | 402881e471b0d8130171b3116c240061 | CentOS7 | Physical |          |         |         | 2020/04/25 20:39:55 | 2049/12/01 00:00:00 | Unlimited | 0       
1  | 402881e471b0d8130171b20eafbe0010 | CentOS8 | Physical |          |         |         | 2020/04/25 15:57:19 | 2049/12/01 00:00:00 | Unlimited | 0       
3  | 402881e471b0d8130171b38cc4380093 | EPEL7   | Physical |          |         |         | 2020/04/25 22:54:39 | 2049/12/01 00:00:00 | Unlimited | 0       
4  | 402881e471b0d8130171b38d6fb40095 | EPEL8   | Physical |          |         |         | 2020/04/25 22:55:23 | 2049/12/01 00:00:00 | Unlimited | 0       
---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------

The IDs I need are the 2 and the 3 and I’ll add them to my Activation Key:

1
2
3
4
5
hammer activation-key add-subscription --organization kraba.lan --name 'CentOS7_Key' \
  --quantity '1' --subscription-id 2

hammer activation-key add-subscription --organization kraba.lan --name 'CentOS7_Key' \
    --quantity '1' --subscription-id 3

Now my Activation Key is ready to be used into a CentOS 8 and it will be register a server into Foreman with all the CentOS 7 repos and the EPEL one.

Creating the CV via web GUI:

  • Content -> Activation Keys -> Create Activation Keys
  • Add Name CentOS7_Key, tick Library and Save
  • Content -> Activation Keys -> Subscription tab -> Add
  • Select CentOS7 and EPEL7
  • Details tab -> select the CentOS7_CV as Content View

Managing RHEL Subscription/Product

Note
As written at the end of this section, I’ll add just for reference two RHEL 8 repositories, a CV and an activation key. The steps for RHEL 7/6/other product present into the RH CDN are the same

I’ll add now my RHEL licenses to Foreman. It’ll be different from case to case, according to your RHEL licensing plan. I had only a Virtual Datacenters Standard licenses during the years, the notes below will be pretty accurate also for different kind of licensing. First of all I’ve to generate and download the Manifest from the Red Hat website, if you have a RH account you can check how to generate it here, and the name is file-manifest.zip.

Importing the RHEL Manifest and Product

1
2
3
4
5
6
7
hammer subscription upload --organization kraba.lan --upload file-manifest.zip

hammer subscription manifest-history --organization kraba.lan
--------|-----------------------------------------|--------------------
STATUS  | STATUS MESSAGE                          | TIME
--------|-----------------------------------------|--------------------
SUCCESS | kraba.lan file imported successfully.   | 2020/04/27 11:08:31

and I’ll check which repositories are available for RHEL 8:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
hammer repository-set list --organization kraba.lan | grep "Red Hat Enterprise Linux 8 for x86_64"

7442 | yum       | Red Hat Enterprise Linux 8 for x86_64 - AppStream (Debug RPMs)
7446 | kickstart | Red Hat Enterprise Linux 8 for x86_64 - AppStream (Kickstart)
7441 | yum       | Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
7443 | yum       | Red Hat Enterprise Linux 8 for x86_64 - AppStream (Source RPMs)
7417 | yum       | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Debug RPMs)
7419 | file      | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (ISOs)
7421 | kickstart | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Kickstart)
7416 | yum       | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
7420 | file      | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Source ISOs)
7418 | yum       | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Source RPMs)
8016 | yum       | Red Hat Enterprise Linux 8 for x86_64 - High Availability (Debug RPMs)
8017 | file      | Red Hat Enterprise Linux 8 for x86_64 - High Availability (ISOs)
8014 | yum       | Red Hat Enterprise Linux 8 for x86_64 - High Availability (RPMs)
8018 | file      | Red Hat Enterprise Linux 8 for x86_64 - High Availability (Source ISOs)
8015 | yum       | Red Hat Enterprise Linux 8 for x86_64 - High Availability (Source RPMs)
8086 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Real Time (Debug RPMs)
8087 | file      | Red Hat Enterprise Linux 8 for x86_64 - Real Time (ISOs)
8084 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Real Time (RPMs)
8088 | file      | Red Hat Enterprise Linux 8 for x86_64 - Real Time (Source ISOs)
8085 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Real Time (Source RPMs)
8061 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (Debug RPMs)
8062 | file      | Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (ISOs)
8059 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (RPMs)
8063 | file      | Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (Source ISOs)
8060 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (Source RPMs)
8606 | yum       | Red Hat Enterprise Linux 8 for x86_64 - SAP Solutions (Debug RPMs)
8608 | file      | Red Hat Enterprise Linux 8 for x86_64 - SAP Solutions (ISOs)
8605 | yum       | Red Hat Enterprise Linux 8 for x86_64 - SAP Solutions (RPMs)
8609 | file      | Red Hat Enterprise Linux 8 for x86_64 - SAP Solutions (Source ISOs)
8607 | yum       | Red Hat Enterprise Linux 8 for x86_64 - SAP Solutions (Source RPMs)
7933 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Supplementary (Debug RPMs)
7935 | file      | Red Hat Enterprise Linux 8 for x86_64 - Supplementary (ISOs)
7932 | yum       | Red Hat Enterprise Linux 8 for x86_64 - Supplementary (RPMs)

and I’ll enable the 7441 and the 7416, AppStream (RPMs) and BaseOS (RPMs):

1
2
hammer repository-set enable --id 7441 --organization ATS --releasever 8 --basearch x86_64
hammer repository-set enable --id 7416 --organization ATS --releasever 8 --basearch x86_64

and Foreman will create a new Product for these two repositories named Red Hat Enterprise Linux 8 for x86_64:

1
2
3
4
5
6
7
hammer repository list --product 'Red Hat Enterprise Linux for x86_64'
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------
ID   | NAME                                                            | PRODUCT                             | CONTENT TYPE | URL
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------
3451 | Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs x86_64 8 | Red Hat Enterprise Linux for x86_64 | yum          | https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os
3452 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs x86_64 8    | Red Hat Enterprise Linux for x86_64 | yum          | https://cdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------

and I update the Product for RHEL 8 with the proper sync plan:

1
hammer product update --name 'Red Hat Enterprise Linux for x86_64' --organization 'kraba.lan' --sync-plan 'Weekly_Sync'

Managing the Manifest and Repositories via web GUI:

  • Content -> -> Subscriptions -> Manage Manifest
  • Upload the Manifest and Save
  • Your licenses/subscriptions will appear
  • Content -> Red Hat Repositories
  • Tick the requested repositories, they will move on right area when selected
  • Content -> Product -> Check if the new products are available
  • Edit the Product -> Add Weekly_Sync

I can check my repositories into the web GUI in Content -> Products

Syncing the RHEL repositories:

I’ll now synchronize all the repositories for the first time. I take note of the IDs of the repositories from the last hammer command, my repos IDs are from 3451 and 3452.

1
2
3
4
5
6
7
hammer repository list --product 'Red Hat Enterprise Linux for x86_64' --organization 'kraba.lan'
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------
ID   | NAME                                                            | PRODUCT                             | CONTENT TYPE | URL
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------
3451 | Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs x86_64 8 | Red Hat Enterprise Linux for x86_64 | yum          | https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os
3452 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs x86_64 8    | Red Hat Enterprise Linux for x86_64 | yum          | https://cdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------

I’ll run the sync automatically

1
2
3
for repoid in $(seq 3451 3452); do \
  hammer repository synchronize --async --organization 'kraba.lan' --id "$repoid"; \
  done;

or I can do it one by one:

1
2
3
hammer repository synchronize --async --organization 'kraba.lan' --product 'Red Hat Enterprise Linux for x86_64' --id 3451
hammer repository synchronize --async --organization 'kraba.lan' --product 'Red Hat Enterprise Linux for x86_64' --id 3452

I can check the sync on the web GUI:

  • Content -> Sync Status -> Expand ALL

or I can check the product list:

1
hammer product list --name 'Red Hat Enterprise Linux for x86_64' --organization kraba.lan

Syncing the repositories via web GUI:

  • Content -> Sync Status -> Expand All
  • Select All or Select the ones you want
  • Synchronize now

If I want to add to my Foreman the RHEL 7 repositories I can use the same steps of RHEL 8 and checking/changing them for RHEL 7. In this section I don’t need to know which is the URL/mirror to add, I just have to select and add the desired repository via Red Hat CDN. The next two sections are only for RHEL 8 but I can use it also for RHEL 7, just change the name.

Creating a Content View for RHEL

I’ll now create and publish a Content View (CV) for the repos of RHEL 8.

First step is creating the CV

1
2
3
hammer content-view create --organization kraba.lan \
  --name "RHEL8_CV" \
  --description 'RHEL 8 Content View'

Second step is adding the repos to the CV. I want to add all the RHEL 8 repos plus the EPEL for RHEL 8 (and CentOS 8 of course). I need the IDs of the repos and add them with a cycle or manually to the CV.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
hammer repository list --product 'Red Hat Enterprise Linux for x86_64' --organization 'kraba.lan'
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------
ID   | NAME                                                            | PRODUCT                             | CONTENT TYPE | URL
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------
3451 | Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs x86_64 8 | Red Hat Enterprise Linux for x86_64 | yum          | https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os
3452 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs x86_64 8    | Red Hat Enterprise Linux for x86_64 | yum          | https://cdn.redhat.com/content/dist/rhel8/8/x86_64/baseos/os
-----|-----------------------------------------------------------------|-------------------------------------|--------------|----------------------------------------------------------------

hammer repository list --organization 'kraba.lan' --product 'EPEL8'

---|-------|---------|--------------|----------------------------------------------------
ID | NAME  | PRODUCT | CONTENT TYPE | URL                                                
---|-------|---------|--------------|----------------------------------------------------
12 | EPEL8 | EPEL8   | yum          | https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64
---|-------|---------|--------------|----------------------------------------------------

for i in $(seq 3451 3452); do \
  hammer content-view add-repository --organization kraba.lan \
  --name RHEL8_CV --product 'Red Hat Enterprise Linux for x86_64' --repository-id "$i"; \
  done;

hammer content-view add-repository --organization kraba.lan --name RHEL8_CV \
  --product 'EPEL8' --repository-id 12

hammer content-view list --name CentOS8_CV

----------------|------------|------------|-----------|----------------|------------------
CONTENT VIEW ID | NAME       | LABEL      | COMPOSITE | LAST PUBLISHED | REPOSITORY IDS   
----------------|------------|------------|-----------|----------------|------------------
3               | CentOS8_CV | CentOS8_CV | false     |                | 2, 3, 4, 5, 6, 12
----------------|------------|------------|-----------|----------------|------------------

And last step is publishing the CV:

1
2
hammer content-view publish --organization kraba.lan --name RHEL8_CV \
  --description "Publishing first RHEL CV"

Creating the CV via web GUI:

  • Content -> Content Views -> Create Content View
  • Add Name RHEL8_CV, Description and Save
  • Content -> Content Views -> Select Content View
  • Yum Content tab -> Repositories
  • Add tab -> Tick the repos
  • Click Publish New Version (up right)

Creating an Activation Key for RHEL

Note
As I mentioned at the beginning of this chapter, I worked only with virtual datacenter and Virtual Datacenters Standard licenses. All my licenses were associated to the VMWare hosts, not to a single server/VM. For that reason I’m not adding a Red Hat license to the activation key. The VMs - as I know - will be automatically registered via host license. I’ll explain how to setup a VMWare later and how it works. If you’ve a different license planning use it and add it (eg. a license per server or similar)

Now I’ll create/activate the activation key for RHEL 8. The activation key is the one who will be used to register the server/client to Foreman and it will associate the proper subscription and repos to the server/client.

First step is checking the ID/Name of our Lifecycle Environment and after I’ll create the Activation Key

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
hammer lifecycle-environment list --organization kraba.lan

---|---------|------
ID | NAME    | PRIOR
---|---------|------
2  | Library |      

hammer activation-key create --organization kraba.lan --name 'RHEL8_Key' \
  --description 'RHEL 8 Activation Key' --lifecycle-environment Library \
  --content-view RHEL8_CV --unlimited-hosts

hammer activation-key list --organization kraba.lan

---|-------------|----------------|-----------------------|-------------
ID | NAME        | HOST LIMIT     | LIFECYCLE ENVIRONMENT | CONTENT VIEW
---|-------------|----------------|-----------------------|-------------
3  | RHEL8_Key   | 0 of Unlimited | Library               | RHEL8_CV  
---|-------------|----------------|-----------------------|-------------

Second step is checking the Content Credentials and adding them to the Activation Key. In this I’ll add the RHEL 8 and EPEL8 - RPM-GPG-KEY-EPEL-8 content credentials.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hammer subscription list --organization kraba.lan

---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------
ID | UUID                             | NAME    | TYPE     | CONTRACT | ACCOUNT | SUPPORT | START DATE          | END DATE            | QUANTITY  | CONSUMED
---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------
2  | 402881e471b0d8130171b3116c240061 | CentOS7 | Physical |          |         |         | 2020/04/25 20:39:55 | 2049/12/01 00:00:00 | Unlimited | 0       
1  | 402881e471b0d8130171b20eafbe0010 | CentOS8 | Physical |          |         |         | 2020/04/25 15:57:19 | 2049/12/01 00:00:00 | Unlimited | 0       
3  | 402881e471b0d8130171b38cc4380093 | EPEL7   | Physical |          |         |         | 2020/04/25 22:54:39 | 2049/12/01 00:00:00 | Unlimited | 0       
4  | 402881e471b0d8130171b38d6fb40095 | EPEL8   | Physical |          |         |         | 2020/04/25 22:55:23 | 2049/12/01 00:00:00 | Unlimited | 0       
---|----------------------------------|---------|----------|----------|---------|---------|---------------------|---------------------|-----------|---------

The ID I need is the 4 and I’ll add it to my Activation Key:

1
2
hammer activation-key add-subscription --organization kraba.lan --name 'RHEL8_Key' \
    --quantity '1' --subscription-id 4

Now my Activation Key is ready to be used into a RHEL 8 and it will be register a server into Foreman with all the RHEL 8 repos and the EPEL one.

Creating the CV via web GUI:

  • Content -> Activation Keys -> Create Activation Keys
  • Add Name RHEL8_Key, tick Library and Save
  • Content -> Activation Keys -> Subscription tab -> Add
  • Select EPEL8
  • Details tab -> select the RHEL8_CV as Content View

Registering a client to foreman

Note
Please read the well the –org= in subscription-manager, kraba.lan will be translated as kraba_lan!!!!

Now I’ll register a CentOS/RHEL server to my Foreman and I’ll do it running these commands into the client:

Registering a CentOS8 client:

1
2
3
4
5
6
7
curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://foreman.kraba.lan/pub/katello-ca-consumer-latest.noarch.rpm
yum localinstall katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org="kraba_lan" --activationkey="CentOS8_Key"
mkdir /etc/yum.repos.d/old ; mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/old; mv /etc/yum.repos.d/epel* /etc/yum.repos.d/old
yum install -y https://yum.theforeman.org/client/2.0/el8/x86_64/foreman-client-release.rpm
yum install -y katello-host-tools katello-host-tools-tracer

Registering a CentOS7 client:

1
2
3
4
5
6
curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://foreman.kraba.lan/pub/katello-ca-consumer-latest.noarch.rpm
yum localinstall katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org="kraba_lan" --activationkey="CentOS7_Key"
mkdir /etc/yum.repos.d/old ; mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/old; mv /etc/yum.repos.d/epel* /etc/yum.repos.d/old
yum install -y https://yum.theforeman.org/client/2.0/el7/x86_64/foreman-client-release.rpm
yum -y install katello-host-tools katello-host-tools-tracer

Registering a RHEL8 client:

1
2
3
4
5
6
curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://foreman.kraba.lan/pub/katello-ca-consumer-latest.noarch.rpm
yum localinstall katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org="kraba_lan" --activationkey="RHEL8_Key"
mkdir /etc/yum.repos.d/old ; mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/old; mv /etc/yum.repos.d/epel* /etc/yum.repos.d/old
yum install -y https://yum.theforeman.org/client/2.0/el8/x86_64/foreman-client-release.rpm
yum install -y katello-host-tools katello-host-tools-tracer

Registering a RHEL7 client:

1
2
3
4
5
6
curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://foreman.kraba.lan/pub/katello-ca-consumer-latest.noarch.rpm
yum localinstall katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org="kraba_lan" --activationkey="RHEL7_Key"
mkdir /etc/yum.repos.d/old ; mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/old; mv /etc/yum.repos.d/epel* /etc/yum.repos.d/old
yum install -y https://yum.theforeman.org/client/2.0/el7/x86_64/foreman-client-release.rpm
yum install -y katello-host-tools katello-host-tools-tracer

With these commands I’m downloading the Foreman CA of my Foreman, I’m registering the client to Foreman, I’m doing a backup of the old CentOS/RHEL repos and I’m installing the Katello Host Tools & Tracer.

As described on Katello documentation The katello-host-tools package reports errata & package profile information, but does not allow you to run remote actions on the clients and Optionally you can also install katello-host-tools-tracer and the client will report processes that need restarting after an update back to the Katello server.

The Katello Agent will not be installed because We generally recommend using Foreman Remote Execution or Ansible for remote actions, but we also offer a messaging bus based client that does have some limitations when used with a large number of clients and it will be no more available on next releases. In the next article - Part 2 I’ll explain how to setup Ansible and remote execution.

Registration test

First of all I’ll register the CentOS 7 - Foreman server into Foreman:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
hammer host list --organization kraba.lan

---|-------------------|------------------|------------|---------------|-------------------|---------------|--------------|----------------------
ID | NAME              | OPERATING SYSTEM | HOST GROUP | IP            | MAC               | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|-------------------|------------------|------------|---------------|-------------------|---------------|--------------|----------------------
1  | foreman.kraba.lan | CentOS 7.7.1908  |            | 192.168.1.100 | 08:00:27:01:9c:a5 | OK            |              |                      
---|-------------------|------------------|------------|---------------|-------------------|---------------|--------------|----------------------

hammer host info --name foreman.kraba.lan

Id:                       1
Name:                     foreman.kraba.lan
Organisation:             kraba.lan
Location:                 krabaDC
Puppet Environment:       production
Puppet CA Proxy:          foreman.kraba.lan
Puppet Master Proxy:      foreman.kraba.lan
Cert name:                foreman.kraba.lan
Managed:                  no
Installed at:             
Last report:              2020/04/26 06:17:13
Uptime (seconds):         73274
Status:                   
    Global Status: OK
Network:                  
    IPv4 address: 192.168.1.100
    MAC:          08:00:27:01:9c:a5
    Domain:       kraba.lan
Network interfaces:       
 1) Id:           1
    Identifier:   enp0s3
    Type:         interface (primary, provision)
    MAC address:  08:00:27:01:9c:a5
    IPv4 address: 192.168.1.100
    FQDN:         foreman.kraba.lan
Operating system:         
    Architecture:           x86_64
    Operating System:       CentOS 7.7.1908
    Build:                  no
    Custom partition table:
Parameters:               

All parameters:           

Additional info:          
    Owner Id:   
    Owner Type:
    Enabled:    yes
    Model:      VirtualBox
    Comment:
Content Information:      
    Applicable Packages:
    Upgradable Packages:
Subscription Information:
    UUID:            
    Last Checkin:    
    Release Version:
    Autoheal:        
    Registered To:   
    Registered At:
Host Collections:

 yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirrors.nublue.co.uk
 * centos-sclo-rh: centos.mirrors.nublue.co.uk
 * epel: mirror.infonline.de
 * extras: centos.mirrors.nublue.co.uk
 * updates: uk.mirror.nsec.pt
repo id                                                                          repo name                                                                                                                   status
!base/7/x86_64                                                                   CentOS-7 - Base                                                                                                             10,097
!centos-sclo-rh/x86_64                                                           CentOS-7 - SCLo rh                                                                                                           6,509
!epel/x86_64                                                                     Extra Packages for Enterprise Linux 7 - x86_64                                                                              13,240
!extras/7/x86_64                                                                 CentOS-7 - Extras                                                                                                              341
!foreman/x86_64                                                                  Foreman 2.0                                                                                                                    665
!foreman-plugins/x86_64                                                          Foreman plugins 2.0                                                                                                            313
!katello/x86_64                                                                  Katello 3.15                                                                                                                    52
!katello-candlepin/x86_64                                                        Candlepin: an open source entitlement management system.                                                                         2
!katello-pulpcore/x86_64                                                         pulpcore: Fetch, Upload, Organize, and Distribute Software Packages.                                                            66
!pulp/7/x86_64                                                                   Pulp Community Release                                                                                                          67
!puppet6/x86_64                                                                  Puppet 6 Repository el 7 - x86_64                                                                                              202
!updates/7/x86_64                                                                CentOS-7 - Updates                                                                                                           1,787
repolist: 33,341

I’ll run the registration steps:

1
2
3
4
5
6
curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://foreman.kraba.lan/pub/katello-ca-consumer-latest.noarch.rpm
yum -y localinstall katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org="kraba_lan" --activationkey="CentOS7_Key"
mkdir /etc/yum.repos.d/old ; mv /etc/yum.repos.d/CentOS-* /etc/yum.repos.d/old; mv /etc/yum.repos.d/epel* /etc/yum.repos.d/old
yum install -y https://yum.theforeman.org/client/2.0/el7/x86_64/foreman-client-release.rpm
yum install -y katello-host-tools katello-host-tools-tracer

and I check if the server is registered properly:

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
(The output of subscription manager will be)
The system has been registered with ID: 08cca910-6244-4cf6-a2fc-724c65b53ed9
The registered system name is: foreman
No products installed.

yum repolist

Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
Loading mirror speeds from cached hostfile
repo id                                                                              repo name                                                                                                               status
foreman/x86_64                                                                       Foreman 2.0                                                                                                                665
foreman-plugins/x86_64                                                               Foreman plugins 2.0                                                                                                        313
katello/x86_64                                                                       Katello 3.15                                                                                                                52
katello-candlepin/x86_64                                                             Candlepin: an open source entitlement management system.                                                                     2
katello-pulpcore/x86_64                                                              pulpcore: Fetch, Upload, Organize, and Distribute Software Packages.                                                        66
!kraba_lan_CentOS7_CentOS7_Extras                                                    CentOS 8 Extras                                                                                                            341
!kraba_lan_CentOS7_CentOS7_OS                                                        CentOS 7 OS                                                                                                             10,097
!kraba_lan_CentOS7_CentOS7_SCL                                                       CentOS 8 SCL                                                                                                             6,509
!kraba_lan_CentOS7_CentOS7_Updates                                                   CentOS 8 Updates                                                                                                         1,787
!kraba_lan_EPEL7_EPEL7                                                               EPEL7                                                                                                                   13,242
pulp/7/x86_64                                                                        Pulp Community Release                                                                                                      67

hammer host info --name foreman.kraba.lan

Id:                       1
Name:                     foreman.kraba.lan
Organisation:             kraba.lan
Location:                 krabaDC
Puppet Environment:       production
Puppet CA Proxy:          foreman.kraba.lan
Puppet Master Proxy:      foreman.kraba.lan
Cert name:                foreman.kraba.lan
Managed:                  no
Installed at:             
Last report:              2020/04/26 06:47:13
Uptime (seconds):         74087
Status:                   
    Global Status: Warning
Network:                  
    IPv4 address: 192.168.1.100
    MAC:          08:00:27:01:9c:a5
    Domain:       kraba.lan
Network interfaces:       
 1) Id:           1
    Identifier:   enp0s3
    Type:         interface (primary, provision)
    MAC address:  08:00:27:01:9c:a5
    IPv4 address: 192.168.1.100
    FQDN:         foreman.kraba.lan
Operating system:         
    Architecture:           x86_64
    Operating System:       CentOS 7.7.1908
    Build:                  no
    Custom partition table:
Parameters:               

All parameters:           

Additional info:          
    Owner:      Anonymous Admin
    Owner Id:   1
    Owner Type: User
    Enabled:    yes
    Model:      VirtualBox
    Comment:
Content Information:      
    Content View:          
        ID:   4
        Name: CentOS7_CV
    Lifecycle Environment:
        ID:   2
        Name: Library
    Content Source:        
        ID:   
        Name:
    Kickstart Repository:  
        ID:   
        Name:
    Applicable Packages:   0
    Upgradable Packages:   0
    Applicable Errata:     
        Enhancement: 0
        Bug Fix:     0
        Security:    0
Subscription Information:
    UUID:                          08cca910-6244-4cf6-a2fc-724c65b53ed9
    Last Checkin:                  2020-04-26 06:49:29 UTC
    Release Version:               
    Autoheal:                      true
    Registered To:                 foreman.kraba.lan
    Registered At:                 2020-04-26 06:46:00 UTC
    Registered by Activation Keys:
     1) CentOS7_Key
    System Purpose:                
        Service Level:  
        Purpose Usage:  
        Purpose Role:   
        Purpose Addons:
Host Collections:

hammer host list --organization kraba.lan
---|-------------------|------------------|------------|---------------|-------------------|---------------|--------------|----------------------
ID | NAME              | OPERATING SYSTEM | HOST GROUP | IP            | MAC               | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|-------------------|------------------|------------|---------------|-------------------|---------------|--------------|----------------------
1  | foreman.kraba.lan | CentOS 7.7.1908  |            | 192.168.1.100 | 08:00:27:01:9c:a5 | Warning       | CentOS7_CV   | Library              
---|-------------------|------------------|------------|---------------|-------------------|---------------|--------------|----------------------

As I can check the host is registered properly.

If I move to the web GUI I can check if the server is present:

  • Hosts -> All Hosts
  • Click on host (eg. foreman.kraba.lan)
  • Check & click to Content
  • Check if is registered