Skip to content

Instantly share code, notes, and snippets.

@alexesDev
Created May 10, 2020 13:42
Show Gist options
  • Save alexesDev/e55ab60dc5380d55113064283b28edf7 to your computer and use it in GitHub Desktop.
Save alexesDev/e55ab60dc5380d55113064283b28edf7 to your computer and use it in GitHub Desktop.
Nomad Weave Scope Deployment
job "scope-agent" {
type = "system"
datacenters = ["dc1"]
group "scope-agent" {
task "scope-agent" {
driver = "docker"
config {
image = "weaveworks/scope:1.13.0"
network_mode = "host"
pid_mode = "host"
privileged = true
args = [
"--probe-only",
"--probe.docker=true",
"scope-app.service.dc1.consul:4040",
]
volumes = [
"/var/run/docker.sock:/var/run/docker.sock",
"/var/run/scope/plugins:/var/run/scope/plugins",
"/sys/kernel/debug:/sys/kernel/debug",
]
labels = {
"works.weave.role" = "system"
}
}
env {
CHECKPOINT_DISABLE = "yes"
}
resources {
cpu = 100
memory = 128
}
}
}
group "scope-traffic-control" {
task "scope-traffic-control" {
driver = "docker"
config {
image = "weaveworksplugins/scope-traffic-control"
network_mode = "host"
pid_mode = "host"
privileged = true
volumes = [
"/var/run:/var/run",
]
}
resources {
cpu = 100
memory = 128
}
}
}
}
job "scope-app" {
type = "service"
datacenters = ["dc1"]
group "scope-app" {
task "scope-app" {
driver = "docker"
config {
image = "weaveworks/scope:1.13.0"
network_mode = "weave"
command = "/home/weave/scope"
args = ["--mode=app"]
}
resources {
cpu = 100
memory = 128
}
env {
CHECKPOINT_DISABLE = "yes"
}
service {
name = "scope-app"
port = 4040
address_mode = "driver"
tags = [
"traefik.http.routers.scope.rule=Host(`scope.xxxx.xip.io`)"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment