-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgrid-intensity-exporter.nomad
45 lines (35 loc) · 1.04 KB
/
grid-intensity-exporter.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
job "grid-intensity-exporter" {
# The "datacenters" parameter specifies the list of datacenters which should
# be considered when placing this task. This must be provided.
datacenters = ["dc1"]
# the exporter job runs as a service with a single instance that
# can be scraped by prometheus.
type = "service"
group "grid-intensity-exporter" {
count = 1
network {
# for testing, we can get away with having a fixed port
# but in production we'd let nomad allocate a port instead
port "exporter" {
static = 8000
to = 8000
}
}
task "grid-intensity-exporter" {
driver = "docker"
config {
args = [
"exporter"
]
image = "thegreenwebfoundation/grid-intensity:integration-test"
ports = ["exporter"]
}
env {
GRID_INTENSITY_LOCATION = "GBR"
GRID_INTENSITY_PROVIDER = "Ember"
GRID_INTENSITY_NODE = "${node.unique.name}"
GRID_INTENSITY_REGION = "${node.region}"
}
}
}
}