2018-03-29 16:35:45 +00:00
|
|
|
job "test" {
|
2020-09-11 13:21:28 +00:00
|
|
|
|
|
|
|
datacenters = ["dc1", "dc2"]
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
|
|
|
type = "service"
|
2018-03-29 16:35:45 +00:00
|
|
|
|
|
|
|
group "t1" {
|
|
|
|
count = 3
|
|
|
|
|
|
|
|
task "t1" {
|
|
|
|
driver = "raw_exec"
|
|
|
|
|
|
|
|
config {
|
|
|
|
command = "bash"
|
|
|
|
args = ["-c", "sleep 5000"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
update {
|
2019-07-20 14:55:07 +00:00
|
|
|
canary = 3
|
|
|
|
max_parallel = 1
|
|
|
|
min_healthy_time = "1s"
|
|
|
|
auto_revert = true
|
|
|
|
healthy_deadline = "2s"
|
2018-04-26 20:46:28 +00:00
|
|
|
progress_deadline = "3s"
|
2018-03-29 16:35:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
restart {
|
|
|
|
attempts = 0
|
|
|
|
mode = "fail"
|
|
|
|
}
|
|
|
|
|
|
|
|
reschedule {
|
|
|
|
unlimited = "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|