Boxen is an awesome tool for automating dev environment setups and configuration on OS X. Here at Intridea, we are huge Boxen fans. Not only is it a fairly straightforward process, the entire set-up can be achieved with a single command!
Why we love it.
Boxen comes with an addon project called boxen-web to facilitate quick and painless installs. At Intridea, when someone receives a new company laptop, they can visit https://intridea-boxen-web.herokuapp.com/, which will OAuth with their github account and display a command to be run in the terminal.
This command will install Boxen (and its dependencies), taking approximately 30 minutes to fully install. The end result? Without any customization, you get a machine set up with rbenv, a few ruby versions, node, git, nginx, and homebrew!
Github also provides many ready to use puppet modules under the Boxen Organization on Github. They are all named starting with puppet-*. If you can’t find the package you want under the Boxen organization, using the search works as well.
The learning curve.
Now, in order to take full advantage of Boxen and customize it to your organization’s needs, you’ll need to learn Puppet. It’s a bit of a learning curve; standardizing your configuration and learning another language. However, while Boxen’s documentation is quite sparse, reading up on the code and researching other Boxen forks will help get you up to speed.
In addition, Boxen has a great example of how to package software so that puppet can install it here; a huge help when creating my puppet module for Drobo.
Finally, keep in mind Boxen packages tend to be Github specific. For instance, the puppet-nginx module includes a landing page for Github employees. Initially, when utilizing this package, I had expected a vanilla nginx, similar to running brew install nginx
. However, due the custom site in Github’s puppet-nginx module, this wasn’t the case. After some troubleshooting, removing puppet-nginx and telling Puppet to install nginx via homebrew did the job.
Quick Tip: Boxen is rather opinionated, and keeps its own homebrew install in /opt/boxen/homebrew
, while homebrew installs to /usr/local
by default. The quick fix for this is to use brew --prefix
in your scripts instead of hard-coding /usr/local
.
Remember, it’s only a tool.
Alright, so we’ve gone over why Boxen is great. However, not only does it streamline the dev machine set up (although, lets be honest having 90% of what you need for ruby dev is enough in itself!), but it’s customizable too.
With Boxen, you can add organization, project, and user level customizations. Just keep in mind, when customizing you’ll need to rewire your thought process. Instead of changing your immediate environment, you’ll need to train yourself to edit your Boxen configuration and then run the updated boxen
command.
Conclusion
Boxen; the one-stop shop for ruby development on OS X. Streamlining dev environment setups and configuration, Boxen is an awesome asset to any company. It is straightforward, quick, and virtually painless.
Got any tips or tricks for using Boxen? Send us a tweet or message us on Facebook!