Now that we have a running Katello server, it is time to do the initial configuration.
The sequence of these are important, as there are some dependencies, for example one need to have the GPG key before one creates the repo. Thus, having those ahead of time will facilitate and expedite the configuration.
First create a new organization if the “Default Organization” is not the one you’d like to use. For the blog, we’ll just stick to the default organization as well as the default locations.
Create lifecycle environments
This will be the path that rpm promotions take through the organization. Typically one would want the new patches in the dev or test environments at least a week before they go into prod to ensure there are no surprises.
To create this, navigate to Content -> Lifecycle Environments
Then, select “Create Environment Path”

Next, create the production environment by selecting “Add New Environment” above the newly created path box

You should now have the new path containing to environments

Create a sync plan
Next we create a sync plan for all the repos. This will be a daily plan.
Navigate to Content -> Sync Plans, and click the “Create Sync Plan” button.

Create GPG Keys
Next up, we need to have the GPG keys for all the repos we’ll start off with. For the same of illustration, I will only add:
* CentOS ( https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7 )
* EPEL ( https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 )
* Puppet ( https://yum.puppetlabs.com/RPM-GPG-KEY-puppet )
* The Katello client ( https://github.com/Katello/katello.org/blob/master/gpg/RPM-GPG-KEY-katello-2015.gpg )
These are added via Content -> Content Credentials, then clicking on the “Create Content Credential” button.
Repeat this step for all repositories

Your content credential page, should now look similar to this

Creating repositories
We are now all set to start adding repositories. Modify the URL’s to a local mirror to expedite the sync time.
My local mirrors will be:
CentOS Base – http://mirror.xnet.co.nz/pub/centos/7/os/x86_64/
CentOS Extras – http://mirror.xnet.co.nz/pub/centos/7/extras/x86_64/
CentOS Updates – http://mirror.xnet.co.nz/pub/centos/7/updates/x86_64/
EPEL – http://mirror.xnet.co.nz/pub/epel/7/x86_64/
Puppet PC1 – https://yum.puppetlabs.com/el/7/PC1/x86_64/
Katello Client – https://fedorapeople.org/groups/katello/releases/yum/3.2/client/el7/x86_64/
Products provide a nice, logical way to organize repositories. We will thus create a product for each GPG key we created earlier, as one can only have one credential per product.
Add the repositories by navigating to Content -> Products
The click on the “Create Product” button and filling out the required fields.

Once you click save, it will progress to the repository tab in order to add the relevant repositories noted above. Click on “New Repository”, and fill in the required boxes.


I generally select the “Immediate” policy. That way one can get any package from the published view should that be required. Note that this will require more disk space, so look at the options and choose the option best suited for your environment.
Repeat the above process for all the repositories you need to configure.
For illustration purposes, the CentOS product will look like this before a sync

So, for our requirements, the product page now looks as follow

Sync all the repos
Leave yourself with enough time for this step! This will download all the packages in all the repos, so it will take a while and will chew up bandwidth and disk space.
Select all the repos, then click on “Select Action”, followed by “Sync Selected”.
Go off and have some coffee, play a few games, have a BBQ or visit some friends.
Create a content view
Once the long wait for the sync is over, the next step is to create a content view. A content view is a snapshot in time of the latest version of each package, and this snapshot is what will be promoted through the environments in order to know the effect of an update before it hits production.
Navigate to Content -> Content Views, and click on the “Create New View” button.

At the next screen, you will be prompted to add all the repos you’d like to include in the view. Since all the repositories we’ve added will be applicable to all CentOS servers, we add all of them.
Then, click on the “Publish New Version” button.
Provide it with a description of your liking, and click on “Save”.
This will publish the snapshot versions to your first environment, which is always “Library”.

Once done, the promotion is done, it should look like this

Next, click the Promote button and select the first environment

Click no promote version to promote this through to the first environment.
Promoting to prod will follow similar process. Once done and promoted to all environments, this is what the view should look like

Create activation keys
Last step will be creating activation keys. Activation keys are used to tie servers to content products and versions.
To create these keys, navigate to Content -> Activation Keys, then click on “Create Activation Key” Create a key for each environment.

Once done, click on the Subscriptions tab, then on Subscriptions, then on Add.
Select all the subscriptions and then click on the “Add Selected” button.

Repeat the process for production. This should result in two keys being available.

You are now ready to add hosts to Katello!
To add hosts, navigate to Hosts -> Content Hosts. Then click on the “Register Content Host” button.
This will provide detail instructions on how to add a node.