Prepare a host
If you are in an air-gapped environment, you must be able to connect a host to the internet and mirror registry for connected mirroring or mirror images to file system which can be brought to a restricted environment for disconnected mirroring. For information on the latest supported operating systems, see ibm-pak plugin install documentation.
Software | Purpose |
---|---|
Docker | Container management |
Podman | Container management |
Red Hat OpenShift CLI (oc) | Red Hat OpenShift Container Platform administration |
- Install Docker or Podman.To install Docker (for example, on Red Hat® Enterprise Linux®), run the following commands:Note: If you are installing as a non-root user you must use sudo. For more information, refer to the Podman or Docker documentation for installing as a non-root user.
yum check-update yum install docker
To install Podman, see Podman Installation Instructions.
- Install the
oc
Red Hat® OpenShift® Container Platform CLI tool. - Download and install the most recent version of IBM Catalog Management Plug-in for IBM
Cloud Paks from the IBM/ibm-pak. Extract the binary file by entering
the following command:
tar -xf oc-ibm_pak-linux-amd64.tar.gz
Run the following command to move the file to the /usr/local/bin directory:Note: If you are installing as a non-root user you must use sudo. For more information, refer to the Podman or Docker documentation for installing as a non-root user.mv oc-ibm_pak-linux-amd64 /usr/local/bin/oc-ibm_pak
Note: Download the plug-in based on the host operating system. You can confirm thatoc ibm-pak -h
is installed by running the following command:oc ibm-pak --help
The plug-in usage is displayed.
For more information on plug-in commands, see command-help.
Your host is now configured and you are ready to mirror your images.
Creating registry namespaces
Top-level namespaces are the namespaces which appear at the root path of your private
registry. For example, if your registry is hosted at myregistry.com:5000
,
then mynamespace
in myregistry.com:5000/mynamespace
is
defined as a top-level namespace. There can be many top-level namespaces.
When the images are mirrored to your private registry, it is required that the top-level namespace where images are getting mirrored already exists or can be automatically created during the image push. If your registry does not allow automatic creation of top-level namespaces, you must create them manually.
When you generate mirror manifests, you can specify the top-level namespace where you want
to mirror the images by setting TARGET_REGISTRY
to
myregistry.com:5000/mynamespace
which has the benefit of needing to
create only one namespace mynamespace in your registry if it does not allow automatic
creation of namespaces. The top-level namespaces can also be provided in the final registry
by using --final-registry
.
If you do not specify your own top-level namespace, the mirroring process will use the ones
which are specified by the CASEs. For example, it will try to mirror the images at
myregistry.com:5000/cp
etc.
- cp
There can be more top-level namespaces that you might need to create. See section on Generate mirror manifests for information on how to
use the oc ibm-pak describe
command to list all the top-level
namespaces.