DevOps for Web Development: Installing and Configuring Chef

Configuration management(CM) manages changes in the system or, to be more specific, the server runtime environment. Let’s consider an example where we need to manage multiple servers with same kind of configuration. For example, we need to install Tomcat on each server. What if we need to change the port on all servers or update some packages or provide rights to some users? Any kind of modification in this scenario is a manual and, if so, error-prone process. As the same configuration is being used for all the servers, automation can be useful here. Automating installation and modification in the server runtime environment or permissions brings servers up to spec effectively.

We are going to see how Chef is useful in end-to-end automation of the application delivery lifecycle. Let’s revisit the context. We want to create an end-to-end pipeline where the application source files are compiled, unit tests are executed, package file is created, a new virtual machine created, runtime environment is setup, and deployment is performed. Chef in our context plays a vital role, considering its many uses. We are going to use it for setting up our runtime environment and standardizing the process of configuration management rather than implementing a customized way to install tools using scripts. Centralized configuration management makes it easy to control and configure resources without complication.

This chapter describes in detail the configuration management tool Chef, the installation of its components and alternatives, and the configuration of components and convergence of a node for preparing a runtime environment for Java EE application using cookbooks. However, writing a cookbook and a detailed discussion of Chef components is out of the scope of this book as it will take up too much space. You will learn how to install and configure Chef and converge a node based on cookbooks/roles.

We will cover the following topics:

  • Getting started with Chef
  • An overview of hosted Chef
  • Installing and configuring a Chef workstation
  • Converging a Chef node using a Chef workstation


For more details get the DevOps for Web Development book.

DevOps for Web Devlopment

It is also available at:

Leave a comment

Your email address will not be published. Required fields are marked *