Overriding remote cookbooks with local copies


#1

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.


#2

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 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.


#3

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> 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.