[chef] Re: Re: [chef-dev] Re: ideas for chef-hackday at Chefconf, Tuesday afternoon, May 15


Chronological Thread 
  • From: Bryan Berry < >
  • To:
  • Subject: [chef] Re: Re: [chef-dev] Re: ideas for chef-hackday at Chefconf, Tuesday afternoon, May 15
  • Date: Wed, 25 Apr 2012 20:14:31 +0200

hmm, I have something different in mind

Jay, like we talked on the podcast, I think cookbooks need to be
self-contained. Here is how I think it should be laid out

I definitely think that the Vagrantfile, Toftfile (my own invention),
and Cheffile should live at the cookbook/COOKBOOK-NAME/  level

cookbook/COOKBOOK-NAME/
                                              attributes/
                                              definitions/
                                              files/
                                              libraries/
                                              providers/
                                              recipes/
                                              resources/
                                              temp/      # cache
cookbooks sourced by Cheffile
                                              tests/              #
tests or test? don't know the convention
                                                        minitest/
                                                                     recipe1/

          some_test.rb

          some_test2.rb
                                                                      recipe2/

         . . .
                                                        cucumber/
                                                        rspec/
                                              Cheffile
                                              Cheffile.lock
                                              Rakefile
                                              Toftfile
# same as Vagrantfile but for toft
                                              Vagrantfile

The Cheffile at the at COOKBOOK-NAME level would be used by
Vagrantfile or Toftfile to source the other cookbooks needed to run
integration tests.

that's my euro 0,02

On Wed, Apr 25, 2012 at 7:53 PM, Jay Feldblum 
< >
 wrote:
> It may be wise to structure the Git repository of tested cookbooks according
> to the following convention:
>
> /
>     cookbooks/
>     #   .gitignore'd
>     #   for cookbooks installed via librarian-chef
>     #   this is an assumption librarian-chef currently makes
>     cookbook/
>         COOKBOOK-NAME/
>             attributes/
>             definitions/
>             files/
>             libraries/
>             providers/
>             recipes/
>             resources/
>             templates/
>             metadata.rb
>     test/
>         integration/
>             some_integration_test.rb
>             some_other_integration_test.rb
>     .gitignore
>     #   includes:
>     #       cookbooks/
>     #       Cheffile.lock
>     Cheffile
>     #   to support Vagrantfile
>     #   the cookbook under test may depend on other cookbooks
>     Cheffile.lock
>     #   .gitignore'd
>     #   don't add to git in a cookbook repo
>     #   only add to git in an infrastructure repo
>     Rakefile
>     #   has a task for zipping up the content of cookbooks/COOKBOOK-NAME
>     #   and optionally for releasing to the Opscode Community Site
>     Vagrantfile
>     #   if using Vagrant for testing
>     #   references cookbooks located in cookbooks/ (dependencies) and
> cookbook/ (under test)
>
> If people think this is a good idea, I may add intelligence to
> Librarian-Chef's git source to try to find the cookbook inside
> cookbook/COOKBOOK-NAME/ if it can't find the cookbook at the top-level of
> the git repo. However, for now, people can always use the format:
>
> cookbook "COOKBOOK-NAME",
>     :git => "git://github.com/user/COOKBOOK-NAME",
>     :path => "cookbook/COOKBOOK-NAME"
>
> Cheers,
> Jay
>



Archive powered by MHonArc 2.6.16.

§