13

According to the document I should replace chef-solo by chef-client --local-mode.

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. https://docs.getchef.com/ctl_chef_solo.html

I simply replaced the commands and works fine. Is the two commands are always replaceable without reconfigure? Or there are some slight difference I should know?

ironsand
  • 707
  • 1
  • 7
  • 12
  • don't know why this was downvoted? maybe a bit naive but so is everyone at first. and it's a useful question to me as well, thanks for asking – actual_kangaroo Feb 04 '15 at 12:42

2 Answers2

9

The Opscode blog post that introduces local mode points out the single difference:

A note about chef-solo

chef-solo still exists, and this obviously has some overlap there. In most cases where you are using chef-solo, you will be able to use chef-client -z in its place, since chef-client has all of chef-solo’s features and more. Only if your recipes specifically test for :solo mode will things be different, since chef-client does not set this variable.

Unless your cookbooks depend on :solo, they are replaceable.

Mike Clarke
  • 256
  • 2
  • 2
3

The chef-solo command is now deprecated in favor of local-mode/chef-zero:

https://github.com/chef/chef-rfc/blob/master/rfc031-replace-solo-with-local-mode.md

Since ruby roles (and the ruby DSL for other objects) have been fixed in chef-zero/local-mode, it is now the preferred solution over chef-solo.

The support level of chef-solo at this point is effectively abandonware. When triaging issues chef-solo issues are always lowest priority and nobody is working on them. PRs from the community to fix bugs would be accepted, but there are more bug reports in solo than there are PRs.

No new projects should start using chef-solo. Existing projects should convert.

lamont
  • 133
  • 5