Sign inSign up

binlab/jenkins-agent

By binlab

•Updated almost 7 years ago

Jenkins Agent based on Alpine Linux

Image
0

7.8K

binlab/jenkins-agent repository overview

⁠Jenkins Agent based on Alpine Linux

⁠Current versions included in a latest builds:
ToolVersion
Java JDK8u191-jdk-alpine3.8
Jenkins Agent3.29
Docker CLI18.09.1
AWS CLI1.16.197
Kubectl1.15.0
Helm2.14.1
Kubernetes-deploy0.26.7
Kapp0.9.0

Here different versions of Jenkins Agent images for different tasks

⁠JNLP Agent + with Docker client and AWS CLI

⁠Configuration specifics

⁠Enabled JNLP protocols

By default, the JNLP3-connect⁠ is disabled due to the known stability and scalability issues. You can enable this protocol on your own risk using the JNLP_PROTOCOL_OPTS=-Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=false property (the protocol should be enabled on the master side as well).

In Jenkins versions starting from 2.27 there is a JNLP4-connect⁠ protocol. If you use Jenkins 2.32.x LTS, it is recommended to enable the protocol on your instance.

⁠Amazon ECS

Make sure your ECS container agent is updated⁠ before running. Older versions do not properly handle the entryPoint parameter. See the entryPoint⁠ definition for more information.

⁠Jnlp auto version (see jnlp-auto folder)

This jenkins-agent version can automatically register in the jenkins server.

⁠Permissions on the jenkins server

The required permissions for the user are:

  • Overall/Read
  • Agent/Connect
  • Agent/Create
  • Agent/Delete
⁠Additional ebvironment variables
  • AUTO_REG: tell jenkins-slave script that we want to automatically register our agent. just delete it if you don't want to use it.
  • ENV: setup environment variable (also, set a label for the slave agent)
⁠Docker example
version: "3.3"
services:
  jenkins-agent:
    image: binlab/jenkins-agent:jnlp-docker
    container_name: jenkins-agent
    hostname: jenkins-agent
    restart: unless-stopped
    environment:
      JENKINS_URL: "https://jenkins.example.com"
      JENKINS_AGENT_WORKDIR: "/home/jenkins/agent"
      JENKINS_SECRET: "example-bot:296682da3b9c6dc624551b1e17c"
      JENKINS_AGENT_NAME: "project-agent"
      AUTO_REG: "true"
      ENV: "dev"
⁠Entrypoint

Because of using sh trap we need to install dumb-init and set it up as entrypoint

Tag summary

Content type

Image

Digest

Size

81.5 MB

Last updated

almost 7 years ago

docker pull binlab/jenkins-agent