Configuring Operator Lifecycle Manager

Cluster administrators can configure OLM and OperatorHub to use local content in a restricted network environment using a custom Operator catalog image. For this example, the procedure uses a custom redhat-operators catalog image previously built and pushed to a local registry.

Prerequisites
  • OLM must be installed in the local registry.

  • NPS VM/Bastian node must be installed and configured.

  • RHOCP cluster must be deployed.

  • <image_name>-manifests folder must be copied from the registry VM to bastian node/nps VM in the /var/nps/ISO folder.

Procedure
  1. Run the following command to configure OLM on the RHOCP cluster and create the Calatog Source that references the redhat-operator-catalog image:
    nps deploy -s rhocp -a configure-olm

    On successful completion of the command, the vim state will be changed to OLM_CONFIGURED state.

  2. Verify if the execution of the olm configuration command is successful.
    • Perform the following manual verification steps in case of successful execution of the olm configuration command:
      • Run the following NPS command:

        nps show –data vim
      • Verify the state of the olm configure using logs located in var/log/vim/rhocp/rhocp-cli-<date>.log.

      • Run the oc get packagemanifest -n openshift-marketplace command in the NPS VM and look for sriov-network-operator in the NAME field.

    • Perform the following manual verification steps in case of unsuccessful execution of the olm configuration command, that is, the vim state changed to OLM_CONFIGURE_FAILED:
      • Run the following command for verification:

        oc get pods -n openshift-marketplace
        oc get catalogsource -n openshift-marketplace

        A sample output is as follows:

        NAME                      DISPLAY               TYPE   PUBLISHER   AGE
        redhat-operator-catalog   RH-OPERATOR-CATALOG   grpc   grpc        7d
      • If the Pods are not running, delete the catalog source.
        1. Navigate to the /var/nps/ISO directory.

        2. Delete the catalog source.

          oc delete –f catalogsource.yaml
        3. Do one of the following:

          • Rerun the autodeploy and proceed further.

          • Rerun the olm configuration command for manual configuration.
            nps deploy -s rhocp -a configure-olm