All Versions
Bamboo 5.13Bamboo 5.7.x
Bamboo 5.6.x
More...
Why should I use Amazon EBS with Elastic Bamboo?
Elastic agents are effectively stateless. This means that any externally-retrieved resources such as Maven artifacts, cached application servers, etc, will be downloaded again each time an elastic agent is started. The elastic agent will also perform a full checkout the first time a plan is built on the agent. If your builds have external dependencies and/or you are not performing clean builds each time, you may find that Amazon EBS will significantly improve your build times.
Additionally, EBS can be used as an easy mechanism for customising elastic agents, rather than changing the configuration of the elastic images (see Creating a Custom Elastic Image) that the agents are started from. For example, you could upload files and scripts to your EBS volume that would install PostgreSQL databases on elastic agents when are started from the related elastic instance.
On this page:
To create your first EBS snapshot,
createInitialVolume.sh <volume size> — This script creates a EBS volume (where <volume size> is the size of the volume), attaches the volume and mounts it on the elastic instance. For example, createInitialVolume.sh 100 will create a 100GB EBS volume and attach and mount it on the elastic instance.rewarmEbsSnapshot.sh — This script sets up the standard structure for Elastic Bamboo on the EBS volume. The directories and files for this standard volume structure are detailed in the Important EBS Directories and Files section below./mnt/bamboo-ebs folder or its subfolders, if you want them to be included in the snapshot. We recommend that you read Populating your EBS volume for guidelines on how to populate your EBS volume effectively.chown -R bamboo:bamboo <filename>killall java command — This command kills all processes on the instance, such as agent processes, so that the volume can be unmounted to be snapshotted.generateSnapshot.sh — This script unmounts and detaches the volume, before creating a snapshot based on the volume. The time taken to create the snapshot will vary depending on the amount of content that you have uploaded to the EBS volume. The Snapshot ID for the snapshot will be available in the logs for the elastic instance. See Accessing an Elastic Instance for instructions on how to access the logs for your elastic instance.Congratulations! You have created your first EBS snapshot!
Once you have set up an EBS snapshot, the final step is to add the snapshot details to an elastic image configuration, so that any instances started from that image will have EBS volumes attached to them. You can associate different snapshots with different elastic image configurations.
To configure Elastic Bamboo to use an EBS snapshot,
If you are currently using EBS with Elastic Bamboo and want to update your snapshot, follow the instructions below. These are similar to the instructions for creating a new EBS snapshot.
To update your EBS snapshot,
/mnt/bamboo-ebs folder or its subfolders, if you want them to be included in the snapshot.killall java — This command kills all agent processes, so that nothing is using the mounted volume.jps -vl — This command displays a list of all java processes running on your instance. There should be no java processes running.generateSnapshot.sh — This script unmounts and detaches the volume, before creating a snapshot based on the volume.By convention, Bamboo will attach an EBS device at /dev/sdh. This will be mounted at /mnt/bamboo-ebs. The contents of the standard structure are:
bin/customiseInstance.sh - This script is run on startup of an elastic instance. We recommend that you do not customise this script, as it is overwritten when rewarmEbsSnapshot.sh is run.bin/customise-extras.sh - This script is run on startup of an elastic instance as the root (as opposed to being run as the Bamboo user). This script is safe to customise, as it will never be overwritten. You can customise this script to automate processes such as setting up your database, move files to custom locations on the instance, etc.profile-extras.sh - This script gets appended to the profile that is run under the Bamboo user (as opposed to being run as the root). It is useful for setting up environment variables.bamboo-agent/bamboo-agent.cfg.xml - This configuration file modifies the build working directory to point to build working directory on the EBS volume.bamboo-agent/build-dir - This is the build working directory.maven/build.properties - This properties file is copied to /home/bamboo on startup of an elastic instance. It points the Maven 1 default repository to /mnt/bamboo-ebs/maven/.mavenmaven/settings.xml - This configuration files is copied to /home/bamboo/.m2 on startup of an elastic instance. It points the Maven 2 default repository to /mnt/bamboo-ebs/maven/.m2/repository.tmp-extras - The contents of this directory is copied to /tmp on startup of an elastic instance.