|
| 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/<PREVIOUS_VERSION>` |
| 45 | +directory and run `sudo ./upgrade.sh`, as described in the section |
| 46 | +[Upgrading a VM installation](#upgrading-a-vm-installation) above. |
| 47 | + |
| 48 | +If the version you are replacing is earlier than v1.4.4, follow these steps: |
| 49 | + |
| 50 | +1. Run `redis-di --version` to check the current version. |
| 51 | + |
| 52 | + If the version is the new one, copy the previous version |
| 53 | + of the RDI CLI to `/usr/local/bin` with the following command: |
| 54 | + |
| 55 | + ```bash |
| 56 | + sudo cp rdi_install/<PREVIOUS_VERSION>/deps/rdi-cli/<OS>/redis-di usr/local/bin |
| 57 | + ``` |
| 58 | + |
| 59 | +1. Check that the CLI version is correct by running `redis-di --version`. |
| 60 | + |
| 61 | + Then, go to the `rdi_install/<PREVIOUS_VERSION>` directory and run the |
| 62 | + following command; |
| 63 | + |
| 64 | + ```bash |
| 65 | + sudo redis-di upgrade --rdi-host <RDI_REDIS_HOST> --rdi-port <RDI_REDIS_PORT> |
| 66 | + ``` |
| 67 | + |
| 68 | +{{< note >}}If the `collector-source` or the `processor` are not in the `Running` state during |
| 69 | +the upgrade, you must run `redis-di deploy` and check again that they are both in the |
| 70 | +`Running` state. |
| 71 | +{{< /note >}} |
| 72 | + |
| 73 | +### Upgrading a VM installation with High availability |
| 74 | + |
| 75 | +If there is an active pipeline, the upgrade process will involve upgrading RDI on the active |
| 76 | +VM first which will cause downtime for the collector-source (see |
| 77 | +[Upgrade a VM installation](#upgrade-a-vm-installation) above). Afterwards, the passive |
| 78 | +VM will be upgraded. Switching over won't eliminate the downtime because switching between |
| 79 | +VMs also requires a about a minute of downtime. |
| 80 | +
|
| 81 | +## Upgrading a Kubernetes installation |
| 82 | +
|
| 83 | +Follow the steps below to upgrade an existing |
| 84 | +[Kubernetes]({{< relref "/integrate/redis-data-integration/installation/install-k8s" >}}) |
| 85 | +installation of RDI: |
| 86 | +
|
| 87 | +1. Download the new versions of the images, if you are using a private registry: |
| 88 | +
|
| 89 | + ```bash |
| 90 | + docker pull redis/rdi-processor:tagname |
| 91 | + docker pull redis/rdi-operator:tagname |
| 92 | + docker pull redis/rdi-api:tagname |
| 93 | + docker pull redis/rdi-monitor:tagname |
| 94 | + docker pull redis/rdi-collector-initializer |
| 95 | + docker pull redis/rdi-collector-api |
| 96 | + ``` |
| 97 | +
|
| 98 | +1. Download the RDI helm chart tar file from the |
| 99 | + [Redis download center](https://cloud.redis.io/#/rlec-downloads). |
| 100 | +
|
| 101 | +1. Run the `helm upgrade` command: |
| 102 | + |
| 103 | + ```bash |
| 104 | + helm upgrade [RELEASE_NAME] [CHART] |
| 105 | + ``` |
| 106 | +
|
| 107 | + Note that you don't need to |
| 108 | + [deploy]({{< relref "/integrate/redis-data-integration/data-pipelines/deploy" >}}) |
| 109 | + again after this step. |
| 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 | +Check for any pods that don't have `1/1` in the `READY` column (which is the second |
| 122 | +column). For example, the pod below has `0/1` in the second column, which indicates the |
| 123 | +deployment hasn't worked: |
| 124 | +
|
| 125 | +```bash |
| 126 | +<pod_name> 0/1 CrashLoopBackOff 1881 (91s ago) 6d17h |
| 127 | +``` |
| 128 | +
|
| 129 | +You can also check that the latest version is running using the following command on one of |
| 130 | +the pods: |
| 131 | +
|
| 132 | +```bash |
| 133 | +sudo k3s kubectl describe <pod_name> -n <namespace> |
| 134 | +``` |
| 135 | +
|
| 136 | +Search for the image tag `Image: docker.io/redis/<pod_name>:<version/image_tag>` |
| 137 | +in the command's output to verify the version. |
| 138 | + |
| 139 | +If you find that the upgrade hasn't worked for any reason, then run the `helm upgrade` |
| 140 | +command again (as described in the section |
| 141 | +[Upgrading a Kubernetes installation](#upgrading-a-kubernetes-installation) above), |
| 142 | +but this time with the previous version you were upgrading from. This will restore your |
| 143 | +previous working state. |
| 144 | +
|
| 145 | +## What happens during the upgrade? |
| 146 | +
|
| 147 | +The upgrade process replaces the current RDI components with the new versions: |
| 148 | +
|
| 149 | +- Firstly, the control plane components are replaced. At this point, the pipeline |
| 150 | + is still active but monitoring will be disconnected. |
| 151 | +
|
| 152 | +- Secondly, the pipeline data path components are replaced with the new versions. |
| 153 | + If a pipeline is active while upgrading, the `collector-source` will be restarted |
| 154 | + as a result of restarting the `collector-initializer`. The pipeline will pause for |
| 155 | + about two minutes but it will catch up very quickly after restarting. |
| 156 | + The pipeline data and state are both stored in Redis, so data will never normally |
| 157 | + be lost during the downtime while upgrading. |
0 commit comments