Configuring an internal image repository

Create a repository for storing images that are created by the operator during Maximo® Manage deployment.

Procedure

  1. Log in to a Bastion host.
  2. Create a network file system (NFS) for the image repository.
    mkdir /disk1/nfs/image-registry && chmod 777 /disk1/nfs/image-registry/
  3. 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)
  4. Restart the server.
    systemctl restart nfs-server
  5. 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
  6. Apply the image-storage.yaml file.
    oc apply -f image-storage.yaml
  7. Edit the operator.
    oc edit configs.imageregistry.operator.openshift.io
  8. Change the spec.managementState value from Removed to Managed.
  9. Update the spec.storage value.
    storage
    managementState: Managed
    pvc
    claim: image-registry-storage
  10. Save and quit.
  11. Verify that the image repository is available.
    oc get co image-registry
  12. Enable the route.
    oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge