Adding catalog sources to a cluster

Add catalog sources to your OpenShift cluster to make the IBM operators available for installation. This task is also required if you are applying catalog sources fix packs prior to an upgrade.

This task must be performed by a cluster administrator. For more information, see OpenShift Roles and permissions.

The following catalog sources are available:

  • Specific catalog sources for each operator. By using a separate catalog source for each operator, you gain full control of software versioning on a cluster. For example:

    • You can upgrade each Cloud Pak component independently.

    • You can have a fully declarative set of artifacts, which you can use to recreate exact installations.

    • You can easily control upgrade and promotion through environments (such as from test to production environments) with a CI/CD pipeline.

    • You can control when upgrades happen. A new operator version becomes available in an OpenShift cluster only after you update the catalog source for that operator. This process effectively gives you manual control of upgrades, so you do not need to use the Manual option for the Update approval setting for operators. The Manual option forces all possible upgrades to be done at the same time and can block upgrades, so use the Automatic option only. For more information, see the "Restricting automatic updates with an approval strategy" section of Installing the operators by using the Red Hat OpenShift console.

    To use this option, skip to Adding specific catalog sources for each operator.

  • IBM Operator Catalog. With this option, new operator versions become available and are applied without any intervention from you. So, use this option only for online installations where you want automatic upgrades of operators and the IBM Cloud Pak foundational services, and where deterministic installations are not needed. This option might be useful for proof-of-concept environments but is not suitable for production environments. To use this option, skip to Adding the IBM Operator Catalog.

Adding specific catalog sources for each operator

This procedure must be performed by using the CLI.

Before you begin

If you are applying catalog sources fix packs prior to an upgrade, complete the following steps:

  • Confirm that your operators are running properly.

  • If there are any pending operator updates that require manual approval, approve those before starting this procedure. For more information, see "Restricting automatic updates with an approval strategy" in Installing the operators by using the Red Hat OpenShift console.

If you have not already installed it, or if it needs updating, download the IBM Catalog Management plug-in (version 1.6.0 or later) from GitHub. This plug-in allows you to run oc ibm-pak commands against the cluster.

Procedure

Complete the following steps for each of the Cloud Pak operators that you want to install.

  1. Log into your cluster by using the oc login command and your user credentials:

    oc login <openshift_url> -u <username> -p <password> -n <namespace>
  2. Export the following environment variables for the operator:

    export OPERATOR_PACKAGE_NAME=<operator_package_name>
    export OPERATOR_VERSION=<operator_version>
    export ARCH=<architecture>

    See the following section, Export commands for all operators, for values to use for the <operator_package_name>, <operator_version>, and <architecture> placeholders, and a table with a list of export commands that you can copy. For example:

    export OPERATOR_PACKAGE_NAME=ibm-integration-platform-navigator
    export OPERATOR_VERSION=7.2.4
    export ARCH=amd64
  3. Download the files for the operator. If you are completing an air-gapped installation, you should already have the files that you need after following the instructions in Mirroring images for an air-gapped cluster, in which case you can skip to step 6 to apply the catalog source files to the cluster.

    oc ibm-pak get ${OPERATOR_PACKAGE_NAME} --version ${OPERATOR_VERSION}
  4. Generate the catalog sources required for this operator:

    oc ibm-pak generate mirror-manifests ${OPERATOR_PACKAGE_NAME} icr.io --version ${OPERATOR_VERSION}
  5. (Optional) Generate the catalog sources and save them on another directory.

    This command might not return anything if there are no multi-architecture catalog sources for the components being installed.

    1. To get the catalog sources, run:

      cat ~/.ibm-pak/data/mirror/${OPERATOR_PACKAGE_NAME}/${OPERATOR_VERSION}/catalog-sources.yaml
    2. Run the following command to discover whether there are any architecture-specific catalog sources that you need. This command might not return anything if there are no architecture-specific catalog sources for the components being installed. Even if this is the case, those components can be installed in the supported architecture.

      cat ~/.ibm-pak/data/mirror/${OPERATOR_PACKAGE_NAME}/${OPERATOR_VERSION}/catalog-sources-linux-${ARCH}.yaml
    3. (Optional) Navigate to the directory in your file browser to copy these artifacts into files that you can keep for re-use or for pipelines.

  6. Apply the catalog sources for this operator to the cluster. This command might not return anything if there are no multi-architecture catalog sources for the components being installed:

    oc apply -f ~/.ibm-pak/data/mirror/${OPERATOR_PACKAGE_NAME}/${OPERATOR_VERSION}/catalog-sources.yaml

    Also run the following command to confirm whether there are any architecture-specific catalog sources to apply. If there are no architecture-specific catalog sources, you can skip this step.

    oc apply -f ~/.ibm-pak/data/mirror/${OPERATOR_PACKAGE_NAME}/${OPERATOR_VERSION}/catalog-sources-linux-${ARCH}.yaml
  7. Confirm that the catalog sources were created in the openshift-marketplace project/namespace:

    oc get catalogsource -n openshift-marketplace

Export commands for all operators

These commands set environment variables for the operator package name and version:

Operator Export commands
IBM Cloud Pak for Integration export OPERATOR_PACKAGE_NAME=ibm-integration-platform-navigator && export OPERATOR_VERSION=7.2.4
IBM Automation foundation assets export OPERATOR_PACKAGE_NAME=ibm-integration-asset-repository && export OPERATOR_VERSION=1.6.4
IBM API Connect export OPERATOR_PACKAGE_NAME=ibm-apiconnect && export OPERATOR_VERSION=5.1.0
IBM App Connect export OPERATOR_PACKAGE_NAME=ibm-appconnect && export OPERATOR_VERSION=11.6.0
IBM MQ export OPERATOR_PACKAGE_NAME=ibm-mq && export OPERATOR_VERSION=3.1.3
IBM Event Streams export OPERATOR_PACKAGE_NAME=ibm-eventstreams && export OPERATOR_VERSION=3.3.2
IBM Event Endpoint Management export OPERATOR_PACKAGE_NAME=ibm-eventendpointmanagement && export OPERATOR_VERSION=11.1.6
IBM DataPower Gateway export OPERATOR_PACKAGE_NAME=ibm-datapower-operator && export OPERATOR_VERSION=1.10.1
IBM Aspera HSTS export OPERATOR_PACKAGE_NAME=ibm-aspera-hsts-operator && export OPERATOR_VERSION=1.5.13
IBM Cloud Pak foundational services export OPERATOR_PACKAGE_NAME=ibm-cp-common-services && export OPERATOR_VERSION=4.6.3
IBM Cert Manager (1) export OPERATOR_PACKAGE_NAME=ibm-cert-manager && export OPERATOR_VERSION=4.2.1

(1) Add the IBM Cert Manager catalog source if both the following statements are true:

  • You are planning to deploy instances of API management or Event Endpoint Manager.

  • You are installing on OpenShift 4.12 on s390x (IBM Z®) or ppc64le (IBM® POWER®) hardware. (On OpenShift 4.12 on other hardware, and on later versions of OpenShift on any hardware, use the cert-manager Operator for Red Hat OpenShift instead. For more information about mirroring this operator, see Installing the cert-manager Operator for Red Hat OpenShift.

You must also use one of these values to set your architecture:

export ARCH=amd64
export ARCH=ppc64le
export ARCH=s390x

Adding the IBM Operator Catalog

Important: Use the IBM Operator Catalog only for online installations where you want automatic upgrades of operators and the IBM Cloud Pak foundational services, and where deterministic installations are not needed. This option might be useful for proof-of-concept environments but is not suitable for production environments.

This procedure can be performed by using the CLI or by using the OpenShift web console.

Using the CLI

  1. Copy this resource definition for IBM operators into a local file on your computer:

    apiVersion: operators.coreos.com/v1alpha1
    kind: CatalogSource
    metadata:
      name: ibm-operator-catalog
      namespace: openshift-marketplace
      annotations:
        olm.catalogImageTemplate: "icr.io/cpopen/ibm-operator-catalog:v{kube_major_version}.{kube_minor_version}"
    spec:
      displayName: IBM Operator Catalog
      publisher: IBM
      sourceType: grpc
      image: icr.io/cpopen/ibm-operator-catalog:latest
      updateStrategy:
        registryPoll:
          interval: 45m
  2. Run the following command. Replace <filename.yaml> with the name of the file you created in the first step:

    oc apply -f <filename.yaml>

Using the OpenShift web console

  1. Log into the OpenShift web console with your OpenShift cluster administrator credentials.

  2. In the banner, click the plus ("+") icon to open the Import YAML dialog box.
    Note: You do not need to select a value for "Project". The YAML code in the next step already includes the correct value for metadata:namespace, which ensures that the catalog source is installed in the correct project (namespace).
  3. Paste this resource definition into the dialog box:

    apiVersion: operators.coreos.com/v1alpha1
    kind: CatalogSource
    metadata:
      name: ibm-operator-catalog
      namespace: openshift-marketplace
      annotations:
         olm.catalogImageTemplate: "icr.io/cpopen/ibm-operator-catalog:v{kube_major_version}.{kube_minor_version}"
    spec:
      displayName: IBM Operator Catalog
      image: 'icr.io/cpopen/ibm-operator-catalog:latest'
      publisher: IBM
      sourceType: grpc
      updateStrategy:
        registryPoll:
          interval: 45m
  4. Click Create.