Skip to content

Commit e596891

Browse files
DOC-4753 added RDI upgrade guide
1 parent 02da4c1 commit e596891

File tree

2 files changed

+153
-3
lines changed

2 files changed

+153
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Title: Installation
2+
Title: Install and upgrade
33
aliases: /integrate/redis-data-integration/ingest/installation/
44
alwaysopen: false
55
categories:
@@ -10,14 +10,14 @@ categories:
1010
description: Learn how to install RDI
1111
group: di
1212
hideListLinks: false
13-
linkTitle: Installation
13+
linkTitle: Install/upgrade
1414
summary: Redis Data Integration keeps Redis in sync with the primary database in near
1515
real time.
1616
type: integration
1717
weight: 2
1818
---
1919

20-
The guides in this section explain the options you have for installing RDI.
20+
The guides in this section explain the options you have for installing and upgrading RDI.
2121
Before you use RDI, you must also configure your source database to use the CDC connector. See the
2222
[Prepare source databases]({{< relref "/integrate/redis-data-integration/data-pipelines/prepare-dbs" >}})
2323
section to learn how to do this.
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
Title: Upgrading RDI
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- integrate
7+
- rs
8+
- rdi
9+
description: Learn how to upgrade an existing RDI installation
10+
group: di
11+
hideListLinks: false
12+
linkTitle: Upgrade
13+
summary: Redis Data Integration keeps Redis in sync with the primary database in near
14+
real time.
15+
type: integration
16+
weight: 3
17+
---
18+
19+
## Upgrading a VM installation
20+
21+
Follow the steps below to upgrade an existing
22+
[VM installation]({{< relref "/integrate/redis-data-integration/installation/install-vm" >}})
23+
of RDI:
24+
25+
1. Download the RDI installer from the
26+
[Redis download center](https://cloud.redis.io/#/rlec-downloads)
27+
(under the *Modules, Tools & Integration* dropdown) and extract it to your
28+
preferred installation folder.
29+
30+
1. Go to the installation folder:
31+
32+
```bash
33+
cd rdi_install/$RDI_VERSION
34+
```
35+
36+
1. Run the `upgrade` script as a privileged user:
37+
38+
```bash
39+
sudo ./upgrade.sh
40+
```
41+
42+
### Recovering from failure during a VM upgrade
43+
44+
If the previous version is v1.4.4 or later, go to the `rdi_install/<NEW_VERSION>` directory
45+
and run `sudo redis-di upgrade`.
46+
47+
If the version you are replacing is earlier than v1.4.4, follow these steps:
48+
49+
1. Run `redis-di --version` to check the current version.
50+
51+
If the version is the new one, copy the previous version
52+
of the RDI CLI to `/usr/local/bin` with the following command:
53+
54+
```bash
55+
sudo cp rdi_install/<PREVIOUS_VERSION>/deps/rdi-cli/<OS>/redis-di usr/local/bin
56+
```
57+
58+
1. Check that the CLI version is correct by running `redis-di --version`.
59+
60+
Then, go to the `rdi_install/<PREVIOUS_VERSION>` directory and run the
61+
following command;
62+
63+
```bash
64+
sudo redis-di upgrade --rdi-host <RDI_REDIS_HOST> --rdi-port <RDI_REDIS_PORT>
65+
```
66+
67+
{{< note >}}If the `collector-source` or the `processor` are not in the `Running` state during
68+
the upgrade, you must run `redis-di deploy` and check again that they are both in the
69+
`Running` state.
70+
{{< /note >}}
71+
72+
### Upgrading a VM installation with High availability
73+
74+
If there is an active pipeline, the upgrade process will involve upgrading RDI on the active
75+
VM first which will cause downtime for the collector-source (see
76+
[Upgrade a VM installation](#upgrade-a-vm-installation) above). Afterwards, the passive
77+
VM will be upgraded. Switching over won't eliminate the downtime because switching between
78+
VMs also requires a about a minute of downtime.
79+
80+
## Upgrading a Kubernetes installation
81+
82+
Follow the steps below to upgrade an existing
83+
[Kubernetes]({{< relref "/integrate/redis-data-integration/installation/install-k8s" >}})
84+
installation of RDI:
85+
86+
1. Download the new versions of the images, if you are using a private registry:
87+
88+
```bash
89+
docker pull redis/rdi-processor:tagname
90+
docker pull redis/rdi-operator:tagname
91+
docker pull redis/rdi-api:tagname
92+
docker pull redis/rdi-monitor:tagname
93+
docker pull redis/rdi-collector-initializer
94+
```
95+
96+
1. Download the RDI helm chart tar file from the
97+
[Redis download center](https://cloud.redis.io/#/rlec-downloads).
98+
99+
1. Run the `helm upgrade` command:
100+
101+
```bash
102+
helm upgrade [RELEASE_NAME] [CHART]
103+
```
104+
105+
Note that you don't need to
106+
[deploy]({{< relref "/integrate/redis-data-integration/data-pipelines/deploy" >}})
107+
again after this step.
108+
109+
1. Download the latest `redis-di`.
110+
111+
### Verifying the upgrade
112+
113+
Check the upgrade with the following command:
114+
115+
```bash
116+
sudo k3s kubectl get all -n <namespace>
117+
```
118+
119+
You should find that all the pods are running (they will have `1/1` in the `READY` column of the
120+
command's output).
121+
122+
You can also check that the latest version is running using the following command on one of
123+
the pods:
124+
125+
```bash
126+
sudo k3s kubectl describe <pod_name> -n <namespace>
127+
```
128+
129+
Search for the image tag `Image: docker.io/redis/<pod_name>:<version/image_tag>`
130+
in the command's output to verify the version
131+
132+
### Recovering from failure during a Kubernetes upgrade
133+
134+
If you get an error during the upgrade or some deployments are not OK, then
135+
run the `helm upgrade` command again, but with the previous version you were upgrading
136+
from.
137+
138+
## What happens during the upgrade?
139+
140+
The upgrade process replaces the current RDI components with the new versions:
141+
142+
- Firstly, the control plane components are replaced. At this point, the pipeline
143+
is still active but monitoring will be disconnected.
144+
145+
- Secondly, the pipeline data path components are replaced with the new versions.
146+
If a pipeline is active while upgrading, the `collector-source` will be restarted
147+
as a result of restarting the `collector-initializer`. The pipeline will pause for
148+
about two minutes but it will catch up very quickly after restarting.
149+
The pipeline data and state are both stored in Redis, so data will never normally
150+
be lost during the downtime while upgrading.

0 commit comments

Comments
 (0)