The Chef Server acts as a hub for configuration data. The Chef Server stores cookbooks, the policies that are applied to cookbooks, and metadata that describes each registered node in the infrastructure. Nodes use the chef-client to ask the Chef Server for configuration details, such as recipes, templates, and file distributions. The chef-client then does as much of the configuration work as possible on the nodes themselves (and not on the Chef Server). This scalable approach distributes the configuration effort throughout the organization.
Starting with the release of Chef 11.x, the front-end for the Chef Server is written using Erlang, which is a programming language that first appeared in 1986, was open sourced in 1998, and is excellent with critical enterprise concerns like concurrency, fault-tolerance, and distributed environments. This version of Chef can scale to the size of any enterprise and is often referred to as Erchef.
The following diagram shows the various components that are part of a Chef Server deployment and how they relate to one another.
| Component | Description |
|---|---|
| Bookshelf | Bookshelf is used to store cookbook content—files, templates, and so on—that have been uploaded to the Chef Server as part of a cookbook version. Cookbook content is stored by content checksum. If two different cookbooks or different versions of the same cookbook include the same file or template, Bookshelf will store that file only once. The cookbook content managed by Bookshelf is stored in flat files and is separated from the Chef Server and search index repositories. All cookbooks are stored in a dedicated repository. |
| WebUI | chef-server-webui is a Ruby on Rails 3.0 application that hosts the web interface for the Chef Server. |
| Erchef | Erchef is a complete rewrite of the core API for the Chef Server, which allows it to be faster and more scalable than previous versions. The API itself is still compatible with the original Ruby-based Chef Server, which means that cookbooks and recipes that were authored for the Ruby-based Chef Server will continue to work on the Erlang-based Chef Server. The chef-client is still written in Ruby. Note Even though Chef 11.x is authored in Erlang, writing code in Erlang is NOT a requirement for using Chef 11.x. |
| Message Queues | Messages are sent to the Search Index using the following components:
All messages are added to a dedicated search index repository. |
| Nginx | Nginx is an open-source HTTP and reverse proxy server that is used as the front-end load balancer for the Chef Server. All requests to the Chef Server API are routed through Nginx. |
| PostgreSQL | PostgreSQL is the data storage repository for the Chef Server. |