Redict
Seamless migration between providers
We have tested a seamless migration from Redis to Redict on our production deployment. To reproduce:
We have deployed Redict to our production cluster.
Defaults have been changed to:
with_redis: false
with_redict: trueThese can be changed in their respective
vars/
files.Run
DEPLOYMENT=prod TAGS=redict make deploy
Using remote shell and
redict-cli
run:replicaof redis 6379
This converts the Redict instance into a read-only replica of the Redis.
After the data exchange is done, change all references in variables to redis to point to the new hostname, in this case
redis → redict
.Run
DEPLOYMENT=prod TAGS=packit-service-beat,fedmsg,packit-worker,packit-service make deploy
Simultaneously run the deployment with the changed hostnames and via
redict-cli
run:replicaof no one
to make the redict deployment the primary one.
(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
:replicaof redict 6379
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)