Skip to content

Commit 6d6cd45

Browse files
upgrade changes for openshift
1 parent cae05d0 commit 6d6cd45

File tree

2 files changed

+123
-34
lines changed

2 files changed

+123
-34
lines changed

content/operate/kubernetes/upgrade/openshift-cli.md

Lines changed: 52 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,48 @@ weight: 20
1414
Redis implements rolling updates for software upgrades in Kubernetes deployments. The upgrade process includes updating three components:
1515

1616
1. [Upgrade the Redis Enterprise operator](#upgrade-the-operator)
17-
2. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redisenterprisecluster-rec)
18-
3. [Upgrade Redis Enterprise databases (REDB)](#upgrade-databases)
17+
1. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redis-enterprise-cluster-rec)
18+
1. [Upgrade Redis Enterprise databases (REDB)](#upgrade-databases)
1919

20-
## Before upgrading
20+
## Prerequisites
2121

22-
1. Check [Supported Kubernetes distributions]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to make sure your Kubernetes distribution is supported.
22+
The following steps ensure you have the minimum versions of all components necessary to upgrade to 7.8.2-2. **Without these minimum versions, the upgrade will freeze and require manual recovery.**
2323

24-
2. Use `oc get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process.
24+
See the [troubleshooting](#troubleshooting) section for details on recovering a failed upgrade.
2525

26-
3. Verify you are upgrading from Redis Enterprise operator version 6.2.10-45 or later. If you are not, you must upgrade to 6.2.10-45 before upgrading to versions 6.2.18 or later.
26+
### Kubernetes version
2727

28-
4. When upgrading existing clusters running on RHEL7-based images, make sure to select a RHEL7-based image for the new version. See [release notes]({{< relref "/operate/kubernetes/release-notes/" >}}) for more info.
28+
Check [Supported Kubernetes distributions]({{<relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to make sure your Kubernetes distribution is supported by 7.8.2-2. If not, upgrade your Kubernetes distribution before upgrading the Redis operator.
2929

30-
5. If you want to migrate from RHEL7-based images to RHEL8-based images, you'll need to upgrade to version 7.2.4-2 with a RHEL7-based image, then you'll be able to migrate to a RHEL8-based image when upgrading to 7.2.4-**TBD**.
30+
### Redis operator version
3131

32+
Your Redis Enterprise clusters must be running version 7.4.2-2 or later before upgrading to 7.8.2-2. See the [7.4 upgrade]({{<relref "/operate/kubernetes/7.4.6/upgrade">}}) for detailed steps.
33+
34+
### Redis database version
35+
36+
Your Redis databases must be running version 7.2 or later before upgrading your cluster version to 7.8.2-2. See [upgrade databases](#upgrade-databases) for detailed steps. You can find your database version in the [REDB `spec.redisVersion` field]({{<relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}).
37+
38+
### RHEL9-compatible modules
39+
40+
Upgrading to Redis operator version 7.8.2-2 requires migrating your Redis Enterprise nodes to RHEL9 from either Ubuntu 18 or RHEL8. If your databases use modules, you need to manually install modules compatibile with RHEL9.
41+
42+
To see which modules you have installed, run:
43+
44+
```sh
45+
curl -k -u <rec_username>:<rec_password> -X GET https://localhost:9443/v1/modules | jq -r 'map([.module_name, .semantic_version, (.platforms | keys)]) | .[] | .[0] as $name | .[1] as $version | .[2][] | $name + "-" + $version + "-" + .' | sort
46+
```
47+
48+
To see which modules are currently in use, run:
49+
50+
```sh
51+
curl -k -u <rec_username>:<rec_password> -X GET https://localhost:9443/v1/bdbs | jq -r '.[].module_list | map(.module_name + "-" + .semantic_version) | .[]'
52+
```
53+
54+
See [Upgrade modules]({{<relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module">}}) for details on how to upgrade modules with the `rladmin` tool.
55+
56+
### Valid license
57+
58+
Use `kubectl get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process.
3259
## Upgrade the operator
3360

3461
### Download the bundle
@@ -174,38 +201,34 @@ To see the status of the current rolling upgrade, run:
174201
oc rollout status sts <REC_name>
175202
```
176203
177-
## After upgrading
178-
179-
For OpenShift users, operator version 6.4.2-6 introduced a new SCC (`redis-enterprise-scc-v2`). If any of your OpenShift RedisEnterpriseClusters are running versions earlier than 6.2.4-6, you need to keep both the new and old versions of the SCC.
204+
### Upgrade databases
180205
181-
If all of your clusters have been upgraded to operator version 6.4.2-6 or later, you can delete the old version of the SCC (`redis-enterprise-scc`) and remove the binding to your service account.
206+
After the cluster is upgraded, you can upgrade your databases. Specify your new database version in the `spec.redisVersion` field for your REDB and REAADB custom resources. Supported database versions for operator version 7.8.2-2 include `"7.2"` and `"7.4"` (note this value is a string).
182207
183-
1. Delete the old version of the SCC
208+
Note that if your cluster [`redisUpgradePolicy`]({{<relref "/operate/kubernetes/reference/redis_enterprise_cluster_api#redisupgradepolicy" >}}) or your database [`redisVersion`]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}) are set to `major`, you won't be able to upgrade those databases to minor versions. See [Redis upgrade policy]({{< relref "/operate/rs/installing-upgrading/upgrading#redis-upgrade-policy" >}}) for more details.
184209

185-
```sh
186-
oc delete scc redis-enterprise-scc
187-
```
210+
## Troubleshooting
188211

189-
The output should look similar to the following:
212+
If you start an upgrade without meeting the [prerequisites](#prerequisites), the operator will freeze the upgrade. Check the operator logs for the source of the error. The REDB reconsilliation doesn't work during an upgrade, so you need to apply a manual fix with the Redis Software API (examples below). The updates will also need to be added to the REDB custom resource.
190213

191-
```sh
192-
securitycontextconstraints.security.openshift.io "redis-enterprise-scc" deleted
193-
```
214+
### Invalid module version
194215

195-
1. Remove the binding to your service account.
196-
197-
```sh
198-
oc adm policy remove-scc-from-user redis-enterprise-scc system:serviceaccount:<my-project>:<rec-name>
199-
```
216+
If the operator logs show an event related to an unsupported module, download the updated module locally, and install it using the `v2/modules` API endpoint.
200217

218+
```sh
219+
curl -sfk -u <rec_username>:<rec_password> -X POST -F 'module=@<full path to your module>' https://localhost:9443/v2/modules
220+
```
201221

202-
## Upgrade databases
222+
After updating the modules with the Redis Software API, update the REDB custom resource to reflect the change.
203223

204-
{{<warning>}}In version 7.2.4, old module versions and manually uploaded modules are not persisted. If databases are not upgraded after cluster upgrade, and require cluster recovery afterwards, you'll need to contact Redis support. This issue will be fixed in the next maintenance release by moving the stored location of the modules.{{</warning>}}
224+
### Invalid database version
205225

206-
After the cluster is upgraded, you can upgrade your databases. The process for upgrading databases is the same for both Kubernetes and non-Kubernetes deployments. For more details on how to [upgrade a database]({{< relref "/operate/rs/installing-upgrading/upgrading/upgrade-database" >}}), see the [Upgrade an existing Redis Enterprise Software deployment]({{< relref "/operate/rs/installing-upgrading/upgrading" >}}) documentation.
226+
If the operator logs show an event related to an incompatible database version, upgrade the database using the Redis Software API.
207227

208-
Note that if your cluster [`redisUpgradePolicy`]({{< relref "/operate/kubernetes/reference/redis_enterprise_cluster_api#redisupgradepolicy" >}}) or your database [`redisVersion`]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}) are set to `major`, you won't be able to upgrade those databases to minor versions. See [Redis upgrade policy]({{< relref "/operate/rs/installing-upgrading/upgrading#redis-upgrade-policy" >}}) for more details.
228+
```sh
229+
curl -sfk -u <rec_username>:<rec_password> -X POST -H "Content-Type: application/json" -d '{"redis_version": <target redis version>}' https://localhost:9443/v1/bdbs/<BDB UID>/upgrade
230+
```
209231

232+
After updating the modules with the Redis Software API, update the REDB custom resource to reflect the change.
210233

211234

content/operate/kubernetes/upgrade/upgrade-olm.md

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,51 @@ linkTitle: OpenShift OperatorHub
1111
weight: 40
1212
---
1313

14-
## Before upgrading
14+
Redis implements rolling updates for software upgrades in Kubernetes deployments. The upgrade process includes updating three components:
1515

16-
1. Check [Supported Kubernetes distributions]({{< relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to make sure your Kubernetes distribution is supported.
16+
1. [Upgrade the Redis Enterprise operator](#upgrade-the-operator)
17+
1. [Upgrade the Redis Enterprise cluster (REC)](#upgrade-the-redis-enterprise-cluster-rec)
18+
1. [Upgrade Redis Enterprise databases (REDB)](#upgrade-databases)
1719

18-
2. Use `oc get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process.
20+
## Prerequisites
1921

20-
3. Verify you are upgrading from Redis Enterprise operator version 6.2.10-45 or later. If you are not, you must upgrade to 6.2.10-45 before upgrading to versions 6.2.18 or later.
22+
The following steps ensure you have the minimum versions of all components necessary to upgrade to 7.8.2-2. **Without these minimum versions, the upgrade will freeze and require manual recovery.**
23+
24+
See the [troubleshooting](#troubleshooting) section for details on recovering a failed upgrade.
25+
26+
### Kubernetes version
27+
28+
Check [Supported Kubernetes distributions]({{<relref "/operate/kubernetes/reference/supported_k8s_distributions" >}}) to make sure your Kubernetes distribution is supported by 7.8.2-2. If not, upgrade your Kubernetes distribution before upgrading the Redis operator.
29+
30+
### Redis operator version
31+
32+
Your Redis Enterprise clusters must be running version 7.4.2-2 or later before upgrading to 7.8.2-2. See the [7.4 upgrade]({{<relref "/operate/kubernetes/7.4.6/upgrade">}}) for detailed steps.
33+
34+
### Redis database version
35+
36+
Your Redis databases must be running version 7.2 or later before upgrading your cluster version to 7.8.2-2. See [upgrade databases](#upgrade-databases) for detailed steps. You can find your database version in the [REDB `spec.redisVersion` field]({{<relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}).
37+
38+
### RHEL9-compatible modules
39+
40+
Upgrading to Redis operator version 7.8.2-2 requires migrating your Redis Enterprise nodes to RHEL9 from either Ubuntu 18 or RHEL8. If your databases use modules, you need to manually install modules compatibile with RHEL9.
41+
42+
To see which modules you have installed, run:
43+
44+
```sh
45+
curl -k -u <rec_username>:<rec_password> -X GET https://localhost:9443/v1/modules | jq -r 'map([.module_name, .semantic_version, (.platforms | keys)]) | .[] | .[0] as $name | .[1] as $version | .[2][] | $name + "-" + $version + "-" + .' | sort
46+
```
47+
48+
To see which modules are currently in use, run:
49+
50+
```sh
51+
curl -k -u <rec_username>:<rec_password> -X GET https://localhost:9443/v1/bdbs | jq -r '.[].module_list | map(.module_name + "-" + .semantic_version) | .[]'
52+
```
53+
54+
See [Upgrade modules]({{<relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module">}}) for details on how to upgrade modules with the `rladmin` tool.
55+
56+
### Valid license
57+
58+
Use `kubectl get rec` and verify the `LICENSE STATE` is valid on your REC before you start the upgrade process.
2159

2260
## Upgrade the Redis Enterprise operator
2361

@@ -48,4 +86,32 @@ oc adm policy add-scc-to-user redis-enterprise-scc-v2 \
4886
system:serviceaccount:<my-project>:<rec-name>
4987
```
5088

51-
If you are upgrading from operator version 6.4.2-6 or before, see the [after upgrading section in the OpenShift CLI upgrade]({{<relref "/operate/kubernetes/upgrade/openshift-cli#after-upgrading">}}) to delete the old SCC and role binding after all clusters are running 6.4.2-6 or later.
89+
### Upgrade databases
90+
91+
After the cluster is upgraded, you can upgrade your databases. Specify your new database version in the `spec.redisVersion` field for your REDB and REAADB custom resources. Supported database versions for operator version 7.8.2-2 include `"7.2"` and `"7.4"` (note this value is a string).
92+
93+
Note that if your cluster [`redisUpgradePolicy`]({{<relref "/operate/kubernetes/reference/redis_enterprise_cluster_api#redisupgradepolicy" >}}) or your database [`redisVersion`]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api#redisversion" >}}) are set to `major`, you won't be able to upgrade those databases to minor versions. See [Redis upgrade policy]({{< relref "/operate/rs/installing-upgrading/upgrading#redis-upgrade-policy" >}}) for more details.
94+
95+
## Troubleshooting
96+
97+
If you start an upgrade without meeting the [prerequisites](#prerequisites), the operator will freeze the upgrade. Check the operator logs for the source of the error. The REDB reconsilliation doesn't work during an upgrade, so you need to apply a manual fix with the Redis Software API (examples below). The updates will also need to be added to the REDB custom resource.
98+
99+
### Invalid module version
100+
101+
If the operator logs show an event related to an unsupported module, download the updated module locally, and install it using the `v2/modules` API endpoint.
102+
103+
```sh
104+
curl -sfk -u <rec_username>:<rec_password> -X POST -F 'module=@<full path to your module>' https://localhost:9443/v2/modules
105+
```
106+
107+
After updating the modules with the Redis Software API, update the REDB custom resource to reflect the change.
108+
109+
### Invalid database version
110+
111+
If the operator logs show an event related to an incompatible database version, upgrade the database using the Redis Software API.
112+
113+
```sh
114+
curl -sfk -u <rec_username>:<rec_password> -X POST -H "Content-Type: application/json" -d '{"redis_version": <target redis version>}' https://localhost:9443/v1/bdbs/<BDB UID>/upgrade
115+
```
116+
117+
After updating the modules with the Redis Software API, update the REDB custom resource to reflect the change.

0 commit comments

Comments
 (0)