Vagrant+Puppet is AMAZING!

vagrant-up

At my work on my team, we have five main developers. Two of us are on Mac, while the other three are on Windows. I, as a front end guy in the group, am advocating for SASS/Compass be used prominently on the redesign, like in depth use (great book btw). There is one little problem — workflow. To be able to developed locally, SCSS require pre-compiling, and it uses ruby. Mac comes with ruby, but Windows does not. Grunt could do it, but then you need node.js/npm. If I want everyone on my team to have it, I need to install all of those (ruby/sass/compass/node/npm/grunt)… that would be just way too much customization/potential places to break.

Enter Vagrant and puppet. It is just amazingly awesome. You can create a linux machine on VirtualBox – which is an open source VM. I am running latest puppet-enabled ubuntu box available from puppetlab, which is Ubuntu 13.10 (saucy Salamander).

Dealing with Vagrant really tickled my inner linux nerd-ness. Once upon a time, I was involved with running a group called BJLUG, Boston Japanese Linux Users Group — this was way back when, when you still had to pay for Apple’s CJK Language Pack to have Japanese installed on your machine, and I figured out that if you use linux, it was FREE to write email back to Japan etc. There were certainly a lot of LUGs back then. Not sure if they are around any more.

I learned how to install puppets, thanks to my colleague Kevin D. who patiently walked me through it, and was able to create box with apache and the likes.

Now we all need to download, and then just run vagrant up and vagrant provision. And your local scss changes, on your filesystem, using your favorite text editor on your OS, will be watched and css is compiled without any additional work. This is beautiful.

The Vagrant CLI documentation was useful for me, who have not used Vagrant before.

Some useful command:

  • vagrant up – Start the VM
  • vagrant provision – Provisions the VM
  • vagrant ssh – Logs into the VM with ssh
  • vagrant reload --provision – Restarts and provisions the VM
  • vagrant suspend and vagrat resume – If you don’t want fully shut the VM down
  • vagrant halt – Stops the VM
  • vagrant destroy – Deletes the VM

Actually, first time I saw use of vagrant was WordPress VIP team’s quick start. It includes all their server hosting environment. They do good work there over at VIP. And also there are ways to have local WordPress environment in vagrant such as Varying Vagrant Vagrants (VVV) environment. I am still using MAMP for my local wordpress theme/plugin development (when I have “free time”) but perhaps I should reconsider it. For new version of Daigo.org theme?

(Articles that I liked: Friday, March 21, 2014)

I’ve been posting links that I liked at Posterous (RIP) and then my tumblr blog. Here are the week worth of links:

Vagrant

:

Providers

:

SSH for Windows

:

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>