This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
damon-job.nomad
57 lines (55 loc) · 1.78 KB
/
damon-job.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
job "damon-job" {
region = "eastus2"
datacenters = ["dev"]
type = "service"
group "damon-group" {
count = 1
task "damon-test-task" {
artifact {
## Replace whith wheverer damon is hosted
source = "https://example.com/damon.exe.zip"
}
artifact {
## Replace with wherever your service artifact is hosted
source = "https://example.com/myservice.exe.zip"
}
driver = "raw_exec"
config {
# Damon is the task entrypoint
command = "${NOMAD_TASK_DIR}/damon.exe"
# Your command and services should be in the 'args' section
args = ["${NOMAD_TASK_DIR}/myservice.exe"]
}
resources {
cpu = 1024
memory = 1024
network {
mbits = 100
## For your own http endpoint
port "http" {}
## For metrics exposed by Damon
port "damon" {}
}
}
env {
## Example of overriding NOMAD_CPU_LIMIT to give it more CPU than allocated
"DAMON_CPU_LIMIT" = "2048"
}
## For your own HTTP endpoint service
service {
port = "http"
check {
type = "http"
path = "/health"
interval = "10s"
timeout = "2s"
}
}
## For damon's metrics endpoint
service {
port = "damon"
name = "${NOMAD_TASK_NAME}-damon"
}
}
}
}