DevOps Lab

Chef Local Cookbook Development Badge Practice Cookbook

We deploy the real environment, you take the scenario-based labs on us. Hands-on, from anywhere, at any time.

Time required: 2 Hours

Suggested Pre Requisites

Ensure you have run the script to install the prerequisites outlined in the objectives section. This will install the ChefDK along with Docker and Git. The source code will be placed onto the lab server for you.


Log in to your lab server, and from your home directory, use the following command to install the prerequisites. Run the following command: 

curl -s | bash

Once the installations have completed, you will need to log back in to your lab server and descend into the lcd_basic directory and complete the tasks outlined in the scenario. Try to complete this in one hour.



During this lab, you will perform tests and satisfy those tests to ensure you have met all of the requirements of the cookbook. You may choose to create the code which provides a solution for the tests with either CentOS or Ubuntu as provided in the .kitchen.yml, which is contained within the provided cookbook. You may use as documentation but do not make use of the search function. You may also use as a reference.


Your objectives are as follows:

1. Write the Chef recipe code so that all tests are passing within Test Kitchen for Ubuntu or CentOS or both.
2. Create an attribute called greeting which contains the string: "Greetings".
3. Place a template in /var/www/html and use the attribute within it to output the phrase "Greetings, Planet Earth!".
4. Use the PHP cookbook from the supermarket with version 3.1.1 to install php.

Share our Labs
Start Your Free Trial

We have the longest and most in depth courses about cloud and engineering topics on the web. All of our training content is included with every membership.