Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
Title: Installation
Title: Install and upgrade
aliases: /integrate/redis-data-integration/ingest/installation/
alwaysopen: false
categories:
Expand All @@ -10,14 +10,14 @@ categories:
description: Learn how to install RDI
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Learn how to install RDI
description: Learn how to install and upgrade RDI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

group: di
hideListLinks: false
linkTitle: Installation
linkTitle: Install/upgrade
summary: Redis Data Integration keeps Redis in sync with the primary database in near
real time.
type: integration
weight: 2
---

The guides in this section explain the options you have for installing RDI.
The guides in this section explain the options you have for installing and upgrading RDI.
Before you use RDI, you must also configure your source database to use the CDC connector. See the
[Prepare source databases]({{< relref "/integrate/redis-data-integration/data-pipelines/prepare-dbs" >}})
section to learn how to do this.
150 changes: 150 additions & 0 deletions content/integrate/redis-data-integration/installation/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
Title: Upgrading RDI
alwaysopen: false
categories:
- docs
- integrate
- rs
- rdi
description: Learn how to upgrade an existing RDI installation
group: di
hideListLinks: false
linkTitle: Upgrade
summary: Redis Data Integration keeps Redis in sync with the primary database in near
real time.
type: integration
weight: 3
---

## Upgrading a VM installation

Follow the steps below to upgrade an existing
[VM installation]({{< relref "/integrate/redis-data-integration/installation/install-vm" >}})
of RDI:

1. Download the RDI installer from the
[Redis download center](https://cloud.redis.io/#/rlec-downloads)
(under the *Modules, Tools & Integration* dropdown) and extract it to your
preferred installation folder.

1. Go to the installation folder:

```bash
cd rdi_install/$RDI_VERSION
```

1. Run the `upgrade` script as a privileged user:

```bash
sudo ./upgrade.sh
```

### Recovering from failure during a VM upgrade

If the previous version is v1.4.4 or later, go to the `rdi_install/<NEW_VERSION>` directory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my mistake, it's not the NEW_VERSION, it's the previous version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

and run `sudo redis-di upgrade`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galilev If the previous version is higher than 1.4.4, shouldn't we be using the upgrade.sh script instead of the CLI?

Copy link
Contributor

@galilev galilev Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


If the version you are replacing is earlier than v1.4.4, follow these steps:

1. Run `redis-di --version` to check the current version.

If the version is the new one, copy the previous version
of the RDI CLI to `/usr/local/bin` with the following command:

```bash
sudo cp rdi_install/<PREVIOUS_VERSION>/deps/rdi-cli/<OS>/redis-di usr/local/bin
```

1. Check that the CLI version is correct by running `redis-di --version`.

Then, go to the `rdi_install/<PREVIOUS_VERSION>` directory and run the
following command;

```bash
sudo redis-di upgrade --rdi-host <RDI_REDIS_HOST> --rdi-port <RDI_REDIS_PORT>
```

{{< note >}}If the `collector-source` or the `processor` are not in the `Running` state during
the upgrade, you must run `redis-di deploy` and check again that they are both in the
`Running` state.
{{< /note >}}

### Upgrading a VM installation with High availability

If there is an active pipeline, the upgrade process will involve upgrading RDI on the active
Copy link
Collaborator

@ZdravkoDonev-redis ZdravkoDonev-redis Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galilev Why upgrading first the active version? Wouldn't you have 2 downtimes this way?

Scenario 1 - upgrade first the active RDI (RDI_instance_1) then the passive RDI (RDI_instance_2):

  1. Upgrade the Active RDI (RDI_instance_1) ---> Downtime, the passive RDI (RDI_instance_2) becomes the active one, since the active is now down
  2. Upgrade the newly active RDI (RDI_instance_2) ---> Downtime, the newly passive RDI (RDI_instance_1) becomes the active one, since the newly active RDI is down

Scenario 2 - upgrade first the passive RDI (RDI_instance_2) then the passive RDI (RDI_instance_1):

  1. Upgrade the passive RDI (RDI_instance_2) ---> no downtime, upgrade succeeds
  2. Upgrade the Active RDI (RDI_instance_1) ---> Downtime, the passive RDI (RDI_instance_2) becomes the active one, since the active is now down

Or am I missing something?

Copy link
Contributor

@galilev galilev Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZdravkoDonev-redis The upgrade won't trigger a switchover. We plan to upgrade the active RDI first, followed by the passive. @yaronp68 asked whether switching to RDI instance 2 and then upgrading RDI instance 1 would result in zero downtime. However, since a switchover itself requires downtime, this approach wouldn’t be beneficial

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

VM first which will cause downtime for the collector-source (see
[Upgrade a VM installation](#upgrade-a-vm-installation) above). Afterwards, the passive
VM will be upgraded. Switching over won't eliminate the downtime because switching between
VMs also requires a about a minute of downtime.
## Upgrading a Kubernetes installation
Follow the steps below to upgrade an existing
[Kubernetes]({{< relref "/integrate/redis-data-integration/installation/install-k8s" >}})
installation of RDI:
1. Download the new versions of the images, if you are using a private registry:
```bash
docker pull redis/rdi-processor:tagname
docker pull redis/rdi-operator:tagname
docker pull redis/rdi-api:tagname
docker pull redis/rdi-monitor:tagname
docker pull redis/rdi-collector-initializer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaronp68 what about the collector-api?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should also include it. It will not be an optional component anymore, so let's just add it here.

@galilev , please provide the command so that @andy-stark-redis can add it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy-stark-redis please add docker pull redis/rdi-collector-api

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

```
1. Download the RDI helm chart tar file from the
[Redis download center](https://cloud.redis.io/#/rlec-downloads).
1. Run the `helm upgrade` command:
```bash
helm upgrade [RELEASE_NAME] [CHART]
```
Note that you don't need to
[deploy]({{< relref "/integrate/redis-data-integration/data-pipelines/deploy" >}})
again after this step.

1. Download the latest `redis-di`.
Copy link
Contributor

@galilev galilev Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaronp68 can we remove it? They don't need it for the k8s installation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's remove it. Also, they cannot just get the latest CLI, it's part of the installation package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy-stark-redis please remove line 109

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


### Verifying the upgrade

Check the upgrade with the following command:

```bash
sudo k3s kubectl get all -n <namespace>
```

You should find that all the pods are running (they will have `1/1` in the `READY` column of the
command's output).
You can also check that the latest version is running using the following command on one of
the pods:
```bash
sudo k3s kubectl describe <pod_name> -n <namespace>
```
Search for the image tag `Image: docker.io/redis/<pod_name>:<version/image_tag>`
in the command's output to verify the version

### Recovering from failure during a Kubernetes upgrade

If you get an error during the upgrade or some deployments are not OK, then
Copy link
Collaborator

@dwdougherty dwdougherty Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If OK here is referring to a state shown in a command's output, then using OK is okay. :) Otherwise, use okay. This is not a Google style guide issue per se (it uses both OK and okay to mean the latter), but I've seen this rule on other style guides. Up to you.

Copy link
Contributor

@galilev galilev Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andy-stark-redis maybe we should add:

Run the command sudo k3s kubectl get all -n <namespace> and verify that all the pods are running and that the READY column for all the pods is 1/1. E.g. fornot okstate:

<pod_name> 0/1 CrashLoopBackOff 1881 (91s ago) 6d17h

Copy link
Contributor Author

@andy-stark-redis andy-stark-redis Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. (I've combined this section with the one above about verifying the installation, btw, since the recovery info is quite short and straightforward.)

run the `helm upgrade` command again, but with the previous version you were upgrading
from.

## What happens during the upgrade?

The upgrade process replaces the current RDI components with the new versions:

- Firstly, the control plane components are replaced. At this point, the pipeline
is still active but monitoring will be disconnected.

- Secondly, the pipeline data path components are replaced with the new versions.
If a pipeline is active while upgrading, the `collector-source` will be restarted
as a result of restarting the `collector-initializer`. The pipeline will pause for
about two minutes but it will catch up very quickly after restarting.
The pipeline data and state are both stored in Redis, so data will never normally
be lost during the downtime while upgrading.
Loading