Reader small image

You're reading from  Mastering Chef

Product typeBook
Published inJun 2015
Reading LevelIntermediate
Publisher
ISBN-139781783981564
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Mayank Joshi
Mayank Joshi
author image
Mayank Joshi

Mayank Joshi works for Indix as a DevOps engineer. He has worn many hats during his 10-year long career. He has been a developer, a systems analyst, a systems administrator, a software consultant, and for the past 6 years, he has been fascinated with the phenomenal growth witnessed in cloud environments and the challenges of automation associated with the hosting of the infrastructure in such environments. Prior to Indix, he worked for start-ups such as SlideShare, R&D organizations such as CDAC, and even had a stint at a highly automated chemical plant of IFFCO.
Read more about Mayank Joshi

Right arrow

Different sources of attributes


An attribute can be defined at multiple places and it is very important to declare an attribute at the right place with right precedence order. During a chef-client run, attributes are collected from the following different sources:

  • Nodes (collected by Ohai at the start of each chef-client run)

  • Attribute files (associated with cookbook) are collected during compile time

  • Recipes (associated with cookbook. The attributes specified in the recipes might be collected during run time as well

  • Environments

  • Roles

The life cycle of an attribute can be understood by the following sequence of steps:

  1. Developer writes attributes in the attribute file, recipe, role, or environment.

  2. The concerned code is pushed to the Chef server.

  3. During the chef-client run, Ohai collects all the automatic attributes from the node.

  4. The chef-client will pull node object from the chef-server, which will in turn bring in the normal attributes that are persistent.

  5. The chef-client will update the cookbook...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Chef
Published in: Jun 2015Publisher: ISBN-13: 9781783981564

Author (1)

author image
Mayank Joshi

Mayank Joshi works for Indix as a DevOps engineer. He has worn many hats during his 10-year long career. He has been a developer, a systems analyst, a systems administrator, a software consultant, and for the past 6 years, he has been fascinated with the phenomenal growth witnessed in cloud environments and the challenges of automation associated with the hosting of the infrastructure in such environments. Prior to Indix, he worked for start-ups such as SlideShare, R&D organizations such as CDAC, and even had a stint at a highly automated chemical plant of IFFCO.
Read more about Mayank Joshi