Custom plugins

For most purpose, the plugins provided by Ohai will be good enough. However, sooner or later, one lands up in a situation where one wants some attributes associated with nodes being provisioned, and these attributes define a system-level property that can be used to make certain decisions during the chef-client run. For such cases, Ohai provides us with the ability to write our own custom plugins. Ohai provides a very simple DSL that can be used for this purpose. For example, we run a large number of machines on AWS and there are different kinds of machines available known by different names such as m1.xlarge, c1.xlarge, and so on. We want to push different configurations on the basis of different types of EC2 instance. So, we go ...

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.