Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 10. Managing upgrades


This section provides step-by-step instructions to upgrade the OpenShift Serverless Logic Operator from version 1.34.0 to 1.35.0. The upgrade process involves preparing the existing workflows and services, updating the Operator, and restoring the workflows after the upgrade.

Note

Different workflow profiles require different upgrade steps. Carefully follow the instructions for each profile.

10.1.1. Preparing for the upgrade

Before starting the upgrade process, you need to prepare your OpenShift Serverless Logic environment. This section outlines the necessary steps to ensure a upgrade from version 1.34.0 to 1.35.0.

The preparation process includes:

  • Deleting or scaling workflows based on their profiles.
  • Backing up all necessary databases and resources.
  • Ensuring you have a record of all custom configurations.
  • Running required database migration scripts for workflows using persistence.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

10.1.1.1. Deleting workflows with dev profile

Before upgrading the Operator, you must delete workflows running with the dev profile and redeploy them after the upgrade is completed.

Procedure

  1. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resource definitions (CRDs), ConfigMaps, or any other related custom configurations.
  2. Delete the workflow by executing the following command:

    $ oc delete -f <my-workflow.yaml> -n <target_namespace>

10.1.1.2. Deleting and migrating workflows with the preview profile

Before upgrading the Operator, you must delete workflows running with the Preview profile, and migrate any data that is persisted. When the upgrade is completed, you must redeploy the workflows.

Procedure

  1. If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
  2. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow CRDs, ConfigMaps, or any other related custom configurations.
  3. Delete the workflow by executing the following command:

    $ oc delete -f <my-workflow.yaml> -n <target_namespace>
  4. If you are using persistence, you must execute the following database migration script:

    ALTER TABLE flyway_schema_history
        RENAME CONSTRAINT flyway_schema_history_pk TO kie_flyway_history_runtime_persistence_pk;
    
    ALTER INDEX flyway_schema_history_s_idx
      RENAME TO kie_flyway_history_runtime_persistence_s_idx;
    
    ALTER TABLE flyway_schema_history RENAME TO kie_flyway_history_runtime_persistence;

10.1.1.3. Scaling down workflows with the gitops profile

Before upgrading the Operator, you must scale down workflows running with the gitops profile, and scale them up again after the upgrade is completed.

Procedure

  1. Modify the my-workflow.yaml CRD and scale down each workflow to zero before upgrading as shown in the following example:

    spec:
      podTemplate:
        replicas: 0
  2. Apply the updated CRD by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>
  3. (Optional) Scale the workflow to 0 by running the following command:

    $ oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'

10.1.1.4. Backing up the Data Index database

You must back up the Data Index database before upgrading to prevent data loss.

Procedure

  • Take a full backup of the Data Index database, ensuring:

    • The backup includes all database objects and not just table data.
    • The backup is stored in a secure location.

10.1.1.5. Backing up the Jobs Service database

You must back up the Jobs Service database before upgrading to maintain job scheduling data.

Procedure

  • Take a full backup of the Jobs Service database, ensuring:

    • The backup includes all database objects and not just table data.
    • The backup is stored in a secure location.

10.1.2. Upgrading the OpenShift Serverless Logic Operator

To transition from OpenShift Serverless Logic Operator (OSL) version 1.34.0 to 1.35.0, you must upgrade the OSL using the Red Hat OpenShift Serverless web console. This upgrade ensures compatibility with newer features and proper functioning of your workflows.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

Procedure

  1. In the web console, navigate to the Operators OperatorHub Installed Operator page.
  2. Select the openshift-serverless-logic namespace from the Installed Namespace.
  3. In the list of installed operators, find and click the OpenShift Serverless Logic Operator.
  4. In the Operator details page, click on the Subscription tab. Click Edit Subscription.
  5. In the Upgrade status, click the Upgrade available link.
  6. Click the Preview install plan and Approve to start the update.
  7. To monitor the upgrade process, run the following command:

    $ oc get subscription logic-operator-rhel8 -n openshift-serverless-logic -o jsonpath='{.status.installedCSV}'

    Expected output

    $ logic-operator-rhel8.v1.35.0

Verification

  1. To verify the new Operator version is installed, run the following command:

    $ oc get clusterserviceversion logic-operator-rhel8.v1.35.0 -n openshift-serverless-logic

    Expected output

    NAME                           DISPLAY                               VERSION   REPLACES                       PHASE
    logic-operator-rhel8.v1.35.0   OpenShift Serverless Logic Operator   1.35.0    logic-operator-rhel8.v1.34.0   Succeeded

10.1.3. Finalizing the upgrade

After upgrading the OpenShift Serverless Logic Operator to version 1.35.0, you must finalize the upgrade process by restoring or scaling workflows and cleaning up old services. This ensures that your system runs cleanly on the new version and that all dependent components are configured correctly.

Follow the appropriate steps below based on the profile of your workflows and services.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

10.1.3.1. Finalizing the Data Index upgrade

After the Operator upgrade, a new ReplicaSet is automatically created for Data Index 1.35.0. You must delete the old one manually.

Procedure

  1. Verify the new ReplicaSet exists by listing all ReplicaSets by running the following command:

    $ oc get replicasets -n <target_namespace> -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image
  2. Identify the old Data Index ReplicaSet (with version 1.34.0) and delete it:

    $ oc delete replicaset <old_replicaset_name> -n <target_namespace>

10.1.3.2. Finalizing the Job Service upgrade

You must manually clean up the Jobs Service components from the older version to trigger deployment of version 1.35.0 components.

Procedure

  1. Delete the old Jobs Service deployment by running the following command:

    $ oc delete deployment <jobs-service-deployment-name> -n <target_namespace>

    This will trigger automatic cleanup of the older Pods and ReplicaSets and initiate a fresh deployment using version 1.35.0.

10.1.3.3. Redeploying workflows with the dev profile

After the upgrade, you must redeploy workflows that use the dev profile and any associated Kubernetes resources.

Procedure

  1. Ensure all required resources are restored, including SonataFlow CRDs, ConfigMaps, or any other related custom configurations.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>

10.1.3.4. Restoring workflows with the preview profile

Workflows with the preview profile require an additional configuration step before being redeployed.

Procedure

  1. If the workflow uses persistence, add the following property to the ConfigMap associated with the workflow:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      labels:
        app: my-workflow
      name: my-workflow-props
    data:
      application.properties: |
        kie.flyway.enabled=true
  2. Ensure all required resources are recreated, including SonataFlow CRDs, ConfigMaps, or any other related custom configurations.
  3. Redeploy the workflow by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>

10.1.3.5. Scaling up workflows with the gitops profile

Workflows with the gitops profile that were previously scaled down must be scaled back up to continue operation.

Procedure

  1. Modify the my-workflow.yaml CRD and scale up each workflow to one before upgrading as shown in the following example:

    spec:
      podTemplate:
        replicas: 1
  2. Apply the updated CRD by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>
  3. (Optional) Scale the workflow back to 1 by running the following command:

    $ oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 1}}}'

10.1.3.6. Verifying the upgrade

After restoring workflows and services, it is essential to verify that the upgrade was successful and that all components are functioning as expected.

Procedure

  1. Check if all workflows and services are running by entering the following command:

    $ oc get pods -n <target_namespace>

    Ensure that all pods related to workflows, Data Index, and Jobs Service are in a Running or Completed state.

  2. Verify that the OpenShift Serverless Logic Operator is running correctly by entering the following command:

    $ oc get clusterserviceversion logic-operator-rhel8.v1.35.0 -n openshift-serverless-logic

    Expected output

    NAME                           DISPLAY                               VERSION   REPLACES                       PHASE
    logic-operator-rhel8.v1.35.0   OpenShift Serverless Logic Operator   1.35.0    logic-operator-rhel8.v1.34.0   Succeeded

  3. Check Operator logs for any errors by entering the following command:

    $ oc logs -l control-plane=sonataflow-operator -n openshift-serverless-logic

You can upgrade the OpenShift Serverless Logic Operator from version 1.35.0 to 1.36.0. The upgrade process involves preparing the existing workflows and services, updating the Operator, and restoring the workflows after the upgrade.

Note

Different workflow profiles require different upgrade steps. Follow the instructions for each profile carefully.

10.2.1. Preparing for the upgrade

Before starting the upgrade process, you need to prepare your OpenShift Serverless Logic environment to upgrade from version 1.35.0 to 1.36.0.

The preparation process is as follows:

  • Deleting or scaling workflows based on their profiles.
  • Backing up all necessary databases and resources.
  • Ensuring you have a record of all custom configurations.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

10.2.1.1. Deleting workflows with the dev profile

Before upgrading the Operator, you must delete workflows running with the dev profile and redeploy them after the upgrade is complete.

Procedure

  1. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resources (CRs), ConfigMap resources, or any other related custom configurations.
  2. Delete the workflow by executing the following command:

    $ oc delete workflow <workflow_name> -n <target_namespace>

10.2.1.2. Deleting workflows with the preview profile

Before upgrading the Operator, you must delete workflows running with the preview profile. When the upgrade is complete, you must redeploy the workflows.

Procedure

  1. If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
  2. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resources (CRs), ConfigMap resources, or any other related custom configurations.
  3. Delete the workflow by executing the following command:

    $ oc delete workflow <workflow_name> -n <target_namespace>

10.2.1.3. Scaling down workflows with the gitops profile

Before upgrading the Operator, you must scale down workflows running with the gitops profile, and scale them up again after the upgrade is complete.

Procedure

  1. Modify the my-workflow.yaml custom resources (CR) and scale down each workflow to 0 before upgrading as shown in the following example:

    spec:
      podTemplate:
        replicas: 0
      # ...
  2. Apply the updated my-workflow.yaml CR by running the following command:

    $ oc apply -f my-workflow.yaml -n <target_namespace>
  3. Optional: Scale the workflow to 0 by running the following command:

    $ oc patch workflow <workflow_name> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'

10.2.1.4. Backing up the Data Index database

You must back up the Data Index database before upgrading to prevent data loss.

Procedure

  • Take a full backup of the Data Index database, ensuring:

    • The backup includes all database objects and not just table data.
    • The backup is stored in a secure location.

10.2.1.5. Backing up the Jobs Service database

You must back up the Jobs Service database before upgrading to maintain job scheduling data.

Procedure

  • Take a full backup of the Jobs Service database, ensuring:

    • The backup includes all database objects and not just table data.
    • The backup is stored in a secure location.

10.2.2. Upgrading the OpenShift Serverless Logic Operator to 1.36.0

You can upgrade the OpenShift Serverless Logic Operator from version 1.35.0 to 1.36.0 by performing the following steps.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).
  • You have version 1.35.0 of OpenShift Serverless Logic Operator installed.

Procedure

  1. Patch the ClusterServiceVersion (CSV) for the 1.35.0 OpenShift Serverless Logic Operator to update the deployment labels by running the following command:

    $ oc patch csv logic-operator-rhel8.v1.35.0 \
      -n openshift-serverless-logic \
      --type=json \
      -p='[
        {
          "op": "replace",
          "path": "/spec/install/spec/deployments/0/spec/selector/matchLabels",
          "value": {
            "app.kubernetes.io/name": "sonataflow-operator"
          }
        },
        {
          "op": "replace",
          "path": "/spec/install/spec/deployments/0/label",
          "value": {
            "app.kubernetes.io/name": "sonataflow-operator"
          }
        },
        {
          "op": "replace",
          "path": "/spec/install/spec/deployments/0/spec/template/metadata/labels",
          "value": {
            "app.kubernetes.io/name": "sonataflow-operator"
          }
        }
      ]'
  2. Delete the current Operator deployment by running the following command:

    $ oc delete deployment logic-operator-rhel8-controller-manager -n openshift-serverless-logic
  3. In the web console, navigate to the Operators OperatorHub Installed Operators page.
  4. In the list of installed Operators, find and click the Operator named OpenShift Serverless Logic Operator.
  5. Initiate the OpenShift Serverless Logic Operator upgrade to version 1.36.0.

Verification

  • After applying the upgrade, verify that the Operator is running and in the Succeeded phase, by running the following command:

    $ oc get clusterserviceversion logic-operator-rhel8.v1.36.0

    Example output

    NAME                           DISPLAY                               VERSION   REPLACES                       PHASE
    logic-operator-rhel8.v1.36.0   OpenShift Serverless Logic Operator   1.36.0    logic-operator-rhel8.v1.35.0   Succeeded

10.2.3. Finalizing the upgrade

After upgrading the OpenShift Serverless Logic Operator to version 1.36.0, you must finalize the upgrade process by restoring or scaling workflows and cleaning up old services. This ensures that your system runs cleanly on the new version and that all dependent components are configured correctly.

Follow the appropriate steps below based on the profile of your workflows and services.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

10.2.3.1. Finalizing the Data Index upgrade

After the Operator upgrade, if your deployment is configured to use a Knative Eventing Kafka Broker, you must delete the old data-index-process-definition trigger that was created in the OpenShift Serverless Logic 1.35.0 version. Optionally, you can delete the old ReplicaSet resource as well.

Procedure

  1. List all the triggers by running the following command:

    $ oc get triggers -n <target_namespace>

    Example output

    NAME                                                              BROKER              SUBSCRIBER_URI
    data-index-jobs-a25c8405-f740-47d2-a9a5-f80ccaec2955              example-broker      http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/jobs
    data-index-process-definition-473e1ddbb3ca1d62768187eb80de99bca   example-broker      http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/definitions
    data-index-process-error-a25c8405-f740-47d2-a9a5-f80ccaec2955     example-broker      http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
    data-index-process-instance-mul07f593476e8c14353a337590e0bfd5ae   example-broker      http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
    data-index-process-node-a25c8405-f740-47d2-a9a5-f80ccaec2955      example-broker      http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
    data-index-process-state-a25c8405-f740-47d2-a9a5-f80ccaec2955     example-broker      http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
    data-index-process-variable-487e9a6777fff650e60097c9e17111aea25   example-broker      http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
    
    jobs-service-create-job-a25c8405-f740-47d2-a9a5-f80ccaec2955      example-broker      http://sonataflow-platform-jobs-service.<target_namespace>.svc.cluster.local/v2/jobs/events
    jobs-service-delete-job-a25c8405-f740-47d2-a9a5-f80ccaec2955      example-broker      http://sonataflow-platform-jobs-service.<target_namespace>.svc.cluster.local/v2/jobs/events

  2. Based on the generated example output, delete the old data-index-process-definition trigger by running the following command:

    $ oc delete trigger data-index-process-definition-473e1ddbb3ca1d62768187eb80de99bca -n <target_namespace>

    After deletion, a new trigger compatible with OpenShift Serverless Logic 1.36.0 is automatically created.

  3. Optional: Identify the old ReplicaSet resource by running the following command:

    $ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>

    Example output

    Name                                                Image
    sonataflow-platform-data-index-service-1111111111   registry.redhat.io/openshift-serverless-1/logic-data-index-postgresql-rhel8:1.35.0
    
    sonataflow-platform-data-index-service-2222222222   registry.redhat.io/openshift-serverless-1/logic-data-index-postgresql-rhel8:1.36.0

  4. Optional: Delete your old ReplicaSet resource by running the following command:

    $ oc delete replicaset <old_replicaset_name> -n <target_namespace>

    Example command based on the example output

    $ oc delete replicaset sonataflow-platform-data-index-service-1111111111 -n <target_namespace>

10.2.3.2. Finalizing the Job Service upgrade

After the OpenShift Serverless Operator is upgraded to version 1.36.0 you can optionally delete the old ReplicaSet resource.

Procedure

  1. Identify the old ReplicaSet resource by running the following command:

    $ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>

    Example output

    Name                                                Image
    sonataflow-platform-jobs-service-1111111111         registry.redhat.io/openshift-serverless-1/logic-jobs-service-postgresql-rhel8:1.35.0
    sonataflow-platform-jobs-service-2222222222         registry.redhat.io/openshift-serverless-1/logic-jobs-service-postgresql-rhel8:1.36.0

  2. Delete your old ReplicaSet resource by running the following command:

    $ oc delete replicaset <old_replicaset_name> -n <target_namespace>

    Example command based on the example output

    $ oc delete replicaset sonataflow-platform-jobs-service-1111111111 -n <target_namespace>

10.2.3.3. Redeploying workflows with the dev profile

After the upgrade, you must redeploy workflows that use the dev profile and any associated Kubernetes resources.

Procedure

  1. Ensure that all required Kubernetes resources, including the ConfigMap with the application.properties field, are restored before redeploying the workflow.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_name> -n <target_namespace>

10.2.3.4. Restoring workflows with the preview profile

After the upgrade, you must redeploy workflows that use the preview profile and any associated Kubernetes resources.

Procedure

  1. Ensure that all required Kubernetes resources, including the ConfigMap with the application.properties field, are restored before redeploying the workflow.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_name> -n <target_namespace>

10.2.3.5. Scaling up workflows with the gitops profile

To continue operation, you must scale up workflows that you previously scaled down with the gitops profile.

Procedure

  1. Modify the my-workflow.yaml custom resources (CR) and scale up each workflow to 1 as shown in the following example:

    spec:
      podTemplate:
        replicas: 1
      # ...
  2. Apply the updated CR by running the following command:

    $ oc apply -f my-workflow.yaml -n <target_namespace>
  3. Optional: Scale the workflow back to 1 by running the following command:

    $ oc patch workflow <workflow_name> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 1}}}'

10.2.4. Verifying the 1.36.0 upgrade

After restoring workflows and services, verify that the upgrade was successful and all components are functioning as expected.

Procedure

  1. Check if all workflows and services are running by entering the following command:

    $ oc get pods -n <target_namespace>

    Ensure that all pods related to workflows, Data Index, and Jobs Service are in a Running or Completed state.

  2. Verify that the OpenShift Serverless Logic Operator is running correctly by entering the following command:

    $ oc get clusterserviceversion logic-operator-rhel8.v1.36.0 -n openshift-serverless-logic

    Example output

    NAME                           DISPLAY                               VERSION   REPLACES                       PHASE
    logic-operator-rhel8.v1.36.0   OpenShift Serverless Logic Operator   1.36.0    logic-operator-rhel8.v1.35.0   Succeeded

  3. Check Operator logs for any errors by entering the following command:

    $ oc logs -l control-plane=sonataflow-operator -n openshift-serverless-logic

You can upgrade the OpenShift Serverless Logic Operator from version 1.36.0 to 1.37.0. The upgrade process involves preparing the existing workflows and services, updating the Operator, and restoring the workflows after the upgrade.

Important

Different workflow profiles require different upgrade steps. Follow the instructions for each profile carefully.

10.3.1. Preparing for the upgrade

Before starting the upgrade process, you need to prepare your OpenShift Serverless Logic environment to upgrade from version 1.36.0 to 1.37.0.

The preparation process is as follows:

  • Deleting workflows based on their profiles.
  • Backing up all necessary databases and resources.
  • Ensuring you have a record of all custom configurations.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have backups for all workflow, Data Index, and Job Service databases where persistence is enabled.
  • You have access to all namespaces where SonataFlow, Data Index, and Job Service are deployed.
  • You have installed the OpenShift CLI (oc).

10.3.1.1. Deleting workflows with the dev profile

Before upgrading the Operator, you must delete workflows running with the dev profile. When the upgrade is complete, you must redeploy the workflows.

Procedure

  1. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resources (CRs), ConfigMap resources, or any other related custom configurations.
  2. Delete the workflow by running the following command:

    $ oc delete -f <workflow.yaml> -n <target_namespace>

10.3.1.2. Deleting workflows with the preview profile

Before upgrading the Operator, you must delete workflows running with the preview profile. When the upgrade is complete, you must redeploy the workflows.

Procedure

  1. If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
  2. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resources (CRs), ConfigMap resources, or any other related custom configurations.
  3. Delete the workflow by running the following command:

    $ oc delete -f <workflow.yaml> -n <target_namespace>

10.3.1.3. Deleting workflows with the gitops profile

Before upgrading the Operator, delete workflows that run with the gitops profile. After the upgrade completes, rebuild the corresponding workflow image by using the OpenShift Serverless Logic 1.37.1 Serverless Workflow builder image. Redeploy the workflow by using the rebuilt image.

Procedure

  1. If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
  2. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resources (CRs), ConfigMap resources, or any other related custom configurations.
  3. Delete the workflow by running the following command:

    $ oc delete -f <workflow.yaml> -n <target_namespace>

10.3.1.4. Backing up the Data Index database

You must back up the Data Index database before upgrading to prevent data loss.

Procedure

  • Take a full backup of the Data Index database, ensuring:

    • The backup includes all database objects and not just table data.
    • Ensure that you store the backup in a secure location.

10.3.1.5. Backing up the Jobs Service database

You must back up the Jobs Service database before upgrading to maintain the job scheduling data.

Procedure

  • Take a full backup of the Jobs Service database, ensuring:

    • The backup includes all database objects and not just table data.
    • Ensure that you store the backup in a secure location.

10.3.2. Upgrading the OpenShift Serverless Logic Operator to 1.37.0

You can upgrade the OpenShift Serverless Logic Operator from version 1.36.0 to 1.37.0 by performing the following steps.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have installed the OpenShift CLI (oc).
  • You have version 1.36.0 of OpenShift Serverless Logic Operator installed.

Procedure

  1. Uninstall the current OpenShift Serverless Logic Operator 1.36.0.

    1. Delete the existing Operator subscription by running the following command:

      $ oc delete subscriptions.operators.coreos.com logic-operator-rhel8 -n openshift-serverless-logic
      Note

      You must use the fully qualified resource name subscriptions.operators.coreos.com to avoid short-name collisions with Knative Eventing resources.

    2. Delete the existing ClusterServiceVersion (CSV) by running the following command:

      $ oc delete csv logic-operator-rhel8.v1.36.0 -n openshift-serverless-logic
  2. In every namespace where a SonataFlowPlatform resource is installed and configured with dbMigrationStrategy: job for either Data Index or Job Service, remove the associated database migration job by running the following command:

    $ oc delete job sonataflow-db-migrator-job -n <target-namespace>
  3. Install the OpenShift Serverless Logic Operator 1.37.0:

    1. Create the following Subscription resource similar to the following example:

      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        labels:
          operators.coreos.com/logic-operator.openshift-serverless-logic: ''
        name: logic-operator
        namespace: openshift-serverless-logic
      spec:
        channel: stable
        installPlanApproval: Manual
        name: logic-operator
        source: redhat-operators
        sourceNamespace: openshift-marketplace
        startingCSV: logic-operator.v1.37.0
      Note

      You must use Manual install plan approval.

    2. Query the pending install plan by running the following command:

      $ oc get installplan -n openshift-serverless-logic

      You must get an output similar to the following:

      NAME            CSV                            APPROVAL   APPROVED
      install-XXXX    logic-operator.v1.37.0         Manual     false
    3. Approve the install plan by running the following command:

      $ oc patch installplan install-XXXX -n openshift-serverless-logic --type merge -p '{"spec":{"approved":true}}'

Verification

After completing the upgrade, verify that the OpenShift Serverless Logic Operator is running correctly and that the upgrade to version 1.37.0 was successful before restoring or redeploying workflows and services.

  • Verify that the OpenShift Serverless Logic Operator 1.37.0 is running correctly and the output shows the Operator in the Succeeded phase, by running the following command:

    $ oc get clusterserviceversion logic-operator.v1.37.0

    You will get an output similar to the following example:

    NAME                          DISPLAY                               VERSION   REPLACES                      PHASE
    logic-operator.v1.37.0        OpenShift Serverless Logic Operator   1.37.0                                  Succeeded

10.3.3. Finalizing the upgrade

After upgrading the OpenShift Serverless Logic Operator to version 1.37.0, you must finalize the upgrade process by restoring or scaling workflows and cleaning up old services. This ensures that your system runs cleanly on the new version and that all dependent components are configured correctly.

Follow the appropriate steps below based on the profile of your workflows and services.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have installed the OpenShift CLI (oc).

10.3.3.1. Finalizing the Data Index upgrade

After the OpenShift Serverless Logic Operator is upgraded to version 1.37.0, the Data Index service is automatically updated. You can optionally finalize the upgrade by identifying and removing ReplicaSets that belong to the earlier 1.36.0 version.

Procedure

  1. Optional: Verify that a new ReplicaSet for the Data Index 1.37.0 version is created by running the following command:

    $ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>

    You will get an output similar to the following example:

    Name                                                Image
    sonataflow-platform-data-index-service-1111111111   registry.redhat.io/openshift-serverless-1/logic-data-index-postgresql-rhel8:1.36.0
    
    sonataflow-platform-data-index-service-2222222222   registry.redhat.io/openshift-serverless-1/logic-data-index-postgresql-rhel9:1.37.0
  2. Optional: Delete your old ReplicaSet resource by running the following command:

    $ oc delete replicaset sonataflow-platform-data-index-service-1111111111 -n <target_namespace>

10.3.3.2. Finalizing the Job Service upgrade

After the OpenShift Serverless Logic Operator is upgraded to version 1.37.0, the Job Service is automatically updated. You can optionally finalize the upgrade by identifying and removing ReplicaSets that belong to the earlier 1.36.0 version.

Procedure

  1. Optional: Verify that a new ReplicaSet for the Job Service 1.37.0 version is created by running the following command:

    $ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>

    You will get an output similar to the following example:

    sonataflow-platform-jobs-service-1111111111    registry.redhat.io/openshift-serverless-1/logic-jobs-service-postgresql-rhel8:1.36.0
    
    sonataflow-platform-jobs-service-2222222222     registry.redhat.io/openshift-serverless-1/logic-jobs-service-postgresql-rhel9:1.37.0
  2. Optional: Delete your old ReplicaSet running the Job Service 1.36.0 version by running the following command:

    $ oc delete replicaset sonataflow-platform-jobs-service-1111111111 -n <target_namespace>

10.3.3.3. Redeploying workflows with the dev profile

After upgrading the OpenShift Serverless Logic Operator to version 1.37.0, you must redeploy workflows that use the dev profile to complete the upgrade process.

Procedure

  1. Ensure that all required Kubernetes resources are restored before redeploying the workflow. The resources also include the ConfigMap resource with the application.properties field.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_yaml> -n <target_namespace>

10.3.3.4. Redeploying workflows with the preview profile

After upgrading the OpenShift Serverless Logic Operator to version 1.37.0, you must redeploy workflows that use the preview profile to complete the upgrade process.

Procedure

  1. Ensure that all required Kubernetes resources, including the ConfigMap with the application.properties field, are created before redeploying the workflow.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_yaml> -n <target_namespace>

10.3.3.5. Redeploying workflows with the gitops profile

After upgrading the OpenShift Serverless Logic Operator to version 1.37.0, you must rebuild and redeploy workflows that use the gitops profile to complete the upgrade process.

Procedure

  1. Rebuild the workflow image using the OpenShift Serverless Logic 1.37.0 serverless workflow builder image:

    registry.redhat.io/openshift-serverless-1/logic-swf-builder-rhel9:1.37.0
    Note

    When rebuilding the image, the OpenShift Serverless Logic Operator generates a workflow deployment with imagePullPolicy: IfNotPresent by default. This means that if an already deployed workflow <workflow_name> is redeployed with the same image name, even when that image was rebuilt, the previously downloaded image is reused.

  2. Ensure that the new image is picked up by using one of the following alternatives:

    1. Use a new image tag and configure the workflow to use it.

      Use the current image tag by running the following command:

      quay.io/my-images/my-workflow:1.0

      Use the new image tag by running the following command:

      quay.io/my-images/my-workflow:1.0-1

      Update the workflow custom resource (CR) similar to the following example:

      apiVersion: sonataflow.org/v1alpha08
      kind: SonataFlow
      metadata:
        name: my-workflow
        annotations:
          sonataflow.org/description: My Workflow
          sonataflow.org/version: '1.0'
          sonataflow.org/profile: gitops
      spec:
        podTemplate:
          container:
            # only change the image name/tag
            image: quay.io/my-images/my-workflow:1.0-1
        flow:
          # the workflow definition (don't change)
    2. Preserve the image name and configure the workflow with imagePullPolicy: Always as follows:

      apiVersion: sonataflow.org/v1alpha08
      kind: SonataFlow
      metadata:
        name: my-workflow
        annotations:
          sonataflow.org/description: My Workflow
          sonataflow.org/version: '1.0'
          sonataflow.org/profile: gitops
      spec:
        podTemplate:
          container:
            image: quay.io/my-images/my-workflow:1.0
            # only change the imagePullStrategy
            imagePullPolicy: Always
        flow:
          # the workflow definition (don't change).
      Note

      When rebuilding the image and redeploying the workflow, do not change the workflow definition or any workflow-related assets. This includes the workflow name, version, and description.

  3. Ensure that all Kubernetes resources required by the workflow are created. This includes any user-provided resources, such as a ConfigMap containing the application.properties file.
  4. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_yaml> -n <target_namespace>

You can upgrade the OpenShift Serverless Logic Operator from version 1.37.0 to 1.37.1. The upgrade process involves preparing the existing workflows and services, updating the Operator, and restoring the workflows after the upgrade.

Important

Different workflow profiles require different upgrade steps. Follow the instructions for each profile carefully.

10.4.1. Preparing for the 1.37.0 to 1.37.1 upgrade

Before starting the upgrade process, prepare your OpenShift Serverless Logic environment to upgrade from version 1.37.0 to 1.37.1.

The preparation process is as follows:

  • Deleting workflows based on their profiles.
  • Backing up all necessary databases and resources.
  • Ensuring you have a record of all custom configurations.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have backups for all workflow, Data Index, and Job Service databases where persistence is enabled.
  • You have access to all namespaces where SonataFlow, Data Index, and Job Service are deployed.
  • You have installed the OpenShift CLI (oc).

10.4.1.1. Increasing the Jobs Service retry interval

During system upgrades or migrations, job executions might fail temporarily because the system enters transitional states. For example, workflows might not be fully available while migration is in progress.

If the retry interval is too short, the system might discard failed jobs before the upgrade completes. Increase the Jobs Service retry interval before you start the upgrade. This change ensures that the system retains failed jobs during the upgrade and retries them after the system stabilizes.

Procedure

  1. Edit your SonataFlowPlatform custom resource (CR) and add the KOGITO_JOBS_SERVICE_MAXINTERVALLIMITTORETRYMILLIS environment variable to jobService.podTemplate.container:

    apiVersion: sonataflow.org/v1alpha08
    kind: SonataFlowPlatform
    metadata:
      name: sonataflow-platform-example
      namespace: example-namespace
    spec:
      # Preserve all existing fields in your SonataFlowPlatform
      services:
        jobService:
          podTemplate:
            container:
              env:
                - name: KOGITO_JOBS_SERVICE_MAXINTERVALLIMITTORETRYMILLIS
                  # Example: retry interval of 4 hours
                  value: "14400000"
  2. Keep all existing fields in your SonataFlowPlatform CR unchanged.
  3. Reapply the SonataFlowPlatform CR by running the following command:

    oc apply -f <sonataflowplatform.yaml>
  4. Verify that the Jobs Service deployment updates successfully.

10.4.1.2. Deleting workflows with the dev profile

Before upgrading the Operator, you must delete workflows running with the dev profile. When the upgrade is complete, you must redeploy the workflows.

Procedure

  1. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resources (CRs), ConfigMap resources, or any other related custom configurations.
  2. Delete the workflow by running the following command:

    $ oc delete -f <workflow.yaml> -n <target_namespace>

10.4.1.3. Deleting workflows with the preview profile

Before upgrading the Operator, you must delete workflows running with the preview profile. When the upgrade is complete, you must redeploy the workflows.

Procedure

  1. If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
  2. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resources (CRs), ConfigMap resources, or any other related custom configurations.
  3. Delete the workflow by running the following command:

    $ oc delete -f <workflow.yaml> -n <target_namespace>

10.4.1.4. Deleting workflows with the gitops profile

For workflows that use the gitops profile, it is strongly recommended to rebuild the workflow image that you generated for version 1.37.0 before upgrading the Operator. Rebuilding the image ensures compatibility with OpenShift Serverless Logic 1.37.1.

For each workflow, for example my-workflow, complete the following steps.

Procedure

  1. Rebuild the workflow image by using the OpenShift Serverless Logic 1.37.1 workflow builder image:

    $ registry.redhat.io/openshift-serverless-1/logic-swf-builder-rhel9:1.37.1
  2. Reconfigure the workflow image by considering the following behavior:

    By default, OpenShift Serverless Logic generates a workflow Deployment with imagePullPolicy: IfNotPresent. If you redeploy a workflow with the same image name, the cluster reuses the earlier downloaded image, even if the image was rebuilt.

  3. Do not change the workflow definition or any related metadata when rebuilding the image.

    Rebuilding the image creates a new image build, not a new workflow version. The workflow name, version, and description must remain unchanged.

  4. Ensure that the cluster pulls the rebuilt image by using one of the following approaches:

    • Use a new image tag and update the workflow to reference the new tag (recommended).

      You get an output similar to the following example:

      current image: quay.io/my-images/my-workflow:1.0
      new image: quay.io/my-images/my-workflow:1.0-1
      
      apiVersion: sonataflow.org/v1alpha08
      kind: SonataFlow
      metadata: # don't change
        name: my-workflow
        annotations:
          sonataflow.org/description: My Workflow
          sonataflow.org/version: '1.0'
          sonataflow.org/profile: gitops
      spec:
        podTemplate:
          container:
            # only change the image name/tag
            image: quay.io/my-images/my-workflow:1.0-1
        flow:
          # the workflow definition (don't change)
    • Preserve the image name and configure the workflow with imagePullPolicy: Always.

      You get an output similar to the following example:

      apiVersion: sonataflow.org/v1alpha08
      kind: SonataFlow
      metadata:
        name: my-workflow
        annotations:
          sonataflow.org/description: My Workflow
          sonataflow.org/version: '1.0'
          sonataflow.org/profile: gitops
      spec:
        podTemplate:
          container:
            image: quay.io/my-images/my-workflow:1.0
            # change only the image pull policy
            imagePullPolicy: Always
        flow:
          # do not change the workflow definition
  5. If the workflow uses persistence, back up the workflow database. Ensure that the backup includes all database objects, not only table data.
  6. Ensure that you have a copy of the corresponding SonataFlow custom resource (CR) and any related Kubernetes resources created for the workflow. For example, if the workflow uses custom property configurations, keep a copy of the user-provided ConfigMap that has the application.properties file.
  7. Delete the workflow by running the following command:

    $ oc delete -f <my-workflow.yaml> -n <target_namespace>

10.4.1.5. Backing up the Data Index database

You must back up the Data Index database before upgrading to prevent data loss.

Procedure

  • Take a full backup of the Data Index database, ensuring:

    • The backup includes all database objects and not just table data.
    • Ensure that you store the backup in a secure location.

10.4.1.6. Backing up the Jobs Service database

You must back up the Jobs Service database before upgrading to maintain the job scheduling data.

Procedure

  • Take a full backup of the Jobs Service database, ensuring:

    • The backup includes all database objects and not just table data.
    • Ensure that you store the backup in a secure location.

10.4.2. Upgrading the OpenShift Serverless Logic Operator to 1.37.1

You can upgrade the OpenShift Serverless Logic Operator from version 1.37.0 to 1.37.1 by performing the following steps.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have installed the OpenShift CLI (oc).
  • You have version 1.37.0 of OpenShift Serverless Logic Operator installed.

Procedure

  1. If you configure dbMigrationStrategy: job for Data Index or Jobs Service in any namespace that has a SonataFlowPlatform, delete the existing database initialization job by running the following command:

    $ oc delete job sonataflow-db-migrator-job -n <target_namespace>
  2. Query the available installation plans for the Operator upgrade by running the following command:

    $ oc get installplan -n openshift-serverless-logic

    You must get an output similar to the following:

    NAME            CSV                      APPROVAL   APPROVED
    install-YYYY    logic-operator.v1.37.1   Manual     false
    install-XXXX    logic-operator.v1.37.0   Manual     true
  3. Approve the install plan by running the following command:

    $ oc patch installplan install-YYYY -n openshift-serverless-logic --type merge -p '{"spec":{"approved":true}}'
  4. Verify that the Operator upgrade completed successfully by running the following command:

    $ oc get csv -n openshift-serverless-logic

    You must get an output similar to the following:

    NAME                     DISPLAY                               VERSION   REPLACES                 PHASE
    logic-operator.v1.37.1   OpenShift Serverless Logic Operator   1.37.1    logic-operator.v1.37.0   Succeeded

Verification

  1. If you configure dbMigrationStrategy: job for Data Index or Jobs Service, verify that the database initialization job exists by running the following command:

    $ oc get job sonataflow-db-migrator-job -n <target_namespace>
  2. Verify that the Data Index database migration completed successfully by checking the job logs by running the following command:

    $ oc logs job/sonataflow-db-migrator-job -n <target_namespace>

    You will get an output similar to the following example:

    2026-02-02 11:45:09,606 INFO  [org.kie.kog.mig.pos.MigrationService] (main) Migrating data-index
    2026-02-02 11:45:09,778 INFO  [org.fly.cor.int.com.DbValidate] (main) Successfully validated 22 migrations (execution time 00:00.043s)
    2026-02-02 11:45:09,810 INFO  [org.fly.cor.int.com.DbMigrate] (main) Current version of schema "sonataflow-platform-data-index-service": 1.45.1.4
    2026-02-02 11:45:09,824 INFO  [org.fly.cor.int.com.DbMigrate] (main) Migrating schema "sonataflow-platform-data-index-service" to version "1.46.0 - add user task id column"
    2026-02-02 11:45:09,861 INFO  [org.fly.cor.int.com.DbMigrate] (main) Migrating schema "sonataflow-platform-data-index-service" to version "1.47.0 - adjust column sizes in tables updated by hibernate"
    2026-02-02 11:45:09,882 INFO  [org.fly.cor.int.com.DbMigrate] (main) Successfully applied 2 migrations to schema "sonataflow-platform-data-index-service", now at version v1.47.0 (execution time 00:00.010s)

10.4.3. Finalizing the upgrade

After upgrading the OpenShift Serverless Logic Operator to version 1.37.1, you must finalize the upgrade process by redeploying the workflows.

Follow the appropriate steps based on the profile of your workflows and services.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have installed the OpenShift CLI (oc).

10.4.3.1. Finalizing the Data Index upgrade

After you upgrade the OpenShift Serverless Logic Operator to version 1.37.1, the Data Index service restarts automatically and runs version 1.37.1.

10.4.3.2. Finalizing the Job Service upgrade

After you upgrade the OpenShift Serverless Logic Operator to version 1.37.1, the Job Service restarts automatically and runs version 1.37.1.

10.4.3.3. Redeploying workflows with the gitops profile

After upgrading the OpenShift Serverless Logic Operator to version 1.37.1, you must redeploy workflows that use the gitops profile to complete the upgrade process.

Procedure

  1. Restore all required Kubernetes resources before redeploying the workflow. These resources include the ConfigMap resource with the application.properties field.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_yaml> -n <target_namespace>

10.4.3.4. Redeploying workflows with the dev profile

After upgrading the OpenShift Serverless Logic Operator to version 1.37.1, you must redeploy workflows that use the dev profile to complete the upgrade process.

Procedure

  1. Restore all required Kubernetes resources before redeploying the workflow. These resources include the ConfigMap resource with the application.properties field.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_yaml> -n <target_namespace>

10.4.3.5. Redeploying workflows with the preview profile

After upgrading the OpenShift Serverless Logic Operator to version 1.37.1, you must redeploy workflows that use the preview profile to complete the upgrade process.

Procedure

  1. Restore all required Kubernetes resources before redeploying the workflow. These resources include the ConfigMap resource with the application.properties field.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <workflow_yaml> -n <target_namespace>

10.4.3.6. Restoring the Jobs Service retry interval

After you redeploy all workflows, restore the Jobs Service retry interval to its original configuration.

Procedure

  1. Edit your SonataFlowPlatform custom resource (CR) and update the KOGITO_JOBS_SERVICE_MAXINTERVALLIMITTORETRYMILLIS environment variable by one of the following steps:

    • Remove the environment variable if you added it only for the upgrade.
    • Restore the environment variable to its earlier value if you had overridden the default configuration.
  2. Keep all existing fields in your SonataFlowPlatform CR unchanged.
  3. Reapply the SonataFlowPlatform CR:

    oc apply -f <sonataflowplatform.yaml>
  4. Verify that the Jobs Service deployment updates successfully.
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2026 Red Hat
Nach oben