Chef-zero "deprecated" and chef solo to be used again?


On the #chef IRC channel, coderanger said:

Datamancer: What you want is to use chef-solo
Datamancer: Like I said, you want to use chef-solo
The only reason to still be using chef-client -z is for policy archives
The docs are out of date
The correct thing to use now is chef-solo again

Does chef-solo (with version 12.3.0?) support all the things, that chef-zero supports/supported? Are encrypted data bags built in? What about search?

And, maybe a bit more important: Is this somewhere somehow “documented”, that chef-solo is to be favoured instead of chef-zero?

Thanks a lot,

Not that I know, latest version of chef-client/chef-solo is 12.13. Chef-solo now use local-mode, keeping original behavior, with enhanced possibility of using search etc, if you give it a repo. So it is not that local mode is deprecated, only the command which chef-solo covers now.

Useful links to latest documentation:

We (the maintainers) haven’t done a great job on publicizing this. Starting in Chef 12.11, chef-solo was unified with chef-client to both use the same internal code paths. The original solo behavior has been left via a legacy mode flag, but this will be removed in Chef 13. We have been trying to go back to a simpler way to talk about things: Chef is Chef, there is only one Chef, if you use Chef with Chef Server you run chef-client, otherwise you run chef-solo. Two flavors, one “thing”. The hope is that long term this will be clearer but in the short term it definitely isn’t, for which I apologize. The main exception to this currently is that the output from chef export needs to be run with chef-client -z instead of chef-solo, but this is a bug that will be fixed in the future. Other than that one issue, everything that works in Chef should work in both chef-client and chef-solo as best as we can make it.

1 Like

@coderanger from what you said looks like chef-solo is the way to go.

But in the docs seems like “chef-client -z” is the prefered way:

The chef-client includes an option called local mode (–local-mode or -z), which runs the chef-client against the chef-repo on the local machine as if it were running against a Chef server. Local mode was added to the chef-client in the 11.8 release. If you are running that version of the chef-client (or later), you should consider using local mode instead of using chef-solo.

chef-solo and chef-client -z are functionally identical, besides the behaviour that @coderanger noted regarding the output of chef export. I’ll get the docs fixed, thanks.