Nomploy Nomad Packs

← All packs

garnet v0.1.0

Databases

Garnet — a high-performance, Redis-compatible (RESP) cache-store from Microsoft Research. A drop-in replacement for Redis with strong throughput and latency. Deployed as a single host-networked Nomad service.

nomad-pack run garnet --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- garnet

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

2 tasks resp 6379 1 volume image ghcr.io/microsoft/garnet:latest tracks :latest image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run garnet -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "garnet"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Garnet container image. Pin a tag in production.
image = "ghcr.io/microsoft/garnet:latest"

# Port for the RESP (Redis) protocol.
port = 6379

# Enable the append-only file for durability across restarts (--aof). Disable for a pure in-memory cache.
aof = true

# Named volume mounted at /data (checkpoints + append-only file).
data_volume = "garnet_data"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"garnet"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"ghcr.io/microsoft/garnet:latest"
The Garnet container image. Pin a tag in production.
port number
6379
Port for the RESP (Redis) protocol.
aof bool
true
Enable the append-only file for durability across restarts (--aof). Disable for a pure in-memory cache.
data_volume string
"garnet_data"
Named volume mounted at /data (checkpoints + append-only file).
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
The task resources.
Back up this pack

This pack stores data in one Docker named volume: garnet_data

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/garnet_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/garnet_data/_data backup:<bucket>/garnet_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

garnet

Garnet — a high-performance, Redis-compatible cache-store from Microsoft Research. It speaks the RESP wire protocol, so unmodified Redis clients work against it, while offering excellent throughput, low latency and optional disk persistence. A drop-in alternative to Redis/Valkey.

Single host-networked Nomad service with a persistent data volume.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run garnet --registry=nomploy

Configure

Variable Default Description
port 6379 RESP (Redis) protocol port.
aof true Enable the append-only file for durability (--aof). Set false for a pure in-memory cache.
image ghcr.io/microsoft/garnet:latest Container image. Pin a tag in production.
data_volume garnet_data /data — checkpoints and the append-only file.
resources { cpu = 300, memory = 256 } Task resources. Bump memory for large datasets.

Connect with any Redis client: redis-cli -h <host> -p 6379. A prestart init task makes the data volume writable. With aof = true, data survives restarts; disable it (and the app becomes a fast volatile cache). Pin the job to the node holding the volume with constraints, and don't expose the port to untrusted networks (no auth by default).