okd-project / okd

The self-managing, auto-upgrading, Kubernetes distribution for everyone
https://okd.io
Apache License 2.0
1.76k stars 297 forks source link

Documentation on "Mirroring images for a disconnected installation using the oc-mirror plugin" seems to be incomplete #1940

Closed DoodlesOnMyFood closed 3 months ago

DoodlesOnMyFood commented 6 months ago

I was trying to use the oc mirror plugin to create a mirror repository following https://docs.okd.io/latest/installing/disconnected_install/installing-mirroring-disconnected.html#installation-oc-mirror-installing-plugin_installing-mirroring-disconnected

I failed quite early during the guide.

oc mirror init
error: unable to get version map for init: GET https://registry.redhat.io/auth/realms/rhcc/protocol/redhat-docker-v2/auth?scope=repository%3Aredhat%2Fredhat-operator-index%3Apull&service=docker-registry: UNAUTHORIZED: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication

Based on what I am reading on

https://docs.openshift.com/container-platform/4.15/installing/disconnected_install/installing-mirroring-disconnected.html#mirroring-image-set

It seems to me the oc mirror plugin requires ocp pull secrets.

I can't find any way to configure registries oc-mirror will use.

If there is a way, I believe the documentation should cover this.

If not, then I think the documentation should state that oc-mirror doesn't support okd.

sherine-k commented 6 months ago

Hi @DoodlesOnMyFood I agree that init seems to be assuming mirroring for OCP releases. You probably don't need the init : it's only there to create a skeleton for your imageSetConfig file. I' ve never tried this but according to this example, oc-mirror should allow you to mirror okd releases. oc-mirror uses (like podman) auth info from $XDG_RUNTIME_DIR/containers/auth.json. so if you login to the various registries (quay.io, etc) that you need for mirroring the imageSet, that file should get updated automatically.