ai-devtools —

Elastic Jenkins: Scaling Workers With Docker Swarm and the Jenkins Swarm Plugin

The manual process for registering new Jenkins build agents is long and involves several steps: opening "Manage Jenkins" → "Nodes"; filling out the configuration forms; retrieving secrets from the Jenkins UI; connecting to the host via SSH; and running the command to start the agent.

Elastic Jenkins: Scaling Workers With Docker Swarm and the Jenkins Swarm Plugin

This manual method is acceptable in smaller-scale environments, but it becomes less efficient as the environment grows, since the same steps must be repeated for each new node. The Jenkins Swarm Plugin helps with part of this: new workers register themselves, so capacity is quick to add. It does not fix a mismatch between an agent and its Jenkinsfile.

Every replica gets the same default labels (swarm Docker), so scaling gives you more identical workers. Workers with different labels or images would need separate services. This implementation differs from a typical Jenkins deployment in a few ways.

Credentials are Docker secrets rather than environment variables. Workers connect over WebSocket, so the controller does not publish a separate agent port.

Earlier coverage

Reported by devops.com.

ai-devtoolscloud

Related coverage

Elsewhere in this edition