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