-
Notifications
You must be signed in to change notification settings - Fork 1
/
timer.nomad
50 lines (48 loc) · 1003 Bytes
/
timer.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
job "timer" {
region = "global"
datacenters = ["dc1"]
type = "batch"
meta {
auto-backup = true
backup-schedule = "@daily"
backup-target-db = "postgres"
}
group "script" {
volume "job_inbound" {
type = "host"
source = "job_inbound"
read_only = false
}
count = 1
task "script" {
volume_mount {
volume = "job_inbound"
destination = "/scratch"
}
artifact {
source = "/timer.py"
destination = "local/timer.py"
mode = "file"
}
// constraint {
// attribute = "${meta.cached_binaries}"
// operator = "set_contains"
// value = "python3"
// }
constraint {
attribute = "${attr.unique.hostname}"
value= "sense.station"
}
driver = "exec"
user = "becker"
config {
command = "python3"
args = ["local/timer.py"]
}
resources {
cpu = 125
memory = 100
}
}
}
}