One thing first: my definition of a development environment.
What I mean by this is that for me a development environment is an environment where I can play as a developer using eclipse, intellij, visual studio and/or other ide’s. Also, I want to install trials of other things, or create sample projects. As I also am a DevOps guy, I also would like to play arround with deployments, patches or with security, switching thing on and off. Actually, I want to be able to do everything with unlimitations on my development environment.
When I  have created my code, I will check it in into my archive, which will be connected to something like Visual Studio Online or Jenkins for example. That will build my software for the correct target platform.

I have been working in the IT business for about 18 years now. One of the things I learned over the few years is that I needed a development environment. And preferrably in a hypervisor locally. When I started I got a central server which was shared with other developers. Then came Virtual PC, VMWare player, Hyper-V and Virtualbox on our local laptops.

Well, that was fun, but all we had to do was build our development environment in shape of a virtual image within those hypervisors by hand. With all the tools we needed at our company, I (and I tried a lot, thus getting a little experienced in installing the software as quickly as possible) still needed about 5 hours of downloading, installing and configuring the right software.

Another thing was that when new members joined the team, an image was quickly copied over. With all the personal preferences and configuration of the previous owner of the image.

So I wanted to automate this. Then came Packer and Vagrant from Hashicorp.

Packer is used to create a so-called basebox and vagrant can turn a basebox and a bunch of statements into an actual virtual image within your preferred hypervisor.

I started off by creating a complete Windows 10 development basebox with Visual Studio and SQL server installed. That was a little pain in the ass. But I succeeded.

Then I got to work for a Linux project and started to create an automatic development environment based on Ubuntu-Mate 16.04 LTS in combination with Ansible scripts. You can find this project here. These scripts will give you in about 30 minutes  a fresh, up to date and complete development environment to get started with your work. It is also extendable with your own preferences, or with project specific software or download of project specific repositories.

I have updated the windows development image as well. You can find this project here. For windows it will still take about 3,5 hours until all software is installed, but then you have a development image  where you can do .net development and java development on.

If you have any improvements, just raise an issue in the corresponding github  repository.

Now, what are exactly the advantages of such an scripted development environment?

  • New teammembers are quickly up and ready
  • Documented development environment
  • Easy recovery
  • The environments are (almost) equal for each team member (for example the eclipse settings like formatters or cleanup scripts are set correctly from the development environment scripts.