0
votes

Is there a tool available that allows packaging of a resolved set of resources from a full chef repo? Something similar to berkshelf's package command, but that can determine dependencies (e.g. data bags, environments, roles) and include them.

Background

I have a chef repo that includes data bags, environments and roles. The repo is uploaded to a chef server and then used by chef-client in different environments. However, in certain circumstances, chef solo is more appropriate for a host. In this case, I'd like to organize components of the repo into functional distributable packages that can be delivered to a host and used for a local chef solo run. When running a chef-client with a role in the run-list, cookbooks are synchronized locally and converged with data bags. I'm looking for a tool that can effectively do the same thing in advance.

To get a similar result, I can create a Berksfile that defines the required cookbooks for a role (which is what I use in run lists passed to chef solo), but have to manually cater for data bags and roles.

2

2 Answers

2
votes

Not yet, but it is something we are working on internally: https://tickets.opscode.com/browse/CHEF-4984.

2
votes

You'll most likely want to use chef-zero and chef-client -z local mode instead of using chef-solo. There are fundamental differences between chef-solo and chef-client introduced by chef-solo being designed to not talk to a server (search is a large sticking point), and those differences will not be fixed. The solution is to point chef-client at a local chef-zero instance.