Saturday 8 June 2013

Development Environment Setup Part 1 - Requirements

One of the first things I do when beginning a new project is prepare my development environment. I do this because there are a number of problems that tend to creep up on every project that can be headed off early by tackling this first. The big issues are environment availability, consistency, and the ability to recover from disasters. Availability is merely access to the system and the resources required to program. This is your operating system, virtual machine, your code repository and libraries required to run and test your application.

Not only do you need your libraries available, they have to be the correct ones for your programming project. It doesn't help if you have begun coding using new features of Oracle Java 7 and you have Sun Java 6 running every other machine. Consistency is hugely important as you begin to add more human resources to a project and begin to work in separate branches. It can lead to a lot of pain when you need to merge to master or begin testing across different platforms.

Finally you need to consider disaster recovery. What do you do when your hard-drive fails, the OS is unresponsive, your code goes missing or anything that renders your primary development environment unavailable? Good disaster recovery doesn't require a huge amount of thought given how ubiquitous the internet and cloud-based technologies are these days.

The base components of any of my new environment builds is a cocktail of Vagrant, VirtualBox and GitHub. All free to use and readily available online. Oracle's VirtualBox is our virtualisation product which Vagrant will use to build new virtual machines based off a simple configuration Vagrantfile we create. GitHub will be our repository of choice to safely backup and store our code as we delve into a new software project.

Note: The free version of GitHub has your code publicly available. A paid-subscription is required to have private repositories.

What we are going to have at the end here:
  • Easy to configure and reproduce Ubuntu virtual machine
  • Using Vagrant for the virtual machine initial setup and configuration
  • VirtualBox which'll handle the virtualisation
  • GitHub for our easy to use and access online repository for our code

First step, download all there and install in this order.
[Windows and Mac]
Download and Install GitHub
Download and Install VirtualBox
Download and Install (the latest) Vagrant

Once we have all these we'll get into the basic configuration.


No comments:

Post a Comment