Skip to content

Commit cbd884c

Browse files
authored
Merge pull request #93862 from openshift-cherrypick-robot/cherry-pick-93332-to-serverless-docs-1.36
[serverless-docs-1.36] PR for SRVLOGIC-530: Add the section to upgrade Serverless Logic Operator from 1.35.0 to 1.36.0
2 parents d0f5827 + e5463b5 commit cbd884c

14 files changed

+462
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ Topics:
412412
Topics:
413413
- Name: Upgrading Serverless Logic Operator from 1.34.0 to 1.35.0
414414
File: serverless-logic-upgrading-operator-from-1.34-to-1.35
415+
- Name: Upgrading Serverless Logic Operator from 1.35.0 to 1.36.0
416+
File: serverless-logic-upgrading-operator-from-1-35-to-1-36
415417

416418
---
417419
# Knative kn CLI
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-backing-up-data-index-database_{context}"]
7+
= Backing up the Data Index database
8+
9+
You must back up the Data Index database before upgrading to prevent data loss.
10+
11+
.Procedure
12+
13+
* Take a full backup of the Data Index database, ensuring:
14+
** The backup includes all database objects and not just table data.
15+
** The backup is stored in a secure location.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-backing-up-job-service-database_{context}"]
7+
= Backing up the Jobs Service database
8+
9+
You must back up the Jobs Service database before upgrading to maintain job scheduling data.
10+
11+
.Procedure
12+
13+
* Take a full backup of the Jobs Service database, ensuring:
14+
** The backup includes all database objects and not just table data.
15+
** The backup is stored in a secure location.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-deleting-migrating-workflows-with-preview-profile_{context}"]
7+
= Deleting workflows with the preview profile
8+
9+
Before upgrading the Operator, you must delete workflows running with the `preview` profile. When the upgrade is complete, you must redeploy the workflows.
10+
11+
.Procedure
12+
13+
. If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
14+
15+
. Ensure you have a backup of all necessary Kubernetes resources, including `SonataFlow` custom resources (CRs), `ConfigMap` resources, or any other related custom configurations.
16+
17+
. Delete the workflow by executing the following command:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc delete workflow <workflow_name> -n <target_namespace>
22+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-deleting-workflows-with-dev-profile_{context}"]
7+
= Deleting workflows with the dev profile
8+
9+
Before upgrading the Operator, you must delete workflows running with the `dev` profile and redeploy them after the upgrade is complete.
10+
11+
.Procedure
12+
13+
. Ensure you have a backup of all necessary Kubernetes resources, including `SonataFlow` custom resources (CRs), `ConfigMap` resources, or any other related custom configurations.
14+
15+
. Delete the workflow by executing the following command:
16+
+
17+
[source,terminal]
18+
----
19+
$ oc delete workflow <workflow_name> -n <target_namespace>
20+
----
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-finalizing-data-index_{context}"]
7+
= Finalizing the Data Index upgrade
8+
9+
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 {ServerlessLogicProductName} 1.35.0 version. Optionally, you can delete the old `ReplicaSet` resource as well.
10+
11+
.Procedure
12+
13+
. List all the triggers by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc get triggers -n <target_namespace>
18+
----
19+
+
20+
.Example output
21+
[source,terminal,subs="verbatim,quotes"]
22+
----
23+
NAME BROKER SUBSCRIBER_URI
24+
data-index-jobs-a25c8405-f740-47d2-a9a5-f80ccaec2955 example-broker http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/jobs
25+
data-index-process-definition-473e1ddbb3ca1d62768187eb80de99bca example-broker http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/definitions
26+
data-index-process-error-a25c8405-f740-47d2-a9a5-f80ccaec2955 example-broker http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
27+
data-index-process-instance-mul07f593476e8c14353a337590e0bfd5ae example-broker http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
28+
data-index-process-node-a25c8405-f740-47d2-a9a5-f80ccaec2955 example-broker http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
29+
data-index-process-state-a25c8405-f740-47d2-a9a5-f80ccaec2955 example-broker http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
30+
data-index-process-variable-487e9a6777fff650e60097c9e17111aea25 example-broker http://sonataflow-platform-data-index-service.<target_namespace>.svc.cluster.local/processes
31+
32+
jobs-service-create-job-a25c8405-f740-47d2-a9a5-f80ccaec2955 example-broker http://sonataflow-platform-jobs-service.<target_namespace>.svc.cluster.local/v2/jobs/events
33+
jobs-service-delete-job-a25c8405-f740-47d2-a9a5-f80ccaec2955 example-broker http://sonataflow-platform-jobs-service.<target_namespace>.svc.cluster.local/v2/jobs/events
34+
----
35+
36+
. Based on the generated example output, delete the old `data-index-process-definition` trigger by running the following command:
37+
+
38+
[source,terminal]
39+
----
40+
$ oc delete trigger data-index-process-definition-473e1ddbb3ca1d62768187eb80de99bca -n <target_namespace>
41+
----
42+
+
43+
After deletion, a new trigger compatible with {ServerlessLogicProductName} 1.36.0 is automatically created.
44+
45+
. Optional: Identify the old `ReplicaSet` resource by running the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>
50+
----
51+
+
52+
.Example output
53+
[source,terminal,subs="verbatim,quotes"]
54+
----
55+
Name Image
56+
sonataflow-platform-data-index-service-1111111111 registry.redhat.io/openshift-serverless-1/logic-data-index-postgresql-rhel8:1.35.0
57+
58+
sonataflow-platform-data-index-service-2222222222 registry.redhat.io/openshift-serverless-1/logic-data-index-postgresql-rhel8:1.36.0
59+
----
60+
+
61+
. Optional: Delete your old `ReplicaSet` resource by running the following command:
62+
+
63+
[source,terminal]
64+
----
65+
$ oc delete replicaset <old_replicaset_name> -n <target_namespace>
66+
----
67+
+
68+
.Example command based on the example output
69+
[source,terminal]
70+
----
71+
$ oc delete replicaset sonataflow-platform-data-index-service-1111111111 -n <target_namespace>
72+
----
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-finalizing-job-service_{context}"]
7+
= Finalizing the Job Service upgrade
8+
9+
After the {ServerlessOperatorName} is upgraded to version 1.36.0 you can optionally delete the old `ReplicaSet` resource.
10+
11+
.Procedure
12+
13+
. Identify the old `ReplicaSet` resource by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc get replicasets -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image -n <target_namespace>
18+
----
19+
+
20+
.Example output
21+
[source,terminal,subs="verbatim,quotes"]
22+
----
23+
Name Image
24+
sonataflow-platform-jobs-service-1111111111 registry.redhat.io/openshift-serverless-1/logic-jobs-service-postgresql-rhel8:1.35.0
25+
sonataflow-platform-jobs-service-2222222222 registry.redhat.io/openshift-serverless-1/logic-jobs-service-postgresql-rhel8:1.36.0
26+
----
27+
+
28+
. Delete your old `ReplicaSet` resource by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ oc delete replicaset <old_replicaset_name> -n <target_namespace>
33+
----
34+
+
35+
.Example command based on the example output
36+
[source,terminal]
37+
----
38+
$ oc delete replicaset sonataflow-platform-jobs-service-1111111111 -n <target_namespace>
39+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-redeploying-workflows-with-dev-profile_{context}"]
7+
= Redeploying workflows with the dev profile
8+
9+
After the upgrade, you must redeploy workflows that use the `dev` profile and any associated Kubernetes resources.
10+
11+
.Procedure
12+
13+
. Ensure that all required Kubernetes resources, including the `ConfigMap` with the `application.properties` field, are restored before redeploying the workflow.
14+
15+
. Redeploy the workflow by running the following command:
16+
+
17+
[source,terminal]
18+
----
19+
$ oc apply -f <workflow_name> -n <target_namespace>
20+
----
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-restoring-workflows-with-preview-profile_{context}"]
7+
= Restoring workflows with the preview profile
8+
9+
After the upgrade, you must redeploy workflows that use the `preview` profile and any associated Kubernetes resources.
10+
11+
.Procedure
12+
13+
. Ensure that all required Kubernetes resources, including the `ConfigMap` with the `application.properties` field, are restored before redeploying the workflow.
14+
15+
. Redeploy the workflow by running the following command:
16+
+
17+
[source,terminal]
18+
----
19+
$ oc apply -f <workflow_name> -n <target_namespace>
20+
----
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
// * serverless-logic/serverless-logic-upgrading-operator-from-1.35-to-1.36
3+
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="serverless-logic-upgrade-1-36-scaling-down-workflows-with-gitops-profile_{context}"]
7+
= Scaling down workflows with the gitops profile
8+
9+
Before upgrading the Operator, you must scale down workflows running with the `gitops` profile, and scale them up again after the upgrade is complete.
10+
11+
.Procedure
12+
13+
. Modify the `my-workflow.yaml` custom resources (CR) and scale down each workflow to `0` before upgrading as shown in the following example:
14+
+
15+
[source,yaml]
16+
----
17+
spec:
18+
podTemplate:
19+
replicas: 0
20+
# ...
21+
----
22+
23+
. Apply the updated `my-workflow.yaml` CR by running the following command:
24+
+
25+
[source,terminal]
26+
----
27+
$ oc apply -f my-workflow.yaml -n <target_namespace>
28+
----
29+
30+
. Optional: Scale the workflow to `0` by running the following command:
31+
+
32+
[source,terminal]
33+
----
34+
$ oc patch workflow <workflow_name> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'
35+
----

0 commit comments

Comments
 (0)