786989dbe3
Adds new package that can be used by client and server RPC endpoints to facilitate monitoring based off of a logger clean up old code small comment about write rm old comment about minsize rename to Monitor Removes connection logic from monitor command Keep connection logic in endpoints, use a channel to send results from monitoring use new multisink logger and interfaces small test for dropped messages update go-hclogger and update sink/intercept logger interfaces
54 lines
989 B
HCL
54 lines
989 B
HCL
job "client" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "client" {
|
|
count = 6
|
|
|
|
task "agent" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "djenriquez/nomad:v0.6.0"
|
|
|
|
# command = "nomad"
|
|
args = ["agent"]
|
|
network_mode = "host"
|
|
volumes = ["local/config:/etc/nomad", "/var/run/docker.sock:/var/run/docker.sock", "/tmp:/tmp"]
|
|
privileged = true
|
|
}
|
|
|
|
resources {
|
|
cpu = 300
|
|
memory = 100
|
|
|
|
network {
|
|
mbits = 10
|
|
port "http" {}
|
|
}
|
|
}
|
|
|
|
template {
|
|
data = <<EOF
|
|
log_level = "DEBUG"
|
|
data_dir = "/tmp/nomad-client{{ env "NOMAD_ALLOC_INDEX" }}"
|
|
name = "client-{{ env "NOMAD_ALLOC_INDEX" }}"
|
|
enable_debug = true
|
|
client {
|
|
enabled = true
|
|
servers = ["127.0.0.1:4647"]
|
|
options {
|
|
"driver.raw_exec.enable" = "1"
|
|
}
|
|
}
|
|
|
|
ports {
|
|
http = {{ env "NOMAD_PORT_http" }}
|
|
}
|
|
EOF
|
|
|
|
destination = "local/config/client.hcl"
|
|
}
|
|
}
|
|
}
|
|
}
|