Is it possible to get TeamCity to stop & restart Amazon EC2 instances for build agents?
amazon-ec2, amazon-web-services, ec2-api-tools, teamcity, teamcity-7.0
Solution
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
Problem
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