-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathjenkins-java.nomad.hcl
65 lines (61 loc) · 1.68 KB
/
jenkins-java.nomad.hcl
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
job "jenkins" {
type = "service"
datacenters = ["eu-west-2a","eu-west-2b","eu-west-2c","eu-west-2","dc1"]
update {
stagger = "30s"
max_parallel = 1
}
# constraint {
# attribute = "${driver.java.version}"
# operator = ">"
# value = "1.7.0"
# }
group "web" {
count = 1
# Size of the ephemeral storage for Jenkins. Consider that depending
# on job count and size it could require larger storage.
ephemeral_disk {
migrate = true
size = "500"
sticky = true
}
network {
port "http" {
}
port "slave" {
}
}
task "frontend" {
env {
# Use ephemeral storage for Jenkins data.
JENKINS_HOME = "/alloc/data"
JENKINS_SLAVE_AGENT_PORT = "${NOMAD_PORT_slave}"
}
driver = "java"
config {
jar_path = "local/jenkins.war"
jvm_options = ["-Xmx768m", "-Xms384m"]
args = ["--httpPort=${NOMAD_PORT_http}"]
}
artifact {
source = "http://ftp-chi.osuosl.org/pub/jenkins/war-stable/2.89.1/jenkins.war"
options {
# Checksum will change depending on the Jenkins Version.
checksum = "sha256:f9f363959042fce1615ada81ae812e08d79075218c398ed28e68e1302c4b272f"
}
}
service {
# This tells Consul to monitor the service on the port
# labeled "http".
port = "http"
name = "jenkins"
check {
type = "http"
path = "/login"
interval = "10s"
timeout = "2s"
}
}
}#task
}#group
}