Skip to content

Instantly share code, notes, and snippets.

@robothor
Last active March 28, 2017 10:28
Show Gist options
  • Save robothor/9b6b0770287ecf1255ed4553e6dd87f1 to your computer and use it in GitHub Desktop.
Save robothor/9b6b0770287ecf1255ed4553e6dd87f1 to your computer and use it in GitHub Desktop.
job "mtl-example" {
datacenters = ["eu-west-1"]
type = "service"
update {
stagger = "10s"
max_parallel = 1
}
group "mtl-test" {
count = 1
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
ephemeral_disk {
sticky = false
migrate = false
size = 500
}
task "mtl-example" {
driver = "exec"
config {
command = "/bin/echo"
args = ["${NOMAD_ALLOC_DIR}", "${NOMAD_TASK_NAME}", "${NOMAD_PORT_mtl_sleep_yours}", "${NOMAD_PORT_three}"]
}
resources {
cpu = 100
memory = 100
network {
port "one" {}
port "two" {}
port "three" {}
}
}
}
task "mtl-sleep" {
driver = "exec"
config {
command = "/bin/sleep"
args = ["10000"]
}
resources {
cpu = 100
memory = 100
network {
mbits = 100
port "yours" {}
port "mine" {}
}
}
}
task "mtl-env" {
driver = "exec"
config {
command = "/usr/bin/env"
}
resources {
cpu = 100
memory = 100
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment