Vagrant speed up on Mac OS X

A while ago after struggling for weeks with trying to make all of the different gems configurations work on our Macs, our team switched to using Vagrant for development, matching our CentOS production deployment environment.

Our team except for me.  It was dead slow, and I refused to be convinced that this is better than the wrestling exercise of getting the oci gems working (see previous posts).  Once OCI is installed, things mostly work, and at least it’s fast enough that your test suite gives you feedback quickly enough that it’s not a chore to run.

This was until I had to install the LWES gem. It simply doesn’t work on Mac OS X.  Game over, give up, switch to Vagrant, and cry.

6 hours it took to red-green-refactor a simple API library, because of the many minutes it took for each spec to run.

Fortunately, a simple config change makes all the difference:

config.vm.share_folder "lui", "/home/vagrant/project_name", ".", :nfs => true
config.vm.network :hostonly, "192.168.255.2"

Voila! A seemingly 10X improvement in performance. Apparently switching to a :hostonly network with :nfs is the magic trick to making this a totally workable environment.

Unfortunately it does not work on Windows for those of you living in that world.

Advertisements

One Comment

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