Nomploy Nomad Packs

← All packs

rustfs v0.1.0

Object storage

RustFS — a high-performance, S3-compatible object storage server written in Rust (an Apache-2.0 MinIO alternative), with a built-in web console. Deployed as a single host-networked Nomad service.

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

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

2 tasks http 9000console 9001 1 volume image rustfs/rustfs:latest tracks :latest image bumped today
Variables 11
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The RustFS container image. Pin a tag in production.
image = "rustfs/rustfs:latest"

# Host port for the S3 API (RUSTFS_ADDRESS).
port = 9000

# Host port for the web console (RUSTFS_CONSOLE_ADDRESS).
console_port = 9001

# Root access key (RUSTFS_ACCESS_KEY). CHANGE THIS.
access_key = "rustfsadmin"

# Root secret key (RUSTFS_SECRET_KEY). CHANGE THIS.
secret_key = "rustfsadmin"

# Named volume mounted at /data (object storage).
data_volume = "rustfs_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
"rustfs"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"rustfs/rustfs:latest"
The RustFS container image. Pin a tag in production.
port number
9000
Host port for the S3 API (RUSTFS_ADDRESS).
console_port number
9001
Host port for the web console (RUSTFS_CONSOLE_ADDRESS).
access_key key string
"rustfsadmin"
Root access key (RUSTFS_ACCESS_KEY). CHANGE THIS.
secret_key key string
"rustfsadmin"
Root secret key (RUSTFS_SECRET_KEY). CHANGE THIS.
data_volume string
"rustfs_data"
Named volume mounted at /data (object storage).
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: rustfs_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/rustfs_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/rustfs_data/_data backup:<bucket>/rustfs_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

rustfs

RustFS — a high-performance, S3-compatible object storage server written in Rust, with a built-in web console. Apache-2.0 licensed, it's a drop-in MinIO alternative for backups, app storage and static assets — use it with any S3 client or SDK.

Single host-networked Nomad service exposing the S3 API and the console, backed by one persistent data volume.

Deploy

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

Configure

Variable Default Description
port 9000 S3 API port (RUSTFS_ADDRESS).
console_port 9001 Web console port (RUSTFS_CONSOLE_ADDRESS).
access_key rustfsadmin Change this. Root access key (RUSTFS_ACCESS_KEY).
secret_key rustfsadmin Change this. Root secret key (RUSTFS_SECRET_KEY).
image rustfs/rustfs:latest Container image. Pin a tag in production.
data_volume rustfs_data /data — object storage.
resources { cpu = 300, memory = 256 } Task resources. Bump for heavy workloads.

A prestart init task chowns the data volume to uid 10001 (RustFS runs unprivileged). Point S3 clients at http://<host>:9000 with the access/secret keys; the console is on :9001. Pin the job to the node holding the volume with constraints and back it up.