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
Procedure
- 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
ImageContentSourcePolicyto 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.conffile. 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.ioto 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_BUNDLESvariable.# 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"
- Method 1: Use the out-of-the-box Operator catalog image
- Install the Operator.
- Install with Operator Lifecycle Manager:
If you opt for the method of rebuilding the Operator catalog image, update the catalog source image to use the newly generated catalog image. The remaining steps are identical as how you install the Operator with OLM in online mode. For more information, see Installing Operator online with Operator Lifecycle Manager.
- Install without Operator Lifecycle Manager
The installation of the Operator in airgap without OLM is similar to the online installation process without OLM. The key difference is that you must replace the image repository with your local repository. For more information, see Installing Operator online without Operator Lifecycle Manager.
Alternatively, you can install by using the Operator Utility script. For more information see, Operator Utility overview and Installation with the Operator Utility script.
- Install with Operator Lifecycle Manager: