Creating an air gapped repo server

Problem:
I’m working in an air gapped environment with some requirements I haven’t been able to find in my searches. We have a requirement that we can build a host to any given build date if requested. In order to achieve that we are currently doing the following using foreman 2.3.5:

  • Use foreman to sync the packages to a host that has external access
  • Copy the contents of /var/lib/pulp/published/yum/https/repos/Default_Organization/Library/ to a transfer drive
  • From the transfer drive copy the contents to a repo server and put the current release in a YYYYMMDD subdirectory. (Yes, each month is unfortunately a full copy)
  • Update /etc/yum.repos.d/* to point to http:////YYYMMDD

The sync and transfer are done on the first of each month. While not super efficient this meets our requirements.

I have been tasked with updating our external facing machine and foreman. When I installed foreman 3.3 I discovered that /var/lib/pulp/published is no longer there and found https://community.theforeman.org/t/pulp3-var-lib-pulp-published-missing/24615 explaining why.

Being new to managing this process I’m not certain how to proceed. Is there a way to get pulp3 to generate the the published directory that I haven’t found? Is there an alternative way to migrate the patches from the external host to the air gapped host while maintaining the requirement of having a image that is identical on a per month basis?

I apologize if my phrasing isn’t what it needs to be, I’m still trying to connect all the pieces…

Expected outcome:
Generate /var/lib/pulp/published directories, or equivalent, for migration between air gapped networks

Foreman and Proxy versions:
3.3

Foreman and Proxy plugin versions:

Distribution and version:
CentOS 8 Stream

Other relevant data:

Syncable yum-format repository exports arrived in Katello 4.6 (which goes with Foreman 3.4 I believe.) I think this is similar to what you’d been doing.

For more info see @Partha_Aji’s demo here:

Syncable imports are coming in Katello 4.7: https://www.youtube.com/watch?v=L3HGFGRsDAY&t=810s

One question though… why not just use content views to accomplish this? A content view is a snapshot of a set of content. You could have one for each month.

Thanks for the pointer, I’ll review the video and see what I can make of it.

Regarding the question about content views, they may very well be an option that the original creator wasn’t aware of. Because I’m willing to start from scratch they are certainly something that I’ll look into since this is new territory for me I’m not familiar with them either.

Thank you, I appreciate the response!

1 Like