|
| 1 | +// NOTE: Do not externally parametrize these versions, they are specific to this migration guide. |
| 2 | +:current_operator_version: 1.37.2 |
| 3 | +:next_operator_version: 1.38.0 |
| 4 | +:next_swf_builder_image: registry.redhat.io/openshift-serverless-1/logic-swf-builder-rhel9:1.38.0 |
| 5 | + |
| 6 | += Upgrade {operator_name} from {current_operator_version} to {next_operator_version} |
| 7 | +:compat-mode!: |
| 8 | +// Metadata: |
| 9 | +:description: Upgrade OSL Operator from 1.37.2 to 1.38.0 |
| 10 | +:keywords: kogito, sonataflow, workflow, serverless, operator, kubernetes, minikube, openshift, containers |
| 11 | +// links |
| 12 | +:openshift_operator_install_url: https://docs.openshift.com/container-platform/4.13/operators/admin/olm-adding-operators-to-cluster.html |
| 13 | +:openshift_operator_uninstall_url: https://docs.openshift.com/container-platform/4.13/operators/admin/olm-deleting-operators-from-cluster.html |
| 14 | +:kubernetes_operator_install_url: https://operatorhub.io/how-to-install-an-operator |
| 15 | +:kubernetes_operator_uninstall_url: https://olm.operatorframework.io/docs/tasks/uninstall-operator/ |
| 16 | +:operatorhub_url: https://operatorhub.io/ |
| 17 | + |
| 18 | +This guide describes how to upgrade the {operator_name} `{current_operator_version}` installed in an OpenShift cluster to the version `{next_operator_version}`. |
| 19 | + |
| 20 | +.Prerequisites |
| 21 | +* An OpenShift cluster with admin privileges and `oc` installed. |
| 22 | + |
| 23 | +== Procedure |
| 24 | + |
| 25 | +To upgrade an {operator_name} `{current_operator_version}` installation to the version `{next_operator_version}`, you must execute this procedure: |
| 26 | + |
| 27 | +=== Overall upgrade procedure |
| 28 | + |
| 29 | +It is recommended to read and understand all the steps of the procedure before executing. |
| 30 | +Interested parties might automate the procedure according to their convenience or infrastructure, for example, keeping all the `SonataFlow` CRs in a GitHub repository, might help considerably to implement automation, etc. |
| 31 | + |
| 32 | +. Increase the Job Service retry interval before starting the upgrade by following these <<config_jobs_service_retry_interval, steps>>. |
| 33 | +. Execute the steps `1` and `2` of the upgrade for every workflow with the <<workflows_dev_profile, dev profile>>. |
| 34 | +. Execute the steps `1`, `2` and `3` of the upgrade for every workflow with the <<workflows_preview_profile, preview profile>>. |
| 35 | +. Execute the steps `1`, `2`, `3` and `4` of the upgrade for every workflow with the <<workflows_gitops_profile_image_rebuild, gitops profile>>. |
| 36 | +. Execute the step `1` of the <<data_index_upgrade, Data Index>> upgrade. |
| 37 | +. Execute the step `1` of the <<jobs_service_upgrade, Job Service>> upgrade. |
| 38 | +. Upgrade the {operator_name} to the version `{next_operator_version}` <<operator_upgrade_procedure, following this procedure>>, and verify that the new version is running. |
| 39 | +. Finalize the <<data_index_upgrade, Data Index>> upgrade by continuing from step `2`. |
| 40 | +. Finalize the <<jobs_service_upgrade, Job Service>> upgrade by continuing from step `2`. |
| 41 | +. Finalize the upgrade for the workflows with the <<workflows_gitops_profile_image_rebuild, gitops profile>> by continuing from step `5`. |
| 42 | +. Finalize the upgrade for the workflows with the <<workflows_preview_profile, preview profile>> by continuing from step `4`. |
| 43 | +. Finalize the upgrade for the workflows with the <<workflows_dev_profile, dev profile>> by continuing from step `3`. |
| 44 | +. Restore the Job Service retry interval by following these <<restore_jobs_service_retry_interval, steps>>. |
| 45 | + |
| 46 | +[#config_jobs_service_retry_interval] |
| 47 | +==== Increase the Jobs Service retry interval |
| 48 | + |
| 49 | +include::../../../_common-content/cloud/operator/upgrade-serverless-operator/regular_jobs_service_increase_retry_interval_procedure.adoc[] |
| 50 | + |
| 51 | +[#workflows_dev_profile] |
| 52 | +==== Workflows with the `dev` profile |
| 53 | + |
| 54 | +include::../../../_common-content/cloud/operator/upgrade-serverless-operator/regular_dev_workflow_upgrade_procedure.adoc[] |
| 55 | + |
| 56 | +[#workflows_preview_profile] |
| 57 | +==== Workflows with the `preview` profile |
| 58 | + |
| 59 | +include::../../../_common-content/cloud/operator/upgrade-serverless-operator/regular_preview_workflow_upgrade_procedure.adoc[] |
| 60 | + |
| 61 | +[#workflows_gitops_profile_image_rebuild] |
| 62 | +==== Workflows with the `gitops` profile |
| 63 | + |
| 64 | +For every workflow with the `gitops` profile, it is strongly recommended to rebuild the workflow image generated for version `{current_operator_version}` before applying the upgrade, to ensure full compatibility with OpenShift Serverless Logic `{next_operator_version}`. |
| 65 | + |
| 66 | +For every workflow my-workflow with the `gitops` profile you must: |
| 67 | + |
| 68 | +include::../../../_common-content/cloud/operator/upgrade-serverless-operator/regular_gitops_worklow_upgrade_procedure_with_image_build.adoc[] |
| 69 | + |
| 70 | +[#data_index_upgrade] |
| 71 | +==== Data Index upgrade |
| 72 | + |
| 73 | +Every Data Index deployment must be upgraded with the following procedure: |
| 74 | + |
| 75 | +*Pre-operator upgrade steps:* |
| 76 | + |
| 77 | +. Back up the Data Index database, including all database objects, not just the table information. |
| 78 | + |
| 79 | +*Post-operator upgrade steps:* |
| 80 | + |
| 81 | +[start=2] |
| 82 | +. The Data Index service will be automatically restarted with the version {next_operator_version}. |
| 83 | + |
| 84 | + |
| 85 | +[#jobs_service_upgrade] |
| 86 | +==== Job Service upgrade |
| 87 | + |
| 88 | +*Pre-operator upgrade steps:* |
| 89 | + |
| 90 | +. Back up the Job Service database, including all database objects, not just the table information. |
| 91 | + |
| 92 | +*Post-operator upgrade steps:* |
| 93 | + |
| 94 | +[start=2] |
| 95 | + |
| 96 | +. The Job Service will be automatically restarted with the version {next_operator_version}. |
| 97 | + |
| 98 | +[#operator_upgrade_procedure] |
| 99 | +==== Operator Upgrade Procedure |
| 100 | +To upgrade the {operator_name} from `{current_operator_version}` to `{next_operator_version}` you must execute these steps: |
| 101 | + |
| 102 | +include::../../../_common-content/cloud/operator/upgrade-serverless-operator/regular_operator_upgrade_procedure.adoc[] |
| 103 | + |
| 104 | +. Verify that a new Data Index and Jobs Service database initialization `Job` was created: |
| 105 | ++ |
| 106 | +Alternatively, in every namespace where you have installed a `SonataFlowPlatform`, that has configured the `dbMigrationStrategy: job`, for any of |
| 107 | +the Data Index or the Jobs Service, you can verify that a new `sonataflow-db-migrator-job` was created with the following command: |
| 108 | + |
| 109 | ++ |
| 110 | +[source,bash,subs="attributes"] |
| 111 | +---- |
| 112 | +kubectl get jobs \ |
| 113 | + -n <target-namespace> \ |
| 114 | + -l app=<platform-name>,app.kubernetes.io/version={next_operator_version} |
| 115 | +---- |
| 116 | + |
| 117 | ++ |
| 118 | +You must get an output similar to this: |
| 119 | ++ |
| 120 | +[source, terminal] |
| 121 | +---- |
| 122 | +NAME STATUS COMPLETIONS DURATION AGE |
| 123 | +sonataflow-db-migrator-job-b81d6bb3 Complete 1/1 15s 16m |
| 124 | +---- |
| 125 | + |
| 126 | +[#restore_jobs_service_retry_interval] |
| 127 | +==== Restore the Jobs Service retry interval |
| 128 | + |
| 129 | +include::../../../_common-content/cloud/operator/upgrade-serverless-operator/regular_jobs_service_restore_retry_interval_procedure.adoc[] |
| 130 | + |
| 131 | +include::../../../../pages/_common-content/report-issue.adoc[] |
0 commit comments