How does Chef take system inventory? Ohai! Ohai makes system details accessible via Node Object attributes, which are accessible inside of recipes.
- [Instructor] You'll remember from the previous exercises,…we're executing the chef-client command.…You may have noticed by taking a look in the output…that chef seems to know something…about the server that it's running on.…For example, when I executed the chef-client command,…it understands that we're using the apt-get package manager…to actually install packages on this Ubuntu-based system.…If we were on a different system,…like CentOS or Red Hat distribution in general,…you'd see it using Yum here to install packages.…
How did the chef-client know…that we're on an Ubuntu-based system?…The answer lies in a utility that comes with the ChefDK,…or more accurately, with the chef-client, called Ohai.…Ohai is how we take system inventory.…Ohai is a command line application…that ships with the chef-client.…In fact, it's required by the chef-client,…and it's able to query the system for a number of useful…details that we might like to use in our chef code.…
When you run the Ohai command,…its output will be presented to you in JSON.…
This intermediate-level course provides insights into the Chef architecture through practical examples and demos, including the deployment of a PHP application on top of a LAMP stack. Instructor Robin Beck walks through recipe development and the various prebuilt cookbooks available from the Chef community Supermarket, and reviews best practices for building wrapper cookbooks that allow you to access recipes from different cookbooks. He also shows how to work more efficiently with knife commands for managing clients, cookbooks, and data.
- Building a setup recipe
- Using cookbooks to organize recipes
- Using community recipes
- Uploading cookbooks
- Using the database cookbook
- Adding PHP to the mix
- Searching with knife
- Testing cookbooks with Kitchen
Skill Level Intermediate
1. Review the Fundamentals
2. Community Code
3. Complete the LAMP Stack
4. The Joy of Test Kitchen
Next steps3m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.