- From: Seth Chisamore <
>
- To:
- Subject: [chef] Re: Re: Re: Installing handlers with chef_handler
- Date: Thu, 21 Jul 2011 12:26:39 -0400
Zac,
You could fork the repo, but the preferred way would be to just track the
upstream cookbook in your local chef-repo using the 'vendor branch' pattern.
An implementation of this pattern (that works with git) is built into 'knife
cookbook site install'.
This command does the following:
* Download the cookbook tarball from cookbooks.opscode.com.
* Ensure its on the git master branch (or specify with --branch option).
* Checks for an existing vendor branch, and creates if it doesn't.
* Checks out the vendor branch (chef-vendor-COOKBOOK).
* Removes the existing (old) version.
* Untars the cookbook tarball it downloaded in the first step.
* Adds the cookbook files to the git index and commits.
* Creates a tag for the version downloaded.
* Checks out the master (or desired) branch again.
* Merges the cookbook into master (or desired branch).
For more information on 'knife cookbook site install' and the vendor pattern
check out the wiki page [0] on the topic.
Seth
--
Opscode, Inc.
Seth Chisamore, Senior Technical Evangelist
IRC, Skype, Twitter, Github: schisamo
[0]
http://wiki.opscode.com/display/chef/Working+with+Git+and+Cookbooks
On Thursday, July 21, 2011 at 12:14 PM, Zac Stevens wrote:
>
Hi Seth,
>
>
On Thu, Jul 21, 2011 at 5:01 PM, Seth Chisamore
>
<
>
>
(mailto:
)>
>
wrote:
>
> You may have stumbled across a bug. I will try to recreate and open a
>
> COOK ticket if appropriate.
>
>
Thanks for the prompt response - it's appreciated.
>
>
> The JsonFile handler should drop a JSON file in '/var/chef/reports' when
>
> it fires.
>
>
Yeah, that's what I figured. Should it create the directory if it's
>
not present?
>
It didn't (assuming it fired), but creating the directory by hand
>
didn't change anything.
>
>
> Also, we recommend you get cookbooks from the community site using 'knife
>
> cookbook site install' or 'knife cookbook site download'. The repository
>
> you forked, github.com/cookbooks (http://github.com/cookbooks) is not an
>
> Opscode account, and we don't know what the state of the cookbooks in
>
> that repository might be. Opscode maintains the GitHub repository for
>
> development tracking, but not for released versions of cookbooks we can
>
> support. We push the released versions to community.opscode.com
>
> (http://community.opscode.com). For more information see.
>
>
Duly noted - I did start off this exercise using the official cookbook
>
(via "cookbook site install"), but cloning the unofficial repo seemed
>
to make for a cleaner example. I should have noted this in my
>
original post.
>
>
If the preference is to clone github.com/opscode/cookbooks
>
(http://github.com/opscode/cookbooks) as a whole,
>
I'll stick with that in future to avoid confusion.
>
>
Cheers,
>
>
>
Zac
Archive powered by MHonArc 2.6.16.