After presenting on 'Fearless Development with Drush, Vagrant and Aegir' at DrupalCamp Montreal, I was approached about a rather interesting project. It involved synchronizing data between a couple dozen Drupal sites running on Windows systems. To be able to better manage the Drupal components on these systems, we decided to deploy Aegir on Vagrant-based virtual machines (VMs).
!!! WARNING: This blog post contains code !!!
Quite a bit of it, actually. It's in Ruby. I've never coded in Ruby before this, so in all likelihood it sucks. But I probably won't be able to recognize that until I've had more experience hacking on Ruby code (maybe in Vagrant or Puppet). Also, my academic and professional background is in philosophy and marketing, so there's no help there. Anyway, consider yourself warned. That said, I'm very open to constructive criticism, so feel free to make suggestions.
I'm a huge fan of Vagrant and have been using it pretty extensively lately. In particular, I'm using it to develop, test and debug a number of Puppet modules. Obviously I keep these modules under version control, for which I strongly prefer Git. The problem I was coming across was that, in order to run git commands, I have to be in the appropriate module's sub-directory, but to run 'vagrant provision' I needed to be in the root of the vagrant project.
For awhile now, I've been meaning to experiment with <a href="http://puppetlabs.com">Puppet</a> to get my server (and maybe even desktop!) config management under control. Since I've called in sick today (I guess I'll just have to miss that budget meeting...), I figure this is a fine opportunity to invest in some skill-building.