Installing Operator in airgap with and without Operator Lifecycle Manager

To install in airgap, use either the out-of-the-box or rebuild the Operator catalog image followed by installation.

Before you begin

Ensure that you review and meet the prerequisites. For more information, see Prerequisites to install Operator in airgap.

Procedure

  1. Configure the Sterling™ Order Management System Operator catalog by using any of the following methods.
    • Method 1: Use the out-of-the-box Operator catalog image

      Configure the registry mirror rules in order for it to be used in an airgap environment. In airgap, the registry mirror rules ensure that the Kubernetes nodes can pull container images from a local or mirrored registry. The setup process varies depending on the platform and container runtime.

      For Red Hat® OpenShift® Container Platform clusters, use the ImageContentSourcePolicy to define cluster-wide registry mirror rules. For more information, see ImageContentSourcePolicy.

      For Vanilla Kubernetes clusters, the method to configure registry mirrors depends on the container runtime as explained in the following list.

      containerd
      Configure the registry mirrors in the containerd configuration file, config.toml. For more information, see Configure image registry.
      CRI-O
      Configure the registry mirrors in the registries.conf file. For more information, see Container registries.
      Docker
      Configure the registry mirrors in the Docker daemon configuration that is daemon.json. For more information, see Mirror the Docker hub library.
      Other runtimes
      Refer to the respective documentation for configuring registry mirrors.
    • Method 2: Rebuild the Operator catalog image

      If you choose to rebuild the catalog image by using the bundle images that are available within the case, run the following commands and script. This process updates the entitled repository that is icr.io to your target repository, rebuilds and pushes the modified bundle images, generates a new catalog image from the updated bundles, and pushes the catalog image to your target registry.

      By default, the following commands rebuild only the latest bundle. To include more bundles, modify the NUM_LATEST_BUNDLES variable.

      # Add the number of the latest bundles to include in the new catalog image
      export NUM_LATEST_BUNDLES=1
      
      # Export required environment variables
      export RESOURCE_FILE_PATH="$OP_CASE_INVENTORY/resources.yaml"
      export BUNDLE_VERSIONS=$(yq e '.resources.resourceDefs.containerImages[] | select(.image == "cpopen/ibm-oms-operator-bundle") | .tag' "$RESOURCE_FILE_PATH" \
                                  | sort -Vr \
                                  | head -n "$NUM_LATEST_BUNDLES" \
                                  | paste -sd ',' -)
      
      # Rebuild the new catalog image from the specified bundles. The source images for the bundle will always be icr.io/cpopen.
      $OP_CASE_INVENTORY/scripts/byoc.sh \
                --source-repo "icr.io/cpopen" \
                --bundle-versions "$BUNDLE_VERSIONS" \
                --target-repo "$TARGET_REPO"
  2. Install the Operator.