Support Bulk Artifact Copy Between Pulp Containers

Problem Statement:

Provide native support to copy or sync all artifacts from one Pulp container repository/instance to another Pulp container repository/instance.
Currently, migrating artifacts between two Pulp container registries requires manual workflows such as:
Re-pulling images from source and pushing to destination
Re-syncing from upstream registries/repositories

There is no built-in Pulp mechanism to directly clone or mirror artifacts between two Pulp container repositories or instances.

Expectation:

Add a capability to:

  1. Copy / mirror all artifacts (blobs + manifests + tags) from one Pulp container to another latest Pulp container
  2. Preserves:
    Tags
    Digests
    Artifact checksums
    Versions

I can see there is a page for Pulp Replication but couldn’t find steps on how to deploy: https://pulpproject.org/pulpcore/docs/dev/learn/subclassing/replication/?h=repli

This is exactly what the Replication feature is for, but it seems we have no docs for it! While I’m working on that here are some commands to get you started:

To replicate the content & repositories from Pulp A (upstream) to Pulp B (downstream) run the following:

# configure upstream & downstream cli profiles
$ cat ~/.config/pulp/cli.toml

[cli-a]
base_url = "http://a.pulp"
api_root = "/pulp/"
username = "admin"
password = "password"
verify_ssl = false

[cli-b]
base_url = "http://b.pulp"
api_root = "/pulp/"
username = "admin"
password = "password"
verify_ssl = false

If you can do a pulp --profile a status and pulp --profile b status then we can move onto the next step.

# Create the UpstreamPulp object on downstream pointing to upstream
# The UpstreamPulp config takes the same options as the CLI!
pulp --profile b upstream-pulp create --name pulp-A --base-url http://a.pulp --api-root /pulp/ --username admin --password password

Now run the replicate endpoint and the downstream Pulp will copy everything available upstream that is distributed.

pulp --profile b upstream-pulp replicate --upstream-pulp pulp-A
1 Like