Upgradable cookbook strategy


#1

Hi,

I’m new to chef, and thus far have been playing around with some basic
cookbooks that deploy services consisting of jars and configuration files.

I have now started looking into versioning of cookbooks and how to incorporate
incremental upgrades in the versioned cookbooks. The idea is that given my chef
client already has version ‘x’ of my cookbook installed and I then subsequently
apply a newer version, ‘y’, I don’t necessarily want everything to be
reapplied. I only want to apply the delta, which is necessary to upgrade from
version x to version y. Such a delta might consist of altering tables in a
database, adding properties to configuration files etc. If the installed
version is more than one version apart from the new version to be installed,
there might be several deltas to apply.

Do chef cookbooks have any mechanisms or strategies for applying such deltas?
For instance, how is it possible during a chef-client run to detect which
cookbook version is currently installed, in order to know which deltas to
apply?

Kind regards,
Sims