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