Configuring Elastic Bamboo
Builds run on these elastic agents in a similar way to how they run on remote agents.
If you have disabled remote agent support, you must enable it before you can enable Elastic Bamboo. Refer to Disabling and enabling remote agents support for instructions on how to enable remote agent support.
To configure your Amazon Web Services (AWS) account details or settings for Elastic Bamboo:
- From the top navigation bar select > Elastic Bamboo > Configuration.
Select Edit configuration.
- Configure settings as described in the sections below.
- Select Save when finished.
On this page:
Configuring AWS account settings
Before you use Elastic Bamboo for the first time in your Bamboo instance, enter your Amazon Web Services (AWS) account details into the Bamboo application. You can authenticate with AWS using an AWS Access Key or an EC2 instance profile.
If you change your AWS account details, Bamboo will stop all currently running elastic agents.
Before you begin
- If you don't have an AWS account, sign up for one on the AWS registration page.
- Read Elastic Bamboo Costs for more details about how Amazon will charge you for EC2 compute resource usage. Amazon EC2 is sold separately from your Bamboo license and all fees are billed to your AWS account.
Using an AWS access key ID and secret access key
If you're unsure what your AWS access key ID and secret access key are, see Understanding and getting your AWS credentials — AWS General Reference.
To enter or update your AWS access key ID and secret access key:
- From the top navigation bar, select Administration () > Elastic Bamboo.
- From the left menu, select Configuration.
- Select Edit configuration.
- Under Amazon Web Services configuration, select Access key.
- Enter your AWS access key ID, secret access key, and select the region.
Using an EC2 instance profile
If you're running Bamboo on an EC2 instance in AWS, you can utilize an instance profile to configure Elastic Bamboo. An instance profile is a container for an IAM role attached to an EC2 instance that provides short-lived, periodically rotated credentials. Bamboo can automatically detect and use such credentials to manage EC2 instances for Elastic Agents.
To configure Elastic Bamboo using an EC2 instance profile:
- Go to Administration () > Elastic Bamboo.
- From the left menu, select Configuration.
- Select Edit configuration.
Under Amazon Web Services configuration, select Instance profile.
The Instance profile option is available only if you're running Bamboo on an EC2 instance.
Global settings
Elastic Bamboo provides you with a number of global configuration options to help you optimize EC2 usage for your Bamboo job builds. These settings control how the Bamboo server operates and how it manages its elastic instances and agents.
Maximum number of elastic instances
The number of elastic instances that can be running at any one time. You may wish to decrease this value if you are concerned about EC2 compute costs, and you have a large number of concurrent job builds that cannot be supported by your non-elastic agents.
Automatically terminate elastic instance when elastic agent process ends
Controls whether your elastic instances will automatically shut down after the elastic agent processes running on them terminate.
Shutdown delay
Controls how long an elastic instance will wait before shutting down, after its elastic agent process terminates.
EC2 spot instances
Elastic Bamboo provides support for Amazon EC2 Spot Instances. Amazon spot instances allow you to buy unused EC2 capacity. You can configure Elastic Bamboo to buy you a spot instance of a particular type, and fall back to a regular instance after a set amount of time if no instances are available.
Enable support for spot instances
Select this checkbox to enable support for spot instances.
Fallback to a regular instance after
The time (in minutes) after which Elastic Bamboo will fall back to using a regular instance, if a spot instance hasn't become available.
AWS settings
These settings allow you to specify your AWS configuration settings in Bamboo so that Bamboo can operate elastic instances through your AWS account. This section includes settings that are used to configure elastic instances to work with the Amazon Elastic Block Store (EBS).
Using EBS with your elastic instances can significantly reduce the amount of data transfer required to run a job build, compared with starting a clean elastic instance. To find out more about this feature and how to set it up in Elastic Bamboo, read Configuring elastic instances to use the EBS.
Upload AWS account identifiers to new elastic instances
Select to upload the AWS Account Private Key File and Account Certificate File to all new elastic instances started. This is mandatory if you wish to use EBS to store job build information in a snapshot. However, you can also select this option if you are not using EBS (e.g. if you wish upload the AWS account identifiers in order to use Amazon's AWS command line tools).
Note that your AWS access key ID and secret access key will be be uploaded to your Elastic Instances only if you configured Elastic Bamboo with an AWS access key. If you’re using an instance profile, the AWS access key ID and secret access key won’t be uploaded.
Key files location
Choose how private key and certificate will be provided.
Account Private Key File
You must specify the location of this file to use the Amazon EBS with Elastic Bamboo. This file is generated by Amazon.
Account Certificate File
You must specify the location of this file to use the Amazon EBS with Elastic Bamboo. This file is generated by Amazon.
If you haven't downloaded an AWS private key file or certificate file to your Bamboo server yet, see IAM best practices on the Amazon page.
Automatic elastic instance management
The Automatic Elastic Instance Management feature allows Bamboo to start and shut down elastic instances automatically (based on build queue demands), so that you do not have to perform these action manually. This feature reduces Bamboo administration overhead and can help minimize your overall elastic instance usage costs.
If a job's requirements cannot be met by any available online agents, this feature will start any elastic instance whose elastic agent has the capabilities to execute the job, so that the job's build can be generated. Regardless of how an elastic instance was started, all elastic instances will be shut down based on the settings specified below.
Elastic instance management
Select from the following elastic instance management presets. Each of these presets define values for the five criteria described in the Custom user-defined options (below). (Bear in mind that both the Aggressive and Passive presets have trade-offs.)
- Default — Balances build queue clearance rates with elastic instance usage costs.
- Aggressive — Favors higher build queue clearance rates but with higher elastic instance usage costs.
- Passive — Favors lower instance usage costs but with lower build queue clearance rates.
- Custom — Select your own settings, as described below.
- Disabled — Disables Bamboo's automatic elastic instance management feature.
Idle agent shutdown delay
Specify the number of minutes that an elastic agent must be idle before Bamboo shuts down the elastic instance running that agent.
Elastic instances running in the Amazon EC2 compute cloud are charged in hourly blocks from the time they are started. To maximize usage of elastic instances in a cost-effective manner, Bamboo only performs these checks just prior to the expiry of each hourly block.
Allowed non-Bamboo instances
The maximum number of elastic instances allowed on your AWS account that are not controlled by this Bamboo instance. When this limit is exceeded, Bamboo will not start any new instances.
Maximum number of instances to start at once
The maximum number of elastic instances that Bamboo can start in one go. Bamboo only starts this maximum number of elastic instances on a per minute basis.
Number of builds in queue threshold
The total number of builds in a queue. When this and all other thresholds have been reached, new elastic instances will be started.
Number of elastic builds in queue threshold
The number of builds in the queue that can be executed on elastic instances. When this and all other thresholds have been reached, new elastic instances will be started.
Average queue time threshold
The average number of minutes that job builds have been waiting in a queue. When this and all other thresholds have been reached, new elastic instances will be started.