Nomploy Nomad Packs

← All packs

surrealdb v0.1.0

Databases

SurrealDB — a scalable, multi-model database (document, graph, relational, and more) with a SQL-like query language, queryable over HTTP and WebSocket. Deployed as a host-networked Nomad service with RocksDB storage on a persistent volume.

nomad-pack run surrealdb --registry nomploy
1 task http 8000 1 volume image surrealdb/surrealdb:latest
Variables 10
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The SurrealDB container image. Pin a tag in production.
image = "surrealdb/surrealdb:latest"

# Host port for the SurrealDB HTTP/WebSocket API.
port = 8000

# Initial root username (created on first start, then persisted in storage).
root_user = "root"

# Initial root password. CHANGE THIS.
root_password = "root"

# Docker named volume for /data (the RocksDB storage). SurrealDB runs as root, so a fresh volume is writable. Back it up.
data_volume = "surrealdb_data"

# Placement constraints — 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    = 500
    memory = 512
  }
NameTypeDefaultDescription
job_name string
"surrealdb"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"surrealdb/surrealdb:latest"
The SurrealDB container image. Pin a tag in production.
port number
8000
Host port for the SurrealDB HTTP/WebSocket API.
root_user string
"root"
Initial root username (created on first start, then persisted in storage).
root_password key string
"root"
Initial root password. CHANGE THIS.
data_volume string
"surrealdb_data"
Docker named volume for /data (the RocksDB storage). SurrealDB runs as root, so a fresh volume is writable. Back it up.
constraints list
[]
Placement constraints — 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    = 500
    memory = 512
  }
The task resources.
Readme

surrealdb

SurrealDB — a scalable, multi-model database (document, graph, relational, time-series) with a SQL-like query language (SurrealQL), queryable over HTTP and WebSocket. Host-networked Nomad service with on-disk RocksDB storage on a persistent volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run surrealdb --registry nomploy --var root_password=<secret>

In nomploy: create a Compose service, type Nomad Pack, pack surrealdb, set root_password, then Deploy. Endpoint at http://<node-ip>:8000.

Key variables

Variable Default Notes
image surrealdb/surrealdb:latest Pin a tag in production.
port 8000 HTTP + WebSocket API.
root_user / root_password root / root Root creds, persisted on first start. Change the password.
data_volume surrealdb_data RocksDB storage. Back it up.
constraints [] Pin to a node so the local volume stays put.
resources cpu 500 / mem 512 Raise for larger workloads.

Notes