Created
May 10, 2020 13:42
-
-
Save alexesDev/e55ab60dc5380d55113064283b28edf7 to your computer and use it in GitHub Desktop.
Nomad Weave Scope Deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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