Este conteúdo não está disponível no idioma selecionado.
Chapter 10. Managing upgrades
10.1. Upgrading OpenShift Serverless Logic Operator from version 1.34.0 to 1.35.0 Copiar o linkLink copiado para a área de transferência!
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.
Different workflow profiles require different upgrade steps. Carefully follow the instructions for each profile.
10.1.1. Preparing for the upgrade Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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 Copiar o linkLink copiado para a área de transferência!
Before upgrading the Operator, you must delete workflows running with the dev profile and redeploy them after the upgrade is completed.
Procedure
-
Ensure you have a backup of all necessary Kubernetes resources, including
SonataFlowcustom resource definitions (CRDs),ConfigMaps, or any other related custom configurations. Delete the workflow by executing the following command:
oc delete -f <my-workflow.yaml> -n <target_namespace>
$ oc delete -f <my-workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.1.2. Deleting and migrating workflows with the preview profile Copiar o linkLink copiado para a área de transferência!
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
- If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
-
Ensure you have a backup of all necessary Kubernetes resources, including
SonataFlowCRDs,ConfigMaps, or any other related custom configurations. Delete the workflow by executing the following command:
oc delete -f <my-workflow.yaml> -n <target_namespace>
$ oc delete -f <my-workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you are using persistence, you must execute the following database migration script:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.1.3. Scaling down workflows with the gitops profile Copiar o linkLink copiado para a área de transferência!
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
Modify the
my-workflow.yamlCRD and scale down each workflow tozerobefore upgrading as shown in the following example:spec: podTemplate: replicas: 0spec: podTemplate: replicas: 0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the updated CRD by running the following command:
oc apply -f <my-workflow.yaml> -n <target_namespace>
$ oc apply -f <my-workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow (Optional) Scale the workflow to
0by running the following command:oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'$ oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.1.4. Backing up the Data Index database Copiar o linkLink copiado para a área de transferência!
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 Copiar o linkLink copiado para a área de transferência!
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 Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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
-
In the web console, navigate to the Operators
OperatorHub Installed Operator page. -
Select the
openshift-serverless-logicnamespace from the Installed Namespace. - In the list of installed operators, find and click the OpenShift Serverless Logic Operator.
- In the Operator details page, click on the Subscription tab. Click Edit Subscription.
- In the Upgrade status, click the Upgrade available link.
- Click the Preview install plan and Approve to start the update.
To monitor the upgrade process, run the following command:
oc get subscription logic-operator-rhel8 -n openshift-serverless-logic -o jsonpath='{.status.installedCSV}'$ oc get subscription logic-operator-rhel8 -n openshift-serverless-logic -o jsonpath='{.status.installedCSV}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expected output
logic-operator-rhel8.v1.35.0
$ logic-operator-rhel8.v1.35.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
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
$ oc get clusterserviceversion logic-operator-rhel8.v1.35.0 -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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
NAME DISPLAY VERSION REPLACES PHASE logic-operator-rhel8.v1.35.0 OpenShift Serverless Logic Operator 1.35.0 logic-operator-rhel8.v1.34.0 SucceededCopy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.3. Finalizing the upgrade Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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 Copiar o linkLink copiado para a área de transferência!
After the Operator upgrade, a new ReplicaSet is automatically created for Data Index 1.35.0. You must delete the old one manually.
Procedure
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
$ oc get replicasets -n <target_namespace> -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].imageCopy to Clipboard Copied! Toggle word wrap Toggle overflow Identify the old Data Index ReplicaSet (with version 1.34.0) and delete it:
oc delete replicaset <old_replicaset_name> -n <target_namespace>
$ oc delete replicaset <old_replicaset_name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.3.2. Finalizing the Job Service upgrade Copiar o linkLink copiado para a área de transferência!
You must manually clean up the Jobs Service components from the older version to trigger deployment of version 1.35.0 components.
Procedure
Delete the old Jobs Service deployment by running the following command:
oc delete deployment <jobs-service-deployment-name> -n <target_namespace>
$ oc delete deployment <jobs-service-deployment-name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 Copiar o linkLink copiado para a área de transferência!
After the upgrade, you must redeploy workflows that use the dev profile and any associated Kubernetes resources.
Procedure
-
Ensure all required resources are restored, including
SonataFlowCRDs,ConfigMaps, or any other related custom configurations. Redeploy the workflow by running the following command:
oc apply -f <my-workflow.yaml> -n <target_namespace>
$ oc apply -f <my-workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.3.4. Restoring workflows with the preview profile Copiar o linkLink copiado para a área de transferência!
Workflows with the preview profile require an additional configuration step before being redeployed.
Procedure
If the workflow uses persistence, add the following property to the
ConfigMapassociated with the workflow:Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Ensure all required resources are recreated, including
SonataFlowCRDs,ConfigMaps, or any other related custom configurations. Redeploy the workflow by running the following command:
oc apply -f <my-workflow.yaml> -n <target_namespace>
$ oc apply -f <my-workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.3.5. Scaling up workflows with the gitops profile Copiar o linkLink copiado para a área de transferência!
Workflows with the gitops profile that were previously scaled down must be scaled back up to continue operation.
Procedure
Modify the
my-workflow.yamlCRD and scale up each workflow toonebefore upgrading as shown in the following example:spec: podTemplate: replicas: 1spec: podTemplate: replicas: 1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the updated CRD by running the following command:
oc apply -f <my-workflow.yaml> -n <target_namespace>
$ oc apply -f <my-workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow (Optional) Scale the workflow back to
1by running the following command:oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 1}}}'$ oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 1}}}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.1.3.6. Verifying the upgrade Copiar o linkLink copiado para a área de transferência!
After restoring workflows and services, it is essential to verify that the upgrade was successful and that all components are functioning as expected.
Procedure
Check if all workflows and services are running by entering the following command:
oc get pods -n <target_namespace>
$ oc get pods -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that all pods related to workflows, Data Index, and Jobs Service are in a
RunningorCompletedstate.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
$ oc get clusterserviceversion logic-operator-rhel8.v1.35.0 -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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
NAME DISPLAY VERSION REPLACES PHASE logic-operator-rhel8.v1.35.0 OpenShift Serverless Logic Operator 1.35.0 logic-operator-rhel8.v1.34.0 SucceededCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check Operator logs for any errors by entering the following command:
oc logs -l control-plane=sonataflow-operator -n openshift-serverless-logic
$ oc logs -l control-plane=sonataflow-operator -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2. Upgrading OpenShift Serverless Logic Operator from version 1.35.0 to 1.36.0 Copiar o linkLink copiado para a área de transferência!
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.
Different workflow profiles require different upgrade steps. Follow the instructions for each profile carefully.
10.2.1. Preparing for the upgrade Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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 Copiar o linkLink copiado para a área de transferência!
Before upgrading the Operator, you must delete workflows running with the dev profile and redeploy them after the upgrade is complete.
Procedure
-
Ensure you have a backup of all necessary Kubernetes resources, including
SonataFlowcustom resources (CRs),ConfigMapresources, or any other related custom configurations. Delete the workflow by executing the following command:
oc delete workflow <workflow_name> -n <target_namespace>
$ oc delete workflow <workflow_name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.1.2. Deleting workflows with the preview profile Copiar o linkLink copiado para a área de transferência!
Before upgrading the Operator, you must delete workflows running with the preview profile. When the upgrade is complete, you must redeploy the workflows.
Procedure
- If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
-
Ensure you have a backup of all necessary Kubernetes resources, including
SonataFlowcustom resources (CRs),ConfigMapresources, or any other related custom configurations. Delete the workflow by executing the following command:
oc delete workflow <workflow_name> -n <target_namespace>
$ oc delete workflow <workflow_name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.1.3. Scaling down workflows with the gitops profile Copiar o linkLink copiado para a área de transferência!
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
Modify the
my-workflow.yamlcustom resources (CR) and scale down each workflow to0before upgrading as shown in the following example:spec: podTemplate: replicas: 0 # ...spec: podTemplate: replicas: 0 # ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the updated
my-workflow.yamlCR by running the following command:oc apply -f my-workflow.yaml -n <target_namespace>
$ oc apply -f my-workflow.yaml -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Scale the workflow to
0by running the following command:oc patch workflow <workflow_name> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'$ oc patch workflow <workflow_name> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.1.4. Backing up the Data Index database Copiar o linkLink copiado para a área de transferência!
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 Copiar o linkLink copiado para a área de transferência!
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 Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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
Patch the
ClusterServiceVersion(CSV) for the 1.35.0 OpenShift Serverless Logic Operator to update the deployment labels by running the following command:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the current Operator deployment by running the following command:
oc delete deployment logic-operator-rhel8-controller-manager -n openshift-serverless-logic
$ oc delete deployment logic-operator-rhel8-controller-manager -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
In the web console, navigate to the Operators
OperatorHub Installed Operators page. - In the list of installed Operators, find and click the Operator named OpenShift Serverless Logic Operator.
- 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
Succeededphase, by running the following command:oc get clusterserviceversion logic-operator-rhel8.v1.36.0
$ oc get clusterserviceversion logic-operator-rhel8.v1.36.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
NAME DISPLAY VERSION REPLACES PHASE logic-operator-rhel8.v1.36.0 OpenShift Serverless Logic Operator 1.36.0 logic-operator-rhel8.v1.35.0 SucceededCopy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.3. Finalizing the upgrade Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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 Copiar o linkLink copiado para a área de transferência!
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
List all the triggers by running the following command:
oc get triggers -n <target_namespace>
$ oc get triggers -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Based on the generated example output, delete the old
data-index-process-definitiontrigger by running the following command:oc delete trigger data-index-process-definition-473e1ddbb3ca1d62768187eb80de99bca -n <target_namespace>
$ oc delete trigger data-index-process-definition-473e1ddbb3ca1d62768187eb80de99bca -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow After deletion, a new trigger compatible with OpenShift Serverless Logic 1.36.0 is automatically created.
Optional: Identify the old
ReplicaSetresource by running the following command:oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>
$ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
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.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Delete your old
ReplicaSetresource by running the following command:oc delete replicaset <old_replicaset_name> -n <target_namespace>
$ oc delete replicaset <old_replicaset_name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example command based on the example output
oc delete replicaset sonataflow-platform-data-index-service-1111111111 -n <target_namespace>
$ oc delete replicaset sonataflow-platform-data-index-service-1111111111 -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.3.2. Finalizing the Job Service upgrade Copiar o linkLink copiado para a área de transferência!
After the OpenShift Serverless Operator is upgraded to version 1.36.0 you can optionally delete the old ReplicaSet resource.
Procedure
Identify the old
ReplicaSetresource by running the following command:oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>
$ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
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.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete your old
ReplicaSetresource by running the following command:oc delete replicaset <old_replicaset_name> -n <target_namespace>
$ oc delete replicaset <old_replicaset_name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example command based on the example output
oc delete replicaset sonataflow-platform-jobs-service-1111111111 -n <target_namespace>
$ oc delete replicaset sonataflow-platform-jobs-service-1111111111 -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.3.3. Redeploying workflows with the dev profile Copiar o linkLink copiado para a área de transferência!
After the upgrade, you must redeploy workflows that use the dev profile and any associated Kubernetes resources.
Procedure
-
Ensure that all required Kubernetes resources, including the
ConfigMapwith theapplication.propertiesfield, are restored before redeploying the workflow. Redeploy the workflow by running the following command:
oc apply -f <workflow_name> -n <target_namespace>
$ oc apply -f <workflow_name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.3.4. Restoring workflows with the preview profile Copiar o linkLink copiado para a área de transferência!
After the upgrade, you must redeploy workflows that use the preview profile and any associated Kubernetes resources.
Procedure
-
Ensure that all required Kubernetes resources, including the
ConfigMapwith theapplication.propertiesfield, are restored before redeploying the workflow. Redeploy the workflow by running the following command:
oc apply -f <workflow_name> -n <target_namespace>
$ oc apply -f <workflow_name> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.3.5. Scaling up workflows with the gitops profile Copiar o linkLink copiado para a área de transferência!
To continue operation, you must scale up workflows that you previously scaled down with the gitops profile.
Procedure
Modify the
my-workflow.yamlcustom resources (CR) and scale up each workflow to1as shown in the following example:spec: podTemplate: replicas: 1 # ...spec: podTemplate: replicas: 1 # ...Copy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the updated CR by running the following command:
oc apply -f my-workflow.yaml -n <target_namespace>
$ oc apply -f my-workflow.yaml -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Scale the workflow back to
1by running the following command:oc patch workflow <workflow_name> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 1}}}'$ oc patch workflow <workflow_name> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 1}}}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.2.4. Verifying the 1.36.0 upgrade Copiar o linkLink copiado para a área de transferência!
After restoring workflows and services, verify that the upgrade was successful and all components are functioning as expected.
Procedure
Check if all workflows and services are running by entering the following command:
oc get pods -n <target_namespace>
$ oc get pods -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that all pods related to workflows, Data Index, and Jobs Service are in a
RunningorCompletedstate.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
$ oc get clusterserviceversion logic-operator-rhel8.v1.36.0 -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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
NAME DISPLAY VERSION REPLACES PHASE logic-operator-rhel8.v1.36.0 OpenShift Serverless Logic Operator 1.36.0 logic-operator-rhel8.v1.35.0 SucceededCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check Operator logs for any errors by entering the following command:
oc logs -l control-plane=sonataflow-operator -n openshift-serverless-logic
$ oc logs -l control-plane=sonataflow-operator -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3. Upgrading OpenShift Serverless Logic Operator from version 1.36.0 to 1.37.0 Copiar o linkLink copiado para a área de transferência!
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.
Different workflow profiles require different upgrade steps. Follow the instructions for each profile carefully.
10.3.1. Preparing for the upgrade Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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 Copiar o linkLink copiado para a área de transferência!
Before upgrading the Operator, you must delete workflows running with the dev profile. When the upgrade is complete, you must redeploy the workflows.
Procedure
-
Ensure you have a backup of all necessary Kubernetes resources, including
SonataFlowcustom resources (CRs),ConfigMapresources, or any other related custom configurations. Delete the workflow by running the following command:
oc delete -f <workflow.yaml> -n <target_namespace>
$ oc delete -f <workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.1.2. Deleting workflows with the preview profile Copiar o linkLink copiado para a área de transferência!
Before upgrading the Operator, you must delete workflows running with the preview profile. When the upgrade is complete, you must redeploy the workflows.
Procedure
- If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
-
Ensure you have a backup of all necessary Kubernetes resources, including
SonataFlowcustom resources (CRs),ConfigMapresources, or any other related custom configurations. Delete the workflow by running the following command:
oc delete -f <workflow.yaml> -n <target_namespace>
$ oc delete -f <workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.1.3. Deleting workflows with the gitops profile Copiar o linkLink copiado para a área de transferência!
Before upgrading the Operator, you must delete workflows running with the gitops profile. When the upgrade is complete, you must rebuild the corresponding workflow image using the new OpenShift Serverless Logic 1.37.0 serverless workflow builder image and you must redeploy the workflow using the new image.
Procedure
- If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
-
Ensure you have a backup of all necessary Kubernetes resources, including
SonataFlowcustom resources (CRs),ConfigMapresources, or any other related custom configurations. Delete the workflow by running the following command:
oc delete -f <workflow.yaml> -n <target_namespace>
$ oc delete -f <workflow.yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.1.4. Backing up the Data Index database Copiar o linkLink copiado para a área de transferência!
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.3.1.5. Backing up the Jobs Service database Copiar o linkLink copiado para a área de transferência!
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.
- The backup is stored in a secure location.
10.3.2. Upgrading the OpenShift Serverless Logic Operator to 1.37.0 Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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
Uninstall the current OpenShift Serverless Logic Operator 1.36.0.
Delete the existing Operator subscription by running the following command:
oc delete subscriptions.operators.coreos.com logic-operator-rhel8 -n openshift-serverless-logic
$ oc delete subscriptions.operators.coreos.com logic-operator-rhel8 -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou must use the fully qualified resource name
subscriptions.operators.coreos.comto avoid short-name collisions with Knative Eventing resources.Delete the existing
ClusterServiceVersion(CSV) by running the following command:oc delete csv logic-operator-rhel8.v1.36.0 -n openshift-serverless-logic
$ oc delete csv logic-operator-rhel8.v1.36.0 -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow
In every namespace where a
SonataFlowPlatformresource is installed and configured withdbMigrationStrategy: jobfor 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>
$ oc delete job sonataflow-db-migrator-job -n <target-namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install the OpenShift Serverless Logic Operator 1.37.0:
Create the following
Subscriptionresource similar to the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou must use
Manualinstall plan approval.Query the pending install plan by running the following command:
oc get installplan -n openshift-serverless-logic
$ oc get installplan -n openshift-serverless-logicCopy to Clipboard Copied! Toggle word wrap Toggle overflow You must get an output similar to the following:
NAME CSV APPROVAL APPROVED install-XXXX logic-operator.v1.37.0 Manual false
NAME CSV APPROVAL APPROVED install-XXXX logic-operator.v1.37.0 Manual falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow Approve the install plan by running the following command:
oc patch installplan install-XXXX -n openshift-serverless-logic --type merge -p '{"spec":{"approved":true}}'$ oc patch installplan install-XXXX -n openshift-serverless-logic --type merge -p '{"spec":{"approved":true}}'Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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
Succeededphase, by running the following command:oc get clusterserviceversion logic-operator.v1.37.0
$ oc get clusterserviceversion logic-operator.v1.37.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
NAME DISPLAY VERSION REPLACES PHASE logic-operator.v1.37.0 OpenShift Serverless Logic Operator 1.37.0 SucceededCopy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.3. Finalizing the upgrade Copiar o linkLink copiado para a área de transferência!
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-adminprivileges. - 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 Copiar o linkLink copiado para a área de transferência!
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
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>
$ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
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.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Delete your old
ReplicaSetresource by running the following command:oc delete replicaset sonataflow-platform-data-index-service-1111111111 -n <target_namespace>
$ oc delete replicaset sonataflow-platform-data-index-service-1111111111 -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.3.2. Finalizing the Job Service upgrade Copiar o linkLink copiado para a área de transferência!
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
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>
$ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
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.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Delete your old
ReplicaSetrunning the Job Service 1.36.0 version by running the following command:oc delete replicaset sonataflow-platform-jobs-service-1111111111 -n <target_namespace>
$ oc delete replicaset sonataflow-platform-jobs-service-1111111111 -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.3.3. Redeploying workflows with the dev profile Copiar o linkLink copiado para a área de transferência!
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
-
Ensure that all required Kubernetes resources are restored before redeploying the workflow. The resources also include the
ConfigMapresource with theapplication.propertiesfield. Redeploy the workflow by running the following command:
oc apply -f <workflow_yaml> -n <target_namespace>
$ oc apply -f <workflow_yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.3.4. Redeploying workflows with the preview profile Copiar o linkLink copiado para a área de transferência!
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
-
Ensure that all required Kubernetes resources, including the
ConfigMapwith theapplication.propertiesfield, are created before redeploying the workflow. Redeploy the workflow by running the following command:
oc apply -f <workflow_yaml> -n <target_namespace>
$ oc apply -f <workflow_yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
10.3.3.5. Redeploying workflows with the gitops profile Copiar o linkLink copiado para a área de transferência!
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
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
registry.redhat.io/openshift-serverless-1/logic-swf-builder-rhel9:1.37.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteWhen rebuilding the image, the OpenShift Serverless Logic Operator generates a workflow deployment with
imagePullPolicy: IfNotPresentby 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.Ensure that the new image is picked up by using one of the following alternatives:
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
quay.io/my-images/my-workflow:1.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the new image tag by running the following command:
quay.io/my-images/my-workflow:1.0-1
quay.io/my-images/my-workflow:1.0-1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Update the
workflowcustom resource (CR) similar to the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Preserve the image name and configure the workflow with
imagePullPolicy: Alwaysas follows:Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteWhen 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.
-
Ensure that all Kubernetes resources required by the workflow are created. This includes any user-provided resources, such as a
ConfigMapcontaining theapplication.propertiesfile. Redeploy the workflow by running the following command:
oc apply -f <workflow_yaml> -n <target_namespace>
$ oc apply -f <workflow_yaml> -n <target_namespace>Copy to Clipboard Copied! Toggle word wrap Toggle overflow