2019-05-20 15:37:36 +00:00
|
|
|
job "deployment_auto.nomad" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
|
|
|
|
group "one" {
|
|
|
|
count = 3
|
|
|
|
|
|
|
|
update {
|
|
|
|
max_parallel = 3
|
|
|
|
auto_promote = true
|
|
|
|
canary = 2
|
|
|
|
}
|
|
|
|
|
|
|
|
task "one" {
|
|
|
|
driver = "raw_exec"
|
|
|
|
|
|
|
|
config {
|
|
|
|
command = "/bin/sleep"
|
2019-05-21 20:28:11 +00:00
|
|
|
# change args to update the job, the only changes
|
2019-05-20 15:37:36 +00:00
|
|
|
args = ["1000000"]
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 20
|
|
|
|
memory = 20
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
group "two" {
|
|
|
|
count = 3
|
|
|
|
|
|
|
|
update {
|
|
|
|
max_parallel = 2
|
|
|
|
auto_promote = true
|
|
|
|
canary = 2
|
2019-05-21 13:21:44 +00:00
|
|
|
min_healthy_time = "2s"
|
2019-05-20 15:37:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task "two" {
|
|
|
|
driver = "raw_exec"
|
|
|
|
|
|
|
|
config {
|
|
|
|
command = "/bin/sleep"
|
2019-05-21 20:28:11 +00:00
|
|
|
# change args to update the job, the only changes
|
|
|
|
args = ["2000000"]
|
2019-05-20 15:37:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 20
|
|
|
|
memory = 20
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|