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


Chronological Thread 
  • From: Jay Feldblum < >
  • To:
  • Subject: [chef] Re: [chef-dev] Re: ideas for chef-hackday at Chefconf, Tuesday afternoon, May 15
  • Date: Wed, 25 Apr 2012 13:53:45 -0400

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.

§