Skip to content

Migrate from Redis to Valkey#3

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1764658935-redis-to-valkey-migration
Open

Migrate from Redis to Valkey#3
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1764658935-redis-to-valkey-migration

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Dec 2, 2025

Why I did it

Migrate SONiC from Redis to Valkey. Valkey is a Redis-compatible fork that serves as a drop-in replacement, providing continued open-source development and community support.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Replaced all Redis references with Valkey equivalents:

  • Replaced src/redis/ build directory with src/valkey/ (Valkey 8.0.1 from Debian repos)
  • Updated build rules: rules/redis.mkrules/valkey.mk, rules/redis.deprules/valkey.dep
  • Updated all docker-base-* Dockerfiles to install valkey-tools instead of redis-tools
  • Updated docker-database to use valkey-server and valkey-tools
  • Changed config path from /etc/redis/redis.conf to /etc/valkey/valkey.conf
  • Changed supervisord user from redis to valkey
  • Updated redis-cli wrapper script to call valkey-cli
  • Updated sonic-dpu-mgmt-traffic.sh to use valkey-cli

How to verify it

  1. Build SONiC image and verify valkey packages are installed correctly
  2. Verify database container starts with valkey-server
  3. Verify redis-cli wrapper correctly invokes valkey-cli
  4. Test database operations function correctly

Important items for reviewer to verify:

  • Valkey packages are available at packages.trafficmanager.net/public/valkey/ for buster/stretch architectures (armhf, arm64, amd64)
  • Valkey package creates the valkey user/group on installation
  • Config path /etc/valkey/valkey.conf is correct for Valkey package
  • No other redis-cli/redis-server references were missed in the codebase

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

Description for the changelog

Migrate from Redis to Valkey (Redis-compatible fork) for database services

Link to config_db schema for YANG module changes

N/A - No YANG model changes

A picture of a cute animal (not mandatory but encouraged)

Additional Information

This commit migrates SONiC from Redis to Valkey, a Redis-compatible fork.

Changes include:
- Replace src/redis with src/valkey for building Valkey packages
- Update rules/redis.mk and rules/redis.dep to rules/valkey.mk and rules/valkey.dep
- Update docker-database to use valkey-server and valkey-tools
- Update docker-base-* Dockerfiles to install valkey-tools instead of redis-tools
- Update supervisord.conf.j2 to run valkey-server with valkey user
- Update docker-database-init.sh to use valkey user for permissions
- Update redis-cli wrapper to call valkey-cli
- Update rules/docker-database.mk to reference valkey-cli
- Update sonic-dpu-mgmt-traffic.sh to use valkey-cli

Valkey is API-compatible with Redis, so existing code using Redis
commands and protocols will continue to work without modification.

Co-Authored-By: sunrusta@cisco.com <sunesh@yahoo.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants