Files
spore-deployment/nomad/spore.hcl

146 lines
2.2 KiB
HCL

job "spore" {
datacenters = ["dc1"]
type = "service"
group "mqtt" {
count = 1
network {
mode = "host"
}
task "mqtt" {
driver = "docker"
config {
image = "eclipse-mosquitto:2.0"
network_mode = "host"
}
resources {
cpu = 100
memory = 128
}
}
}
group "gateway" {
count = 1
network {
mode = "host"
}
task "gateway" {
driver = "docker"
config {
image = "wirelos/spore-gateway:latest"
network_mode = "host"
}
env {
LOG_LEVEL = "info"
MQTT_SERVER = "tcp://localhost:1883"
MQTT_USER = ""
MQTT_PASSWORD = ""
}
resources {
cpu = 200
memory = 256
}
}
}
group "registry" {
count = 1
network {
mode = "host"
}
task "registry" {
driver = "docker"
config {
image = "wirelos/spore-registry:latest"
network_mode = "host"
volumes = [
"/opt/nomad/spore/data/registry:/data/registry"
]
}
env {
REGISTRY_PATH = "/data/registry"
DB_PATH = "/data/registry/registry.db"
}
resources {
cpu = 200
memory = 256
}
}
}
group "ledlab" {
count = 1
network {
mode = "host"
}
task "ledlab" {
driver = "docker"
config {
image = "wirelos/spore-ledlab:latest"
network_mode = "host"
}
env {
PORT = "8080"
UDP_PORT = "4210"
GATEWAY_URL = "http://localhost:3001"
FILTER_APP_LABEL = "pixelstream"
MATRIX_WIDTH = "16"
MATRIX_HEIGHT = "16"
FPS = "20"
}
resources {
cpu = 300
memory = 512
}
}
}
group "ui" {
count = 1
network {
mode = "host"
}
task "ui" {
driver = "docker"
config {
image = "wirelos/spore-ui:latest"
network_mode = "host"
}
env {
PORT = "3000"
}
resources {
cpu = 100
memory = 256
}
}
}
}