Chef QuickStart – What is Chef and most used terminologies.

Chef QuickStart -- What is Chef and most used terminologies.

In this article you will know what is Chef, what are Chef Server Components, How to run your Chef Server, terminologies and components

What is Chef?

Chef is an infrastructure as code, an automation platform which will allow you to build and manage your infrastructure with ease. Chef is based on Ruby language.

Chef Main Server Components

Chef Server vs Chef Workstation vs Chef Node

Chef Server
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.

Chef Workstation
A workstation is a computer running the Chef Development Kit (ChefDK) that is used to author cookbooks, interact with the Chef server, and interact with nodes.

Chef Node
Chef node is any server which is configured to be maintained by Chef.

 

Ways to have Chef Server

  1. Managed Hosted Chef
    Which means you will pay for usage and it will be running as a service.
  2. Chef server
    In-house Chef server "Master" and "Nodes" -- opensource.
  3. AWS OpsWorks, a free service from AWS which you will pay for only the managed nodes, this will work only for your AWS resources.

 

Chef Terminologies and Components:

Organizations
-- Inside Chef Server you can organize or split your usage based on different companies, different applications or any other critiria.

Environments
Example: QA, Staging, Production..
Environments may include policies of data attributes or package location...etc

 

Nodes
Nodes simply are the servers either pycisal or virtual that managed by Chef.

Resource
This is one of the most used component and it's a piece of the system which the configuration can be applied to.
Examples:
File, Package, User, Director, File, Template, Remote_File, Cookbook_file..etc

Cookbooks
Is a a folder to store the recipes in, Cookbook can contain recipes, templates, file and custom resources. Cookbooks can be shared and/or downloaded from marketplace.

Recipes
They are the configuration files which include all the steps and tasks to be done to any of the node resources.

Example: A receipe to install httpd and update it and ensure that it's running.


Roles

For example if you have nodes which all share specific role like "webserver" or "DBserver" you can assign a role to them which that role will have specific recipes which will be share and assigned to all of them , instead of assigning that recipe to each node you can simply assign it to the role.
For each role it can include a run list of configurations to be applied for that role, ex.: a role for DB server will include specific config. and specific packages to ensure.

Search
Chef server is keeping data about each node, so simply you can use the search option to search for specific hostname or ip ..etc through search query. All data of each node are being gathered by a Chef service called Ohai.

Learn how to install Chef Server, Chef Workstation and bootstrap a node.


Subscribe to
for video tutorials updates