# Customizing cookbooks

**URL:** <https://discourse.chef.io/t/customizing-cookbooks/3214>\
**Category:** Chef Infra (archive)\
**Created:** [October 22, 2012, 5:26pm UTC](https://discourse.chef.io/t/customizing-cookbooks/3214 "2012-10-22T17:26:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Storey](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Jeff\_Storey](https://discourse.chef.io/u/Jeff_Storey)\
**Post date:** [October 22, 2012, 5:26pm UTC](https://discourse.chef.io/t/customizing-cookbooks/3214/1 "2012-10-22T17:26:05Z")

</div>

I have installed a cookbook to my chef server using knife cookbook site install  
, and I need to make some customizations to it. I’ve done that and  
then pushed it up to my git repo where we’re storing all of our cookbooks.

What is the appropriate way to make sure I am receiving updates from the  
opscode public repo? Do I just run knife cookbook site install again  
and then merge the changes with my git repo? Or is there a better way to do  
that?

---

<div class="post-metadata">

**Author:** ![Edward\_Sargisson](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/edward_sargisson/32/570_2.png) [@Edward\_Sargisson](https://discourse.chef.io/u/Edward_Sargisson)\
**Post date:** [October 23, 2012, 12:21pm UTC](https://discourse.chef.io/t/customizing-cookbooks/3214/2 "2012-10-23T12:21:50Z")

</div>

That's how I've been doing it.  
Note that knife cookbook site install will do the branch, tag and merge for you.  
There is a gotcha where if it downloads dependencies that you've  
already updated then there will be no changes for git and the process  
stops - however the cookbook you wanted will have worked.

I also use the git diff process to review every change that is made by  
the updated cookbook.

Secondly, (although kind of firstly) I watch each cookbook on the  
cookbooks site so that I know when they change.

Cheers,  
Edward

On Mon, Oct 22, 2012 at 10:26 AM, [jeff.storey@nextcentury.com](mailto:jeff.storey@nextcentury.com) wrote:

> I have installed a cookbook to my chef server using knife cookbook site install  
> , and I need to make some customizations to it. I've done that and  
> then pushed it up to my git repo where we're storing all of our cookbooks.
> 
> What is the appropriate way to make sure I am receiving updates from the  
> opscode public repo? Do I just run knife cookbook site install again  
> and then merge the changes with my git repo? Or is there a better way to do  
> that?

---

<div class="post-metadata">

**Author:** ![millisami\_r](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/millisami_r/32/418_2.png) [@millisami\_r](https://discourse.chef.io/u/millisami_r)\
**Post date:** [October 23, 2012, 2:06pm UTC](https://discourse.chef.io/t/customizing-cookbooks/3214/3 "2012-10-23T14:06:03Z")

</div>

Using tools like librarian or berkshelf will simplify and reduce the pain of developing customized cookbook.

* * *

@millisami  
~ Sachin Sagar Rai  
Ruby on Rails Developer  
[http://tfm.com.np](http://tfm.com.np)  
[http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
Sent with Sparrow ([http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig))

On Tuesday, October 23, 2012 at 6:06 PM, Edward Sargisson wrote:

> That's how I've been doing it.  
> Note that knife cookbook site install will do the branch, tag and merge for you.  
> There is a gotcha where if it downloads dependencies that you've  
> already updated then there will be no changes for git and the process  
> stops - however the cookbook you wanted will have worked.
> 
> I also use the git diff process to review every change that is made by  
> the updated cookbook.
> 
> Secondly, (although kind of firstly) I watch each cookbook on the  
> cookbooks site so that I know when they change.
> 
> Cheers,  
> Edward
> 
> On Mon, Oct 22, 2012 at 10:26 AM, \<[jeff.storey@nextcentury.com](mailto:jeff.storey@nextcentury.com) ([mailto:jeff.storey@nextcentury.com](mailto:jeff.storey@nextcentury.com))\> wrote:
> 
> > I have installed a cookbook to my chef server using knife cookbook site install  
> > , and I need to make some customizations to it. I've done that and  
> > then pushed it up to my git repo where we're storing all of our cookbooks.
> > 
> > What is the appropriate way to make sure I am receiving updates from the  
> > opscode public repo? Do I just run knife cookbook site install again  
> > and then merge the changes with my git repo? Or is there a better way to do  
> > that?
