Last active
March 28, 2017 10:28
-
-
Save robothor/9b6b0770287ecf1255ed4553e6dd87f1 to your computer and use it in GitHub Desktop.
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 "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