Connecting build agents

1 minute read

A build agent is a computer that handles the tasks of running builds, at the direction of a controller. It can be a virtual machine, a Docker container, or it can run on bare metal. Within the context of a CloudBees CI cluster, a build agent can be a shared resource for client controllers. A build agent can also be dedicated to a specific controller.

What is a build agent?

Before installing a build agent, learn what a Jenkins agent is.

What is a Jenkins Agent?

Set up an agent

It is best practice to build on a build agent instead of the built-in node that comes pre-configured on the controller. A build agent can take many forms - a VM, a Docker container, or a Kubernetes pod, for example.

How to Setup Docker Containers As Build Agents for Jenkins
How to Use Kubernetes Pods As Jenkins Agents

Create an agent node

How to Create an Agent Node

To add an external build agent to your controller:

  1. Go to Manage Jenkins > Manage Nodes.

    Manage Nodes
  2. Click New node.

    New node
  3. Type a unique node name.

    New Node
  4. On the Node configuration page, enter all the required values, depending on the type of build agent.

    Node configuration
    You can launch a Jenkins agent machine in many ways. Select one of the methods to launch a new node. CloudBees recommends that Windows users use JNLP and that Linux users use SSH.
  5. After clicking Save, Jenkins should either try to launch the agent machine, or prompt you for next steps for creating the machine.