Chef

Chef

Basic

'Chef' is an open-source (and enterprise) automation platform created by Opscode that configures and manages your infrastructure (local or cloud). It is generally used to speed up application deployment, create a continuous delivery pipeline, and monitor infrastructure. By converting infrastructure to code, Chef makes infrastructure configuration versionable, testable, and repeatable.

This competency area includes an understanding of configuration management in Chef, an understanding of Chef architecture, exploring the Chef workflow, understanding Cookbooks, Recipes, and Knives, creating, deleting, listing, and downloading cookbooks, viewing information of a node, among others. 

Key Competencies: 

  1. Configuration management - An understanding of configuration management in Chef. It is a process for maintaining computer systems, servers, and software in a desired, consistent state. It is a process that makes sure that systems and software perform consistently across a cluster as expected as changes are made over time.
  2. Node - Nodes are end-point machines where the Chef client is installed. These include laptops, desktops, mainframes, edge devices, etc.
  3. Chef Architecture - An understanding of Chef architecture. Chef follows a client-server architecture. The architecture contains the following key components:
    • Workstation - A workstation is a machine in which Chef is installed and configurations are developed and then uploaded to the Chef server. 

    • Chef Server - The Chef server is the hub where all the configuration data is stored, which includes, the cookbooks, node policies, metadata of the managed nodes.

    • Chef Client - The Chef client is installed in the nodes which check for updated cookbooks in the chef server and execute the cookbook on the node.

  4. Workflow - Exploring the Chef Workflow - Workstation, a chef server, and a chef-client [for one or more nodes] is set up. Cookbooks are configured on the workstation and pushed to the chef-server which acts as a hub for storing configuration data for the managed cluster. Meanwhile, the chef clients keep polling the chef server for new cookbooks or any changes made to the cookbooks. In case a change is required, the chef-client retrieves the cookbook and executes the instructions.
  5. Understanding Cookbooks and Recipes - Cookbooks are the fundamental units of configuration management with Chef. They contain information about the desired state of a node (or a cluster of nodes). Cookbooks are a collection of one or more recipes. Recipes are written in Ruby that define a particular configuration or policy of a node. Recipes can be written for setting up software on a machine to setting or changing values of resources and more.
  6. Understanding Knife - Knife is a command-line interface (CLI) which is the primary way that the workstation communicates or interfaces with the Chef server. Awareness of basic commands with a knife such as creating, deleting, listing, and downloading cookbooks, viewing information of a node, etc. are included in this competency.
  7. Advantages and Disadvantages - Chef has four key advantages: highly scalable (supports many nodes and multi-cloud environments), interoperable (chef client’s can be windows or Linux machines), good support on AWS, and a dependable enterprise version. Disadvantages: Uses ruby for writing configuration, cookbooks are maintained in a common workspace (hard to maintain and avoid mistakes), not easy to manage (a dedicated person is required to manage the workstation), and a community and advanced documentation are lacking.