It's a common headache for development teams of any size to set up all the things that go into a local development environment whenever a new programmer is brought on board or moved to another machine. There's a multitude of installations that go into a developer's machine which might include an IDE, version control, a container like Tomcat or Jetty, database management, and languages. The database might also need to be populated. Many developers want to automate this process, especially in agile teams. There are at least four methods that can be used in different combinations to make the process of setting up a complete development environment a lot less painful.
1. Installation Automation Tools
These tools can automate the installation and configuration of a workstation's services, tools, and config files. Here are a few examples:
Puppet - This popular tool lets users define the class of a machine (development environment, web server, or something else) and it automatically installs everything, configures the software, and provides automatic updating. Once it's set up, Puppet is a zero-click solution that checks the user's machine periodically to make sure that all the configurations are still in place. It will detect mode or file changes and fix any problems. Puppet is capable of handling thousands of machines. One negative aspect is that it lacks Windows support. Puppet is open source under the GNU license and it is a powerful tool, but it does have a learning curve.
Cfengine - Similar to Puppet, it provides automated installation and config, but it has some limitations. Cfengine has a free open source version and a commercial distribution that comes with support. Cfengine doesn't support Windows either, but it plans on adding support early this year.
SmartFrog - This tool does support Windows. SmartFrog is an open source framework (LGPL), written in Java, for configuring hosts.
Shell Scripts - These are another type of tool for configuring hosts. RightScale has examples for configuring an Amazon EC2 image using shell scripts.
Install Packages - If the machines are running Unix, it is possible to configure hosts using just packages. RubyWorks has a similar method where it provides the full Ruby on Rails stack by installing one package that installs other packages through dependencies.
2. Disk Images
Disk Imaging software is a common solution for storing an image of a configured host that can be restored to other hosts. Disk imaging methods, along with virtualization methods, are particularly useful when teams are working on a test machine. It's easy to test and then restore the disk image to the original configured state, but keeping the configuration up-to-date can be a hassle. New images have to be generated in order to propagate a permanent config file change.
There are a lot of virtualization tool vendors out there including Xen, VirtualPC, VMWare, and Sun's (now Oracle's) VirtualBox. These tools can be used to create virtual machine images with various configurations and installations. In addition to being able to restore a machine to its original configuration state, different VMs will allow developers to work on two or more projects using several different environments that can't all be on one system (using two different versions of a core technology, for example). A common method is to have a VM image that contains the team's whole development stack and is not attached to the corp domain. To get a new machine image, a team member just has to copy it locally, run NewSID, and then join the corp domain with a unique machine name. On modern hardware, this method for virtualization has no noticeable performance degradation.
4. Source Code Control
The final step for an automated process usually entails source code control. Teams should set up their projects in source control so they can immediately build, deploy, and run after checkout. Developers might also want to check-in helper infrastructure (Makefiles, Ant buildfiles, etc.) and settings for their tools (IDE project files). That should take care of many hassles associated with setup.