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.
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.
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?
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.
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.
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.