From 3e09de46ba7384f4189531612278c8a71fa23271 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Wed, 24 Apr 2024 15:27:17 +0200 Subject: [PATCH] docs(redict): document migration to redict Related to #561 Signed-off-by: Matej Focko --- docs/deployment/specifics/redict.md | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docs/deployment/specifics/redict.md diff --git a/docs/deployment/specifics/redict.md b/docs/deployment/specifics/redict.md new file mode 100644 index 0000000..c35d0ec --- /dev/null +++ b/docs/deployment/specifics/redict.md @@ -0,0 +1,48 @@ +--- +title: Redict +--- + +## Seamless migration between providers + +We have tested a seamless migration from Redis to Redict on our production +deployment. To reproduce: + +1. We have deployed Redict to our production cluster. +2. Using remote shell and `redict-cli` run: + + ```sh + replicaof redis 6379 + ``` + + This converts the Redict instance into a read-only replica of the Redis. + +3. After the data exchange is done, change **all** references in variables to + redis to point to the new hostname, in this case `redis → redict`. +4. Simultaneously run the deployment with the changed hostnames and via + `redict-cli` run: + + ```sh + replicaof no one + ``` + + to make the redict deployment the primary one. + +5. (optional) For safety reasons and easier rollback, it's possible to convert + the former Redis deployment into a replica of Redict, just in case it needs + to be reverted without loss of data. For this you can run in `redis-cli`: + + ```sh + replicaof redict 6379 + ``` + +:::warning References to Redis + +Redis is being referenced from: + +- `packit-service` (API endpoint) +- `packit-service-fedmsg` (Fedora Messaging listener) +- `packit-service-beat` (triggers periodic tasks) +- `packit-worker` (runs the jobs provided by API, Fedora Messaging and “beat”) +- `flower` (monitoring of the Celery queues) + +:::