I’ve spent last few days on setting up the nice, pipe-lined solution for enterprise-level logging. It involves few interesting distributed technologies, running on Linux (we’re almost 100% Windows-based here atm), so I’ve decided to give a go to some nice virtualization and provisioning tools - namely: Vagrant (http://www.vagrantup.com/) & Chef (http://www.opscode.com/chef/). There’s a lot of praise for those through the web, so I had high hopes. Here’s my story …

Installation & initial setup

No issues for both Vagrant and Chef. Keep in mind that I’ve decided to start with Chef Solo, so it’s still the easiest scenario (it may get more tricky when you try Chef Server or the hosted version). Initial setup is piss easy:

  1. There’s already a fully operational Ubuntu box (Vagrant-adapted VM) available that has Chef pre-installed. You can bring it up in 30 seconds once it’s downloaded.
  2. Sharing directories between guest and host is very simple and works out of the box. Same for port forwarding (so you can easily access a website hosted on guest using your own IP on a different box).
  3. VM lifecycle mgmt is fast and smooth - I had few occasional problems that disappeared after reloading the box though.

Running in the corporate environment

Everything was going well as long as I was working on a direct internet connection. Once I’ve moved behind the corporate firewall, things got really complicated. For instance: Chef is not a standalone black-box like software, it uses tools like curl to doe the low-level work. And all those tools have some quirks - for instance. they may not be very coherent about working with HTTP proxy.

Still, this ain’t anything a well determined geek can’t go through :) Embrace the pain.

Recipes, recipes, it’s all about recipes

Now, the most important part - Chef remains useful as long as you don’t run out of useful recipes. And creating a good recipe is hard, time-consuming and is even harder to test. The good news is that there are already some nice recipes on the web (start here: https://github.com/opscode-cookbooks), but the overall quality of recipes you can find is … diverse.

Many of them are just suited for some scenario (aimed the particular need author(s) had) and extending them is quite an effort. Unfortunately, the community that contributes (and even uses) Chef Cookbooks is still very limited (check the downloads count for Windows cookbooks!).

In other words - I still think it’s a great solution, but I need to refresh my Ruby skills. Without ability to code / fix / verify cookbooks on your own, the whole endeavor’s pointless (at this moment of Chef’s maturity).

It’s Git time

Just one more (funny?) remark. I usually use Mercurial, so I had to refresh my Git knowledge for some cookbooks management - I had a bit of time, so I’ve put some effort in reading up some details and … until now I was so sure that Git & Mercurial are almost the same and the differences are meaningless as both are pretty much the same.

Realizing the truth (that actually they differ quite a lot) was a bit of shock. But in the end I think I’ve started to like Git, so most likely I’ve give it a go soon.

Share this post