github.com/hernad/nomad@v1.6.112/e2e/deployment/input/deployment_auto1.nomad (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 job "deployment_auto.nomad" { 5 datacenters = ["dc1"] 6 7 constraint { 8 attribute = "${attr.kernel.name}" 9 value = "linux" 10 } 11 12 group "one" { 13 count = 3 14 15 update { 16 max_parallel = 3 17 auto_promote = true 18 canary = 2 19 } 20 21 task "one" { 22 driver = "raw_exec" 23 24 config { 25 command = "/bin/sleep" 26 27 # change args to update the job, the only changes 28 args = ["1000001"] 29 } 30 31 resources { 32 cpu = 20 33 memory = 20 34 } 35 } 36 } 37 38 group "two" { 39 count = 3 40 41 update { 42 max_parallel = 2 43 auto_promote = true 44 canary = 2 45 min_healthy_time = "2s" 46 } 47 48 task "two" { 49 driver = "raw_exec" 50 51 config { 52 command = "/bin/sleep" 53 54 # change args to update the job, the only changes 55 args = ["2000001"] 56 } 57 58 resources { 59 cpu = 20 60 memory = 20 61 } 62 } 63 } 64 }