Installing by mirroring images to a private container registry (with ibm-pak plug-in)
If your cluster is not connected to the internet, you can install WebSphere Automation in your cluster by using connected or disconnected mirroring.
About this task
If you have a host that can access both the internet and your mirror registry, but not your cluster nodes, you can directly mirror the content from that machine. This process is referred to as "connected mirroring". If you have no such host, you must mirror the images to a file system, and then bring that host or removable media into your restricted environment. This process is referred to as "disconnected mirroring".
Before you begin
Complete the steps in the following sections before you begin generating mirror manifests:
- Prerequisites
- Regardless of whether you plan to mirror the images with a bastion host or to the file system,
you must satisfy the following prerequisites:
- Red Hat OpenShift Container Platform requires you to have cluster admin access to run the install-operator command.
- A Red Hat OpenShift Container Platform cluster must be installed.
- Access to the following sites and ports:
Table 1. Allowlisted sites and ports for using a private container registry Site Description icr.iocp.icr.iodd0.icr.iodd2.icr.iodd4.icr.iodd6.icr.io
If you are located in China, you must also allow the following hosts:
dd1-icr.ibm-zh.comdd3-icr.ibm-zh.comdd5-icr.ibm-zh.comdd7-icr.ibm-zh.com
Allowing these hosts, on port 443, provides access to the IBM Cloud Container Registry, CASE OCI artifact, and IBM Cloud Pak foundational services catalog source github.com GitHub houses CASE files and IBM Cloud Pak tools redhat.com Red Hat registries required per Configuring your firewall for Red Hat OpenShift Container Platform and Red Hat OpenShift Container Platform upgrades
Note:- IBM images that were located on Quay.io and Docker.io were migrated to the IBM Cloud Container Registry. Unless you want to install an earlier version of an IBM Cloud Pak, you likely don't need to open sites and ports for these.
- With
ibm-pakplug-in version 1.2.0, you can eliminate the port forgithub.comto retrieve CASES and tooling by configuring the plug-in to download CASEs as OCI artifacts from IBM Cloud Container Registry (ICCR):oc ibm-pak config repo 'IBM Cloud-Pak OCI registry' -r oci:cp.icr.io/cpopen --enable
- Prepare a host
-
If you are in an air gap environment, you must be able to connect a host to the internet and mirror registry for connected mirroring or mirror images to the file system that can be brought to a restricted environment for disconnected mirroring. For information on the latest supported operating systems, see the ibm-pak plugin install documentation.
The following table explains the software requirements for mirroring IBM Cloud Pak images:
Table 2. Software requirements and purpose Software Purpose Docker Container management Podman Container management Red Hat OpenShift CLI (oc) Red Hat OpenShift Container Platform administration Complete the following steps on your host:- 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 dockerTo 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 IBM/ibm-pak. Extract the binary file by entering the
following command:
tar -xf oc-ibm_pak-linux-amd64.tar.gzRun 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_pakNote: Download the plug-in based on the host operating system. You can confirm that oc ibm-pak -h is installed by running the following command:oc ibm-pak --helpThe plug-in usage is displayed.
For more information on plug-in commands, see command-help
.
The plug-in is also provided in a container image cp.icr.io/cpopen/cpfs/ibm-pak:<TAG>, where
<TAG>is the corresponding plug-in version, for example,cp.icr.io/cpopen/cpfs/ibm-pak:v1.17.0for version 1.17.0 of the plug-in.
The following command creates a container and copies the plug-ins for all the supported platforms in a directory, plugin-dir. You can specify any directory name and it will be created while copying. After copying, it deletes the temporary container. The plugin-dir has all the binaries and other artifacts you find in a GitHub release and repository at IBM/ibm-pak
.
id=$(docker create cp.icr.io/cpopen/cpfs/ibm-pak:<TAG> - ) docker cp $id:/ibm-pak-plugin plugin-dir docker rm -v $id cd plugin-dirIn these instructions, replace
<TAG>with the corresponding plug-in version. For example, usecp.icr.io/cpopen/cpfs/ibm-pak:v1.17.0for version 1.17.0 of the plug-in. - Install Docker or Podman.
- Create registry namespaces
-
Top-level namespaces are the namespaces that appear at the root path of your private registry. For example, if your registry is hosted at
example.com:5000, thenmynamespaceinexample.com:5000/mynamespaceis 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_REGISTRYtoexample.com:5000/mynamespace. This setting 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 that are specified by the CASEs. For example, it will try to mirror the images at
example.com:5000/cp,example.com:5000/cpopen, and so on.So if your registry does not allow automatic creation of top-level namespaces and you are not going to use your own during generation of mirror manifests, then you must create the following namespaces at the root of your registry.
cpcpopen
There can be more top-level namespaces that you might need to create. See the section on how to Generate mirror manifests for information on how to use the oc ibm-pak describe command to list all the top-level namespaces.
- Set environment variables and download CASE files
-
If your host must connect to the internet via a proxy, you must set environment variables on the machine that accesses the internet via the proxy server.
If you are mirroring via connected mirroring, set the following environment variables on the machine that accesses the internet via the proxy server:
export https_proxy=http://<proxy-server-hostname>:<port> export http_proxy=http://<proxy-server-hostname>:<port> # Example: export https_proxy=http://server.proxy.example.com:5018 export http_proxy=http://server.proxy.example.com:5018Before mirroring your images, you can set the environment variables on your mirroring device, and connect to the internet so that you can download the corresponding CASE files. To finish preparing your host, complete the following steps:
Note: Save a copy of your environment variable values to a text editor. You can use that file as a reference to cut and paste from when you finish mirroring images to your registry.- Create the following environment variables with the installer image name and the
version.
export CASE_NAME=<YOUR_CASE_NAME> export CASE_VERSION=<YOUR_CASE_VERSION>To find the CASE name and version, see IBM: Product CASE to Application Version. For WebSphere Automation:
<YOUR_CASE_NAME>isibm-websphere-automation<YOUR_CASE_VERSION>is the same as the product version (1.13.0).
- Connect your host to the internet.
- Set the locale, if you do not want to use the locale that the plug-in
detects for textual helps and
messages.
oc ibm-pak config locale -l <LOCALE>Where
<LOCALE>can be one ofde_DE,en_US,es_ES,fr_FR,it_IT,ja_JP,ko_KR,pt_BR,zh_Hans, orzh_Hant. - Configure the plug-in to download CASEs as OCI artifacts from IBM Cloud Container Registry
(ICCR).
oc ibm-pak config repo 'IBM Cloud-Pak OCI registry' -r oci:cp.icr.io/cpopen --enable - Enable color output (optional with v1.4.0 and
later).
oc ibm-pak config color --enable true - Download the image inventory for WebSphere Automation to your
host.Tip: If you do not specify the CASE version, it downloads the latest CASE.
oc ibm-pak get \ $CASE_NAME \ --version $CASE_VERSION
By default, the root directory that is used by plug-in is ~/.ibm-pak. This means that the preceding command downloads the CASE under ~/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION. You can configure this root directory by setting the
IBMPAK_HOMEenvironment variable. Assuming theIBMPAK_HOMEvariable is set, the preceding command downloads the CASE under$IBMPAK_HOME/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION.The logs files are available at $IBMPAK_HOME/.ibm-pak/logs/oc-ibm_pak.log.
Your host is now configured and you are ready to mirror your images.
Note:- Starting with v1.4.0, the plug-in creates a file,
component-set-config.yaml, in the directory
~/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION to download the CASEs with
oc ibm-pak get. This file captures all the CASEs that were downloaded, pinning
down their exact versions during this particular download. You can use this file later to download
the same CASEs with same versions in another environemnt. You can check in this file to your source
code repository and re-create the same environment each time you use this to download the CASEs. Run
the following
command:
oc ibm-pak get -c file:///home/user/ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION/component-set-config.yamlThe path after
file://should be an absolute path. - You can edit this file defining the CASEs with pinned down versions that should include your
product. The following is an example file,
my-csc.yaml:
name: "example-product" # <required> defines the name for the "product"; this is NOT a CASE name, but follows IBM CASE name rules. For more information, see https://ibm.biz/case-yaml version: "1.0.0" # <required> defines a version for the "product" description: "an example product targeting OCP 4.14" # <optional, but recommended> defines a human readable description for this listing of components cases: # list of CASEs. First item in the list is assumed to be the "top-level" CASE, and all others are dependencies - name: ibm-mas version: 5.5.2 launch: true # Exactly one CASE should have this field set to true. The launch scripts of that CASE are used as an entry point while executing 'ibm-pak launch' with a ComponentSetConfig - name: ibm-cp-common-services version: 1.15.2
- Create the following environment variables with the installer image name and the
version.
Mirroring images to your private container registry
The process of mirroring images takes the image from the internet to your host, then effectively copies that image to your private container registry.
Complete the following steps to mirror your images from your host to your private container registry:
- Step 1. Generate mirror manifests
- Step 2. Authenticating the registry
- Step 3. Mirror images to final location
After you mirror your images, you can configure your cluster and complete the air gap installation by installing WebSphere Automation by way of Red Hat Open Shift Container Platform.
- Step 1. Generate mirror manifests
-
Note: If you want to install subsequent updates to your air-gapped environment, you must run a CASE get command to get the image list when performing those updates. A registry namespace suffix can optionally be specified on the target registry to group-mirrored images.
- Define the environment variable
$TARGET_REGISTRYby running the following command:export TARGET_REGISTRY=<target-registry>The
<target-registry>refers to the registry (hostname and port) where your images will be mirrored to and accessed by the oc cluster. For example, settingTARGET_REGISTRYtoexample.com:5000/mynamespacecreates manifests such that images are mirrored to the top-level namespace that is namedmynamespace. - Run the following commands to generate mirror manifests to be used when mirroring from a bastion
host (connected mirroring):
oc ibm-pak generate mirror-manifests \ $CASE_NAME \ $TARGET_REGISTRY \ --version $CASE_VERSIONThe ~/.ibm-pak directory structure is built over time as you save CASEs and mirror. The following tree shows an example of the ~/.ibm-pak directory structure for connected mirroring. You might need to install thetreecommand first.tree ~/.ibm-pak /root/.ibm-pak ├── config │ └── config.yaml ├── data │ ├── cases │ │ └── <YOUR-CASE-NAME> │ │ └── <YOUR-CASE-VERSION> │ │ ├── XXXXX │ │ ├── XXXXX │ └── mirror │ └── <YOUR-CASE-NAME> │ └── <YOUR-CASE-VERSION> │ ├── catalog-sources.yaml │ ├── image-content-source-policy.yaml │ └── images-mapping.txt └── logs └── oc-ibm_pak.logNote: A new directory, ~/.ibm-pak/mirror, is created when you issue theoc ibm-pak generate mirror-manifestscommand. This directory holds the image-content-source-policy.yaml, images-mapping.txt, and catalog-sources.yaml files.Tip: If you are using a Red Hat Quay.io registry and need to mirror images to a specific organization in the registry, you can target that organization by specifying:export ORGANIZATION=<your-organization> oc ibm-pak generate mirror-manifests \ $CASE_NAME \ $TARGET_REGISTRY/$ORGANIZATION \ --version $CASE_VERSIONYou can also generate manifests to mirror images to an intermediate registry server, then mirroring to a final registry server. This is done by passing the final registry server as an argument to --final-registry:
oc ibm-pak generate mirror-manifests \ $CASE_NAME \ $INTERMEDIATE_REGISTRY \ --version $CASE_VERSION \ --final-registry $FINAL_REGISTRYIn this case, in place of a single mapping file (images-mapping.txt), two mapping files are created:
- images-mapping-to-registry.txt
- images-mapping-from-registry.txt
- Run the following commands to generate mirror manifests to be used when mirroring from a file
system (disconnected mirroring):
oc ibm-pak generate mirror-manifests \ $CASE_NAME \ file://local \ --final-registry $TARGET_REGISTRYThe following tree shows an example of the ~/.ibm-pak directory structure for disconnected mirroring:
tree ~/.ibm-pak /root/.ibm-pak ├── config │ └── config.yaml ├── data │ ├── cases │ │ └── ibm-cp-common-services │ │ └── 4.4.0 │ │ ├── XXXX │ │ ├── XXXX │ └── mirror │ └── ibm-cp-common-services │ └── 4.4.0 │ ├── catalog-sources.yaml │ ├── image-content-source-policy.yaml │ ├── images-mapping-to-filesystem.txt │ └── images-mapping-from-filesystem.txt └── logs └── oc-ibm_pak.logNote: A new directory, ~/.ibm-pak/mirror, is created when you issue the oc ibm-pak generate mirror-manifests command. This directory holds the image-content-source-policy.yaml, images-mapping-to-filesystem.txt, images-mapping-from-filesystem.txt, and catalog-sources.yaml files.
Tip: Some products support the ability to generate mirror manifests only for a subset of images by using the--filterargument and image grouping. The--filterargument provides the ability to customize which images are mirrored during an air gap installation. As an example for this function,ibm-cloud-native-postgresqlCASE can be used, which contains groups that allow mirroring-specific variant ofibm-cloud-native-postgresql(Standard or Enterprise). Use the--filterargument to target a variant ofibm-cloud-native-postgresqlto mirror rather than the entire library. The filtering can be applied for groups and architectures. Consider the following command:oc ibm-pak generate mirror-manifests \ ibm-cloud-native-postgresql \ file://local \ --final-registry $TARGET_REGISTRY \ --filter $GROUPSThe command is updated with a
--filterargument. For example, for$GROUPSequal toibmEdbStandard, the mirror manifests are generated only for the images associated withibm-cloud-native-postgresqlin its Standard variant. The resulting image group consists of images in theibm-cloud-native-postgresqlimage group in addition to any images that are not associated with any groups. This allows products to include common images and the ability to reduce the number of images that you need to mirror.Note: You can use the following command to list all the images that will be mirrored and the publicly accessible registries from where those images will be pulled from:oc ibm-pak describe $CASE_NAME --version $CASE_VERSION --list-mirror-imagesThe output of the preceding command has two sections:
- Mirroring Details from Source to Target Registry
- Mirroring Details from Target to Final Registry. A connected mirroring path that does not involve an intermediate registry will only have the first section.
Make a note of the
Registries foundsubsections in the preceding command output. You will need to authenticate against those registries so that the images can be pulled and mirrored to your local registry. See the next steps on authentication. TheTop level namespaces foundsection shows the list of namespaces under which the images will be mirrored. Manually create these namespaces in your registry (which appears in the Destination column in the command output) root path if your registry does not allow automatic creation of namespaces. - Define the environment variable
- Step 2. Authenticating the registry
-
Complete the following steps to authenticate your registries:
- Store authentication credentials for all source Docker registries.
Your product might require one or more authenticated registries. The following registries require authentication:
cp.icr.ioregistry.redhat.ioregistry.access.redhat.com
You must run the following command to configure credentials for all target registries that require authentication. Run the command separately for each registry:
Note: Theexport REGISTRY_AUTH_FILEcommand only needs to run once.export REGISTRY_AUTH_FILE=<path to the file which will store the auth credentials generated on podman login> podman login <TARGET_REGISTRY>Important: When you log in tocp.icr.io, you must specify the user ascpand the password, which is your Entitlement key from the IBM Cloud Container Registry. For example:podman login cp.icr.io Username: cp Password: Login Succeeded!
For example, if you export
REGISTRY_AUTH_FILE=~/.ibm-pak/auth.json, then after performingpodman login, you can see that the file is populated with registry credentials.If you use the docker login command, the authentication file is typically located at $HOME/.docker/config.json on Linux or %USERPROFILE%/.docker/config.json on Windows. After the docker login command, export
REGISTRY_AUTH_FILEto point to that location. For example, in Linux you can issue the following command:export REGISTRY_AUTH_FILE=$HOME/.docker/config.jsonTable 3. Directory description Directory Description ~/.ibm-pak/config Stores the default configuration of the plug-in and has information about the public GitHub URL from where the CASEs are downloaded.
~/.ibm-pak/data/cases This directory stores the CASE files when they are downloaded by issuing the oc ibm-pak get command. ~/.ibm-pak/data/mirror This directory stores the image-mapping files, ImageContentSourcePolicymanifest in the image-content-source-policy.yaml file, andCatalogSourcemanifest in one or more catalog-sourcesXXX.yaml files. The images-mapping-to-filesystem.txt and images-mapping-from-filesystem.txt files are input to the oc image mirror command, which copies the images to the file system and from the file system to the registry respectively.~/.ibm-pak/data/logs This directory contains the oc-ibm_pak.log file, which captures all the logs that are generated by the plug-in. - Store authentication credentials for all source Docker registries.
- Step 3. Mirror images to final location
-
Complete the steps in this section on your host that is connected to both the local Docker registry and the Red Hat OpenShift Container Platform cluster.
- Mirror images to the final location.
- For mirroring from a bastion host (connected mirroring):
Mirror images to the
TARGET_REGISTRY:oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping.txt \ --filter-by-os '.*' \ -a $REGISTRY_AUTH_FILE \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1If you generated manifests in the previous steps to mirror images to an intermediate registry server followed by a final registry server, do the following steps.
First, mirror images to the intermediate registry server:
oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping-to-registry.txt \ --filter-by-os '.*' \ -a $REGISTRY_AUTH_FILE \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1Next, mirror images from the intermediate registry server to the final registry server:
oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping-from-registry.txt \ --filter-by-os '.*' \ -a $REGISTRY_AUTH_FILE \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1The oc image mirror --help command can be run to see all the options available on the mirror command. By using
continue-on-error, the command tries to mirror as much as possible and continues on errors.oc image mirror --helpNote: Sometimes based on the number and size of images to be mirrored, the oc image mirror command might take longer. If you are issuing the command on a remote machine, it is recommended that you run the command in the background with anohupso even if network connection to your remote machine is lost or you close the terminal, the mirroring continues. For example, the following command starts the mirroring process in background and writes the log to my-mirror-progress.txt.nohup oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping.txt \ -a $REGISTRY_AUTH_FILE \ --filter-by-os '.*' \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1 > my-mirror-progress.txt 2>&1 &You can view the progress of the mirror by issuing the following command on the remote machine:
tail -f my-mirror-progress.txt - For mirroring from a file system (disconnected mirroring):
Mirror images to your file system:
export IMAGE_PATH=<image-path> oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping-to-filesystem.txt \ --filter-by-os '.*' \ -a $REGISTRY_AUTH_FILE \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1 --dir "$IMAGE_PATH"The
<image-path>refers to the local path to store the images. For example, in the previous section if provided file://local as input during generate mirror-manifests, then the preceding command will create a v2/local subdirectory inside the<image-path>directory and copy the images under it.
Note: Sometimes based on the number and size of images to be mirrored, the oc image mirror command might take longer. If you are issuing the command on a remote machine, it is recommended that you run the command in the background withnohupso that even if you lose network connection to your remote machine or you close the terminal, the mirroring continues. For example, the following command starts the mirroring process in the background and writes the log to my-mirror-progress.txt.export IMAGE_PATH=<image-path> nohup oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping-to-filesystem.txt \ --filter-by-os '.*' \ -a $REGISTRY_AUTH_FILE \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1 \ --dir "$IMAGE_PATH" > my-mirror-progress.txt 2>&1 &You can view the progress of the mirror by issuing the following command on the remote machine:
tail -f my-mirror-progress.txt - For mirroring from a bastion host (connected mirroring):
- (For disconnected mirroring only) Continue to move the following items to
your file system:
- The
<image-path>directory that you specified in the previous step - The
authfile referred by$REGISTRY_AUTH_FILE - ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping-from-filesystem.txt
- The
- (For disconnected mirroring only) Mirror images to the target registry
from file system.
Complete the steps in this section on your file system to copy the images from the file system to the
$TARGET_REGISTRY. Your file system must be connected to the target docker registry.Important: If you used the placeholder value ofTARGET_REGISTRYas a parameter to--final-registryat the time of generating mirror manifests, then before running the following command, find and replace the placeholder value ofTARGET_REGISTRYin the file, images-mapping-from-filesystem.txt, with the actual registry where you want to mirror the images. For example, if you want to mirror images toexample.com/mynamespacethen replaceTARGET_REGISTRYwithexample.com/mynamespace.- Run the following command to copy the images (referred in the
images-mapping-from-filesystem.txt file) from the directory referred by
<image-path>to the final target registry:export IMAGE_PATH=<image-path> oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping-from-filesystem.txt \ -a $REGISTRY_AUTH_FILE \ --from-dir "$IMAGE_PATH" \ --filter-by-os '.*' \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1
If you are on a slow, unreliable network, where connections drop frequently, you can choose either of the following options:- Run
oc image mirrorcommand in a while loop. If the mirroring fails due to any reason it will start all over again after pausing for a set amount of time (in the following example, for five seconds).while ! oc image mirror <args>; do sleep 5; done; - Pass the
continue-on-errorflag tooc image mirrorcommand, set totrue(--continue-on-error=true). This flag indicates that the command will try to mirror as much as possible and continue on errors such as network issues. Usage of this flag might cause misleading errors. For more information, see Communication issue due to too many requests error (HTTP 429) while image mirroring.
- Run the following command to copy the images (referred in the
images-mapping-from-filesystem.txt file) from the directory referred by
- Mirror images to the final location.
Configuring the cluster
-
Update the global image pull secret for your Red Hat OpenShift cluster. Follow the steps in Updating the global cluster pull secret.
The documented steps in the link enable your cluster to have proper authentication credentials in place to pull images from your TARGET_REGISTRY as specified in the image-content-source-policy.yaml which you apply to your cluster in the next step.
-
Create
ImageContentSourcePolicyImportant:- Before you run the command in this step, you must be logged in to your Red Hat OpenShift cluster. Using the oc login command, log in to the Red Hat OpenShift Container Platform cluster where your final location resides. You can identify your specific oc login by clicking the user drop-down menu in the Red Hat OpenShift Container Platform console, then clicking Copy Login Command.
- If you used the placeholder value of TARGET_REGISTRY as a parameter to
--final-registryat the time of generating mirror manifests, then before running the following command, find and replace the placeholder value of the TARGET_REGISTRY parameter in file, ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/image-content-source-policy.yaml with the actual registry where you want to mirror the images. For example, replace TARGET_REGISTRY withexample.com/mynamespace.
Run the following command to create ImageContentSourcePolicy:
oc apply -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/image-content-source-policy.yaml - Verify that the
ImageContentSourcePolicyresource is created.oc get imageContentSourcePolicy - Verify your cluster node status and wait for all the nodes to be restarted before
proceeding.
oc get MachineConfigPool$ oc get MachineConfigPool -w NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE master rendered-master-53bda7041038b8007b038c08014626dc True False False 3 3 3 0 10d worker rendered-worker-b54afa4063414a9038958c766e8109f7 True False False 3 3
After the
ImageContentsourcePolicyand global image pull secret are applied, the configuration of your nodes will be updated sequentially. Wait until allMachineConfigPoolsare in theUPDATED=Truestatus before proceeding. - Create a new project for the CASE commands by running the following commands.Note: You must be logged in to a cluster before performing the following steps.
export NAMESPACE=<YOUR_NAMESPACE>oc new-project $NAMESPACE - If you use an insecure registry, you must add the target registry to the
cluster insecureRegistries
list.
oc patch image.config.openshift.io/cluster --type=merge \ -p '{"spec":{"registrySources":{"insecureRegistries":["'${TARGET_REGISTRY}'"]}}}' - Verify your cluster node status and wait for all the nodes to be restarted before
proceeding.
oc get MachineConfigPool -wAfter the
ImageContentsourcePolicyand global image pull secret are applied, the configuration of your nodes will be updated sequentially. Wait until allMachineConfigPoolsare updated.
Installing WebSphere Automation by way of Red Hat OpenShift Container Platform
Now that your images are mirrored to your air gap environment, you can deploy WebSphere Automation to that environment. When you mirrored your environment, you created a parallel offline version of everything that you needed to install an operator into Red Hat OpenShift Container Platform. To install WebSphere Automation, complete the following steps.
- Create the catalog source.Important: Before you run any of the oc ibm-pak launch \ command, you must be logged in to your cluster. Using the oc login command, log in to the Red Hat OpenShift Container Platform cluster where your final location resides. You can identify your specific
oc loginby clicking the user menu in the Red Hat OpenShift Container Platform console, then clicking Copy Login Command.- Set the WSA_OPERATOR_NAMESPACE and
WSA_INSTANCE_NAMESPACE shell variables.
For the AllNamespaces installation mode, set WSA_OPERATOR_NAMESPACE to openshift-operators. Set WSA_INSTANCE_NAMESPACE to the instance namespace, for example, websphere-automation. For SingleNamespace, use different namespace values. For OwnNamespace mode, set WSA_OPERATOR_NAMESPACE to the same value as WSA_INSTANCE_NAMESPACE.
WSA_OPERATOR_NAMESPACE=openshift-operators WSA_INSTANCE_NAMESPACE=websphere-automation - Create the namespaces, if needed.
For catalog namespace, openshift-marketplace exists. For AllNamespaces installation mode, the openshift-operators namespace exists.
oc create namespace $WSA_OPERATOR_NAMESPACE oc create namespace $WSA_INSTANCE_NAMESPACE - Set the environment variable of the --inventory
parameter:
export CASE_INVENTORY_SETUP=<YOUR_CASE_INVENTORY_SETUP>To find the value for
<YOUR_CASE_INVENTORY_SETUP>, see IBM: Product CASE to Application Version. For WebSphere Automation, the value is
automationOperatorSetup. - If updating to WebSphere Automation 1.8.1 or 1.8.2, edit zen
operator catalog source:
export CASE_NAME=ibm-websphere-automation export CASE_VERSION=<YOUR_VERSION>Open the catalog-sources.yaml file for editing.
vi ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/catalog-sources.yamlSearch for the word
zento find the section similar to the following example code block.apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-zen-operator-catalog namespace: openshift-marketplace spec: displayName: ibm-zen-6.1.1+20250218.180746.89 publisher: IBM image: airgap.example.com:5001/cpopen/ibm-zen-operator-catalog@sha256:a484bcb5478a54965ac3b0ea8acfe61026f46a2cb01587143e22e01797f5d63f sourceType: grpc updateStrategy: registryPoll: interval: 30m0sCopy the value of the spec.displayName parameter from your catalog-sources.yaml file and use it to replace the value of the metadata.name parameter. In the pasted value, replace the
+character with a-character; the+is not permitted in the metadata.name field. - If updating to WebSphere Automation 1.8.2, edit postgresql operator
catalog source:
Edit the
ibm-cloud-native-postgresqloperator catalog sources.Open the catalog-sources.yaml file for editing.
vi ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/catalog-sources.yamlSearch for the word
postgresqlto find the section similar to the following example code block.apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: cloud-native-postgresql-catalog namespace: openshift-marketplace spec: displayName: ibm-cloud-native-postgresql-4.30.0+20241023.165233.2074 publisher: IBM image: api.jagocpxairgap415.cp.fyre.ibm.com:5001/cpopen/ibm-cpd-cloud-native-postgresql-operator-catalog@sha256:3b867e7e0879ec24b5058e5db01c0a9be8d9d8d5ef2b7bb1bb7e247babb8b96d sourceType: grpc updateStrategy: registryPoll: interval: 30m0s --- apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: cloud-native-postgresql-catalog namespace: openshift-marketplace spec: displayName: ibm-cloud-native-postgresql-5.15.0+20250416.103820.2490 publisher: IBM image: api.jagocpxairgap415.cp.fyre.ibm.com:5001/cpopen/ibm-cpd-cloud-native-postgresql-operator-catalog@sha256:7dbff355db7739152961cb6a97887d2e43bc960ac58837c126e03ed1a4480a3a sourceType: grpc updateStrategy: registryPoll: interval: 30m0sCopy the value of the spec.displayName parameter from your catalog-sources.yaml file and use it to replace the value of the metadata.name parameter. In the pasted value, replace the
+character with a-character; the+is not permitted in the metadata.name field. - Create and configure a catalog source.
To install the catalog, run the following command:
oc apply -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/catalog-sources.yamlNote: In IBM Cloud Pak foundational services version 3.13 and previous versions, the install-catalog command will deploycatalogsourcewith the latest tag. Starting from IBM Cloud Pak foundational services version 3.14, install-catalog deploys the catalog source,opencloud-operators, withcatalogsource image digest. - Verify that the
CatalogSourcefor the WebSphere Automation operator is created.oc get pods -n openshift-marketplace oc get catalogsource -n openshift-marketplace
- Set the WSA_OPERATOR_NAMESPACE and
WSA_INSTANCE_NAMESPACE shell variables.
- Install the WebSphere Automation operator prerequisites.
- Install the WebSphere Automation operator.
- Install the WebSphere Automation operator.Note: You must have cluster admin access to run the install-operator command. However, you do not need cluster admin access for mirroring.
oc ibm-pak launch \ $CASE_NAME \ --version $CASE_VERSION \ --inventory $CASE_INVENTORY_SETUP \ --action install-operator \ --namespace $WSA_OPERATOR_NAMESPACE - Using the oc login command, log in to the Red Hat OpenShift Container Platform cluster where your final location resides. You can identify your specific oc login by clicking the user drop-down menu in the Red Hat OpenShift Container Platform console, then clicking Copy Login Command.
- Verify that the WebSphere Automation operator is
installed:
oc get pod -n $WSA_OPERATOR_NAMESPACEIt might take up to 15 minutes for all the pods to show the Running status.
- Install the WebSphere Automation operator.
- Deploy the following configuration to create an instance of WebSphere Automation in an air gap environment.
cat <<EOF | oc apply -f - apiVersion: automation.websphere.ibm.com/v1 kind: WebSphereSecure metadata: name: wsa-secure namespace: $WSA_INSTANCE_NAMESPACE spec: license: accept: false cveMonitor: suspend: true --- apiVersion: automation.websphere.ibm.com/v1 kind: WebSphereHealth metadata: name: wsa-health namespace: $WSA_INSTANCE_NAMESPACE spec: license: accept: false EOFIf your cluster has internet access through a proxy server, then you can configure the
WebSphereSecurecustom resource with the proxy server configuration. For more information, see Configuring to use a proxy server. In thecveMonitorspecification, ensure that the.spec.cveMonitor.suspendproperty is set with a value offalse.Set the
.spec.license.acceptproperty totruefrom its default value offalseif you accept the agreement to the license terms. For more information, see Licensing for WebSphere Automation. - Validate the installation.
- Access the WebSphere Automation UI.
Setting up a repeatable mirroring process
Once you complete a CASE save, you can mirror the CASE as many times as you want to. This approach allows you to mirror a specific version of WebSphere Automation into development, test, and production stages by using a private container registry.
Follow the steps in this section if you want to save the CASE to multiple registries (per environment) once and be able to run the CASE in the future without repeating the CASE save process.
- Run the following command to save the CASE to
~/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION which can be used as an input
during the mirror manifest generation:
oc ibm-pak get \ $CASE_NAME \ --version $CASE_VERSION - Run the oc ibm-pak generate mirror-manifests command to generate the
image-mapping.txt file:
oc ibm-pak generate mirror-manifests \ $CASE_NAME \ $TARGET_REGISTRY \ --version $CASE_VERSIONNote: If you are using a Red Hat Quay.io registry registry and need to mirror images to a specific organization in the registry, you can target that organization by specifying:export ORGANIZATION=<your-organization> oc ibm-pak generate mirror-manifests \ $CASE_NAME \ $TARGET_REGISTRY/$ORGANIZATION \ --version $CASE_VERSIONThen, add the image-mapping.txt file to the oc image mirror command:
oc image mirror \ -f ~/.ibm-pak/data/mirror/$CASE_NAME/$CASE_VERSION/images-mapping.txt \ --filter-by-os '.*' \ -a $REGISTRY_AUTH_FILE \ --insecure \ --skip-multiple-scopes \ --max-per-registry=1
If you want to make this repeatable across environments, you can reuse the same saved CASE cache (~/.ibm-pak/$CASE_NAME/$CASE_VERSION) instead of executing a CASE save command again in other environments. You do not have to worry about updated versions of dependencies being brought into the saved cache.