Nomploy Nomad Packs

← All packs

redis v0.1.0

Databases

Redis — an in-memory data store used as a database, cache, and message broker, deployed as a host-networked Nomad service with AOF persistence on a Docker volume.

nomad-pack run redis --registry nomploy
1 task redis 6379 1 volume image redis:7-alpine
Variables 10
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Redis container image.
image = "redis:7-alpine"

# Host port Redis listens on (host networking). Pick a free port on the target node.
port = 6379

# Number of instances (keep at 1 — local-disk AOF, no built-in clustering here).
count = 1

# Optional requirepass password. Empty = no auth (only safe on a private/overlay network).
password = ""

# Docker named volume for /data, so the AOF/RDB survives restarts and reschedules.
data_volume = "redis_data"

# Placement constraints — e.g. pin to one node so the local volume stays put. 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
"redis"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"redis:7-alpine"
The Redis container image.
port number
6379
Host port Redis listens on (host networking). Pick a free port on the target node.
count number
1
Number of instances (keep at 1 — local-disk AOF, no built-in clustering here).
password key string
""
Optional requirepass password. Empty = no auth (only safe on a private/overlay network).
data_volume string
"redis_data"
Docker named volume for /data, so the AOF/RDB survives restarts and reschedules.
constraints list
[]
Placement constraints — e.g. pin to one node so the local volume stays put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
The task resources.
Readme

redis

Redis as a host-networked Nomad service with AOF persistence on a Docker named volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run redis --registry nomploy --var password=change-me

Or in nomploy: Create → Nomad Pack, pick redis from the Nomploy registry.

Variables

Variable Default Description
job_name redis Nomad job name
image redis:7-alpine Container image
port 6379 Host port (pick a free one per node)
count 1 Keep at 1 (local-disk AOF)
password "" requirepass password; empty = no auth
data_volume redis_data Docker named volume for /data
constraints [] Pin placement so the local volume stays put
resources {cpu=300, memory=256} Task resources

Notes