Public Repository

Last pushed: 2 years ago
Short Description
Vanilla Remote Build Agent suitable for customization. Bamboo server not included.
Full Description

Overview

Manage and run your Bamboo Remote Build Agents using Docker. This minimal image is suitable for customization and comprises:

  • Bamboo Agent
  • OpenJDK 7

Remote Build Agents

A Bamboo server can be run using one or more remote build agents (up to 100 depending on your license). Build agents execute jobs within your build plan and since jobs can have different requirements, it is useful to manage and run those build agents using Docker.

Benefits include:

  • Ease of use (script the creation/maintenance of your build agents)
  • Duplicate and distribute changes to build agents very quickly
  • Running multiple remote agents on the same host without conflicting requirements

Note this image does not include a Bamboo server. Download and install Bamboo server separately before continuing (https://www.atlassian.com/software/bamboo)

Usage

Ensure your Bamboo server is running.

Once the server is running go to the Administration > Agents console. Note that there are currently no remote build agents. When the remote build agent is run (instructions follow) it will connect to the server and you will see it appear here (once you refresh).

The following commands may need to be preceded with "sudo " depending on folder permissions and also because docker needs to be run as root. You may also need to replace "docker" with "docker.io" (depending on your installation).

Pull the remote build agent from the Docker Hub Repository

docker pull atlassian/bamboo-base-agent

Once downloaded, run your agent with the following command.

docker run -e HOME=/root/ -e BAMBOO_SERVER=http://hostname:port/bamboo -i -t atlassian/bamboo-base-agent:5.6.1

Note:

  • specify your server's name and port instead of host:port (port is typically 8085)
  • avoid using localhost (since this will refer to the localhost inside the container).

Go back to the Administration > Agents console. Note now that your remote agent has registered itself.

Customisation

Our predefined images are based on our own atlassian/ubuntu-minimal image that is build using docker contrib script and debootstrap.

To customise take a predefined image and run it in container. Name the container for easier access later.

docker run --name="tmp-name" -e HOME=/root/ -i -t atlassian/bamboo-base-agent:5.6.1 /bin/bash

Now change whatever you want inside container with 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 new image from container like this.

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

You can also publish it pushing it to registry.

Trouble shooting

If you have DNS problems (i.e. the docker container can ping the IP of the server but not the hostname) consider using "--dns=your-dns-server-ip1 --dns=your-dns-server-ip2" as command line parameters after "docker run". Note: you need to use the actual ip addresses of your dns server and not 'your-dns-server-ip1'.

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. Admin > General settings. You can't have localhost specified.

Docker Pull Command
Owner
atlassian

Comments (12)
jubba
a month ago

guys, check this repo for Bamboo 6.1 base agent Dockerfile
https://hub.docker.com/r/jubba/docker-bamboo-6.1-base-agent/

szaman
6 months ago

Cannot pull this image.
Getting the following error message.

failed to register layer: re-exec error: exit status 1: output: ProcessBaseLayer C:\ProgramData\docker\windowsfilter\faf910bb88f8d15d60dbc9fdfedc7ecb665870fc7887c5f1b9ff032acb713197: The system cannot find the path specified.

novadigi
7 months ago

Hi,

i am getting following error while downloading bamboo-base-agent

failed to register layer: re-exec error: exit status 1: output: ProcessBaseLayer C:\ProgramData\Docker\windowsfilter\c460aa927144c10ac4737f74d85131bb17934c2346b59a310078ca3727b77c1c: The system cannot find the path specified.

Can anyone help me out

dashap
a year ago

I ran just fine with Dockerfile content:

Ubuntu 15.04 with Atlassian Bamboo Agent and Java 8 installed.

Build image with: docker build -t custom/bamboo-java-agent:latest .

FROM atlassian/bamboo-java-agent
MAINTAINER dashap, https://github.sas.com/dashap
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update && \
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install -y oracle-java8-installer && \
apt-get install -y oracle-java8-set-default && \
apt-get install -y oracle-java6-installer && \
apt-get install -y oracle-java7-installer && \
apt-get install -y oracle-java9-installer && \
apt-get install -y nodejs && \
apt-get install -y nodejs-dev && \
apt-get install -y npm && \
apt-get install -y ruby && \
apt-get install -y vim && \
apt-get clean

Then:

build
build custom with --name option
modify properties
build commit

xlf12
a year ago

Just to emphasis the questions, ...
yes it would be a real benefit to have the Dockerfile as a starting point?
The question is, why can't this be published?

f3rdy
a year ago

What is the reason you don't provide the dockerfile itself for more convenient customization of the agent container? Bashing into a running container and installing stuff by hand is not a suitable way to do this.

jcamara
2 years ago

This no longer works by default with the latest version of Bamboo server as it requires OpenJDK 8 and this Docker image has OpenJDK 7 installed.

simplicityguy
2 years ago

Please share the git repo where the Dockerfile is located in.

alexlist
2 years ago

Please provide a link to your source code repository with the Dockerfile.

yannickboucher
2 years ago

How can I connect an instance of this image to elastic bamboo?