What is Chef

Configuration management is mainly concerned with the creation, maintenance, controlled change and quality control of the scope of work. Chef is one of the best configuration management tools, that benefits the entire organization infrastructure. In this blog post, we are going to cover the topics like what is chef, why is chef, key metrics of chef, configuration management with chef, key building blocks of chef, and the features of the chef.

What is chef

It is a tool used for Configuration Management that is closely competing with Puppet. It is an automation tool which provides a way used to define infrastructure as code, and that Infrastructure as code means managing infrastructure through writing code instead of using manual processes. Chef may also be termed as programmable infrastructure, and uses a pure-Ruby, domain-specific language, that is for writing system configurations. 

The following are the types of automation done by Chef, irrespective of the size of infrastructure, they are.

  • Infrastructure configuration
  • Application deployment
  • Configurations are managed across your network

Same as Puppet, that has a Master-Slave architecture and also the Chef has a Client-Server architecture. But it has an extra component named as Workstation. Observe the following diagram.


Nodes are dynamically updated with the configurations in the Server of the Chef, which is named as Pull Configuration that means which we don’t require to execute for a single command on the Chef server, used to push the configuration on the nodes, which will automatically update themselves along with the configurations present in the Server. 

AWS Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

Why is chef

Chef is an infrastructure automation tool, which has grown rapidly in the last few years for its immense advantages that they lay in configuration management. Even they are making the IT management simplier for more efficiency, and more flexible than before. Specially its concept of “infrastructure as code” is becoming increasingly popular, by using it we will have many advantages.

  • Speedy Software Delivery: If we are able to deliver the software changes speedly it accelerates our organisation speed, the automation of IT infrastructure used for a fast deployment of all the software needs like creating new environments, testing and reviewing changes to the code base, and deploying new software versions.
  • Increased service Resiliency: When we think It is important that the error requires to be rectified pretty quickly in addition to speedy deployment, the infrastructure automation increases our system’s resiliency and thereby decreases the downtime.
  • Effective Risk Management: Its infrastructure automation is able to lower the risk and improve compliance at all stages of a development. Even the security policies and compliance may be encapsulated as part of a Chef recipe and tested automatically before it is being deployed.
  • Accelerates Cloud adoption: There are many organizations, which are switching to a cloud environment and this move is much smoothened by using Chef. And its servers and infrastructure can be automatically installed, configured, and provisioned simply with Chef recipes.
  • Manage Cloud as well as Data Center: It is the perfect solution, which fits all the requirements, be it cloud or datacenter and we keep using Chef when we change the cloud providers.
  • Streamlined IT operations and workflow: Chef increases complexities in IT infrastructure of businesses, It breaks this complexity and streamlines our IT operations and workflow. It also provides a pipeline for continuous deployment starting from building to testing and all the way through delivery, monitoring, and troubleshooting.

Key metrics of chef

  • The configuration management tool chef supports various platforms, they are like AIX, RHEL/CentOS, FreeBSD, OS X, Solaris, Microsoft Windows and Ubuntu. And also supports the additional client platforms which include Arch Linux, Debian and Fedora.
  • It also has active, smart and fast growing community support.
  • As It have maturity and flexibility, it is being used by giants, they are like HP Public Cloud, Prezi, Xero, Mozilla, Expedia, Facebook, Ancestry.com, Rackspace, Get Satisfaction,, Bonobos, Splunk, Citi, DueDil, Disney, and Cheezburger, IGN, Marshall University, Socrata, University of Minnesota, Wharton School of the University of Pennsylvania.
  • It maintains three dimensions of scale, when we generally look at infrastructure  , the number of its servers, the volume of various configurations across those systems, and the number of people needed to maintain those configurations. Chef offers a solution for automation, which is flexible enough that is used to bend to our scale dynamics without requiring us to change our workflow. There is no doubt Chef is one of the most famous Configuration Management tools, that is closely competing with Puppet.
Ops Trainerz

Subscribe to our youtube channel to get new updates..!

Configuration management with chef

One of the traditional deployment workflows is Gannett, which was characterized by various handoffs and manual tests. see what were the problems they faced with this process, the problem are.

  • It is difficult to maintain accurate and repeatable builds.
  • It faced many build failures and tests, which were often running in the wrong environments.
  • Its Deployment and provisioning times could range from a few days to several weeks.
  • Its Operations team didn’t have access for the cloud or for the development environments.
  • Each group used its own tool set, and there is no place for accountability, which is for finance or security. There is no one , who knew how much an application actually cost and the Security had no way to audit the software stacks.

It was ready for the change and developers needed to deploy their applications fastly, operations needed a stable infrastructure, which could be built and deployed in a repeatable way. The Finance wanted to know the true value of an application and the security wanted to view and audit all stacks that were able to track changes.

It saw that cloud as a service provided many advantages, the Developers had access to standardized resources. and it is  simple to handle peaky traffic as cloud’s compute on demand model, and handoffs were minimized.

The configuration tool Chef provides us the dynamic provision and deprovision, and our infrastructure on demand to keep up with peaks in usage and traffic. Chef used to enable new services and features, that are deployed and updated more frequently, along with little risk of downtime. By using Chef we can take advantage of all the flexibility and cost savings that cloud offers. 

  • Gannett began building Virtual Private Cloud, which is used for development environments, it would mimic the production.
  • There are no other tools, which were already using them appropriately, they found that Chef worked properly with the cloud and with the both Linux and Windows environment.
  • And it used Chef to build a development environment, which is a perfectly matched production environment.


  • Its  deployment became faster and more reliable, and the Application provisioning and deployment, That once took weeks, after using Chef it took minutes.
  • The latest applications were deployed on the cloud along with Chef, these applications were deployed to all environments in a similar way, which they were deployed to production.
  • The testing occurred in each environment, so that the deployments were reliable. With it All infrastructure was treated as code, which greatly increased visibility into many changes which occurred. Development, Operations, Security and Finance all benefited from this.

Key building blocks of chef

Recipe: Recipe can be defined as  the collection of attributes that are used to manage the infrastructure. Those are loaded during the process of Chef client running and compared with the existing attribute of the node, and then it gets to the status that is defined in the node resource of the recipe and it is the main workhorse of the cookbook.

Cookbook: It is a collection of recipes, which are the basic building blocks that get uploaded to Chef server, While Chef run takes place, it helps to ensure the recipe.

Resource: Resource is the basic component of a recipe, that is used to manage the infrastructure with various types of states. Which can be various resources in a recipe, that will help in configuring and managing the infrastructure. They are like.

  • package − Manages the packages on a node
  • service − Manages the services on a node
  • user − It manages the users on the node
  • group − It manages groups
  • template −  It Manages the files with embedded Ruby template
  • file − It Manages the contents of a file on the node
  • directory − It manages the directories on the node
  • execute − It Executes a command on the node
  • cron − It Edits an existing cron file on the node

Attribute: There are several various types of attributes which can be applied, with a various level of precedence over the final settings, which the node operates under.

File: It contains any static file that will be placed on the nodes and uses the cookbooks. Then the recipe can be announced as a resource, which moves the files from that directory to the final node.

Templates: Templates are similar to the files, but they are not static. Its files end with the .ebr extension, that means they have embedded Ruby, and They are mainly used to substitute an attribute value into the files that will be placed on the node.

Metadata.rb: This is helped to manage the metadata about the package, that includes details like the name and details of the package. And it also contains things like dependency information, which tells which cookbooks. It requires management and allows the Chef server to build the run-list of the node. And it ensures that all of the pieces are transferred correctly.

Default Cookbook Structure


AWS Training

Weekday / Weekend Batches

Features of chef

Adam Jacob created The configuration management tool Chef in 2009, he used three key insights to address the shortcomings and also saw in other configuration management tools. 

  • This configuration management tool should easily enable web IT, that offers first class support to manage the cloud infrastructure.
  • The infrastructure is unique for everyone, Its complex and enterprise infrastructures benefit greatly from becoming able to model their IT infrastructure and application that the delivery process as code. The tools and ideas come out of a vibrant and also involved user community, we can’t do them alone. It provide Over time with the support of community, it has evolved to have a powerful set of features, which make it unique among configuration management tools
  • Extreme scalability: The users like Facebook, use the  Chef to manage tens of, thousands of servers, to use only a handful of employees.
  • Power: This Chef is built on top of the Ruby programming language, when we need it and have full access to the power of Ruby for customized Chef.
  • Choice: We are not locked as one way of using Chef, it can operate in a distributed standalone mode and in a centralized mode that needs a server. And there are also options, used to pull or push models for deployment.
  • Open: This chef is open source, it is supported by a vibrant community of system administrators and developers. Its open source has been used for power products from Dell, Facebook, Amazon Web Services, etc.
  • Visible: This is one of a premium feature, and the Analytics Platform, which provides powerful enhancements for Chef integrated along with the tool, which we can be notified..

Its unique approach provides us tremendous flexibility, and we don't need to struggle for conformity to Chef, and it adapts to us and our environment. We can deploy to the cloud and infrastructure. We can describe any resource that has in code no matter how much it differs from a standard configuration, there is no reason to begin from scratch as many standard infrastructure configurations and tasks are described in cookbooks are available for free on the Supermarket site of Chef.


It is an automation platform, which configures and manages our infrastructure. Either it is on-premises or in the cloud, we can deploy to the infrastructure type, which makes the most sense for our organizations. We may use Chef for speed up of  application deployment, and also used for creating a continual deployment pipeline. And the key for Chef’s power is that, which turns infrastructure into code. The infrastructure as code means, our computing environment has some of the similar attributes as our application, they are like our infrastructure is versionable, our infrastructure is repeatable, our infrastructure is testable. Its components of Development Kit used to support us as we write Chef code on our development workstation, and its Server provides additional components.

AWS Lambda Developer
I am working as AWS Lambda Developer since 2014. and I have good knowledge skills on AWS & DevOps Platform. TO share my Knowledge through Blogs from OpsTrainerz is Good Opportunity to Me.

Request for more information