Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

crdb-docker

Local Redis Active-Active (CRDB) development environment: two single-node Redis Enterprise clusters in Docker joined into one Active-Active database. Useful for testing how applications behave against CRDB semantics (per-region stream raxes, CRDT conflict resolution, observed-remove deletes) without provisioning cloud infrastructure.

Dev/test only. Redis Enterprise in Docker is not a supported production topology.

Requirements

  • Docker with ≥6 GB memory for the VM (each Redis Enterprise node wants ~2 GB)
  • redislabs/redis image (multi-arch: amd64 and arm64)

Quick start

./setup.sh

This starts two containers (crdb-rs1, crdb-rs2), bootstraps a cluster in each (cluster1.local, cluster2.local), and creates an Active-Active database named crdb spanning both. When it finishes:

Region 1 Region 2
Redis endpoint localhost:12000 localhost:12001
Admin UI https://localhost:8443 https://localhost:8444
REST API https://localhost:9443 https://localhost:9444

Default credentials: admin@redis.local / redislabs.

Verify replication:

redis-cli -p 12000 set hello world
redis-cli -p 12001 get hello   # → "world" (after sync, usually <1s)

Configuration

Environment variables (or a .env file next to docker-compose.yml):

Variable Default Purpose
RS_IMAGE_TAG latest redislabs/redis image tag
RS_USER / RS_PASS admin@redis.local / redislabs Cluster admin credentials
CRDB_NAME crdb Database name (also ./setup.sh <name>)
CRDB_MEMORY 512mb Per-instance memory limit
RS1_DB_PORT / RS2_DB_PORT 12000 / 12001 Host ports for the database
RS1_UI_PORT / RS2_UI_PORT 8443 / 8444 Host ports for the admin UI
RS1_API_PORT / RS2_API_PORT 9443 / 9444 Host ports for the REST API

setup.sh is idempotent: re-running it skips clusters and databases that already exist.

Managing the CRDB

Run crdb-cli inside either container:

docker compose exec rs1 crdb-cli crdb list
docker compose exec rs1 crdb-cli crdb get --crdb-guid <guid>

Stream XADD ID uniqueness mode (strict | semi-strict | liberal):

docker compose exec rs1 rladmin tune db crdb crdt_xadd_id_uniqueness_mode strict

Teardown

docker compose down -v

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages