Upgrading

You can upgrade Event Processing and the IBM Operator for Apache Flink to the latest 1.0.x version by using the operator channel v1.0. Upgrade your Event Processing installation as follows.

Note:

  • If your operator upgrades are set to automatic, minor version upgrades are completed automatically. This means that the Event Processing and IBM Operator for Apache Flink operators will be upgraded to 1.0.x when they are available in the catalog, and your Event Processing and Flink instances are then also automatically upgraded.

  • You will experience some downtime during the Event Processing upgrade while the pods for the relevant components are recycled.

  • If your Flink instance is an application cluster for deploying advanced flows in production environments, the automatic upgrade cannot update the custom Flink image built by extending the IBM-provided Flink image. In this case, after the successful upgrade of the operator, complete steps 1a, 1b, 1e, and 2c in Build and deploy a Flink SQL runner to make use of the upgraded Flink image.

Prerequisites

  • If you installed as part of IBM Cloud Pak for Integration, ensure that you have followed the upgrade steps for IBM Cloud Pak for Integration before you upgrade Event Processing.

  • To upgrade without data loss, your Event Processing and IBM Operator for Apache Flink instances must have persistent storage enabled. If you upgrade instances which use ephemeral storage, all data will be lost.

  • If you installed the Event Processing operator to manage instances of Event Processing in any namespace (one per namespace), then you might need to control when each of these instances is upgraded to the latest version. You can control the updates by pausing the reconciliation of the instance configuration as described in the following sections.

    Note: Pausing the reconciliation of the instance configuration is not available for IBM Operator for Apache Flink instances.

Scheduling the upgrade of an instance

If your operator manages more than one instance of Event Processing, you can control when each instance is upgraded by pausing the reconciliation of the configuration settings for each instance, running the upgrade, and then unpausing the reconciliation when ready to proceed with the upgrade for a selected instance.

Pausing reconciliation by using the CLI

  1. Log in to your Kubernetes cluster as a cluster administrator by setting your kubectl context.
  2. To apply the annotation to an EventProcessing instance, run the following command:

    kubectl annotate EventProcessing <instance-name> -n <instance-namespace> events.ibm.com/pause='true'
    
  3. Follow the steps to upgrade by using the oc CLI, the OpenShift web console or the kubectl CLI.

Unpausing reconciliation by using the CLI

To unpause the reconciliation and continue with the upgrade of an Event Processing instance, run the following command:

kubectl annotate EventProcessing <instance-name> -n <instance-namespace> events.ibm.com/pause-

When the annotation is removed, the configuration of your instance is updated, and the upgrade to the latest version of Event Processing completes.

Pausing reconciliation by using the OpenShift web console

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand Operators in the navigation on the left, and click Installed Operators.

    Operators > Installed Operators

  3. From the Project list, select the namespace (project) the instance is installed in.
  4. Locate the operator that manages your Event Processing instance in the namespace. It is called Event Processing in the Name column. Click the Event Processing link in the row.
  5. Select the instance you want to pause and click the YAML tab.
  6. In the YAML for the custom resource, add events.ibm.com/pause: 'true' to the metadata.annotations field as follows:

    apiVersion: events.ibm.com/v1beta1
    kind: EventProcessing
    metadata:
    name: <instance-name>
    namespace: <instance-namespace>
    annotations:
       events.ibm.com/pause: 'true'
    
  7. Follow the steps to upgrade by using the oc CLI or the OpenShift web console.

Unpausing reconciliation by using the OpenShift web console

To unpause the reconciliation and continue with the upgrade of an Event Processing instance, remove the annotation from the EventProcessing instance. When the annotation is removed, the configuration of your instance is updated, and the upgrade to the latest version of Event Processing completes.

Upgrading on the OpenShift Container Platform

Upgrade your Event Processing and Flink instances running on the OpenShift Container Platform by using the CLI or web console as follows.

Upgrading by using the OpenShift CLI

If you are using the OpenShift command-line interface (CLI), the oc command, complete the steps in the following sections to upgrade your Event Processing and Flink installations.

For Event Processing:

  1. Log in to your Red Hat OpenShift Container Platform as a cluster administrator by using the oc CLI (oc login).
  2. Ensure the required Event Processing Operator Upgrade Channel is available:

    oc get packagemanifest ibm-eventprocessing -o=jsonpath='{.status.channels[*].name}'
    
  3. Change the subscription to move to the required update channel, where vX.Y is the required update channel (for example, v1.1):

    oc patch subscription -n <namespace> ibm-eventprocessing --patch '{"spec":{"channel":"vX.Y"}}' --type=merge
    

For Flink:

  1. Log in to your Red Hat OpenShift Container Platform as a cluster administrator by using the oc CLI (oc login).
  2. Ensure the required IBM Operator for Apache Flink Operator Upgrade Channel is available:

    oc get packagemanifest ibm-eventautomation-flink -o=jsonpath='{.status.channels[*].name}'
    
  3. If your Flink instance uses persistent storage, backup the Flink instance.
  4. Change the subscription to move to the required update channel, where vX.Y is the required update channel (for example, v1.1):

    oc patch subscription -n <namespace> ibm-eventautomation-flink --patch '{"spec":{"channel":"vX.Y"}}' --type=merge
    
  5. If your Flink instance uses persistent storage, restore the backed up Flink instance.
  6. If your Flink instance is an application cluster for deploying advanced flows in production environments, complete steps 1a, 1b, 1e, and 2c in Build and deploy a Flink SQL runner to make use of the upgraded Flink image.

All Event Processing and Flink pods that need to be updated as part of the upgrade will be rolled.

Upgrading by using the OpenShift web console

If you are using the OpenShift Container Platform web console, complete the steps in the following sections to upgrade your Event Processing installation.

For Event Processing:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand Operators in the navigation on the left, and click Installed Operators.

    Operators > Installed Operators

  3. From the Project list, select the namespace (project) the instance is installed in.
  4. Locate the operator that manages your Event Processing instance in the namespace. It is called Event Processing in the Name column. Click the Event Processing in the row.
  5. Click the Subscription tab to display the Subscription details for the Event Processing operator.
  6. Select the version number in the Update channel section (for example, v1.0). The Change Subscription update channel dialog is displayed, showing the channels that are available to upgrade to.
  7. Select the required channel, for example v1.1, and click the Save button on the Change Subscription update channel dialog.

All Event Processing pods that need to be updated as part of the upgrade will be rolled.

For Flink:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. If your Flink instance uses persistent storage, backup the Flink instance.
  3. Expand Operators in the navigation on the left, and click Installed Operators.
  4. From the Project list, select the namespace (project) the instance is installed in.
  5. Locate the operator that manages your Flink instance in the namespace. It is called IBM Operator for Apache Flink in the Name column. Click the IBM Operator for Apache Flink in the row.
  6. Click the Subscription tab to display the Subscription details for the Event Processing operator.
  7. Select the version number in the Update channel section (for example, v1.0). The Change Subscription update channel dialog is displayed, showing the channels that are available to upgrade to.
  8. Select the required channel, for example v1.1, and click the Save button on the Change Subscription update channel dialog.
  9. If your Flink instance uses persistent storage, restore the backed up Flink instance.
  10. If your Flink instance is an application cluster for deploying advanced flows in production environments, complete steps 1a, 1b, 1e, and 2c in Build and deploy a Flink SQL runner to make use of the upgraded Flink image.

All Flink pods that need to be updated as part of the upgrade will be rolled.

Upgrading on other Kubernetes platforms by using Helm

If you are running Event Processing on Kubernetes platforms that support the Red Hat Universal Base Images (UBI) containers, upgrade Event Processing by using the Helm chart as follows:

  1. Log in to your Kubernetes cluster as a cluster administrator by setting your kubectl context.
  2. If your Flink instance uses persistent storage, backup the Flink instance.
  3. Add the IBM Helm repository if you have not already done so:

    helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm
    
  4. Update the Helm repository:

    helm repo update ibm-helm
    
  5. Ensure you are running in the namespace containing the Helm release of the IBM Operator for Apache Flink CRDs.
  6. Upgrade the Helm release by running the command:

    helm upgrade <flink_crd_release_name> ibm-helm/ibm-eventautomation-flink-operator-crd
    
  7. Upgrade the Helm release of IBM Operator for Apache Flink. Switch to the right namespace if your CRD Helm release is in a different namespace to your operator and then run:

    helm upgrade <flink_release_name> ibm-helm/ibm-eventautomation-flink-operator
    
  8. Identify the namespace where the Event Processing installation is located and the Helm release managing the CRDs by looking at the annotations on the CRDs:

    kubectl get crd eventprocessings.events.ibm.com -o jsonpath='{.metadata.annotations}'
    

    The following is an example output showing CRDs managed by Helm release ep-crds in namespace my-ep:

    {"meta.helm.sh/release-name": "ep-crds", "meta.helm.sh/release-namespace": "ep"}
    
  9. Ensure you are using the namespace where your Event Processing CRD Helm release is located (see previous step):

    kubectl config set-context --current --namespace=<namespace>
    
  10. Run the following command to upgrade the Helm release that manages your Event Processing CRDs:

    helm upgrade <crd_release_name> ibm-helm/ibm-ep-operator-crd
    
  11. Run the following command to upgrade the Helm release of your operator installation. Switch to the right namespace if your CRD Helm release is in a different namespace to your operator.

    helm upgrade <ep_release_name> ibm-helm/ibm-ep-operator <install_flags>
    

Where:

  • <crd_release_name> is the Helm release name of the Helm installation that manages the Event Processing CRDs.
  • <ep_release_name> is the Helm release name of the Helm installation of the operator.
  • <install_flags> are any optional installation property settings, such as --set watchAnyNamespace=true.

Note: After you completed the previous steps, you can restore your Flink instances as follows:

Verifying the upgrade

After the upgrade, verify the status of the Event Processing and Flink instances, by using the CLI or the UI.