# Overriding remote cookbooks with local copies

**URL:** <https://discourse.chef.io/t/overriding-remote-cookbooks-with-local-copies/3566>\
**Category:** Chef Infra (archive)\
**Created:** [January 4, 2013, 11:17pm UTC](https://discourse.chef.io/t/overriding-remote-cookbooks-with-local-copies/3566 "2013-01-04T23:17:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirill\_Timofeev](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Kirill\_Timofeev](https://discourse.chef.io/u/Kirill_Timofeev)\
**Post date:** [January 4, 2013, 11:17pm UTC](https://discourse.chef.io/t/overriding-remote-cookbooks-with-local-copies/3566/1 "2013-01-04T23:17:57Z")

</div>

Hi,

I have number of cookbooks on chef server depending on each other. I  
wonder if I can override some of those cook books with local copies for  
testing purposes. I want to make changes to cook book, run chef-client  
which would use chef-server to fetch all cook books except changed one,  
verify that my changes work as expected and only after that submit  
updated cook book to chef server. Is it possible?

Thanks,  
Kirill.

---

<div class="post-metadata">

**Author:** ![Ranjib](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/ranjib/32/1040_2.png) [@Ranjib](https://discourse.chef.io/u/Ranjib)\
**Post date:** [January 4, 2013, 11:59pm UTC](https://discourse.chef.io/t/overriding-remote-cookbooks-with-local-copies/3566/2 "2013-01-04T23:59:49Z")

</div>

cookbook versions can address this. You can specify version of individual  
cookbooks in their metadata. You can enforce every environment to use a  
particular version (in absence of which, most upstream version will be  
picked up). You can specify cookbook versions in individual node's run list  
also.

In a typical cookbook development workflow you might consider having  
multiple chef environments, say dev, test and production. Dev environment  
wont have any cookbook version constrain, while in test you can freeze the  
latest stable versions once they are tested in dev, and finally production  
containing battle tested cookbooks in test environment.

On Fri, Jan 4, 2013 at 3:17 PM, Kirill Timofeev [kvt@hulu.com](mailto:kvt@hulu.com) wrote:

> Hi,
> 
> I have number of cookbooks on chef server depending on each other. I  
> wonder if I can override some of those cook books with local copies for  
> testing purposes. I want to make changes to cook book, run chef-client  
> which would use chef-server to fetch all cook books except changed one,  
> verify that my changes work as expected and only after that submit updated  
> cook book to chef server. Is it possible?
> 
> Thanks,  
> Kirill.

---

<div class="post-metadata">

**Author:** ![Kirill\_Timofeev](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Kirill\_Timofeev](https://discourse.chef.io/u/Kirill_Timofeev)\
**Post date:** [January 5, 2013, 1:09am UTC](https://discourse.chef.io/t/overriding-remote-cookbooks-with-local-copies/3566/3 "2013-01-05T01:09:00Z")

</div>

Hi Ranjib,

thank you for your input, this approach seems reasonable, though it  
requires some efforts for versions support.

Thanks,  
Kirill.

On 01/04/2013 03:59 PM, Ranjib Dey wrote:

> cookbook versions can address this. You can specify version of  
> individual cookbooks in their metadata. You can enforce every  
> environment to use a particular version (in absence of which, most  
> upstream version will be picked up). You can specify cookbook versions  
> in individual node's run list also.
> 
> In a typical cookbook development workflow you might consider having  
> multiple chef environments, say dev, test and production. Dev  
> environment wont have any cookbook version constrain, while in test  
> you can freeze the latest stable versions once they are tested in dev,  
> and finally production containing battle tested cookbooks in test  
> environment.
> 
> On Fri, Jan 4, 2013 at 3:17 PM, Kirill Timofeev \<[kvt@hulu.com](mailto:kvt@hulu.com)  
> [mailto:kvt@hulu.com](mailto:kvt@hulu.com)\> wrote:
> 
> ```
> Hi,
> 
> I have number of cookbooks on chef server depending on each other.
> I wonder if I can override some of those cook books with local
> copies for testing purposes. I want to make changes to cook book,
> run chef-client which would use chef-server to fetch all cook
> books except changed one, verify that my changes work as expected
> and only after that submit updated cook book to chef server. Is it
> possible?
> 
> Thanks,
> Kirill.
> 
> ```
