Katello Smart Proxy - Only Syncing Specific Packages or Repositories

Hi all!

First off apologies for the wordy post. I didn’t mean to write a book, but I thought it was important to provide some background before diving right into the main topic. I put the main summary of my question in bold below as a TL;DR.

So I have an interesting challenge which I’m trying to solve in regards to Katello Smart Proxies and the process of syncing content down to them.

I am wondering if there is a way that I can be more “choosy” about what packages are synced down to a Smart Proxy, rather than syncing the whole kit and caboodle (the entire content view).

Before getting into exactly what I’m trying to do, let me give you a quick lay of the land in regards to how I have things organized in Foreman/Katello.

  • A Product that includes the usual CentOS7 repositories and the EPEL7 repository.
  • A Content View which contains said product, which is published and promoted.
  • A Lifecycle Environment which the above content view has been promoted to.
  • A single Smart Proxy which I wish to synchronize content to.

And a short explanation of what my personal environment looks like:

  • The main Foreman/Katello server is in a datacenter.
  • The Smart Proxy is on another network, which connects to the Foreman server via MPLS over the WAN. The bandwidth is very poor.
  • Several end-points are on the same network as the Smart Proxy, which are going to “provision off” of said Smart Proxy.

Now that you know my environment, here is the challenge:

I want to be choosy with what packages get synced to keep the download to the Smart Proxy small for efficiency and speed due to the slow network connection. I am totally OK with syncing the CentOS7 repositories, but I hate syncing the entire EPEL7 repository just for a handful of packages that we need.

I can think of a few solutions to this, but they each have small downfalls to them:

  • Remove EPEL7 from the Content View and simply copy the handful of packages I need into a custom repository. Then add said repository into the Content View. This way I’m getting only what I need when I sync down the content to the Smart Proxy.
    • The problem with this is that every time I sync the EPEL7 repository in my Product with the base repository and those packages are updated, I’ll have to manually copy (I suppose it could be automated in some fashion) said packages into my custom repository.
  • Set the Download Policy on the Smart Proxy to On Demand. If I’m understanding this setting properly, this means only the needed packages will get synched down to the Smart Proxy only when that first end-point attempts to provision off of it.
    • I’m not sure if this means all content is synched or just the packages it needs?
    • This would mean that first system being provisioned will take a very long time to build (I think?). I know the content will need to be synced either way, but I honestly prefer it not being during an actual build.
    • Ideally it would be nice to have only the EPEL7 repository be set to On Demand, while the others are Immediate for the Smart Proxy, but this doesn’t seem to be an option.

Anyways, I hope I summed up my challange nicely. It would be an absolute pleasure if anyone had any pearls of wisdom or advice for me on this situation!