2018-06-05 17:54:08 +00:00
|
|
|
job "demo2" {
|
2020-09-11 13:21:28 +00:00
|
|
|
|
|
|
|
datacenters = ["dc1", "dc2"]
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
|
|
|
type = "service"
|
2018-06-05 17:54:08 +00:00
|
|
|
|
|
|
|
group "t2" {
|
2020-09-29 15:02:16 +00:00
|
|
|
count = 1
|
2018-06-05 17:54:08 +00:00
|
|
|
|
|
|
|
task "t2" {
|
|
|
|
driver = "raw_exec"
|
|
|
|
|
|
|
|
config {
|
|
|
|
command = "bash"
|
2020-09-29 15:02:16 +00:00
|
|
|
args = ["-c", "sleep 300"]
|
2018-06-05 17:54:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
update {
|
2020-09-29 15:02:16 +00:00
|
|
|
# we want the first allocation to take a while to become healthy,
|
|
|
|
# so that we can check the deployment's progress deadline before
|
|
|
|
# and after it becomes healthy
|
|
|
|
min_healthy_time = "10s"
|
|
|
|
healthy_deadline = "15s"
|
|
|
|
progress_deadline = "20s"
|
|
|
|
|
|
|
|
max_parallel = 1
|
|
|
|
auto_revert = false
|
2018-06-05 17:54:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
restart {
|
|
|
|
attempts = 0
|
|
|
|
mode = "fail"
|
|
|
|
}
|
|
|
|
|
|
|
|
reschedule {
|
2019-07-20 14:55:07 +00:00
|
|
|
unlimited = "true"
|
2018-06-05 17:54:08 +00:00
|
|
|
delay_function = "constant"
|
2019-07-20 14:55:07 +00:00
|
|
|
delay = "5s"
|
2018-06-05 17:54:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|