[chef] Re: Re: Using kitchen override/stub a cookbook


Chronological Thread 
  • From: Yauhen Artsiukhou < >
  • To:
  • Subject: [chef] Re: Re: Using kitchen override/stub a cookbook
  • Date: Fri, 7 Aug 2015 15:44:16 +0300

+1 Noah
Using wrapper for test always is really good idea. Here is example https://github.com/jsirex/collectd-lib-cookbook

I'm using noe template tool for creating cookbook skeletons, which are by default use wrapper cookbook: https://github.com/jsirex/chef-cookbook.noe

2015-08-06 23:54 GMT+03:00 Noah Kantrowitz < " target="_blank"> >:

On Aug 6, 2015, at 1:50 PM, Bill Warner < "> > wrote:

> I am trying to setup testing with kitchen and docker,  some cookbooks like the supermarket "hostname" cookbook are not compatible with docker but they are used in my final deployments.  I'd like to stub these out just for when kitchen docker is used to speed up early testing but not when vagrant or doing a berks install.
>
> I thought I'd use groups in my Berksfile, but that would still try to upload/install the stub cookbook to my chef server while doing a berks install unless i specify a -e docker_integration, and Berksfile doesn't seem to be processed by erb.
>
> I was unable to find anywhere in the .kitchen.yml file where I could override a single cookbook, or a way to have it not process a cookbook.

Use a wrapper cookbook that only include_recipe-s the real one if you aren't on Docker.

--Noah





Archive powered by MHonArc 2.6.16.

§