2

My project is structured with our company cookbooks in a directory separate from 3rd-party cookbooks.

cookbooks
|
|- CompanyCookbooks
|   |
|   |-MyCookbook
|
|- 3rdPartyCookbooks
|   |
|   |-ark

While working from the "MyCookbook" directory, I'm trying to run kitchen converge on my cookbook. The default recipe in MyCookbook depends on ark which is in a separate set of cookbooks under the 3rdPartyCookbooks directory. But I get the following error.

Missing Cookbooks:
------------------
No such cookbook: ark

I've tried to add the path to "3rdPartyCookbooks" to my knife.rb but that didn't work.

cookbook_path ['../../CompanyCookbooks', '../../3rdPartyCookbooks']

I've tried to add various permutations of cookbook_path to the provisioner section of my .kitchen.yml file but that didn't work either.

provisioner:
  name: chef_zero
  data_bags_path: ../../../databags
  roles_path: ../../../roles
  solo_rb:
    cookbook_path:
      - ../../3rdPartyCookbooks
      - ../../CompanyCookbooks

and

provisioner:
  name: chef_zero
  data_bags_path: ../../../databags
  roles_path: ../../../roles
  cookbooks_path: '../../CompanyCookbooks, ../../3rdPartyCookbooks'

related to How to specify cookbook path in .kitchen.yml file for chef_solo provisioner?.

Community
  • 1
  • 1
TreverW
  • 440
  • 7
  • 16
  • 1
    May worth [reading the doc](http://kitchen.ci/docs/getting-started/adding-dependency) – Tensibai Oct 22 '15 at 09:23
  • And [this one](https://docs.chef.io/config_yml_kitchen.html) may be of better help for the provisonner section. (Don't think a solo.rb entry will apply to a chef-zero provisionner) – Tensibai Oct 22 '15 at 09:34
  • Bah. I have this exact same issue and setup as @TreverW and I've done many _permutations_ just like him. RTFM isn't working. The magic settings must be hidden. I hope someone can be more specific to help other people that come here. – squarism Jan 19 '16 at 23:51

2 Answers2

1

As correctly stated before you need to use a Berkshelf. Adding Berksfile like this solved the dependency:

source "https://supermarket.chef.io"
metadata
cookbook "aws", path: "../aws"
0

KitchenCI can fetch cookbook dependencies in remote machines via a dependency manager like Berkshelf or Librarian Chef. When not using a dependency manager it looks for ./cookbooks/ and ./site-cookbooks/ relative to the kitchen execution and synchronizes it to the remote machine (that is not configurable as far I know).

cookbook_path is a property of knife.rb not KitchenCI