Let’s assume we have the following simple job-file:
job "thinywebapp" {
datacenters = [ "isys_poc" ]
group "demo" {
count = 1
network {
port "http" {
to = 9000
}
}
task "webapp" {
driver = "docker"
config {
image = "whatever"
ports = [ "http" ]
}
service {
port = "http"
}
}
}
}
When the job is updated (version-number of image increased for example), the actual allocation is stopped and a new one started.
However, is there apossibility to change the order? To start the new allocation first, wait min_healthy_time and if the new one is healty stop the old one?
This would ensure a zero-down-time.