diff --git a/command/asset/connect-short.nomad.hcl b/command/asset/connect-short.nomad.hcl index 91a1948be81..c5a643558b0 100644 --- a/command/asset/connect-short.nomad.hcl +++ b/command/asset/connect-short.nomad.hcl @@ -15,7 +15,8 @@ job "countdash" { } task "web" { - driver = "docker" + driver = "docker" + shutdown_delay = "10s" config { image = "hashicorpdev/counter-api:v3" @@ -51,7 +52,8 @@ job "countdash" { } task "dashboard" { - driver = "docker" + driver = "docker" + shutdown_delay = "10s" env { COUNTING_SERVICE_URL = "http://${NOMAD_UPSTREAM_ADDR_count_api}" diff --git a/command/asset/connect.nomad.hcl b/command/asset/connect.nomad.hcl index 935a23d4c94..8e2344b583c 100644 --- a/command/asset/connect.nomad.hcl +++ b/command/asset/connect.nomad.hcl @@ -122,6 +122,17 @@ job "countdash" { auth_soft_fail = true } + # Specifies the duration to wait when killing a task between removing its + # service registrations from Consul or Nomad, and sending it a shutdown + # signal. Ideally services would fail health checks once they receive a + # shutdown signal. + # + # For more information on the "shutdown_delay" parameter, refer to: + # + # https://developer.hashicorp.com/nomad/docs/job-specification/task#shutdown_delay + # + shutdown_delay = "10s" + # The "resources" block describes the requirements a task needs to # execute. Resource requirements include attributes such as memory, cpu, # cores, and devices. @@ -232,6 +243,17 @@ job "countdash" { image = "hashicorpdev/counter-dashboard:v3" auth_soft_fail = true } + + # Specifies the duration to wait when killing a task between removing its + # service registrations from Consul or Nomad, and sending it a shutdown + # signal. Ideally services would fail health checks once they receive a + # shutdown signal. + # + # For more information on the "shutdown_delay" parameter, refer to: + # + # https://developer.hashicorp.com/nomad/docs/job-specification/task#shutdown_delay + # + shutdown_delay = "10s" } } } diff --git a/command/asset/example.nomad.hcl b/command/asset/example.nomad.hcl index 1e3136e959a..ab17ecaafe9 100644 --- a/command/asset/example.nomad.hcl +++ b/command/asset/example.nomad.hcl @@ -300,6 +300,17 @@ job "example" { auth_soft_fail = true } + # Specifies the duration to wait when killing a task between removing its + # service registrations from Consul or Nomad, and sending it a shutdown + # signal. Ideally services would fail health checks once they receive a + # shutdown signal. + # + # For more information on the "shutdown_delay" parameter, refer to: + # + # https://developer.hashicorp.com/nomad/docs/job-specification/task#shutdown_delay + # + shutdown_delay = "10s" + # The "artifact" block instructs Nomad to download an artifact from a # remote source prior to starting the task. This provides a convenient # mechanism for downloading configuration files or data needed to run the