Several
IBM® Software Hub services require
Red Hat OpenShift AI. If you plan to install services that use
Inference foundation models, you must install
Red Hat OpenShift AI to start and serve the models. Installing
OpenShift AI in disconnected OpenShift cluster is more challenging than in internet-connect environment. Mirroring the
OpenShift AI images is the prerequisite and a key step of
OpenShift AI installation. To make this task easier, this article introduces the step by step guide for mirroring the
OpenShift AI images.
Setting up a client workstation
Install the oc client and oc-mirror plugin
mkdir /root/mirroring
cd /root/mirroring
wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.16.40/openshift-client-linux-4.16.40.tar.gz
wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/4.16.40/oc-mirror.tar.gz
tar -xvf openshift-client-linux-4.16.40.tar.gz
tar -xvf oc-mirror.tar.gz
3.Make the oc client executable everywhere
cp oc /usr/bin/oc
chmod +x oc-mirror
cp oc-mirror /usr/bin/oc-mirror
Validate with the following command
oc version
oc mirror help
Configure the oc-mirror credentials
Configuring credentials that allow images to be mirrored
Build the ImageSetConfiguration file
Create an ImageSetConfiguration file ocp_ai_416.yaml
for OpenShift AI 2.16 as below:
Note: The 159.33.188.34:8080
in the registry
section needs to be changed to your private image registry location accordingly.
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
archiveSize: 4
storageConfig:
registry:
imageURL: 159.33.188.34:8080/cp
skipTLS: true
mirror:
platform:
channels:
- name: stable-4.16
type: ocp
graph: true
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16
packages:
- name: "rhods-operator"
channels:
- name: "stable-2.16"
minVersion: "2.16.2"
additionalImages:
- name: registry.redhat.io/ubi9/ubi:latest
helm: {}
Note: The 159.33.188.34:8080
in below commands needs to be changed to your private image registry location accordingly.
cd /root/mirroring
oc mirror --config=./ocp_ai_416.yaml docker://159.33.188.34:8080 --source-skip-tls --dest-skip-tls --verbose 9
Once complete, there’s a folder named oc-mirror-workspace created looks like below:
ls oc-mirror-workspace
# Output:
publish results-1750641947
ls oc-mirror-workspace/results-1750641947
# Output:
catalogSource-cs-redhat-operator-index.yaml charts imageContentSourcePolicy.yaml mapping.txt release-signatures updateService.yaml
Apply the ImageDigestMirrorSet
1.Login the OCP cluster using the cluster admin role
oc login https://api.685849c881da5dd628552ad6.am1.xxx.yyy.com:6443 -u kubeadmin -p DP73S-iSmys-SuQ6j-9Ax8f
2.Apply the ImageDigestMirrorSet
cd /root/mirroring/oc-mirror-workspace/results-1750641947
oc create -f $(oc adm migrate icsp imageContentSourcePolicy.yaml | cut -f 4 -d ' ')