virtual machines as agents

Are there currently any supported ways to launch virtual machines on demand or plans in the near future to add this feature?
I would like something like the VMWare plug-in for Hudson:
http://wiki.hudson-ci.org/display/HUDSON/VMware+plugin

My current problem is due to the fact that I may need to run some automated tests once a day on a clean OS.  A virutual machine is perfect to handle such a task.  Currently I would either need to leave a VM running at all times, and thus, consume an agent license.  This could be costly and complicated to manage if I multiply all the cases where I might need access to a clean VM to run some tests when I start thinking about doing the for all products and platforms. It gets worse if I want to have my host OS run as a build agent so that I can use it to start up the proper virtual machines and images.
If I have multiple agent license seats, I should be able to use them in a dynamic way with virutal machines.  Today I might need to focus on LINUX, so I might need multiple LINUX virtual machines running, as opposed to normally needing more Windows virutal machines.  I would have to unsubsribe my Windows agents that are not needed at the time and manually go into TC to subscribe the LINUX virtual machines to make use of my limited agent licenses.  Would this even be possible to do for an on demand situation?
I think we would be willing to pay for a plugin that gave us support for virtual machines ( in particular VMWare ), to allow us to utilze our agent license to the fullest.

thanks,
NS

13 comments

Internally, at Jetbrains, we experiment with something like this. It is similar to Amazon cloud integration, but agents start inside VMWare virtual machines.
I cannot tell exactly, when the first version of this tool will be available, probably we will need a month or so to polish it. If you could send us your email, we will notify you when the tool will be available, or give you a beta version to try.

0

Thanks for the information Pavel, that is good news.  My colleague is the contact point between our company and JetBrains, so I will have him formally contact you about this.

-ns

0

Is there any further word on the availability of such a tool? I would also be very interested in trying it out, even as a beta. Is there an email address to contact about it?

Regards,

Dave Woods

0

Hello David,

Please use teamcity-feedback[at]jetbrains.com.

Kind regards,
Marina

0

Just wanted to add that this would be very useful for us.

We have setup a pretty complicated environment for automated GUI testing.

We have a number of physical machines which we call TestHosts. Each one is a TeamCity buildagent, and also has VMWare installed with many different VMs and many snapshots in each.

When we invoke an automated test via TeamCity, the buildagent runs a script which starts the correct VM at the correct snapshot, causes the test to run, collects the results, then turns off the VM.

It would be much simpler if we could specify inside TeamCity:
* the name of the TestHost acting as VMWare host (this could be a buildagent)
* the name of the VMware guest image and snapshot to start up
* the command to invoke *inside the vmware guest image* once it has started, and artifact directory etc to get the results from.

It would be OK for each VMWare image to also be a build agent, as long as the licensing was concurrent & TeamCity could handle the fact that the VMWare buildagents would be starting up & stopping all the time.

I'll also email this to teamcity-feedback[at]jetbrains.com

Cheers,

Darren.

0

Everybody interested, please watch/vote for the request in our tracker: TW-12538.
This way you can be notified when the plugin discussed is available.

0

Darren,

Thanks for the description of your approach.

The current approach in our beta/not-yet-published plugin is a bit different: When there is a build in the queue which is compatible with an agent that is known to be provided by a virtual machine, the plugin starts the the virtual machine. The machine should have a TeamCity agent installed which should connect to the server on boot and grab the build.

Actually, the approach you implemented can be more applicable in some cases (e.g. when a test needs several machines to be started for a complete environment).

We hope to make our plugin publicly availble in weeks. Please watch TW-12538 to be notified.

0

Is there any way we can have teamcity help us in the scenario where we want to have many buildagents all based off the same image (like the ec2 support).

It seems like the fresh-off-the-press vmware plugin only supports starting already configured agents on demand.

I'd love to find a way to automate the creation of several VM's all of the same template, in a way that it makes teamcity happy (i.e. automatically changing the buildagent name after making the template clone)

0

Lucas,

Sounds like private virtual cloud... Have you considered using something like Eucalyptus.

I mean that we can probably consider improving the VMWare plugin but using a dedicated solution seems more appropriate.

Of course, any such solution will also need a Teamcity support, but since VMWare plugin is open-source it can serve as a basis for an interested developer.

0

Hi Yegor,

The newly-released VMWare plugin does look quite close to our requirements.

I can't tell though whether it can start a specified snapshot - that would be pretty important to us, as we maintain a snapshot tree of a given agent in multiple states.

For bonus points, it would be great if there was an option to take a snapshot of the machine at the end of the run - we sometimes like to preserve snapshots of test VM images after an automated test run. I guess this would require integration with VMWare Workstation rather than just VMWare player, but I think they share the same VIX api?

I was also interested in the "Multiple build runners" feature described here:
http://confluence.jetbrains.net/display/TW/Eluru+6.0+EAP+(build+15311)+Release+Notes

... if there was some way to make each build runner run on a different agent, then we could schedule up 3 steps:
1) Start VM guest at particular snapshot (on VM host)
2) Run build/test (on VM guest)
3) Close down VM and possibly take snapshot (on VM host).

Cheers,

Darren.

0

Darren,

> I can't tell though whether it can start a specified snapshot - that would be pretty important to us, as we maintain a snapshot tree of a given agent in multiple states.

This can probably implemented, but I am not sure where/how the logic on choosing the snapshot should be stored.
I'd appreciate if you can file a feature request into our tracker so that we can keep track of it.

As a side note, I am not sure on the further development of the plugin as there might be better ways to create a cloud then using VMWare Player/Workstation.

> For bonus points, it would be great if there was an option to take a snapshot of the machine at the end of the run - we sometimes like to preserve snapshots of test VM images after an automated test run.

This can also deserve a separate feature request.

Actually, both feature can probably be supported via specifying of custom commands to start/stop images.

0

Thanks Yegor.

I've added these two issues:


And I've added a comment on the value of this plugin for our automated build process, and a plea to keep it alive, to TW-12538:Make VMWare plugin opensource (http://youtrack.jetbrains.net/issue/TW-12538)

Regards,

Darren.

Message was edited by: Darren Bruning (removed wiki markup)

0

Darren,

Thank you for filing issues.

BTW, as plugin is open-sourced under Apache 2.0 license, anybody can tweak it and add features.
Patches are welcome - you can attache them in the tracker :)

0

Please sign in to leave a comment.