Efficient Development Environment Setup

Development environments and their configuration can become quite complex. It’s not unusual that a complete workstation setup takes half a day or more and requires extensive help from other project members. Using virtual machines for the runtime environment can help to reduce setup and maintenance costs.

For large Java web applications, you often need to set up a database server (with a suitable database snapshot), an application server, a web container, maybe a frontend Apache server and other components before writing the first line of code. Every new developer on the project has to go through this exercise and everybody has to keep the system current. More often than not, each system is a bit different, especially if developers use different operating systems or work on multiple projects with each having its unique set of requirements.

The idea to end this pain is simple: Create a virtual machine image that is as close to the deployment environment as possible. Install everything necessary to run your application. Set up bridged networking (as opposed to NAT) to make your network stack available from the host machine. Depending one your local network setup, you might be able to use DHCP and central user management. Things aren’t exactly trivial here, but a good sysadmin should be able to help. The good news is that you only have to do this once and the base system can be reused for other projects as well.

Development takes place on the host machine, so developers can work with their favorite operating system and IDE. Each developer gets a copy of the virtual machine image (the application runtime environment) and can start working in no time. You build the application locally on the host system and deploy it to the virtual machine using a network share. That way, you standardize on the runtime side and people can still work with the tools of their choice.

Additionally, you can install the virtual machine image on a dedicated host to act as a central testing or demonstration system. You could even make your continuous integration system deploy to it, too.

Just try it, the little bit of extra effort quickly pays off.

This entry was posted in best practices and tagged , . Bookmark the permalink.

One Response to Efficient Development Environment Setup

  1. David Linsin says:

    One of the main advantages, IMHO, is that you can actually setup a deployment environment, which is very close to the target system. I cannot count how many times I’ve developed my code on Windows, rolled it out to a Unix system, just to find out that it wasn’t performing as I expected it to.

    Minimizing the gap between development and target system is a huge benefit and VMs help a lot in this matter.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s