-
Notifications
You must be signed in to change notification settings - Fork 5
/
zebedee.nomad
101 lines (84 loc) · 2.22 KB
/
zebedee.nomad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
job "zebedee" {
datacenters = ["eu-west-1"]
region = "eu"
type = "service"
update {
min_healthy_time = "30s"
healthy_deadline = "2m"
max_parallel = 1
auto_revert = true
stagger = "150s"
}
group "publishing" {
count = "{{PUBLISHING_TASK_COUNT}}"
constraint {
distinct_hosts = true
}
constraint {
attribute = "${node.class}"
value = "publishing-mount"
}
restart {
attempts = 3
delay = "15s"
interval = "1m"
mode = "delay"
}
task "zebedee" {
driver = "docker"
artifact {
source = "s3::https://s3-eu-west-1.amazonaws.com/{{DEPLOYMENT_BUCKET}}/zebedee/{{TARGET_ENVIRONMENT}}/{{RELEASE}}.tar.gz"
}
config {
command = "${NOMAD_TASK_DIR}/start-task"
image = "{{ECR_URL}}:concourse-{{REVISION}}"
userns_mode = "host"
args = [
"java",
"-server",
"-Xms{{PUBLISHING_RESOURCE_HEAP_MEM}}m",
"-Xmx{{PUBLISHING_RESOURCE_HEAP_MEM}}m",
"-cp target/dependency/*:target/classes/",
"-Drestolino.classes=target/classes",
"-javaagent:target/dependency/aws-opentelemetry-agent-1.32.0.jar",
"-Dotel.propagators=tracecontext,baggage",
"-Dotel.service.name=zebedee",
"-Dotel.javaagent.enabled=false",
"-Drestolino.packageprefix=com.github.onsdigital.zebedee.api",
"com.github.davidcarboni.restolino.Main",
]
port_map {
http = 8080
}
volumes = [
"/var/florence:/content",
]
}
service {
name = "zebedee"
port = "http"
tags = ["publishing"]
check {
type = "http"
path = "/health"
interval = "10s"
timeout = "2s"
}
}
resources {
cpu = "{{PUBLISHING_RESOURCE_CPU}}"
memory = "{{PUBLISHING_RESOURCE_MEM}}"
network {
port "http" {}
}
}
template {
source = "${NOMAD_TASK_DIR}/vars-template"
destination = "${NOMAD_TASK_DIR}/vars"
}
vault {
policies = ["zebedee"]
}
}
}
}