Information Technology Reference
In-Depth Information
On the other hand, when
chef-client
is running in
client mode
, it assumes you have a Chef
Server running on some other system on your network. In production, this is how most
people use Chef. In client mode,
chef-client
is an agent (or service/daemon) that runs loc-
ally on a machine managed by Chef. Chef Server is a centralized store for the information
needed to manage infrastructure with Chef. It is recommended that you set up Chef Server
when you need to manage more than one machine at a time.
Before
chef-client
local mode was implemented in version 11.8, the only way to run Chef
recipes without a Chef Server was to use
chef-solo
.
chef-solo
offers an additional client
mode called
solo mode
. Solo mode provides a limited subset of Chef functionality intended
to be able to run Chef locally.
chef-solo
does not support
writeback
. In most cases,
local
mode
is far more convenient to use than
solo mode
. Eventually, Chef software plans to retire
solo mode once local mode has feature parity with solo and when the majority of customers
have migrated to
chef-client
11.8 or higher. Solo mode is most popular in places still us-
ing older versions of Chef.
Ohai
When Chef Client performs a Chef run, a separate command-line tool called
ohai
is used to
collect system information. Ohai exposes this collection of node information to Chef as a set
of
automatic attributes
.
Try running
ohai
yourself, so you can see what information is being collected about your
node. On our system,
ohai
generates 1058 lines of output, so make sure you pipe the com-
mand's output through the
more
command to present the information a screen at a time. You
don't have to look through the whole output. When you're done, hit the
q
key to exit back to
the command line:
$ ohai | more
{
"network": {
"interfaces": {
"lo": {
"mtu": "16436",
"flags": [
"LOOPBACK",
"UP",
"LOWER_UP"
],