[chef] Re: What is the cookbook development workflow in your team?


Chronological Thread 
  • From: James Litton < >
  • To:
  • Subject: [chef] Re: What is the cookbook development workflow in your team?
  • Date: Wed, 4 Jan 2012 19:24:09 -0800

Torben,

 Thank you for bringing this up. I have also been puzzling about this 
recently.

Right now the process that I am using involves 3 chef servers.

Development:
- Branch git
- Test/Deploy on Chef Solo (dedicated dev box with separate role in
prod chef server)

Test:
- Checkout branch on test chef server
- Push entire configuration (via shell script that I wrote)
- Force a chef-client run on a hosts in test by environment (Load
Test, staging, preview)
- Complete testing

Code Review
- Review the changes in the branch as well as the test cases

Prod (hosts developer environment and production hosts):
- Merge branch to master
- git pull on prod
- Push config via script
- Force chef-client run here only if required due to external requirement

The only issue really is the Test Chef server sharing, but testing can
generally be done quickly by maintaining smaller updates.

cookbook versions number changes aren't as important due to re-upload
of the cookbook with each push and splitting environments across chef
servers

The release process is not currently automated other than the script
that updates all roles, environments, data bags and cookbooks with
each release.

Generally the entire chef repository is treated as a version/release
in order to avoid version dependencies within each cycle.

I'd also love to hear what other people are doing.

James
PagerDuty

On Wed, Jan 4, 2012 at 11:58 AM, Torben Knerr 
< >
 wrote:
> Hi everybody,
>
> Happy New Year! :-)
>
> This is my first post to this mailing list. I'm trying to implement a proper
> workflow for developing cookbooks within a small team. Coming from a
> slightly different background (Java, Maven and the like) I'm looking for
> some experience on how to implement a typical develop/test/release cycle in
> a Chef environment.
>
> So, assuming you are developing cookbooks in a team, how would you go for
> adding a new feature to a cookbook:
>
>  (a) develop -> test (using Vagrant/Chef Solo) -> repeat develop/fix/test
> cycle until done -> upload to team's chef server
>  (b) develop -> test (upload to a private chef server) -> repeat
> develop/fix/test cycle until done -> upload to team's chef server
>  (c) develop -> test (upload directly to team's chef server) -> repeat
> develop/fix/test cycle until done
>
>
> I'm especially interested in:
>
>  1) at which point in time do you share your sources (git push)?
>     - are you working on feature branches, then merge + push when done?
>     - when do you increase the cookbook version? in the commit where you
> merge back to master?
>     - when do you create the tag? everytime you commit something on master?
>
>  2) at which point in time do you upload the cookbook to the team's chef
> server (knife upload)?
>     - whenever you want to test something?
>     - strictly only after creating a tag (i.e. releases only)?
>     - do you always freeze uploaded cookbooks?
>     - do you allow to overwrite cookbooks at all?
>
>  3) how do you handle releases?
>     - is every upload to the chef repository automatically a (public?)
> release for you?
>     - do you have the release process (roughly: "run tests -> create tag ->
> upload cookbook") automated?
>     - how do you handle cookbook dependencies when you release? do you allow
> for versionless cookbook depends?
>
>
> Eager to hear your experiences. Any help is appreciated!
>
> Cheers,
> Torben



Archive powered by MHonArc 2.6.16.

§