github.com/remilapeyre/nomad@v0.8.5/jobspec/test-fixtures/basic.hcl (about) 1 job "binstore-storagelocker" { 2 region = "fooregion" 3 namespace = "foonamespace" 4 type = "batch" 5 priority = 52 6 all_at_once = true 7 datacenters = ["us2", "eu1"] 8 vault_token = "foo" 9 10 meta { 11 foo = "bar" 12 } 13 14 constraint { 15 attribute = "kernel.os" 16 value = "windows" 17 } 18 19 update { 20 stagger = "60s" 21 max_parallel = 2 22 health_check = "manual" 23 min_healthy_time = "10s" 24 healthy_deadline = "10m" 25 progress_deadline = "10m" 26 auto_revert = true 27 canary = 1 28 } 29 30 task "outside" { 31 driver = "java" 32 33 config { 34 jar_path = "s3://my-cool-store/foo.jar" 35 } 36 37 meta { 38 my-cool-key = "foobar" 39 } 40 } 41 42 group "binsl" { 43 count = 5 44 45 restart { 46 attempts = 5 47 interval = "10m" 48 delay = "15s" 49 mode = "delay" 50 } 51 52 reschedule { 53 attempts = 5 54 interval = "12h" 55 } 56 57 ephemeral_disk { 58 sticky = true 59 size = 150 60 } 61 62 update { 63 max_parallel = 3 64 health_check = "checks" 65 min_healthy_time = "1s" 66 healthy_deadline = "1m" 67 progress_deadline = "1m" 68 auto_revert = false 69 canary = 2 70 } 71 72 migrate { 73 max_parallel = 2 74 health_check = "task_states" 75 min_healthy_time = "11s" 76 healthy_deadline = "11m" 77 } 78 79 task "binstore" { 80 driver = "docker" 81 user = "bob" 82 leader = true 83 84 config { 85 image = "hashicorp/binstore" 86 87 labels { 88 FOO = "bar" 89 } 90 } 91 92 logs { 93 max_files = 14 94 max_file_size = 101 95 } 96 97 env { 98 HELLO = "world" 99 LOREM = "ipsum" 100 } 101 102 service { 103 tags = ["foo", "bar"] 104 canary_tags = ["canary", "bam"] 105 port = "http" 106 107 check { 108 name = "check-name" 109 type = "tcp" 110 interval = "10s" 111 timeout = "2s" 112 port = "admin" 113 grpc_service = "foo.Bar" 114 grpc_use_tls = true 115 116 check_restart { 117 limit = 3 118 grace = "10s" 119 ignore_warnings = true 120 } 121 } 122 } 123 124 resources { 125 cpu = 500 126 memory = 128 127 128 network { 129 mbits = "100" 130 131 port "one" { 132 static = 1 133 } 134 135 port "two" { 136 static = 2 137 } 138 139 port "three" { 140 static = 3 141 } 142 143 port "http" { 144 } 145 146 port "https" { 147 } 148 149 port "admin" { 150 } 151 } 152 } 153 154 kill_timeout = "22s" 155 156 shutdown_delay = "11s" 157 158 artifact { 159 source = "http://foo.com/artifact" 160 161 options { 162 checksum = "md5:b8a4f3f72ecab0510a6a31e997461c5f" 163 } 164 } 165 166 artifact { 167 source = "http://bar.com/artifact" 168 destination = "test/foo/" 169 mode = "file" 170 171 options { 172 checksum = "md5:ff1cc0d3432dad54d607c1505fb7245c" 173 } 174 } 175 176 vault { 177 policies = ["foo", "bar"] 178 } 179 180 template { 181 source = "foo" 182 destination = "foo" 183 change_mode = "foo" 184 change_signal = "foo" 185 splay = "10s" 186 env = true 187 vault_grace = "33s" 188 } 189 190 template { 191 source = "bar" 192 destination = "bar" 193 perms = "777" 194 left_delimiter = "--" 195 right_delimiter = "__" 196 } 197 } 198 199 task "storagelocker" { 200 driver = "docker" 201 202 config { 203 image = "hashicorp/storagelocker" 204 } 205 206 resources { 207 cpu = 500 208 memory = 128 209 iops = 30 210 } 211 212 constraint { 213 attribute = "kernel.arch" 214 value = "amd64" 215 } 216 217 vault { 218 policies = ["foo", "bar"] 219 env = false 220 change_mode = "signal" 221 change_signal = "SIGUSR1" 222 } 223 } 224 225 constraint { 226 attribute = "kernel.os" 227 value = "linux" 228 } 229 230 meta { 231 elb_mode = "tcp" 232 elb_interval = 10 233 elb_checks = 3 234 } 235 } 236 }