Installing the oc-mirror OpenShift CLI plugin

You can install the oc-mirror OpenShift CLI plugin to manage image sets in disconnected environments.

Prerequisites
  • You have installed the OpenShift CLI (oc). If you are mirroring image sets in a fully disconnected environment, ensure the following:

    • You have installed the oc-mirror plugin on the host that has internet access.

    • The host in the disconnected environment has access to the target mirror registry.

  • You have set the umask parameter to 0022 on the operating system that uses oc-mirror.

  • You have installed the correct binary for the RHEL version that you are using.

Procedure
  1. Download the oc-mirror CLI plugin:

    1. Navigate to the Downloads page of the Red Hat Hybrid Cloud Console.

    2. In the OpenShift disconnected installation tools section, select the OS type and Architecture type of the OpenShift Client (oc) mirror plugin from the dropdown menus.

    3. Click Download to save the file.

  2. Extract the archive by running the following command:

    $ tar xvzf oc-mirror.tar.gz
  3. If necessary, update the plugin file to be executable by running the following command:

    $ chmod +x oc-mirror
    Note

    Do not rename the oc-mirror file.

  4. Install the oc-mirror CLI plugin by placing the file in your PATH, for example /usr/local/bin, by running the following command:

    $ sudo mv oc-mirror /usr/local/bin/.
Verification
  • Verify that the oc-mirror plugin v2 is successfully installed by running the following command:

    $ oc mirror --v2 --help