Install With Docker Compose

Start three Meta voters and one primary–follower Group with the 0.1.0 cluster image.

Understand The Example

This single-host lab uses eloqdata/lavik:0.1.0-cluster, three Meta voters and two Data nodes in Redis Cluster mode. One Group owns all 16,384 slots. Named volumes preserve Meta and Data state. Three containers on one host do not provide host-level HA; place members on separate hosts for that failure domain.

The private Docker network is 172.30.92.0/24; check for conflicts before starting. Host ports 6379 and 6380 bind only to loopback. Cluster clients must reach the advertised container addresses, so run these client examples inside the Compose network. Internal control traffic is plaintext in this local lab.

1. Download And Start

Linux · bash
mkdir lavik-0.1.0-cluster && cd lavik-0.1.0-cluster
curl -fLO --retry 3 https://raw.githubusercontent.com/eloqdata/lavik-agent/3341d7d86ade7744bd0631c0feca9fa683cf25e4/packaging/docker/0.1.0/compose.yaml &&
printf '%s\n' 'b28515b59097da99ec485ca54767957109619d7387cd3cc3266b388992de7453  compose.yaml' | sha256sum -c -
curl -fLO --retry 3 https://raw.githubusercontent.com/eloqdata/lavik-agent/3341d7d86ade7744bd0631c0feca9fa683cf25e4/packaging/docker/0.1.0/cluster.toml &&
printf '%s\n' '8810dacc1849ae707d17ceb450d10c2bb8e925c3fc3a609004a94dd4c96a846d  cluster.toml' | sha256sum -c -
Linux · bash
docker compose pull
docker compose up -d
docker compose logs bootstrap
docker compose ps
docker compose exec -T meta-1 lavik-ctl cluster-status   --socket /data/meta/meta-admin.sock --allow-plaintext-admin --json

Data nodes open their Redis port after Meta commits creation. The bootstrap service waits for Meta health and Data process startup, then creates the topology once. Exit status 2 or 3 from cluster-status means not ready or unavailable; inspect progress and retry the status read, not cluster-create.

2. Read And Write

Linux · bash
docker compose exec -T primary redis-cli -c SET greeting 'hello from Lavik'
docker compose exec -T primary redis-cli -c GET greeting
docker compose exec -T follower redis-cli --raw <<'COMMANDS'
READONLY
GET greeting
COMMANDS

The follower read can lag the primary. READONLY and GET must use the same connection. Multi-key requests in Cluster mode must use keys in the same hash slot.

3. Restart Without Reinitializing

Linux · bash
docker compose stop --timeout 60
docker compose up -d
docker compose exec -T meta-1 lavik-ctl cluster-status   --socket /data/meta/meta-admin.sock --allow-plaintext-admin --json

Keep the five named volumes. Do not run docker compose down -v to restart: that deletes stored state. The 0.1.0 image recognizes Meta’s RAFT marker and omits the initial manifest on restart. Keep the original member identities and manifest.

Manage Failover And Monitoring With lavik-ctl →