|
Answer» Chef Client Run (CCR) is performed on each node by following several steps to ensure that the Chef node reaches its desired state. The different steps include - Get node data – Here the "client.rb" file present in Chef node is read and retrieves the Chef node data through the OHAI processes. The most important data acquired here is the node name.
- Authentication – Authenticates the Chef node with the Chef server using the RSA private key.
- Get and rebuild the node object - Once authenticated the node object is pulled down from the Chef Server and then rebuilt. If it is the first client run no node object will be present on Chef Server.
- The run list expanded - Run list of the rebuilt node object is expanded to get a complete list of roles and recipes that will be applied to Chef node.
- Sync cookbooks - The Chef node also checks with the server for all the cookbooks REQUIRED to perform the run list. If the cookbooks don’t match with the ones already cached in the node through previous client runs, then the changed FILES or new files are downloaded.
- Reset node object - All attributes in the node object is set according to attribute precedence.
- Load cookbooks and collect resources – The cookbooks are then loaded to the MEMORY, analyzed closely and all the resources required to perform the OPERATIONS are collected.
- Converge – This is where the actual execution of the resources collected takes place on the Chef node.
- Update node object - Node object in the Chef server is UPDATED with the node object built during the Chef Client run.
- Chef run wait - Chef client run waits for the next time it’s run.
|