Chef is an open-source configuration management tool. It uses the Ruby language. You can use the Ruby language to create cookbooks and save them to a server, and use the server for centralized configuration enforcement and management.
Figure 1 Chef network framework
As shown in Figure 1, Chef operates in a client/server network framework. Basic Chef network components include the Chef server, Chef clients, and workstations.
The Chef server is used to centrally manage Chef clients. It has the following functionalities:
Deploying cookbooks to Chef clients on demand.
Creating .pem key files for Chef clients and workstations.
Workstations provide the interface for you to interact with the Chef server. You can create or modify cookbooks on a workstation, and upload the cookbooks to the Chef server.
A workstation can be hosted by the same host as the Chef server.
Chef clients are network devices managed by the Chef server. Chef clients download cookbooks from the Chef server and use the settings in the cookbooks.
H3C devices can run Chef 12.3.0 to act as Chef clients.
Chef uses Ruby to define configuration items. A configuration item is defined as a resource. A cookbook contains a set of resources for one feature.
Chef manages types of resources. Each resource has a type, a name, one or more properties, and one action. Every property has a value. The value specifies the state desired for the resource. You can specify the state of a device by setting values for properties, without caring about how the device enters the state.
H3C has defined a series of Chef resources for the Chef server to configure Chef clients.