Custom resource/provider packaged as a gem?

I can’t seem to find an example of a custom resource/provider packaged and
distributed as a gem? Is that because it not currently practical to do so?

Thanks!

Brian

Hi,

It is possible but the unit of reuse in the chef community tends to be
the cookbook. So if you need a heavyweight resource then it can be
distributed in the lib dir of the cookboook, otherwise convert it to a
LWRP distribute it through the usual cookbook means.

On Fri, Apr 27, 2012 at 11:43 AM, Brian Parker onebrianparker@gmail.com wrote:

I can't seem to find an example of a custom resource/provider packaged and
distributed as a gem? Is that because it not currently practical to do so?

Thanks!

Brian

--
Cheers,

Peter Donald

Hello,

On Apr 26, 2012, at 19:43, Brian Parker onebrianparker@gmail.com wrote:

I can't seem to find an example of a custom resource/provider packaged and distributed as a gem? Is that because it not currently practical to do so?

It's certainly practical to distribute libraries that contain resource and provider classes as RubyGems. The chef-deploy gem[0] by Ezra Zygmuntowicz does this. It is not an lwrp though. If you want an lwrp then you should put it in the cookbook because then chef will do its automatic class loading.

[0]: the functionality of this gem is now in the deploy resource that comes with chef