Currently, when a service deployment happens, levant assumes that the Job will have the update stanza assigned to it
I currently use a template that looks like this:
job "tsg-v1" {
type = "service"
datacenters = ["us-east-1a"]
group "deployment" {
constraint {
distinct_hosts = true
}
constraint {
operator = "="
attribute = "${meta.role}"
value = "api-server"
}
update {
health_check = "task_states"
max_parallel = 1
stagger = "10s"
}
Notice that the update stanza is in the group, therefore, the levant deployment throws the following info message:
2018/04/20 12:48:05 UTC [INFO] levant/deploy: job tsg-v1 is not configured with update stanza, consider adding to use deployments
This is because of the following code in levant:
// If the service job doesn't have an update stanza, the job will not use
// Nomad deployments.
if l.config.Job.Update == nil {
logging.Info("levant/deploy: job %s is not configured with update stanza, consider adding to use deployments", *l.config.Job.Name)
return l.jobStatusChecker(&eval.EvalID)
}
Would you be happy to check for a group update stanza here as well?