Katello: "On Demand" Sync repo sync option for Ubuntu/deb packages?

Problem:
I’m trying to set up foreman to manage content for a very small number of ubuntu host.
I couldn’t find a way to sync the Ubuntu repos that didn’t try to download them in their 1TB+ Entirety, which isn’t really realistic for managing 4 servers, when most of everything else is RHEL based.

Expected outcome:
Is there a way to add and sync Debian repos where it behaves similarly to the “On Demand” download option for RHEL based repos?

Foreman and Proxy versions:
3.10 nightly
Foreman and Proxy plugin versions:
latest
Distribution and version:
AlmaLinux 8.4 (Server)
Ubuntu 20.04 (Client)

Other relevant data:

I don’t have any answer for you, I have the same problem for my repos but I bit the bullet and synced all of debian amd64. Here are the sizes if you’re interested

362G debian
43G debian-security/

I do have a question for you though, you’re mentioning functionality I didn’t know existed.

I know I can setup on-demand between foreman and a smart-proxy, but I had no idea I could setup foreman to sync on-demand with an internet repo. Can you create a content view when you do that??

Yeah, it appears like it might be exclusive to yum based repos though.

On demand sync is actually a feature in Pulp, and more specifically it is almost entirely a feature in pulpcore. As a result, it should really work equally well for the pulp_deb plugin, as it does for pulp_rpm.

My best guess is that this would require a relatively small change, to expose the underlying Pulp feature in the Katello GUI for APT based systems, just like it is currently exposed for RPM based systems.

One more aspect: While I am fairly confident the Pulp feature will work just fine for Debian/Ubuntu, I do not know to what extent official Debian and Ubuntu repos are additive. If packages are often removed from the upstream repos, than on demand sync is obviously not a good choice. This is true of Debian security repos at the least (I think).

My colleague @m-bucher opened a PR to add “On Demand” “Download Policy” for deb content:

Now we just need to test it…

2 Likes