Nomploy Nomad Packs

← All packs

jenkins v0.1.0

Dev tools

Jenkins — the widely used open-source automation server for building, testing and deploying (CI/CD), with a huge plugin ecosystem. Deployed as a single host-networked Nomad service.

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

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

2 tasks http 8080agent 50000 1 volume image jenkins/jenkins:lts-jdk17 pinned :lts-jdk17 image bumped today
Variables 9
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Jenkins container image. Pin a tag in production.
image = "jenkins/jenkins:lts-jdk17"

# Host port for the Jenkins web UI.
port = 8080

# Port for inbound JNLP build agents (JENKINS_SLAVE_AGENT_PORT).
agent_port = 50000

# Named volume mounted at /var/jenkins_home (all Jenkins state).
data_volume = "jenkins_data"

# Placement constraints. 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
"jenkins"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"jenkins/jenkins:lts-jdk17"
The Jenkins container image. Pin a tag in production.
port number
8080
Host port for the Jenkins web UI.
agent_port number
50000
Port for inbound JNLP build agents (JENKINS_SLAVE_AGENT_PORT).
data_volume string
"jenkins_data"
Named volume mounted at /var/jenkins_home (all Jenkins state).
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 1000
    memory = 1024
  }
The task resources.
Back up this pack

This pack stores data in one Docker named volume: jenkins_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/jenkins_data/_data

rclone (sync to S3/R2)

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

jenkins

Jenkins — the widely used open-source automation server for CI/CD. Build, test and deploy with freestyle jobs or declarative Pipelines, distribute work to build agents, and extend it with a vast plugin ecosystem. This pack runs the controller (LTS, JDK 17) with a persistent home.

Single host-networked Nomad service with a persistent JENKINS_HOME volume.

Deploy

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

Configure

Variable Default Description
port 8080 Web UI port (--httpPort).
agent_port 50000 Inbound JNLP build-agent port.
image jenkins/jenkins:lts-jdk17 Container image. Pin a tag in production.
data_volume jenkins_data /var/jenkins_home — all Jenkins state.
resources { cpu = 1000, memory = 1024 } Task resources. The JVM needs headroom; bump for busy controllers.

First run: the setup wizard needs the initial admin password, printed in the task logs (and at /var/jenkins_home/secrets/initialAdminPassword). A prestart init task chowns the home volume to uid 1000. Run builds on agents rather than the controller for real workloads. Pin the job to the node holding the volume with constraints.