4

I am investigating what Virtual Machine software would be best for running a build server and test environment.

I've been reading a book on Test Driven Development. The first step is to create a walking skeleton as they call it. So as a .net hobby project I want to set up a CI server on a VM, have it build the code and installers. From there the software will somehow be automatically installed to another VM and have acceptance tests run against the it. Maybe this should all be done on one VM I'm not sure.

I've been investigating VMWare player and VirtualBox but I'm having a hard time choosing between them, I was wondering if anyone else has any experience with setting up a similar build/test environment.

Many thanks for any advice

Neil

EDIT: I see this question https://stackoverflow.com/questions/66317/which-is-the-best-vm-program-for-a-programmer which is useful however it doesn't quite answer what I'm looking for in experience of using the products.

Community
  • 1
  • 1
Neil
  • 5,179
  • 8
  • 48
  • 87

2 Answers2

3

I would highly recommend the vagrant project

http://vagrantup.com/

Incredibly useful for managing virtualbox environments as it enables you control what is installed on the environment using configuration managment tooling like chef and puppet.

The technology is more mature for managing linux based virtual machines. You'd be forced to create your own windows basebox. Unfortunately, I don't believe there is a freely available virtualbox image for windows which hinders adoption :-(

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • So once the code and installers have been built on the first vm I could use vagrant to launch another vm and then remotely install the msi say and then kick off the integration/acceptance tests from the first vm? – Neil Mar 15 '12 at 22:14
  • Yes. Vagrant is a framework for managing development and test environments. – Mark O'Connor Mar 16 '12 at 22:32
2

This is a subjective question and more along the lines of ServerFault but I'll answer it anyways. I like Hyper-V or ESX but I'm sure others are fine also. Not sure there is one "best" and I would question anyone who claims there is.

You want something that is a native hypervisor (Hyper-V, ESX, XenServer notVirtual PC/Server, KVM, VirtualBox or GSX), supports snapshotting and has an automation layer suitable to how hard you want to control it. If you are wanting to integrate with Microsoft Team Foundation Server's Test Lab automation you'll also have to use SCVMM (System Center Virtual Machine Manager) which means using Hyper-V.

At my last job we had 50+ ESX based build servers with a base snapshot. We had build automation that called the VSphere API to reset the VM to the base snapshot and power on. This made sure that every build ran from a machine in the exact same clean state. We ran over 100,000 builds a year on that infrastructure.

I've also done similiar things using HyperV. Hyper-V has a WMI based management API that use RPC and is a bit uglier to deal with then VSphere but it works. The VSphere API is web service based and has a client object model for .NET that's alot easier to use.

For testing you want to be able to programatically set a VM up in a certain state, deploy your installer to it and then run your integration test suites.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Thanks for the detailed response, I hadn't even come across hyper-v before but that looks very promising for what I'm looking for. I was thinking of using teamcity as the ci server because that's what I'm using at work but I guess it wouldn't hurt to give Team Foundation a go. – Neil Mar 15 '12 at 16:17
  • I use all of this at home for my consulting. A description of my environment can be found at http://www.iswix.com/dnn/ Basically one headless server and a dual monitor laptop is all I need to host an entire dev environment. – Christopher Painter Mar 15 '12 at 17:58