Choosing Vagrant to Set Up my Development Environment

When I was at the phase of setting up my development environment for Review Board, I wasn’t sure in which direction to proceed.

I am running OS X, and so I wouldn’t need to set up a brand new Linux virtual machine for development purposes as Windows users would, but I had been told that there are some dependency issues with some versions of Linux and OS X.

I decided to go with the second option of using Vagrant. Vagrant is used to build and deploy virtual machines. It is mainly used for the purpose of having everyone on the same development team use the exact same operating system to avoid dependency issues.

Steven McLeod configured Vagrant, Ubuntu 12.04 and the Review Board project. The configuration repository and installation details are located here.

We were given licenses for Vagrant VMware plugin and VMware Fusion or Workstation depending on our current operating system.

I had had experience using VMware Fusion with Windows 8 before, but still found it hard to grasp what exactly Vagrant was doing.

I used to open up VMware Fusion and start the Windows 8 VM. With Vagrant, I accessed the VM through Terminal (the command-line based terminal emulator included with OS X). I wasn’t sure in what way it was using VMware Fusion, or exactly what was going on. After asking questions from the mentors, things became much clearer.

In Terminal, from the repository’s directory on the host OS, the command “vagrant up” starts the VM using VMware Fusion. From that point, the command “vagrant ssh” SSH’s into the VM and you can begin to develop, run the server, or run unit tests. You don’t have to manually start VMware Fusion.

I wanted to use a GUI based IDE to develop code, and could not do this by SSH’ing into the VM. Luckily, Vagrant allows the repository to be shared between the host OS and the virtual machine. I downloaded and installed PyCharm on OS X (whose configuration details with Review Board can be found here). I now develop on OS X, and run the server and unit tests by SSH’ing into the VM 🙂


Leave a Reply

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

You are commenting using your 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