Configure Katello – Download Repositories, Create Environments and Activation Keys

0

This post is the second part of Katello series. In our previous article, we covered the Installation of Katello on CentOS 7 / RHEL 7. Here, in this post, we will configure Katello for providing packages and updates to its clients (we will discuss how to configure clients, later.).

In brief, we will tell Katello to download repositories from upstream (Ex. mirror.centos.org) server and then create activation for registering client servers.

Download Repositories:

Create Organizations:

Before downloading the repositories, create an organization in which you will be doing all the activities.

Foreman Dashboard –> Default Organization –> Manage Organizations –> New Organization.

Name your organization and then click on submit.

Configure Katello - Create an Organization
Configure Katello – Create an Organization

By default, Foreman host (Where Katello installed) is assigned to “no organization“. If you wish to assign the Foreman host to ITzGeek organization; you can do it via “Assign All” or “Manually Assign” option. Here, I will choose to skip by clicking on “Proceed to Edit“.

Configure Katello - Assigning Hosts to an Organization
Configure Katello – Assigning Hosts to an Organization

Simply click submit on the final page.

Configure Katello - Submit Organization
Configure Katello – Submit Organization

Make sure you are in ITzGeek organization whenever you do any activities.

Configure Katello - ITzGeek Organization
Configure Katello – ITzGeek Organization

Create GPG Key:

Now, you would need to create a GPG keys to verify the integrity of the upstream repository.

For Ex, to create a GPG key for CentOS 7 repository; go to the following URL and copy the content of the file.

http://mirror.centos.org/centos-7/7/os/x86_64/RPM-GPG-KEY-CentOS-7

On Foreman, Content –> GPG Keys –> New GPG Key. Enter the name for the GPG Key and then paste the copied content; and finally, click Save.

Configure Katello - Create a GPG Key
Configure Katello – Create a GPG Key

Create Sync Plan:

Let’s create a sync plan for repositories so that they can be synced with upstream servers on a specified interval. Go to Content –> Sync Plans –> New Sync Plan.

Configure Katello - Create a Sync Plan
Configure Katello – Create a Sync Plan

Create Products:

Create a product for CentOS 7 with the following information. Go to Content –> Products –> New Product.

Name        : CentOS 7
Label         : CentOS_7 (Auto complete based on product name)
GPG Key   : CentOS_7_GPG_Key
Sync Plan  : CentOS_7_Sync_Plan

Configure Katello - Create a Product
Configure Katello – Create a Product

Create Repositories:

Create a repository for CentOS 7 base OS by going to Content –> Products –> CentOS 7 (Click on Name) –> Repositories Tab –> Create Repository.

Name                       : OS_x86_64
Label                        : OS_x86_64
Type                         : yum
URL                          : http://mirror.centos.org/centos-7/7/os/x86_64/
Download Policy   : Immediate
GPG Key                 : CentOS_7_GPG_Key

Configure Katello - Create Base Repository
Configure Katello – Create Base Repository
Configure Katello - Create Base Repository
Configure Katello – Create Base Repository

After entering all the details, click Save.

Initiate syncing of the OS_x86_64 repository by going to Content –> Products –> CentOS 7 (Click on Name) –> Repositories Tab –> Select Repository (OS_x86_64) –> Sync Now.

Configure Katello - Sync Now
Configure Katello – Sync Now

Katello will start the syncing of the OS_x86_64 repository.

Configure Katello - Syncing
Configure Katello – Syncing

To check the status of Sync, go to Content –> Sync Status.

Configure Katello - Sync Status
Configure Katello – Sync Status

You would need to wait for this to complete. It may take few minutes or an hour long, depending on your internet speed.

Until that time, you can go and create repositories for

Extras:

Name                       : Extras_x86_64
Label                        : Extras_OS_x86_64
Type                         : yum
URL                          : http://mirror.centos.org/centos-7/7/extras/x86_64/
Download Policy   : Immediate
GPG Key                  : CentOS_7_GPG_Key

Updates:

Name                       : Updates_x86_64
Label                        : Updates_OS_x86_64
Type                         : yum
URL                          : http://mirror.centos.org/centos-7/7/updates/x86_64/
Download Policy    : Immediate
GPG Key                  : CentOS_7_GPG_Key

Once you have added the remaining repositories, your product page will look like below. As soon as you created it, start the Synchronization for new packages. From Content –> Products –> CentOS 7 (Click on Name) –> Repositories Tab.

Configure Katello - Create a repository All Repos
Configure Katello – Create a repository All Repos

You can check the sync status of your newly created repositories, go to Content –> Sync Status.

Configure Katello - Sync Status All
Configure Katello – Sync Status All
You might also like