Bamboo Cloud is a hosted build and continuous integration service from Atlassian. Bamboo is similar to other continuous integration suites, such as Jenkins and TeamCity. The great thing about Bamboo Cloud is that Atlassian hosts the service for you, so you don't have to worry about provisioning, installing, and maintaining an infrastructure for continuous integration. Bamboo also integrates seamlessly with Jira, Atlassian's issue tracking software.
The Bamboo Agent
Bamboo Cloud uses an agent in Amazon’s Elastic Compute Cloud (EC2) to execute the build and deployment steps. Atlassian provides an Amazon Machine Image (AMI) that has all of the Bamboo agent software, as well as common build tools, pre-installed. While the AMI has OpenJDK6 and OpenJDK7 installed, it does not (as of this writing) have OpenJDK8. This poses a problem for users who want to compile Java code designed to work under the Java 8 specification. This article is for users who already have a Bamboo configuration, but want to add OpenJDK8 to their build capabilities. To set up Bamboo with OpenJDK8, you will need to:
Upgrade Amazon Linux within Atassian's AMI to the latest version
Create your own AMI
Configure Bamboo Cloud to be use your custom AMI
Upgrade Amazon Linux within Atlassian's AMI to the latest version
The current Atlassian Bamboo agent image is installed with Amazon Linux 2014.03. To have access to the OpenJDK8 packages, you need to upgrade Amazon Linux to the latest version. SSH into your agent, and open /etc/yum.conf. Find the following line:
Now, OpenJDK8 is installed on your agent under /usr/lib/jvm/java-1.8.0-openjdk.
Create your own AMI
Now that you have OpenJDK8 installed, you will want to make sure that Bamboo can spin up future elastic agent instances with OpenJDK8. To make this happen, you have to create our own AMI. In your EC2 console, find your Bamboo instance. Right click on it and select "Create Image":
In the pop-up, enter in a name and description for your new AMI, then click "Create Image":
In a few minutes, your AMI should be available. You can view your AMIs by clicking on "AMIs" on the left nav bar:
Make a note of your AMI ID. For example, the AMI ID shown in the screenshot above is 'ami-39d49df9'.
Fill out the details on the form. Make sure to put in the AMI ID that you noted earlier. You can also optionally specifiy a subnet and availability zone:
At this point, you will see your new AMI available as an image for new elastic images: You will now be able to start elastic agents using your custom AMI by clicking on the "Start" button, and your builds will have OpenJDK8 capabilities.