Configuring an internal image repository
Create a repository for storing images that are created by the operator during Maximo® Manage deployment.
Procedure
- Log in to a Bastion host.
- Create a network file system (NFS) for the image repository.
mkdir /disk1/nfs/image-registry && chmod 777 /disk1/nfs/image-registry/
-
Edit the /etc/exports file and add an export statement.
/disk1/nfs/image-registry 10.176.245.0/24(rw,no_subtree_check,sync,no_wdelay,insecure,no_root_squash)
-
Restart the server.
systemctl restart nfs-server
-
Create the image-storage.yaml file.
--- apiVersion: v1 kind: PersistentVolume metadata: name: image-registry-pv spec: capacity: storage: 500Gi claimRef: apiVersion: v1 kind: PersistentVolumeClaim name: image-registry-storage namespace: openshift-image-registry accessModes: - ReadWriteMany nfs: path: /disk1/nfs/image-registry server: 10.176.245.2 persistentVolumeReclaimPolicy: Retain --- apiVersion: v1 kind: PersistentVolumeClaim metadata: finalizers: - kubernetes.io/pvc-protection name: image-registry-storage namespace: openshift-image-registry spec: accessModes: - ReadWriteMany resources: requests: storage: 500Gi
-
Apply the image-storage.yaml file.
oc apply -f image-storage.yaml
-
Edit the operator.
oc edit configs.imageregistry.operator.openshift.io
-
Change the
spec.managementState
value fromRemoved
to Managed. -
Update the
spec.storage
value.- storage
managementState: Managed
- pvc
claim: image-registry-storage
- Save and quit.
-
Verify that the image repository is available.
oc get co image-registry
-
Enable the route.
oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge