diff --git a/_sys/traefik.hcl b/_sys/traefik.hcl index 9ff8b83..3d6b858 100644 --- a/_sys/traefik.hcl +++ b/_sys/traefik.hcl @@ -88,8 +88,8 @@ EOF } resources { - cpu = 100 - memory = 128 + cpu = 50 + memory = 64 } } } diff --git a/apps/jenkins/live.hcl b/apps/jenkins/live.hcl new file mode 100644 index 0000000..a9d3f07 --- /dev/null +++ b/apps/jenkins/live.hcl @@ -0,0 +1,61 @@ +job "jenkins" { + datacenters = [ + "nummer5", + ] + type = "service" + + group "apps" { + count = 1 + + network { + port "http" { + to = 8080 + } + } + + service { + name = "jenkins" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.hassio.rule=Host(`jenkins.service.nr5`)", + ] + } + + volume "jenkins-master" { + type = "csi" + source = "jenkins-master" + read_only = false + access_mode = "single-node-writer" + attachment_mode = "file-system" + } + + restart { + attempts = 5 + delay = "60s" + } + + task "jenkins" { + driver = "podman" + volume_mount { + volume = "jenkins-master" + destination = "/var/jenkins_home" + read_only = false + } + + config { + image = "docker.io/jenkins/jenkins:jdk11" + ports = ["http"] + } + env{ + JAVA_OPTS = "-Dhudson.footerURL=http://jenkins.service.nr5" + } + resources { + cpu = 200 + memory = 256 + } + + } + } +} \ No newline at end of file diff --git a/apps/jenkins/volume.hcl b/apps/jenkins/volume.hcl new file mode 100644 index 0000000..4394879 --- /dev/null +++ b/apps/jenkins/volume.hcl @@ -0,0 +1,20 @@ +type = "csi" +id = "jenkins-master" +name = "jenkins-master" +plugin_id = "nfs" + +capability { + access_mode = "single-node-writer" + attachment_mode = "file-system" +} + +context { + server = "ebin02.wks" + share = "/data/raid1-ssd/app-data/jenkins-master" + mountPermissions = "0" +} + +mount_options { + fs_type = "nfs" + mount_flags = [ "timeo=30", "vers=3", "_netdev" , "nolock" ] +} \ No newline at end of file