Hello.
I want to try using Jenkins in nomad.
My nomad.job config:
job "jenkins-nomad" {
type = "service"
namespace = "test"
node_pool = "test"
group "jenkins-nomad" {
count = 1
volume "ceph-jenkins" {
type = "csi"
attachment_mode = "file-system"
access_mode = "single-node-writer"
read_only = false
source = "ceph-jenkins"
}
network {
port "http" {
static = 8080
}
port "jnlp" {
static = 50000
}
}
task "jenkins-nomad" {
driver = "docker"
volume_mount {
volume = "ceph-jenkins"
destination = "/var/jenkins_home"
read_only = false
}
config {
image = "jenkins/jenkins:2.441-jdk17"
ports = [
"http",
"jnlp"
]
}
resources {
cpu = 1000
memory = 2048
}
service {
name = "jenkins-nomad"
port = "http"
check {
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
service {
name = "jenkins-nomad-jnlp"
port = "jnlp"
check {
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
}
}
}
But get an error:
Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
INSTALL WARNING: User: missing rw permissions on JENKINS_HOME: /var/jenkins_home
With nomad volume everything is ok, another service can write to the volume.
Where can be the problem? And how do I resolve it?