Book Image

Mastering Chef

By : Mayank Joshi
Book Image

Mastering Chef

By: Mayank Joshi

Overview of this book

Table of Contents (20 chapters)
Mastering Chef
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Knife and Its Associated Plugins
10
Data Bags and Templates
Index

Chapter 8. Attributes and Their Uses

As we've seen so far, any machine (henceforth referred to as node) can be described through Chef by means of recipes, roles, and environment that it is associated with. However, throughout all this there are a few properties associated with a node as well. A node will have properties such as name, IP address, kernel, FQDN, OS type, and so on, associated with it. All these properties help in defining a system in a more meaningful way. The more properties are associated with a node, the better the quality of its definition. Some of these properties are tightly coupled to the system—for example, OS type, kernel, IP address, and so on—while some are abstract in nature. For example, we might have different kinds of web applications in our setup, some related to finance and others perhaps related to HR. All these applications may be deployed on different machines and they all use the same underlying technology stack; hence, they all have a common role, say...