Katello best practices?

katello

#1

Hi all,

In our team we have used foreman for some time to deploy our bare metal machines. We manage our internal yum repos mirrors with custom scripts outside foreman. We need to use private yum mirrors because most of our machines have no internet access. Now that we are deploying a new environment we thought it was a good opportunity to try katello and start managing the yum repos withing foreman+katello. We have the first test setup with foreman 1.16.0 + katello 3.5 mostly working but I have some doubts about what are the recommended practices when using katello.

  1. My first doubt is that I assumed that I would be able to use the “content view” as “Installation Media” to do the initial OS deployment but I realized I cannot. What I did is to create “installation media” with url “http://my-katello-server.com/pulp/repos/Default_Organization/Library/custom/Centos_7_3/base_x86_64/” . Is this the recommended approach or should I do it differently?

  2. After we got our first machine installed we added a parameter to the machine “kt_activation_keys=Centos_7.3” so the snippet “subscription_manager_registration” is applied and the machine is automatically registered in katello when deploying the OS. In our first test we realized that the first command in the snippet is “yum -t -y -e 0 install subscription-manager” but as the machine has no internet access it cannot install the subscription-manager rpm.

As a workaround I tried to modify the snippet to do something like “rpm -ivh http://my-katello-server.com/pulp/repos/Default_Organization/Library/custom/Centos_7_3/base_x86_64/Packages/subscription-manager.rpm” but I cannot find the subscription-manager rpm when accessing “http://my-katello-server.com/pulp/repos/Default_Organization/Library/custom/Centos_7_3/base_x86_64/Packages/” with my browser. The weird thing is that If I go to “Products >> Centos_7.3 >> Repositories >> base_x86_64 >> Packages” in the webui I can find the “subscription-manager” rpm and this repo is included in my content view.

What’s the recommended practice to register machines in katello without internet access? Can anyone explain why I see the “subscription-manager” rpm in the webui but not when accessing the repo contents with the browser?

Thanks!
Pablo.


#2

My first doubt is that I assumed that I would be able to use the “content view” as “Installation Media” to do the initial OS deployment but I realized I cannot. What I did is to create “installation media” with url “http://my-katello-server.com/pulp/repos/Default_Organization/Library/custom/Centos_7_3/base_x86_64/” . Is this the recommended approach or should I do it differently

You can do it this way, but the recommended method is to use ‘Synced Content’ instead of installation media. When creating a new host or host group, if you select a Content View, Lifecycle Environment, Content Source, Arch and Operating System, it should then allow you to select a kickstart repo to install from without creating installation media. This will also allow you to use kickstart repos that are in your content views.

As a workaround I tried to modify the snippet to do something like “rpm -ivh http://my-katello-server.com/pulp/repos/Default_Organization/Library/custom/Centos_7_3/base_x86_64/Packages/subscription-manager.rpm” but I cannot find the subscription-manager rpm when accessing “http://my-katello-server.com/pulp/repos/Default_Organization/Library/custom/Centos_7_3/base_x86_64/Packages/” with my browser. The weird thing is that If I go to “Products >> Centos_7.3 >> Repositories >> base_x86_64 >> Packages” in the webui I can find the “subscription-manager” rpm and this repo is included in my content view

For Centos, that is the best method. The reason it doesn’t show up when browsing is most likely because this repository is set to “On Demand” (the default value). On demand repositories do not actually download any rpms until they are requested by a client (or browser). After being requested once, they will show up in 5-10 minutes while browsing the repo.

If you don’t want to use the on demand download policy, simply change that repo to ‘immediate’ and re-sync the repo. That will cause all rpms to be download to the server.


#3

You can do it this way, but the recommended method is to use ‘Synced Content’ instead of installation media. When creating a new host or host group, if you select a Content View, Lifecycle Environment, Content Source, Arch and Operating System, it should then allow you to select a kickstart repo to install from without creating installation media. This will also allow you to use kickstart repos that are in your content views.

Thanks for the tip! I will give it a try.

For Centos, that is the best method. The reason it doesn’t show up when browsing is most likely because this repository is set to “On Demand” (the default value). On demand repositories do not actually download any rpms until they are requested by a client (or browser). After being requested once, they will show up in 5-10 minutes while browsing the repo.

I was using the “inmediate” policy. It turns out that I didn’t find the package because of a weird behavior in the search function in my browser. If I try ctrl^f + “subscriptio” it was not finding the package but if I try ctrl^f “subscription” it finds it. Really weird but now I can install it from the local repo.

Thanks for you help!


#4

I cannot manage to use the “synced content” option to install centos hosts. I have created a new topic asking about this