# chef\_knives: chef addons to become a cooking master!

**URL:** <https://discourse.chef.io/t/chef-knives-chef-addons-to-become-a-cooking-master/1284>\
**Category:** Chef Infra (archive)\
**Created:** [September 11, 2009, 10:27am UTC](https://discourse.chef.io/t/chef-knives-chef-addons-to-become-a-cooking-master/1284 "2009-09-11T10:27:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergio\_Rubio1](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@Sergio\_Rubio1](https://discourse.chef.io/u/Sergio_Rubio1)\
**Post date:** [September 11, 2009, 10:27am UTC](https://discourse.chef.io/t/chef-knives-chef-addons-to-become-a-cooking-master/1284/1 "2009-09-11T10:27:32Z")

</div>

Hey guys!

Just a quick email to say thank-you!

We are evaluating Chef in a 200+ nodes infrastructure. We're loving it!

I've created a little github repo with some scripts we use internally  
to gather info from the CouchDB chef database.

> **[GitHub - rubiojr/chef-knives: Chef addons to become a cooking master!](https://github.com/rubiojr/chef-knives)**
>
> Chef addons to become a cooking master! Contribute to rubiojr/chef-knives development by creating an account on GitHub.

Documentation:  
[http://wiki.github.com/rubiojr/chef-knives](http://wiki.github.com/rubiojr/chef-knives)

Keep on rocking guys,

> we  
> need  
> Chef!

Cheers!  
Sergio.

---

<div class="post-metadata">

**Author:** ![Adam\_Jacob](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/adam_jacob/32/292_2.png) [@Adam\_Jacob](https://discourse.chef.io/u/Adam_Jacob)\
**Post date:** [September 11, 2009, 6:05pm UTC](https://discourse.chef.io/t/chef-knives-chef-addons-to-become-a-cooking-master/1284/2 "2009-09-11T18:05:19Z")

</div>

Nice work, Sergio!

We haven't done much work yet on the reporting potential of Chef, so  
it's great to see what you've done. I think it would be cool to see  
this evolve into a big collection... 🙂

Just to make sure we don't stomp on each other, Chef 0.8 will ship  
with an expanded version of corp's 'knife' command line utility.

Let us know if there is anything we can to do help,  
Adam

On Fri, Sep 11, 2009 at 3:27 AM, Sergio Rubio [rubiojr.ml@gmail.com](mailto:rubiojr.ml@gmail.com) wrote:

> Hey guys!
> 
> Just a quick email to say thank-you!
> 
> We are evaluating Chef in a 200+ nodes infrastructure. We're loving it!
> 
> I've created a little github repo with some scripts we use internally  
> to gather info from the CouchDB chef database.
> 
> [GitHub - rubiojr/chef-knives: Chef addons to become a cooking master!](http://github.com/rubiojr/chef-knives)
> 
> Documentation:  
> [http://wiki.github.com/rubiojr/chef-knives](http://wiki.github.com/rubiojr/chef-knives)
> 
> Keep on rocking guys,
> 
> > we  
> > need  
> > Chef!
> 
> Cheers!  
> Sergio.

--  
Opscode, Inc.  
Adam Jacob, CTO  
T: (206) 508-7449 E: [adam@opscode.com](mailto:adam@opscode.com)

---

<div class="post-metadata">

**Author:** ![Sergio\_Rubio1](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@Sergio\_Rubio1](https://discourse.chef.io/u/Sergio_Rubio1)\
**Post date:** [September 16, 2009, 4:16pm UTC](https://discourse.chef.io/t/chef-knives-chef-addons-to-become-a-cooking-master/1284/3 "2009-09-16T16:16:42Z")

</div>

Hey Adam!

On Fri, Sep 11, 2009 at 8:05 PM, Adam Jacob [adam@opscode.com](mailto:adam@opscode.com) wrote:

> Nice work, Sergio!

Thanks!

> We haven't done much work yet on the reporting potential of Chef, so  
> it's great to see what you've done. I think it would be cool to see  
> this evolve into a big collection... 🙂

We are trying to add a chef backend to our datacenter inventory app.  
I'll let you know how it goes... :D. From what I can see, node  
attributes from ohai are everything we need (almost)

> Just to make sure we don't stomp on each other, Chef 0.8 will ship  
> with an expanded version of corp's 'knife' command line utility.

Not quite sure what you mean. Do you mean naming a chef\_knives script  
knife? No worries if that's the case!

> Let us know if there is anything we can to do help,  
> Adam

Sure! in fact (:D) we are writing some ohai plugins, but we haven't  
found the documented way of installing them so we use the following  
method:

1. edit /etc/chef/client.rb
2. add the following line to the end of the file:

Ohai::Config[:plugin\_path] \<\< '/etc/ohai/plugins' #you can choose  
any path you want

1. add your custom plugins there (i.e. /etc/ohai/plugins)
2. reload the client:  
/etc/init.d/chef-client restart

Is there a better way of doing it?  
What happens if a future/new version of an ohai plugin overrides or  
uses the same name for an attribute that we are using in a custom  
plugin? (we put every attribute from our plugins under an attribute  
with our company's name to avoid this... hopefully that will be  
enough...)

Let me know what you think.

One last thing. I've created a github repo with ohai plugins we are  
writing, in case anyone is interested:

> **[GitHub - rubiojr/ohai-plugins: Custom ohai plugins](https://github.com/rubiojr/ohai-plugins)**
>
> Custom ohai plugins. Contribute to rubiojr/ohai-plugins development by creating an account on GitHub.

Cheers!

---

<div class="post-metadata">

**Author:** ![Joel\_Merrick](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joel_merrick/32/893_2.png) [@Joel\_Merrick](https://discourse.chef.io/u/Joel_Merrick)\
**Post date:** [September 16, 2009, 4:20pm UTC](https://discourse.chef.io/t/chef-knives-chef-addons-to-become-a-cooking-master/1284/4 "2009-09-16T16:20:21Z")

</div>

On Wed, Sep 16, 2009 at 5:16 PM, Sergio Rubio [rubiojr.ml@gmail.com](mailto:rubiojr.ml@gmail.com) wrote:

> We are trying to add a chef backend to our datacenter inventory app.  
> I'll let you know how it goes... :D. From what I can see, node  
> attributes from ohai are everything we need (almost)

Sounds interesting... We're currently using GLPI 😢 but we have  
heavily customised it to produce rack diagrams etc.. which is nice

The Ohai stuff could be an excellent addition to the inventory part of  
new provisions

--  
$ echo "kpfmAdpoofdufevq/dp/vl" | perl -pe 's/(.)/chr(ord($1)-1)/ge'

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [September 16, 2009, 4:31pm UTC](https://discourse.chef.io/t/chef-knives-chef-addons-to-become-a-cooking-master/1284/5 "2009-09-16T16:31:30Z")

</div>

Sergio, this is pretty cool stuff, I'll definitely be keeping an eye on it  
and playing with it some more in the next few days. The data in chef has  
huge potential, it's nice to see some people working to unlock it.  
Just to clear up the "knife" thing, knife is a command line program that  
works with the chef HTTP API. You can see the proof-of-concept version here:

> <https://gist.github.com/jsierles/100837>

So when 0.8 is released, (to my knowledge) installing it will also install  
the knife program (much improved from the gist version) in your rubygems bin  
directory (or some bin directory depending on the install method).

Dan DeLeo

On Wed, Sep 16, 2009 at 10:16 AM, Sergio Rubio [rubiojr.ml@gmail.com](mailto:rubiojr.ml@gmail.com) wrote:

> Hey Adam!
> 
> On Fri, Sep 11, 2009 at 8:05 PM, Adam Jacob [adam@opscode.com](mailto:adam@opscode.com) wrote:
> 
> > Nice work, Sergio!
> 
> Thanks!
> 
> > We haven't done much work yet on the reporting potential of Chef, so  
> > it's great to see what you've done. I think it would be cool to see  
> > this evolve into a big collection... 🙂
> 
> We are trying to add a chef backend to our datacenter inventory app.  
> I'll let you know how it goes... :D. From what I can see, node  
> attributes from ohai are everything we need (almost)
> 
> > Just to make sure we don't stomp on each other, Chef 0.8 will ship  
> > with an expanded version of corp's 'knife' command line utility.
> 
> Not quite sure what you mean. Do you mean naming a chef\_knives script  
> knife? No worries if that's the case!
> 
> > Let us know if there is anything we can to do help,  
> > Adam
> 
> Sure! in fact (:D) we are writing some ohai plugins, but we haven't  
> found the documented way of installing them so we use the following  
> method:
> 
> 1. edit /etc/chef/client.rb
> 2. add the following line to the end of the file:
> 
> Ohai::Config[:plugin\_path] \<\< '/etc/ohai/plugins' #you can choose  
> any path you want
> 
> 1. add your custom plugins there (i.e. /etc/ohai/plugins)
> 2. reload the client:  
> /etc/init.d/chef-client restart
> 
> Is there a better way of doing it?  
> What happens if a future/new version of an ohai plugin overrides or  
> uses the same name for an attribute that we are using in a custom  
> plugin? (we put every attribute from our plugins under an attribute  
> with our company's name to avoid this... hopefully that will be  
> enough...)
> 
> Let me know what you think.
> 
> One last thing. I've created a github repo with ohai plugins we are  
> writing, in case anyone is interested:
> 
> [GitHub - rubiojr/ohai-plugins: Custom ohai plugins](http://github.com/rubiojr/ohai-plugins)
> 
> Cheers!
