[chef] Re: Cookbook Architecture


Chronological Thread 
  • From: Peter Donald < >
  • To:
  • Subject: [chef] Re: Cookbook Architecture
  • Date: Thu, 18 Oct 2012 05:56:18 +1100

Hi,

Mostly we try to support multiple versions of a product through a single version of a cookbook. That way we can have the same cookbook deployed across dev/uat/staging/production but have different product versions in each environment. We have cases where there is differences in the install between different versions of the product we will often have a sprinkling of if's in the cookbook ala;

if node['product']['version'] > '1.0'
  # Do 1.0 magic
else
  # Do pre 1.0 magic
end

The main reason we do this is we can decouple the release process from the process that uploads/promotes cookbooks.

On Thu, Oct 18, 2012 at 1:30 AM, < " target="_blank"> > wrote:
Hi Chefs,

We have come across this design pattern many times when building out our
cookbooks and can't quite decide which makes the most sense. Do you write your
cookbook such that the latest version of the cookbook can install any version
of the application it is installing/configuring or do you create separate
versions of the cookbook for each version of the cookbook (i.e. each cookbook
version installs only one version of the software)? The Opscode cookbooks seem
to go with the first strategy but we have found we can make simpler cookbooks
by going with the second strategy.

Any thoughts?



--
Cheers,

Peter Donald



Archive powered by MHonArc 2.6.16.

§