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


Chronological Thread 
  • From: Torben Knerr < >
  • To:
  • Subject: [chef] Re: Re: What is the cookbook development workflow in your team?
  • Date: Thu, 5 Jan 2012 10:12:05 +0100

Hi James,

thanks for sharing! Interesting to see the different approaches you can go for.

Few questions about your approach:

1) as you describe you have a git repo clone of your chef repository on each of your chef servers, then check out locally on the chef server and then knife upload to localhost if i understood correctly. Why do you need a git repo clone of your chef repository on the chef server? Wouldn't it be enough to knife upload from an external box (e.g. developer's box, build server) to either of your chef servers?

2) as far as i understand your cookbook dependencies are versionless during delevopment/upload/test/fix cycles and you always release the whole chef repo instead of single cookbooks. As soon as you do a release, does the script you mention update the Version number of all your cookbooks? Does it at this point in time also add this version number to the cookbook depends statements (and remove it afterwards for the next dev/upload/test/fix cycle)?

3) do you ever have the situation that you need to set up a node with an older cookbook version (e.g. for regression testing)?

Cheers,
Torben


On Thu, Jan 5, 2012 at 4:24 AM, James Litton < "> > wrote:
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.

§