0

Follow-up to this answer.

Running chef solo:

sudo chef-solo -c config.rb -j config.json



Starting Chef Client, version 12.16.42
resolving cookbooks for run list: ["terraform"]

================================================================================
Error Resolving Cookbooks for Run List:
================================================================================

Missing Cookbooks:
------------------
No such cookbook: terraform

Expanded Run List:
------------------
* terraform

Platform:
---------
x86_64-linux

Cookbooks installed using berkshelf contain a version postfix

user@host ~ $ ls ~/.berkshelf/cookbooks/

terraform-0.5.3

If terraform-0.5.3 is renamed to terraform and chef-solo is run again, the terraform cookbook is found, but another one cannot be found:

Missing Cookbooks:
------------------
No such cookbook: build-essential

Attempt to solve the issue

The issue was solved by removing the postfix version from all the cookbooks that reside in the following directory:

user@host ~ $ ls ~/.berkshelf/cookbooks/
ark  ark-1.1.0  build-essential-7.0.2  compat_resource  compat_resource-12.16.2  mingw  mingw-1.2.4  ohai  ohai-4.2.2  seven_zip  seven_zip-2.0.2  terraform-0.5.3  windows  windows-2.1.1

This approach has some side effects:

  1. Every time berks install is run the cookbooks are downloaded again
  2. The postfix needs to be removed every time
030
  • 5,901
  • 13
  • 68
  • 110

1 Answers1

2

You don't use the berkshelf storage folder directly, it's a storage folder. To export in a format that Chef can use, run berks vendor FOLDERNAME/.

coderanger
  • 858
  • 4
  • 13