2018-03-05 18:23:28 +00:00
|
|
|
job "test1" {
|
2020-09-11 13:21:28 +00:00
|
|
|
|
|
|
|
datacenters = ["dc1", "dc2"]
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
|
|
|
type = "service"
|
2018-03-05 18:23:28 +00:00
|
|
|
|
|
|
|
group "t1" {
|
|
|
|
count = 3
|
2018-03-29 16:35:45 +00:00
|
|
|
|
2018-03-05 18:23:28 +00:00
|
|
|
task "t1" {
|
|
|
|
driver = "raw_exec"
|
2018-03-29 16:35:45 +00:00
|
|
|
|
2018-03-05 18:23:28 +00:00
|
|
|
config {
|
2018-03-29 16:35:45 +00:00
|
|
|
command = "bash"
|
|
|
|
args = ["-c", "lol 5000"]
|
2018-03-05 18:23:28 +00:00
|
|
|
}
|
|
|
|
}
|
2018-03-29 16:35:45 +00:00
|
|
|
|
2018-03-05 18:23:28 +00:00
|
|
|
update {
|
2018-03-29 16:35:45 +00:00
|
|
|
max_parallel = 1
|
|
|
|
min_healthy_time = "10s"
|
|
|
|
auto_revert = false
|
2018-03-05 18:23:28 +00:00
|
|
|
}
|
2018-03-29 16:35:45 +00:00
|
|
|
|
2018-03-05 18:23:28 +00:00
|
|
|
restart {
|
2018-03-29 16:35:45 +00:00
|
|
|
attempts = 0
|
|
|
|
delay = "0s"
|
|
|
|
mode = "fail"
|
2018-03-05 18:23:28 +00:00
|
|
|
}
|
2018-03-29 16:35:45 +00:00
|
|
|
|
2018-03-05 18:23:28 +00:00
|
|
|
reschedule {
|
2018-03-29 16:35:45 +00:00
|
|
|
attempts = 0
|
|
|
|
interval = "5m"
|
2018-03-29 12:42:10 +00:00
|
|
|
unlimited = false
|
2018-03-29 16:35:45 +00:00
|
|
|
}
|
2018-03-05 18:23:28 +00:00
|
|
|
}
|
2018-03-29 16:35:45 +00:00
|
|
|
}
|