Managing agents in the cloud?

I have a set of integration tests that I run on a virtual machine. When the tests are complete, the machine is polluted, e.g. it would take longer to restore the machine to its initial conditions then it would to simply deploy a fresh copy.

I have configured team city to work within this paradigm by writing a script that does the following when a build is triggered.

·         Deploy the VM

·         SSH into the VM

o   Pull the code

o   Run the tests

·         Undeploy the VM

The agent controlling this runs on the team city machine. The “real build” is running on the VM which exists only for the duration of the test. The build output for this is really just a copy of the SSH log. I would rather have TeamCity process the build output directly as it does when the build is run by the real agent and not "proxied" thorugh SSH.

What I would prefer to do is deploy a VM that contains an agent that can be used only once. I thought about using the agent push feature in TC 6.5 however I was unable to locate an API for it. If an agent push scenario could be implemented, the SSH step described above would be replaced  by an agent push step followed by a wait until completion prior to unregistering, undeploying, deploying new, and registering a new agent.

An alternative possibility might be to implement a BuildServerListener that  could unregister and my VM when it had comleted a build, and deploy/register a new VM to be ready for the next invocation.

Does anyone out there have any thoughts on how one might best manage agents in a virtual environment such as I have described?




Michael Ottati




Comment actions Permalink


What virtualization platform do you use?
have you seen our VMware plugin?

Comment actions Permalink

I came across this today. The Google Compute Engine cloud agent plugin allows you to tick an option "After first build" that uses each instance for one build only, I believe.


Please sign in to leave a comment.