Preparing a Red Hat OpenShift environment

Create your Event Gateway namespace, define your catalog sources, and install the Event Endpoint Management operator.

Before you begin

Review and complete the planning and preparation that is described in the following topics:

Create a project (namespace)

Create a namespace for your Event Gateway instance by creating a project. When you create a project, a namespace with the same name is also created.

Do not install an Event Gateway instance into any of the default or system namespaces. For example:
  • default
  • kube-system
  • kube-public
  • openshift-operators
Creating a project by using the web console:
  1. Log in to the Red Hat OpenShift Container Platform web console.
  2. Expand the Home dropdown and select Projects to open the Projects pane.
  3. Click Create Project.
  4. Enter a new project name in the Name field, and optionally, a display name in the Display Name field, and a description in the Description field.
  5. Click Create.
Creating a project by using the CLI:
  1. Log in to your Red Hat OpenShift Container Platform CLI (oc login).
  2. Run the following command to create a new project:
    oc new-project <project_name> --description="<description>" --display-name="<display_name>"

    The --description and --display-name arguments are optional.

Create an image pull secret

Create an image pull secret that is called ibm-entitlement-key in your Event Gateway namespace. The secret enables the Event Gateway container image to be pulled from the image registry.

  1. Obtain an entitlement key from the IBM Container software library.
  2. Create the secret in your Event Gateway namespace.
    • To create the secret with the CLI, use the following command:
      oc create secret docker-registry ibm-entitlement-key --docker-username=cp --docker-password="<your-entitlement-key>" --docker-server="cp.icr.io" -n <namespace>
    • To create the secret with the web console:
      1. Select Workloads > Secrets.
      2. Expand the Project dropdown and select the project that you created for your Event Gateway.
      3. Click Create > Image pull secret.
      4. Set the fields as follows:
        • Secret name: ibm-entitlement-key.
        • Registry server address: cp.icr.io.
        • Username: cp.
        • Password: Your entitlement key.
      5. Click Create.

Creating the catalog sources

Two options are available for creating the Event Endpoint Management catalog sources in your Red Hat OpenShift environment:

  1. Download the Container Application Software for Enterprises (CASE) files for the latest version of the Event Endpoint Management operator.

  2. Add the IBM Operator Catalog to your cluster to make the latest version of Event Endpoint Management available in your cluster.
    Important: Use this option only if automatic updates are not enabled in your cluster.

Download the Container Application Software for Enterprises (CASE) files

  1. Log in to your Red Hat OpenShift Container Platform CLI (oc login).
  2. Verify that you have the IBM Catalog Management Plug-in for IBM Cloud Paks (ibm-pak) installed:
    oc ibm-pak --help

    If ibm-pak is not installed, then follow the steps in the ibm-pak readme to install it.

  3. Run the following command to download, validate, and extract the latest Event Endpoint Management CASE version.
    oc ibm-pak get ibm-eventendpointmanagement
  4. Generate mirror manifests by running the following command:
    oc ibm-pak generate mirror-manifests ibm-eventendpointmanagement icr.io 
    
    The previous command generates the following files locally:
    • catalog-sources.yaml
    • catalog-sources-linux-<arch>.yaml (if there are architecture-specific catalog sources)
    • image-content-source-policy.yaml
    • images-mapping.txt
  5. Apply the catalog sources to the cluster by running the following command:
    oc apply -f ~/.ibm-pak/data/mirror/ibm-eventendpointmanagement/11.8.0/catalog-sources.yaml

When the Event Endpoint Management sources are installed, you can proceed to Install the Event Endpoint Management operator.

Add the IBM Operator Catalog to your cluster

Important: Use this method of installation only if automatic updates are disabled in your cluster. If automatic updates are enabled, then Download the Container Application Software for Enterprises (CASE) files instead.

If you have other IBM products that are installed in your cluster, then you might already have the IBM Operator Catalog available.

Installing the IBM Operator Catalog with the CLI:
  1. Log in to your Red Hat OpenShift Container Platform CLI (oc login).
  2. Create a file called ibm_catalogsource.yaml and paste in the following contents:
    apiVersion: operators.coreos.com/v1alpha1
    kind: CatalogSource
    metadata:
       name: ibm-operator-catalog
       namespace: openshift-marketplace
    spec:
       displayName: "IBM Operator Catalog"
       publisher: IBM
       sourceType: grpc
       image: icr.io/cpopen/ibm-operator-catalog
  3. Create the catalog source by applying the ibm_catalogsource.yaml file:
    oc apply -f ibm_catalogsource.yaml

Installing the IBM Operator Catalog with the Red Hat OpenShift web console:
  1. Log in to the Red Hat OpenShift Container Platform web console.
  2. Select the plus icon on the upper right.
  3. Paste the following contents into the YAML editor:
    apiVersion: operators.coreos.com/v1alpha1
    kind: CatalogSource
    metadata:
       name: ibm-operator-catalog
       namespace: openshift-marketplace
    spec:
       displayName: "IBM Operator Catalog"
       publisher: IBM
       sourceType: grpc
       image: icr.io/cpopen/ibm-operator-catalog
  4. Click Create.

When the IBM Operator Catalog is installed in your Red Hat OpenShift environment, you can proceed to Install the Event Endpoint Management operator

Install the Event Endpoint Management operator

To install the operator by using the OpenShift Container Platform web console, complete the following steps:

  1. Log in to the Red Hat OpenShift Container Platform web console.
  2. Expand the Operators dropdown and select OperatorHub to open the OperatorHub dashboard.
  3. In the All Items search box, enter IBM Event Endpoint Management to locate the operator title.
  4. Click the IBM Event Endpoint Management tile.
  5. Click Install to open the Install Operator dashboard.
  6. Select the installation mode that suits your requirements:
    • Manage Event Gateway instances in any namespace. Select All namespaces on the cluster (default).

      The operator is deployed into the system namespace openshift-operators, and can manage instances in any namespace.

    • Manage instances only in a single namespace. Select A specific namespace on the cluster.
      The operator is deployed into the specified namespace, and cannot manage instances in any other namespace.
      Note: Installing different versions of the Event Endpoint Management operator in different namespaces on the same cluster is not supported.
  7. Set Update approval to Manual.
    Important: The Update approval property applies to all operators in the namespace. If you are installing the operator in a shared namespace, then check with the administrators of the other software in that namespace to confirm that they use manual approval. If other software in the namespace requires automatic update approval, then do not install the Event Endpoint Management operator in that namespace; create a dedicated namespace for the Event Endpoint Management operator where Update approval is set to manual.
  8. Click Install to begin the installation.

To install the operator by using the OpenShift Container Platform CLI, complete the following steps:

  1. Log in to your Red Hat OpenShift Container Platform CLI (oc login).
  2. Change to the namespace where you want to install the operator.

    • If you are installing the operator to manage Event Gateway instances in all namespaces, then use the openshift-operators namespace:
      oc project openshift-operators
    • If you want the operator to manage Event Gateway instances in a single namespace only, then specify that namespace.
      oc project <target-namespace>
      Note: Installing different versions of the Event Endpoint Management operator in different namespaces on the same cluster is not supported.
  3. If you are installing the operator to manage a single namespace (if you are not using the openshift-operators namespace), then check whether an existing OperatorGroup exists in your target namespace:
    oc get OperatorGroup
    If an OperatorGroup exists, then continue to the next step to create a Subscription.
    If an OperatorGroup does not exist, then create one as follows:
    1. Create a file called operator-group.yaml and paste in the following content, replacing <target-namespace> with your namespace:
      apiVersion: operators.coreos.com/v1
      kind: OperatorGroup
      metadata:
        name: ibm-eventautomation-operatorgroup
        namespace: <target-namespace>
      spec:
        targetNamespaces:
          - <target-namespace>
      
    2. Create the OperatorGroup by applying the file:
      oc apply -f operator-group.yaml
  4. Create a Subscription for the Event Endpoint Management operator as follows:
    1. Create a file called subscription.yaml and paste in the following contents:
      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: ibm-eventendpointmanagement
        namespace: <target-namespace>
      spec:
        channel: v11.6
        installPlanApproval: Manual
        name: ibm-eventendpointmanagement
        source: <catalog-source-name>
        sourceNamespace: openshift-marketplace
      
      Replace the placeholder values as follows:
      • <target-namespace> is the namespace where you want to install the Event Endpoint Management operator.

        Set <target-namespace> to openshift-operators if you want the operator to manage Event Gateway instances in all namespaces. Set <target-namespace> to your Event Gateway namespace if you want the operator to manage only gateways in that namespace.

      • <catalog-source-name> is the name of the catalog source that was created for this operator.

        Set this property to ibm-eventendpointmanagement-catalog when you are using a CASE bundle, or ibm-operator-catalog if the source is the IBM Operator Catalog.

    2. Create the subscription by applying the subscription.yaml file:
      oc apply -f subscription.yaml

Checking the operator status

You can view the status of the Event Endpoint Management operator from the web console as follows:
  1. Expand the Operators dropdown and select Installed Operators.
  2. Expand the Project dropdown and select the project (namespace) that the operator is installed in.
    Note: If the operator is installed in the openshift-operators namespace, then it appears under any selected project. If you select all projects, then the operator is shown multiple times in the resulting list (once for each project).
  3. Click the operator called IBM Event Endpoint Management.
  4. Scroll down to the ClusterServiceVersion details section of the page.
  5. Check the Status field. After the operator is successfully installed, the status shows Succeeded.

You can view the status of the Event Endpoint Management operator with the CLI as follows:
oc get csv
The command returns a list of installed operators. The installation is successful if the value in the PHASE column for your Event Endpoint Management operator is Succeeded.