Apache Cassandra — a distributed, highly available wide-column NoSQL database built for massive write throughput and linear scalability with no single point of failure. Deployed as a single-node host-networked Nomad service.
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 10.1k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "cassandra"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Cassandra container image. Pin a tag in production.
image = "cassandra:5"
# Host port for the CQL native protocol (clients).
port = 9042
# Host port for inter-node communication (clustering).
internode_port = 7000
# The Cassandra cluster name.
cluster_name = "Nomploy Cluster"
# JVM max heap. Set within the task memory limit (Cassandra otherwise auto-sizes to host RAM).
max_heap_size = "2G"
# JVM young-generation heap size.
heap_newsize = "400M"
# Named volume for Cassandra data (/var/lib/cassandra).
data_volume = "cassandra_data"
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources. Cassandra is JVM/memory-heavy — keep memory above max_heap_size + off-heap.
resources = {
cpu = 1500
memory = 3072
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "cassandra" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "cassandra:5" | The Cassandra container image. Pin a tag in production. |
| port | number | 9042 | Host port for the CQL native protocol (clients). |
| internode_port | number | 7000 | Host port for inter-node communication (clustering). |
| cluster_name | string | "Nomploy Cluster" | The Cassandra cluster name. |
| max_heap_size | string | "2G" | JVM max heap. Set within the task memory limit (Cassandra otherwise auto-sizes to host RAM). |
| heap_newsize | string | "400M" | JVM young-generation heap size. |
| data_volume | string | "cassandra_data" | Named volume for Cassandra data (/var/lib/cassandra). |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 1500
memory = 3072
} | The task resources. Cassandra is JVM/memory-heavy — keep memory above max_heap_size + off-heap. |
No variables match.
This pack stores data in one Docker named volume:
cassandra_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/cassandra_data/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/cassandra_data/_data backup:<bucket>/cassandra_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.
Apache Cassandra is a distributed, highly available wide-column NoSQL database. It's built for huge write throughput and linear scalability with no single point of failure, tunable consistency, and a masterless peer-to-peer design — the engine behind many very large datasets.
This pack runs a single Cassandra node as a host-networked Nomad service.
nomad-pack run cassandra --registry=nomploy
Connect with cqlsh <node-ip> 9042 or any Cassandra driver.
| Variable | Default | Description |
|---|---|---|
image |
cassandra:5 |
Container image (pin a tag in production). |
port |
9042 |
CQL native protocol. |
internode_port |
7000 |
Inter-node communication (for a future cluster). |
cluster_name |
Nomploy Cluster |
Cassandra cluster name. |
max_heap_size |
2G |
JVM max heap — keep within the memory limit. |
heap_newsize |
400M |
JVM young-generation size. |
data_volume |
cassandra_data |
Volume for data (/var/lib/cassandra). |
resources |
1500 MHz / 3072 MB | CPU and memory (Cassandra is memory-heavy). |
Heap: by default the image sizes the JVM heap from host RAM, which will exceed the task's cgroup limit and get OOM-killed — this pack pins
MAX_HEAP_SIZE/HEAP_NEWSIZEso it fits. Keep them comfortably belowresources.memory. Authentication is open by default; enablePasswordAuthenticatorbefore exposing. Data persists indata_volume.