On this page

Related content

Still need help?

A Bamboo server can use one or more remote build agents (up to 1000 depending on your license). Remote agents execute jobs from your build plan. Because jobs can have different requirements, it is useful to have agents with different capabilities.

Docker is a great way to manage your remote agents, and provides:

Ease of use – you can automate or script the creation and maintenance of your remote agents.

Very quick duplication and distribution of changes to remote agents.

The ability to run multiple remote agents on the same host without conflicting requirements.

Bamboo server

Note that the Docker images do not include a Bamboo server. Download and install Bamboo separately before continuing – see Getting started with Bamboo.

Usage

For a new Bamboo installation there will not be any remote agents yet. When you run a remote agent (see below), it will connect to the Bamboo server and will be ready to execute jobs from your build plans.

Ensure your Bamboo server is running, then go to Administration > Agents to see your remote agent once it is running.

The following commands need to be run with sudo because Docker needs to run as root. You may need to replace docker with docker.io (depending on your installation) – see http://docker.io.

Now change whatever you want inside the container with the usual bash commands. You can enforce some capabilities by changing the file in /root/bamboo-agent-home/bin/bamboo-capabilities.properties.

After that, exit and create a new image from the container like this:

sudo docker commit tmp-name atlassian/customized-agent:1.0.0

You can publish your new image by pushing it to the Docker Registry.

Troubleshooting

If you have DNS problems (i.e. the Docker container can ping the IP of the server but not the hostname) consider using this command:

sudo docker run –dns=your-dns-server-ip1 –dns=your-dns-server-ip2

You'll need to replace those values with the actual IP addresses of your DNS server.

If the agent seems to connect and start bootstrapping but has trouble with active mq then check on your Bamboo server that you have set up the broker URL correctly. Go to Administration > General configuration. You should not have 'localhost' specified there.