How to use policyfiles for local/testing w supermarket cookbooks?

I want to write a blog to show how to develop/test locally with Chef and Vagrant using cookbooks from the Supermarket. So I need an easy way to fetch external cookbooks for local test.

I came across Policyfiles, but this seems to be a server only thing? How would you do this locally with chef zero?

From my research, I found this:

  • Berkshelf can work locally, but the source authors recommend Policyfiles
  • Vagrant had support for Berkshelf with vagrant-berkshelf, but this project was archived after support using Vagrant as a gem was pulled.
  • There was a wrapper for chef-solo and chef-zero, but now gives 404 error: https://github.com/nkadel/nkadel-chef-solo-wrapper
  • There's no equivalent for these, such as vagrant-policyfile or other automation to use external cookbooks in local testing.

It is correct that Policyfiles make it easy to reference external cookbooks for local testing with Test Kitchen. It might be easier to walk through with you with the number of questions that you have. Are you available on our Chef Community Slack to have a chat / huddle? If so, find me there.

We actually do exactly that, a pretty simple thing to do. If help is needed, we can probably help some..