Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get TeamCity to stop & restart Amazon EC2 instances for build agents?

I have TeamCity (7.0.2) successfully spinning up an EC2 VM from a custom AMI, running our build, and sending back the build artifacts.

However, even when I used to do this with older TeamCity versions, I was always unhappy with the notion that it simply terminates the instances after they are done, and then creates new instances using the configured AMI next time a build agent is needed.

Can I get TeamCity to issue "stop" commands instead, followed by "start" commands? This has a tonne of advantages - quicker spin-up time, allowing for named instances in the agent stats, and saving the Mercurial clone to EBS for the next build are just three.

p.s. I guess I could use chained builds to call the EC2 API directly rather than use the in-built cloud support, but that sounds like a lot of work and feels flaky

like image 767
Alex Norcliffe Avatar asked May 04 '12 22:05

Alex Norcliffe


People also ask

How do I pause TeamCity build?

On the Project Settings page, open the Actions menu and click Pause/Activate. In the dialog that opens, select the box next to the project to pause all its build configurations or check the boxes of the configurations selectively: the checked build configurations will be paused.

How do I restart my TeamCity agent?

You can find the Restart Server button on the Administration | Diagnostics page in the TeamCity web UI.


1 Answers

We plan to provide support of EBS instances start stop in TeamCity 7.1 Please vote for TW-16419

TeamCity 7.0 may leak EBS volumes TW-12517

like image 151
Eugene Petrenko Avatar answered Sep 25 '22 20:09

Eugene Petrenko