Nomploy Nomad Packs

← All packs

grafana v0.1.0

Observability

Grafana — the open observability platform for dashboards and visualization, deployed as a host-networked Nomad service with a persistent Docker volume for its database and plugins.

nomad-pack run grafana --registry nomploy
1 task http 3001 1 volume image grafana/grafana:latest
Variables 12
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Grafana container image.
image = "grafana/grafana:latest"

# Host port Grafana listens on (host networking). Default 3001 to avoid clashing with the nomploy panel on :3000. Pick a free port on the target node.
port = 3001

# Number of instances (keep at 1 — the default SQLite DB is local-disk).
count = 1

# Initial admin username.
admin_user = "admin"

# Initial admin password. CHANGE THIS — it is baked into the job env.
admin_password = "admin"

# Public URL Grafana believes it is served at (set when fronting it with a domain, e.g. https://grafana.example.com). Empty = use the host:port.
root_url = ""

# Docker named volume for /var/lib/grafana (SQLite DB, plugins). A fresh volume inherits the image's dir ownership (uid 472), so Grafana can write it.
data_volume = "grafana_data"

# Placement constraints — e.g. 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
"grafana"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"grafana/grafana:latest"
The Grafana container image.
port number
3001
Host port Grafana listens on (host networking). Default 3001 to avoid clashing with the nomploy panel on :3000. Pick a free port on the target node.
count number
1
Number of instances (keep at 1 — the default SQLite DB is local-disk).
admin_user string
"admin"
Initial admin username.
admin_password key string
"admin"
Initial admin password. CHANGE THIS — it is baked into the job env.
root_url string
""
Public URL Grafana believes it is served at (set when fronting it with a domain, e.g. https://grafana.example.com). Empty = use the host:port.
data_volume string
"grafana_data"
Docker named volume for /var/lib/grafana (SQLite DB, plugins). A fresh volume inherits the image's dir ownership (uid 472), so Grafana can write it.
constraints list
[]
Placement constraints — e.g. 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

grafana

Grafana as a host-networked Nomad service with a persistent Docker named volume for its SQLite database and plugins.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run grafana --registry nomploy --var admin_password=change-me

Or in nomploy: Create → Nomad Pack, pick grafana from the Nomploy registry.

Variables

Variable Default Description
job_name grafana Nomad job name
image grafana/grafana:latest Container image
port 3001 Host port (avoids the panel's :3000)
count 1 Keep at 1 (local SQLite DB)
admin_user admin Initial admin user
admin_password admin Change this
root_url "" Public URL when fronted by a domain
data_volume grafana_data Docker named volume for /var/lib/grafana
constraints [] Pin placement so the local volume stays put
resources {cpu=500, memory=512} Task resources

Notes