Ohai is a library used by Chef to collect information about nodes within your infrastructure. Information is collected by a set of Ohai plugins, most of which parse the output of system commands.
During lunch on Friday, I create a simple Ohai plugin to collect some basic information about R. You can find the plugin here:
https://github.com/stevendanna/ohai-plugins/blob/master/r.rb
Currently, this plugin collects:
- The version of R,
- The installed packages, and
- The output of
capabilities()
To use this plugin right away, the easiest course of action is to use the Opscode Ohai cookbook. From your chef repository:
1 2 3 4 5 6 7 8 9 |
|
In order to avoid unnecessary runs of Ohai within a chef-client run
you can add the following line to the client.rb
configuration file on your nodes:
1
|
|
If you are using Opscode’s chef-client cookbook, this will already be taken care of for you.
The following is an example of the information it collects:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
Also, Happy New Year!