Offline
The cosi-offline-bundle.sh script can be used to create a package for the offline installation of Dell COSI storage providers for deployment via Helm.
Dependencies
- Multiple Linux systems may be needed.
- One system with Internet access to create the bundle:Clone a GitHub repository.
- Run a script using Docker or Podman to pull and save container images.
- One system with access to an image registry to : Run a script using Docker or Podman to restore and push images to the registry.
- RedHat credentials to pull
openshift4/ose-kube-rbac-proxy-rhel9image fromregistry.redhat.io(no unauthenticated access).
If one system has both Internet access and registry access, it can be used for both steps.
Dependencies and Usage
Preparing an offline bundle requires the following utilities:
| Dependency | Usage |
|---|---|
docker or podman |
Used to pull images from public registries, tag them, and push to a private registry. |
| Required on both the system building the offline bundle and the system preparing for installation. | |
| Tested versions: docker 19.03+ and podman 1.6.4+. | |
git |
Used to manually clone repositories to create an offline bundle. |
| Needed only on the system preparing the offline bundle. | |
| Tested versions: git 1.8+ (any version should work). |
Workflow
To perform an offline installation :
- Build an offline bundle
- Unpack the offline bundle and prepare for installation.
- Install operator using the unpacked files.
- Install Container Storage Modules using the unpacked files.
- Installing Dell CSM Operator on a disconnected OpenShift environment
NOTE: Use the same tool (docker or podman) for packing and unpacking images.
Building an offline bundle
NOTE: Login to
registry.redhat.iowith RedHat credentials before starting.
On a Linux system with Internet access:
- Clone the required
csm-operatorversion:
git clone -b v1.11.0 https://github.com/dell/csm-operator.git
cd csm-operator
- Run the csm-offline-bundle.sh script to create an offline bundle:
bash scripts/csm-offline-bundle.sh -c
The script will :
- Determine required images from CSM Operator configuration files.
- Pull each required image.
- Save all images to a file using
docker saveorpodman save - Build a
tar.gzfile containing the images and necessary installation files.
Here is the output of a request to build an offline bundle for the Dell CSM Operator:
The resulting offline bundle file can be copied to another machine, if necessary, to gain access to the desired image registry.
Unpacking the offline bundle and preparing for installation
This step needs to be performed on a Linux system with access to an image registry that will host container images. If the registry requires login, that should be done before proceeding.
- Copy the Offline Bundle : Transfer the offline bundle file to a machine with access to the desired image registry.
- Unpack the Bundle:
- On a Linux system with registry access, expand the bundle file:
Here is the output of untartar xvfz dell-csm-operator-bundle.tar.gz
-
Prepare for Installation: Run the
csm-offline-bundle.shscript with the-poption and specify the internal registry path with the-roption:cd dell-csm-operator-bundle bash scripts/csm-offline-bundle.sh -p -r localregistry:5000/dell-csm-operator/The script will :
- Load required container images.
- Tag images with the user-supplied registry information.
- Push tagged images to the registry.
- Update the Operator configuration to use the new images.
Here is the output for preparing the bundle for installation (
localregistry:5000refers to an image registry accessible to Kubernetes/OpenShift.dell-csm-operatorrefers to the folder created within the registry.):
Install Operator:
-
Run the
install.shscript to install the operator:bash scripts/install.sh
Install Container Storage Modules
Prepare for Installation: Ensure required images are available and Operator configuration is updated.
Follow Installation Procedure: Proceed with the usual installation steps as documented for the Operator.
Notes:
- The Operator installs to the
dell-csm-operatornamespace by default - Offline bundle installation is only supported with manual installs (without using Operator Lifecycle Manager).
-
Starting with CSM version 1.16, the sample Custom Resource (CR) files introduce a new field,
spec.version, which specifies the target CSM release for deployment. When this field is set, users can provide container images through either the ConfigMap-based image definitions or a custom registry setup. These methods remove the need to embed image references directly within the CR itself. Detailed instructions for both image management options are provided in the ConfigMap & Custom Registry section. If neither method is configured, the operator automatically falls back to using the default image set associated with the corresponding drivers and modules. This spec.version is currently supported on Powerstore, Powermax, Powerscale and Powerflex platforms. - Offline bundle installs the operator in the default namespace via the install.sh script. Ensure the current context in the kubeconfig file is set to default.
Installing Dell CSM Operator on a disconnected OpenShift environment
This guide provides instructions for installing the Dell CSM Operator on a disconnected OpenShift environment. The most convenient method is to mirror the entire catalog of certified Operators.
Prerequisites
Before getting started, ensure the following prerequisites are met:
- The OpenShift CLI (oc) installed
- Access to a private container registry where the mirrored images will be hosted
- Sufficient local storage space to download all required images
Mirror the Certified Operator Catalog
Run the following command to mirror the catalog:
oc adm catalog mirror registry.redhat.io/redhat/certified-operator-index:v[ocp version] [private-registry-url]
Example:
oc adm catalog mirror registry.redhat.io/redhat/certified-operator-index:v4.19 registry.example.com:5000
For more detailed steps, such as using credentials to authenticate, using a file archive, and more, refer to the official OpenShift documentation
Populating OperatorHub from a mirrored Operator
After previous step completes successfully, an ImageContentSourcePolicy manifest is generated. That resource will translate regular image url and tags into the mirrored ones in the private registry.
From the disconnected environment run:
oc create -f imageContentSourcePolicy.yaml
Then update the CatalogSource to reference the mirrored content in the private registry:
oc apply -f catalogSource.yaml
Verify the deployment:
oc get pods -n openshift-marketplace
Once all pods are in a healthy state, the Red Hat–certified Operators should appear in the OperatorHub in the OpenShift Web Console
For more detailed steps on populating the OperatorHub with a new catalog, refer to the official OpenShift documentation.
Mirroring only the Dell CSM Operator
The synchronization of the full certified operator catalog is a resource‑intensive process and can take several hours to complete. It also requires significant storage capacity on the container registry (typically more than 1 TB).
An alternative method is to mirror only the Dell CSM Operator. To do so use oc-mirror plugin to select the dell-csm-operator-certified only.
That procedure is documented in the official documentation.
The overall workflow is similar to the steps described in the previous section, with the following additional requirements:
- Download and install the
oc-mirrorplugin (available through the OpenShift Web Console or from the Github repository). - Authenticate
podmanwithregistry.redhat.io. - Prepare an
ImageSetConfigurationthat includes only the Dell CSM Operator.
Here is a sample ImageSetConfiguration file to be adjusted with OpenShift version and CSM Operator version:
apiVersion: mirror.openshift.io/v2alpha1
kind: ImageSetConfiguration
mirror:
operators:
- catalog: registry.redhat.io/redhat/certified-operator-index:v[ocp version]
packages:
- name: dell-csm-operator-certified
channels:
- name: stable
minVersion: "[dell csm operator version]"
In a fully disconnected environment, the required images must be downloaded locally:
oc mirror --config=dell-csm-operator-mirror.yml file:///tmp/dell-csm-operator-imageset --v2
Push the images to the private registry:
oc mirror --config=dell-csm-operator-mirror.yml --from file:///tmp/dell-csm-operator-imageset docker://<mirror_registry_url> --v2
Finally, patch the ImageDigestMirrorSet:
oc apply -f cluster-resources
Verification can be performed using:
oc get imagedigestmirrorset
oc get catalogsource -n openshift-marketplace
oc get clustercatalog