The anatomy of a Chef run
A Chef run here implies either the execution of chef-client or chef-solo, and we'll look at each of them separately.
A Chef run using chef-client
As we learned earlier while understanding terminology, a chef-client is an agent that runs on machines that are meant to be configured using Chef. The chef-client agent is meant to be executed in an environment where we are using Chef in a client-server architecture.
Upon the invocation of a chef-client, the following things happen:
- Ohai is executed and automatic attributes are collected, which are eventually used to build a node object
- Authentication with a chef-server
- Synchronization of cookbooks
- Loading of cookbooks and convergence
- Checking for the status of chef-client run, reporting, ...
Get Mastering Chef now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.