forked from CarletonComputerScienceSociety/auto-grader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grader.nomad
85 lines (68 loc) · 1.35 KB
/
grader.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
job "grader8" {
datacenters = ["dc1"]
group "scheduler" {
network {
mode = "bridge"
}
service {
name = "grading-scheduler"
port = "4000"
connect {
sidecar_service {}
}
}
task "scheduler" {
driver = "docker"
config {
image = "ghcr.io/angelonfira/rust-test-server/scheduler:latest"
}
env {
test = "test5"
}
resources {
cpu = 5000
memory = 1000
}
}
}
group "runners" {
count = 30
network {
mode = "bridge"
}
service {
name = "grading-runner"
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "grading-scheduler"
local_bind_port = 4000
}
}
}
}
}
task "runner" {
driver = "docker"
config {
image = "ghcr.io/angelonfira/rust-test-server/runner:latest"
}
env {
test = "test5"
}
resources {
cpu = 100
memory = 100
}
# Allow for as many restarts as is needed, since a restart is just a
# compilation environment getting cleaned.
restart {
interval = "1m"
attempts = 100
delay = "0s"
mode = "delay"
}
}
}
}