The ups and downs of omnibus

So recently (in my attempts at cleaning up kitchen-cabinet), I’ve started to look at the benefits and pitfalls of omnibus installers.

Vagrant is a good example of the benefits - it started out life as a pure ruby gem, but it had a lot of dependencies, and it was kind of hard to manage all of them. In addition, the developers of vagrant realized that speed and efficiency could be increased by not always using pure ruby code - tools like bsdtar are much faster than the ruby implementation! So, Vagrant switched to a package installer. This allows it to have an embedded ruby installation, complete with all the extensions and dependencies it needs! Because these are all managed internally, you can’t break vagrant by changing things with your system ruby (and you reallly don’t need to have or use your system ruby at all!).
Not everyone who uses vagrant is a ruby developer, so the less tinkering they have to do to get things working, the better! Vagrant has succeeded in using the omnibus method properly.

On the other hand, there are tools like chef, which don’t work as well in the omnibus style! I hit this issue while developing kitchen-cabinet. At the time, cabinet loaded some portions of knife to help generate a cookbook skeleton. This worked just fine if you had chef installed as a gem in your system ruby - but not so much if you used omnibus chef! So, my choices were to either shell out to chef and hope for the best, or just install the gem version of chef no matter what. Kitchen-cabinet is not the only gem with this problem - chefspec is another notable one. It depends on the chef gem, so if you add just chefspec into a gemfile, you’ll end up installing the chef gem as well!
While it is possible to install things in the embedded ruby that omnibus-chef supplies, that gets wiped out every time you update omnibus chef!

Chef is improving these things however - there is a new project called chefdk that aims at fixing these integration problems. You now have a supported method of installing extra gems/tools into your chefdk ruby, without losing them with every chefdk update! You get the benefit of being able to require portions of knife or other chef tools, while at the same time having the flexibility of shelling out if you want to use something from the system ruby!

 
0
Kudos
 
0
Kudos

Now read this

The Definition of Done

What exactly is the definition of done? What steps are required before you can say a feature is done? The DoD (Definition of Done) should be a simple checklist of activities/steps that should be completed that add value to the product... Continue →