Staging environment using VMware

(This document is aimed more towards Java & VMWare, but the same can be replicated for any other language & environment)

Abstract

You have a team of developers working on different modules for a project-product which are inter-dependant. Each developer diligently writes unit & integration tests supporting their code. You want to set-up an agile test environment to run the unit tests & staging server for integration test, but purchasing hardware for multiple machines is a constraint.

The following article provides a guide on how virtualization tools like VMware can be used to set-up staging or QA environment (Agile).


Set-up
You can either install Windows or Linux (we are on an Ubuntu system) as the HostOS. Use a 64-bit distribution.

Download VMWare server from [http://www.vmware.com/products/server] select the distribution type depending on your OS. The guest and the host OS can be completely different, they need not be same there is no relation between them.
eg: You can install Windows as host and Linux as guest or vice-versa.

You can either create the virtual machines all by yourself using the VMware step-by-step wizard, or download 'appliances' created by others from the VMware site [http://www.vmware.com/appliances], this saves you the initial installation effort.

When you create a new VM, you are also asked the default networking connection type. NAT and Bridged are the most common options one selects from. Use NAT if you want the VM to talk within its own subnet only, or Bridged if you want other machines on the same subnet as the host access them.
eg: Your host machine is on 192.168.10.50
Tip: If you installing the guest yourself, you can create one master guest, with all the common applications configured (eg: OpenSSH server would be great to have on all the guests for remote management or java), you'll have to change the host name after that.
Power up each of the VM's and install the required applications for which they've been set and use them like any other machine on the network.
  • Your source files are versioned on the Revision Control Server
  • Your tests are run nightly on the Cruise Control Server
  • Your team documents the whole project and process on the Wiki, and file bugs in Bugzilla
  • Your MySQL server is used for running the DB & the supporting DBs for other apps (bugzilla, wiki)
These VM's need to be maintained like any other normal physical machine on the network.

Pitfalls
  • Putting all your eggs in one basket, if the main VMware server fails, all the "machines" (VM's) fail.
  • Since the server is dependant on the native OS it sits on, the capabilities of the VMServer is restricted by the OS
  • Solution: Use commercial ESX Server or other alternatives
Alternatives

You can use the Xen too for virtualization. I've heard pretty good things about it too, with a few short comings & advantages over VMServer (that's a separate topic all together).

There is an article dedicated to Virtual Machines on Wikipedia, you can refer that depending on your needs and fix upon a solution that suits your needs better

Glossary

Virtualization - The virtual machine simulates enough hardware to allow an unmodified "guest" OS (one designed for the same CPU) to be run in isolation

Continuous Integration - Continuous integration describes a set of software engineering practice's that speed up the delivery of software by decreasing integration times

Revision Control - Revision control (also known as version control (system) (VCS), source control or (source) code management (SCM)) is the management of multiple revisions of the same unit of information

Host OS - The operating system installed on the physical machine running VMware Server.

Guest OS - The operating system installed on the virtual machine.

Bibliography
  1. http://en.wikipedia.org/wiki/Agile_software_development
  2. http://en.wikipedia.org/wiki/Xen
  3. http://en.wikipedia.org/wiki/Comparison_of_virtual_machines
  4. http://en.wikipedia.org/wiki/Virtualization
  5. http://en.wikipedia.org/wiki/Continuous_Integration
  6. http://en.wikipedia.org/wiki/Revision_control
  7. http://it20.info/blogs/main/archive/2007/11/26/83.aspx
  8. http://mysql-dba-journey.blogspot.com/2007/11/mysql-and-vmware.html

Comments

Popular posts from this blog

Customizing JIRA workflow

Install motion eye on Raspberry Pi for surveillance.

2 DTO or not 2 DTO