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.
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.
Create an agent node
To add an external build agent to your controller:
-
Go to Manage Jenkins > Manage Nodes.
-
Click New node.
-
Type a unique node name.
-
On the Node configuration page, enter all the required values, depending on the type of build agent.
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. -
After clicking Save, Jenkins should either try to launch the agent machine, or prompt you for next steps for creating the machine.
Connect a shared agent
With CloudBees CI, you can connect one or more shared agent to the operations center, making it available to all the controllers connected to the operations center. By sharing agents among controllers, you can balance workloads and make efficient use of resources.
Connect a Mac agent
You can configure Mac build agents like any other JNLP-based agent. The best practices are to:
-
Create a new permanent agent.
-
Change the Launch method to Launch Agent via Java Web Start
-
Launch the agent from a browser on the Mac machine.
-
When prompted, install the agent service on the mac.
Please note that this means that the Mac agent must be able to make inbound connections to your CloudBees CI via the JNLP port.