ClickHouse — a fast open-source column-oriented OLAP database for real-time analytics. Deployed as a host-networked Nomad service with a persistent Docker volume, HTTP and native ports, and a bootstrap user/database.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "clickhouse"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The ClickHouse server container image.
image = "clickhouse/clickhouse-server:latest"
# Host port for the HTTP interface (used by most clients, BI tools, and the play UI at /play).
http_port = 8123
# Host port for the native TCP protocol (clickhouse-client, native drivers).
tcp_port = 9000
# Database created on first boot.
db_name = "default"
# User created on first boot.
db_user = "default"
# Password for db_user. CHANGE THIS — empty means no password. Only applied on first boot.
db_password = "clickhouse"
# Docker named volume for /var/lib/clickhouse. The image's entrypoint fixes ownership on start, so a fresh volume works. Back it up.
data_volume = "clickhouse_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. ClickHouse likes memory — raise for real workloads.
resources = {
cpu = 1000
memory = 2048
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "clickhouse" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "clickhouse/clickhouse-server:latest" | The ClickHouse server container image. |
| http_port | number | 8123 | Host port for the HTTP interface (used by most clients, BI tools, and the play UI at /play). |
| tcp_port | number | 9000 | Host port for the native TCP protocol (clickhouse-client, native drivers). |
| db_name | string | "default" | Database created on first boot. |
| db_user | string | "default" | User created on first boot. |
| db_password key | string | "clickhouse" | Password for db_user. CHANGE THIS — empty means no password. Only applied on first boot. |
| data_volume | string | "clickhouse_data" | Docker named volume for /var/lib/clickhouse. The image's entrypoint fixes ownership on start, so a fresh volume works. 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 = 1000
memory = 2048
} | The task resources. ClickHouse likes memory — raise for real workloads. |
No variables match.
ClickHouse — a fast, open-source column-oriented OLAP database for real-time analytics over large datasets. Deployed as a host-networked Nomad service with a persistent Docker volume.
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run clickhouse --registry nomploy
In nomploy: create a Compose service, type Nomad Pack, pack clickhouse, custom
registry github.com/Nomploy/nomad-packs, then Deploy.
http://<node-ip>:8123 (most clients + the /play query UI).<node-ip>:9000 (clickhouse-client, native drivers).| Variable | Default | Notes |
|---|---|---|
image |
clickhouse/clickhouse-server:latest |
Pin a tag in production. |
http_port / tcp_port |
8123 / 9000 |
Set via a config.d override; change tcp_port if 9000 is taken. |
db_name / db_user / db_password |
default / default / clickhouse |
Created on first boot. Change the password (empty = no password). |
data_volume |
clickhouse_data |
/var/lib/clickhouse. Back it up. |
constraints |
[] |
Pin to a node so the local volume stays put. |
resources |
cpu 1000 / mem 2048 |
ClickHouse is memory-hungry; raise for real workloads. |
count is fixed to 1 (local volume). Pin with constraints. A
ClickHouse cluster (shards/replicas + Keeper) is out of scope for this pack.ulimit (262144) is set, as ClickHouse recommends.data_volume, or use BACKUP/clickhouse-backup.