2015-09-15 00:43:42 +00:00
|
|
|
job "binstore-storagelocker" {
|
2016-04-09 22:38:42 +00:00
|
|
|
region = "global"
|
|
|
|
type = "service"
|
|
|
|
priority = 50
|
|
|
|
all_at_once = true
|
|
|
|
datacenters = ["us2", "eu1"]
|
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"
|
|
|
|
}
|
|
|
|
|
|
|
|
update {
|
|
|
|
stagger = "60s"
|
|
|
|
max_parallel = 2
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
restart {
|
|
|
|
attempts = 5
|
|
|
|
interval = "10m"
|
|
|
|
delay = "15s"
|
|
|
|
mode = "delay"
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
|
|
|
|
2016-04-09 22:38:42 +00:00
|
|
|
task "binstore" {
|
|
|
|
driver = "docker"
|
|
|
|
user = "bob"
|
|
|
|
|
|
|
|
config {
|
|
|
|
image = "hashicorp/binstore"
|
2016-04-25 21:58:31 +00:00
|
|
|
|
|
|
|
labels {
|
|
|
|
FOO = "bar"
|
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
logs {
|
|
|
|
max_files = 10
|
|
|
|
max_file_size = 100
|
|
|
|
}
|
|
|
|
|
|
|
|
env {
|
|
|
|
HELLO = "world"
|
|
|
|
LOREM = "ipsum"
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
tags = ["foo", "bar"]
|
|
|
|
port = "http"
|
|
|
|
|
|
|
|
check {
|
|
|
|
name = "check-name"
|
|
|
|
type = "tcp"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
2016-07-08 21:09:27 +00:00
|
|
|
port = "admin"
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
port "http" {
|
|
|
|
}
|
|
|
|
|
|
|
|
port "https" {
|
|
|
|
}
|
|
|
|
|
|
|
|
port "admin" {
|
|
|
|
}
|
2015-09-15 00:43:42 +00:00
|
|
|
}
|
2016-04-09 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
kill_timeout = "22s"
|
2015-09-15 00:43:42 +00:00
|
|
|
|
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 {
|
|
|
|
source = "http://bar.com/artifact"
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "storagelocker" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
|
|
|
image = "hashicorp/storagelocker"
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 500
|
|
|
|
memory = 128
|
|
|
|
iops = 30
|
|
|
|
}
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "kernel.arch"
|
|
|
|
value = "amd64"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|