2015-09-15 00:43:42 +00:00
|
|
|
job "binstore-storagelocker" {
|
2017-02-22 20:30:05 +00:00
|
|
|
region = "fooregion"
|
2017-09-07 23:56:15 +00:00
|
|
|
namespace = "foonamespace"
|
2017-02-22 20:30:05 +00:00
|
|
|
type = "batch"
|
|
|
|
priority = 52
|
2016-04-09 22:38:42 +00:00
|
|
|
all_at_once = true
|
|
|
|
datacenters = ["us2", "eu1"]
|
2016-08-11 22:37:53 +00:00
|
|
|
vault_token = "foo"
|
2015-09-15 00:43:42 +00:00
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
meta {
|
|
|
|
foo = "bar"
|
|
|
|
}
|
2015-09-15 00:46:52 +00:00
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "kernel.os"
|
|
|
|
value = "windows"
|
|
|
|
}
|
|
|
|
|
2019-11-13 23:36:15 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "${attr.vault.version}"
|
|
|
|
value = ">= 0.6.1"
|
|
|
|
operator = "semver"
|
|
|
|
}
|
|
|
|
|
2018-07-16 13:30:58 +00:00
|
|
|
affinity {
|
|
|
|
attribute = "${meta.team}"
|
2019-07-20 14:55:07 +00:00
|
|
|
value = "mobile"
|
|
|
|
operator = "="
|
|
|
|
weight = 50
|
2018-07-16 13:30:58 +00:00
|
|
|
}
|
|
|
|
|
2019-07-20 14:55:07 +00:00
|
|
|
spread {
|
|
|
|
attribute = "${meta.rack}"
|
|
|
|
weight = 100
|
|
|
|
|
|
|
|
target "r1" {
|
|
|
|
percent = 40
|
|
|
|
}
|
|
|
|
|
|
|
|
target "r2" {
|
|
|
|
percent = 60
|
|
|
|
}
|
|
|
|
}
|
2018-07-18 17:28:26 +00:00
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
update {
|
2019-07-20 14:55:07 +00:00
|
|
|
stagger = "60s"
|
|
|
|
max_parallel = 2
|
|
|
|
health_check = "manual"
|
|
|
|
min_healthy_time = "10s"
|
|
|
|
healthy_deadline = "10m"
|
2018-03-23 17:56:00 +00:00
|
|
|
progress_deadline = "10m"
|
2019-07-20 14:55:07 +00:00
|
|
|
auto_revert = true
|
|
|
|
auto_promote = true
|
|
|
|
canary = 1
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task "outside" {
|
|
|
|
driver = "java"
|
|
|
|
|
|
|
|
config {
|
|
|
|
jar_path = "s3://my-cool-store/foo.jar"
|
2015-09-15 00:48:11 +00:00
|
|
|
}
|
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
meta {
|
|
|
|
my-cool-key = "foobar"
|
2015-09-20 21:18:10 +00:00
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
2015-09-20 21:18:10 +00:00
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
group "binsl" {
|
|
|
|
count = 5
|
|
|
|
|
2019-07-25 14:42:11 +00:00
|
|
|
volume "foo" {
|
|
|
|
type = "host"
|
|
|
|
}
|
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
restart {
|
|
|
|
attempts = 5
|
|
|
|
interval = "10m"
|
|
|
|
delay = "15s"
|
|
|
|
mode = "delay"
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
|
|
|
|
2018-01-18 20:49:01 +00:00
|
|
|
reschedule {
|
2019-07-20 14:55:07 +00:00
|
|
|
attempts = 5
|
|
|
|
interval = "12h"
|
2018-01-18 20:49:01 +00:00
|
|
|
}
|
|
|
|
|
2016-09-14 22:43:42 +00:00
|
|
|
ephemeral_disk {
|
2019-07-20 14:55:07 +00:00
|
|
|
sticky = true
|
|
|
|
size = 150
|
2016-08-24 18:51:15 +00:00
|
|
|
}
|
|
|
|
|
2017-05-09 00:44:26 +00:00
|
|
|
update {
|
2019-07-20 14:55:07 +00:00
|
|
|
max_parallel = 3
|
|
|
|
health_check = "checks"
|
|
|
|
min_healthy_time = "1s"
|
|
|
|
healthy_deadline = "1m"
|
|
|
|
progress_deadline = "1m"
|
|
|
|
auto_revert = false
|
|
|
|
auto_promote = false
|
|
|
|
canary = 2
|
2017-05-09 00:44:26 +00:00
|
|
|
}
|
|
|
|
|
2018-01-24 00:47:00 +00:00
|
|
|
migrate {
|
2019-07-20 14:55:07 +00:00
|
|
|
max_parallel = 2
|
|
|
|
health_check = "task_states"
|
|
|
|
min_healthy_time = "11s"
|
|
|
|
healthy_deadline = "11m"
|
2018-01-24 00:47:00 +00:00
|
|
|
}
|
|
|
|
|
2018-07-16 13:30:58 +00:00
|
|
|
affinity {
|
|
|
|
attribute = "${node.datacenter}"
|
2019-07-20 14:55:07 +00:00
|
|
|
value = "dc2"
|
|
|
|
operator = "="
|
|
|
|
weight = 100
|
2018-07-16 13:30:58 +00:00
|
|
|
}
|
2019-07-20 14:55:07 +00:00
|
|
|
|
2018-07-18 17:28:26 +00:00
|
|
|
spread {
|
|
|
|
attribute = "${node.datacenter}"
|
2019-07-20 14:55:07 +00:00
|
|
|
weight = 50
|
|
|
|
|
2018-07-18 17:28:26 +00:00
|
|
|
target "dc1" {
|
|
|
|
percent = 50
|
|
|
|
}
|
2019-07-20 14:55:07 +00:00
|
|
|
|
2018-07-18 17:28:26 +00:00
|
|
|
target "dc2" {
|
|
|
|
percent = 25
|
|
|
|
}
|
2019-07-20 14:55:07 +00:00
|
|
|
|
2018-07-18 17:28:26 +00:00
|
|
|
target "dc3" {
|
|
|
|
percent = 25
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
task "binstore" {
|
|
|
|
driver = "docker"
|
|
|
|
user = "bob"
|
2017-02-11 00:57:47 +00:00
|
|
|
leader = true
|
2019-10-11 12:00:05 +00:00
|
|
|
kind = "connect-proxy:test"
|
2016-04-09 22:38:42 +00:00
|
|
|
|
2018-07-18 19:16:02 +00:00
|
|
|
affinity {
|
|
|
|
attribute = "${meta.foo}"
|
2019-07-20 14:55:07 +00:00
|
|
|
value = "a,b,c"
|
|
|
|
operator = "set_contains"
|
|
|
|
weight = 25
|
2018-07-18 19:16:02 +00:00
|
|
|
}
|
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
config {
|
|
|
|
image = "hashicorp/binstore"
|
2016-04-25 21:58:31 +00:00
|
|
|
|
|
|
|
labels {
|
|
|
|
FOO = "bar"
|
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
2019-07-25 14:42:11 +00:00
|
|
|
volume_mount {
|
|
|
|
volume = "foo"
|
|
|
|
destination = "/mnt/foo"
|
|
|
|
}
|
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
logs {
|
2017-02-22 20:30:05 +00:00
|
|
|
max_files = 14
|
|
|
|
max_file_size = 101
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
env {
|
|
|
|
HELLO = "world"
|
|
|
|
LOREM = "ipsum"
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
2019-07-20 14:55:07 +00:00
|
|
|
tags = ["foo", "bar"]
|
2018-04-19 22:12:23 +00:00
|
|
|
canary_tags = ["canary", "bam"]
|
2019-07-20 14:55:07 +00:00
|
|
|
port = "http"
|
2016-04-09 22:38:42 +00:00
|
|
|
|
|
|
|
check {
|
2018-05-02 23:49:47 +00:00
|
|
|
name = "check-name"
|
|
|
|
type = "tcp"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
|
|
|
port = "admin"
|
2018-05-03 22:18:12 +00:00
|
|
|
grpc_service = "foo.Bar"
|
2018-05-02 23:49:47 +00:00
|
|
|
grpc_use_tls = true
|
2017-09-14 22:55:37 +00:00
|
|
|
|
|
|
|
check_restart {
|
2019-07-20 14:55:07 +00:00
|
|
|
limit = 3
|
|
|
|
grace = "10s"
|
2017-09-14 22:55:37 +00:00
|
|
|
ignore_warnings = true
|
|
|
|
}
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 500
|
|
|
|
memory = 128
|
|
|
|
|
|
|
|
network {
|
|
|
|
mbits = "100"
|
|
|
|
|
|
|
|
port "one" {
|
|
|
|
static = 1
|
|
|
|
}
|
2015-09-15 00:43:42 +00:00
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
port "two" {
|
|
|
|
static = 2
|
|
|
|
}
|
|
|
|
|
|
|
|
port "three" {
|
|
|
|
static = 3
|
|
|
|
}
|
|
|
|
|
2019-07-20 14:55:07 +00:00
|
|
|
port "http" {}
|
2016-04-09 22:38:42 +00:00
|
|
|
|
2019-07-20 14:55:07 +00:00
|
|
|
port "https" {}
|
2016-04-09 22:38:42 +00:00
|
|
|
|
2019-07-20 14:55:07 +00:00
|
|
|
port "admin" {}
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
2018-10-08 23:09:41 +00:00
|
|
|
|
|
|
|
device "nvidia/gpu" {
|
2019-07-20 14:55:07 +00:00
|
|
|
count = 10
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${device.attr.memory}"
|
|
|
|
value = "2GB"
|
|
|
|
operator = ">"
|
|
|
|
}
|
|
|
|
|
|
|
|
affinity {
|
|
|
|
attribute = "${device.model}"
|
|
|
|
value = "1080ti"
|
|
|
|
weight = 50
|
|
|
|
}
|
2018-10-08 23:09:41 +00:00
|
|
|
}
|
2019-07-20 14:55:07 +00:00
|
|
|
|
2018-10-08 23:09:41 +00:00
|
|
|
device "intel/gpu" {}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
kill_timeout = "22s"
|
2015-09-15 00:43:42 +00:00
|
|
|
|
2017-08-17 00:54:11 +00:00
|
|
|
shutdown_delay = "11s"
|
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
artifact {
|
|
|
|
source = "http://foo.com/artifact"
|
|
|
|
|
|
|
|
options {
|
|
|
|
checksum = "md5:b8a4f3f72ecab0510a6a31e997461c5f"
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
artifact {
|
2019-07-20 14:55:07 +00:00
|
|
|
source = "http://bar.com/artifact"
|
2017-02-22 20:30:05 +00:00
|
|
|
destination = "test/foo/"
|
2019-07-20 14:55:07 +00:00
|
|
|
mode = "file"
|
2015-09-15 00:43:42 +00:00
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
options {
|
|
|
|
checksum = "md5:ff1cc0d3432dad54d607c1505fb7245c"
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
2016-08-09 23:07:45 +00:00
|
|
|
|
|
|
|
vault {
|
|
|
|
policies = ["foo", "bar"]
|
|
|
|
}
|
2016-09-26 22:23:26 +00:00
|
|
|
|
|
|
|
template {
|
2019-07-20 14:55:07 +00:00
|
|
|
source = "foo"
|
|
|
|
destination = "foo"
|
|
|
|
change_mode = "foo"
|
2016-10-03 19:42:18 +00:00
|
|
|
change_signal = "foo"
|
2019-07-20 14:55:07 +00:00
|
|
|
splay = "10s"
|
|
|
|
env = true
|
|
|
|
vault_grace = "33s"
|
2016-09-26 22:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
2019-07-20 14:55:07 +00:00
|
|
|
source = "bar"
|
|
|
|
destination = "bar"
|
|
|
|
perms = "777"
|
|
|
|
left_delimiter = "--"
|
2017-02-21 00:43:28 +00:00
|
|
|
right_delimiter = "__"
|
2016-09-26 22:23:26 +00:00
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task "storagelocker" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
|
|
|
image = "hashicorp/storagelocker"
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 500
|
|
|
|
memory = 128
|
|
|
|
}
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "kernel.arch"
|
|
|
|
value = "amd64"
|
|
|
|
}
|
2016-10-11 22:25:49 +00:00
|
|
|
|
|
|
|
vault {
|
2019-07-20 14:55:07 +00:00
|
|
|
policies = ["foo", "bar"]
|
|
|
|
env = false
|
|
|
|
change_mode = "signal"
|
2016-10-11 22:25:49 +00:00
|
|
|
change_signal = "SIGUSR1"
|
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "kernel.os"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
|
|
|
meta {
|
|
|
|
elb_mode = "tcp"
|
|
|
|
elb_interval = 10
|
|
|
|
elb_checks = 3
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|