Nomploy Nomad Packs

← All packs

activemq v0.1.0

Messaging

Apache ActiveMQ Artemis — a high-performance multi-protocol message broker (AMQP, MQTT, STOMP, OpenWire, core JMS) with a web management console. Deployed as a single host-networked Nomad service.

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

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

1 task http 8161core 61616amqp 5672mqtt 1883stomp 61613 1 volume image apache/activemq-artemis:latest-alpine pinned :latest-alpine image bumped today
Variables 14
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The ActiveMQ Artemis container image. Pin a tag in production.
image = "apache/activemq-artemis:latest-alpine"

# Host port for the web management console.
port = 8161

# Host port for the core/OpenWire protocol.
core_port = 61616

# Host port for AMQP.
amqp_port = 5672

# Host port for MQTT.
mqtt_port = 1883

# Host port for STOMP.
stomp_port = 61613

# Broker admin username.
admin_user = "admin"

# Broker admin password. CHANGE THIS.
admin_password = "activemq_change_me"

# Named volume for the broker instance (data, config, logs) (/var/lib/artemis-instance).
data_volume = "activemq_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
"activemq"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"apache/activemq-artemis:latest-alpine"
The ActiveMQ Artemis container image. Pin a tag in production.
port number
8161
Host port for the web management console.
core_port number
61616
Host port for the core/OpenWire protocol.
amqp_port number
5672
Host port for AMQP.
mqtt_port number
1883
Host port for MQTT.
stomp_port number
61613
Host port for STOMP.
admin_user string
"admin"
Broker admin username.
admin_password set me string
"activemq_change_me"
Broker admin password. CHANGE THIS.
data_volume string
"activemq_data"
Named volume for the broker instance (data, config, logs) (/var/lib/artemis-instance).
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: activemq_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/activemq_data/_data

rclone (sync to S3/R2)

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

activemq

Apache ActiveMQ Artemis is a high-performance, multi-protocol message broker. One broker speaks AMQP, MQTT, STOMP, OpenWire and core JMS, with durable queues and topics, large-message and flow control, clustering, and a web management console (Hawtio) for queues, addresses and diagnostics.

This pack runs ActiveMQ Artemis as a single host-networked Nomad service.

Deploy

nomad-pack run activemq --registry=nomploy \
  --var admin_password=$(openssl rand -hex 16)

Open http://<node-ip>:8161/console and log in as admin.

Configuration

Variable Default Description
image apache/activemq-artemis:latest-alpine Container image (pin a tag in production).
port 8161 Web management console.
core_port 61616 Core / OpenWire protocol.
amqp_port 5672 AMQP.
mqtt_port 1883 MQTT.
stomp_port 61613 STOMP.
admin_user admin Broker admin username.
admin_password activemq_change_me Broker admin password — change this.
data_volume activemq_data Volume for the broker instance.
resources 1000 MHz / 1024 MB CPU and memory for the task.

The broker instance persists in data_volume at /var/lib/artemis-instance.