O'Reilly logo

Learning Chef by Rishabh Sharma, Mitesh Soni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and uploading a simple cookbook

We can also write our own cookbooks. This section will give us a better understanding of cookbooks.

A cookbook works as a container that describes the configuration and policy definition of an application or software in Chef. It has dependencies as well. For example, the development repository for Opscode's Cookbook Tomcat is available at https://github.com/opscode-cookbooks/tomcat. It installs and configures Tomcat on various platforms, such as Ubuntu, Debian, Red Hat 6+, CentOS 6+, and so on. Java and OpenSSL are the dependencies for a Tomcat cookbook.

The following is the high-level structure of a cookbook:

The following screenshot shows the directory structure of a Tomcat cookbook:

The following is an expanded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required