How come the elastic agent doesn't shut down when idle?

I configured a Bamboo plan in our OnDemand trial. It runs against a Bitbucket Git repository with the "Default Image S3 i386 (linux) (stock image)" and builds fine. However, neither the Elastic Agent nor the EC2 instance shut down when being idle. In the configuration, the "Elastic Instance Management" was set to "Passive", so the "Idle Agent Shutdown Delay" was 10 minutes. And the "Shutdown Delay" for the EC2 instance was set to 300 (seconds, I guess).

However, the agent was idle for about 20 minutes without doing anything. When I manually requested it to stop, it sat there with a "(Stop requested)" message (or similar) for another couple of minutes. Finally, I terminated the instance manually through Bamboo.

So, how do I get the Elastic Agent and the Elastic Instance to shut down after five minutes of idle time?

2 answers

1 accepted

Kartsen, the automatic instance management will keep the Elastic Agent running for the whole hour that you have paid for so you get the most value out of your agents.

For example, if an EC2 instance costs 18 cents for an hour and you shut it down after using it for only 20 minutes then start another instance it has costed you 36 cents total.

If the instance has been idle and you approach the full hour you have used Bamboo will shut it down before it costs you another hour.

EDIT: On second thoughts, if it got stuck when you requested it to stop then that sounds like a bug. Best bet is to contact OnDemand support.

That's not how EC2 works. You get billed on a per-hourly basis, for the maximum number of simulltaneous instances running during that hour. Therefore, if you shut down an instance, and start a new instance, within the space of one hour, you only get billed for one hour-instance.

I would like to be able to get my linux instance to shut down when idle, so that the Windows instance can come online and do the windows build, but currently this isn't possible.

Each time you start a stopped instance we charge a full instance hour, even if you make this transition multiple times within a single hour.

Reference: Stop and Start Your Instance - Amazon EC2

 

That's not how EC2 works. You get billed on a per-hourly basis, for the maximum number of simulltaneous instances running during that hour. Therefore, if you shut down an instance, and start a new instance, within the space of one hour, you only get billed for one hour-instance.

I would like to be able to get my linux instance to shut down when idle, so that the Windows instance can come online and do the windows build, but currently this isn't possible.

You are mixing up Google and Amazon. What you described is the way Google tries to minimize your bill. Amazon OTOH, just counts hours, and count non-full hours also as one hour.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,572 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you