Nomploy Nomad Packs

← All packs

cockroachdb v0.1.0

Databases

CockroachDB — a distributed SQL database that speaks the PostgreSQL wire protocol, with strong consistency and horizontal scale. Deployed here as a single-node, insecure instance for dev/homelab, host-networked with a data volume and the built-in DB Console.

nomad-pack run cockroachdb --registry nomploy
1 task sql 26257http 8085 1 volume image cockroachdb/cockroach:latest
Variables 9
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The CockroachDB container image. Pin a tag in production.
image = "cockroachdb/cockroach:latest"

# Host port for the SQL / PostgreSQL wire protocol.
sql_port = 26257

# Host port for the DB Console (web UI).
http_port = 8085

# Named volume for the database store (/cockroach/cockroach-data).
data_volume = "cockroachdb_data"

# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 1000
    memory = 1024
  }
NameTypeDefaultDescription
job_name string
"cockroachdb"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"cockroachdb/cockroach:latest"
The CockroachDB container image. Pin a tag in production.
sql_port number
26257
Host port for the SQL / PostgreSQL wire protocol.
http_port number
8085
Host port for the DB Console (web UI).
data_volume string
"cockroachdb_data"
Named volume for the database store (/cockroach/cockroach-data).
constraints list
[]
Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 1000
    memory = 1024
  }
The task resources.
Readme

cockroachdb

CockroachDB — a distributed SQL database that speaks the PostgreSQL wire protocol, with strong consistency and horizontal scale.

This pack runs a single-node, insecure instance (great for dev/homelab), host-networked with a data volume and the built-in DB Console.

Deploy

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

Configure

Variable Default Description
sql_port 26257 SQL / Postgres wire port.
http_port 8085 DB Console (web UI) port.
data_volume cockroachdb_data /cockroach/cockroach-data — the store.
image cockroachdb/cockroach:latest Container image. Pin a tag in production.
resources { cpu = 1000, memory = 1024 } Task resources.

Connect

# any Postgres client, user "root", no password (insecure mode)
psql "postgresql://root@<node-ip>:26257/defaultdb?sslmode=disable"

--insecure means no authentication and no TLS — use only on a trusted network. For production, run a secure multi-node cluster with certificates. Pin the job to the node holding the volume with constraints.