Time required: 2 Hours
Ensure you have run the script to install the pre-requisites 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 pre-requisites. Run the following command:
curl -s https://gist.githubusercontent.com/msaliano/bc239567480d6356e49f2f445d0c4969/raw/0e380bbc87cb32a49d42deda2f62faad84ec10e5/lachef.sh | bash
Once the installations have completed you will need to log back into 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 https://docs.chef.io as documentation but do not make use of the search function. You may also use https://supermarket.chef.io 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.