I might have the terminology wrong, but how to a give new puppet providers to the puppet clients? I''m thinking a provider is the thing the puppet client uses to implement a task that the master has given it. Am I way off here? Mike B. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 13 July 2007, barsalou wrote:> I might have the terminology wrong, but how to a give new puppet > providers to the puppet clients? > > I''m thinking a provider is the thing the puppet client uses to > implement a task that the master has given it. > > Am I way off here?Almost there. Using package resources as an example: package { rubygems: provider => rpm, source => "/var/local/rubygems.rpm"; rubysomething: provider => gem, source => "/var/local/rubysomething.gem"; } Here "package" is a type which accepts a set of common parameters and "rpm" and "gem" are providers, who actually call out to the specific binaries. Other types -- like file -- have no providers, since they have no need for varying implementations. There is also http://reductivelabs.com/trac/puppet/wiki/CreatingCustomTypes . Glossing over that, it seems a bit outdated, Luke? To actually use a new type or provider, either put them into lib/puppet/type somewhere on your ruby search path or use the pluginsync option and their friends. Regards, David - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGlxuI/Pp1N6Uzh0URAr4XAJ9r9Cona1rQwutQV43Nm/6aP2lJ2ACfTmPR OWel8ctrS2OL86x4+1Nl/c8=yhZY -----END PGP SIGNATURE-----
--On July 13, 2007 8:28:22 AM +0200 David Schmitt <david@schmitt.edv-bus.at> wrote:> Other types -- like file -- have no providers, since they have no need > for varying implementations. >Unless you want to support things like AFS, perhaps. That would be interesting.
On Jul 13, 2007, at 1:28 AM, David Schmitt wrote:> > Almost there. Using package resources as an example: > > package { > rubygems: provider => rpm, source => "/var/local/rubygems.rpm"; > rubysomething: provider => gem, source => "/var/local/ > rubysomething.gem"; > } > > Here "package" is a type which accepts a set of common parameters > and "rpm" > and "gem" are providers, who actually call out to the specific > binaries. > > Other types -- like file -- have no providers, since they have no > need for > varying implementations.I''ve been planning on converting ''file'' to using providers too, just because it makes a lot of the code cleaner, but I haven''t gotten around to it yet.> There is also http://reductivelabs.com/trac/puppet/wiki/ > CreatingCustomTypes . > Glossing over that, it seems a bit outdated, Luke?I would be surprised if it weren''t. Feel free to open a ticket asking for it to be updated, or even better, please update it.> To actually use a new type or provider, either put them into lib/ > puppet/type > somewhere on your ruby search path or use the pluginsync option and > their > friends.My guess is this is what Mike was asking about -- pluginsync especially. If you write a new provider, how do all of the clients get it? In 0.23.0, there''s no good way to do so, but in 0.23.1, whenever it finally comes out, pluginsync will copy files to Puppet''s libdir, meaning that you can copy any Ruby library there and Puppet will load it automatically. You can actually configure your systems to do that today, but you''ll probably get some spurious warnings if you do. Just set the plugindest to be $libdir. -- Men never do evil so completely and cheerfully as when they do it from a religious conviction. --Blaise Pascal --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
--On Friday, July 13, 2007 10:17:06 AM -0500 Luke Kanies <luke@madstop.com> wrote:> In 0.23.0, there''s no good way to do so, but in 0.23.1, whenever it > finally comes out, pluginsync will copy files to Puppet''s libdir, > meaning that you can copy any Ruby library there and Puppet will load > it automatically. You can actually configure your systems to do that > today, but you''ll probably get some spurious warnings if you do. > Just set the plugindest to be $libdir.What about Facter facts? Should one just manage Facter with Puppet or does it need a special mechanism equivalent to this to distribute new fact-getters? -- Digant C Kasundra <digant@stanford.edu> Technical Lead, ITS Unix Systems and Applications, Stanford University
On Jul 16, 2007, at 1:44 PM, Digant C Kasundra wrote:> What about Facter facts? Should one just manage Facter with Puppet > or does > it need a special mechanism equivalent to this to distribute new > fact-getters?This libdir is in Ruby''s search path, so you should be able to put any Ruby library there. However, factsync works a bit better for facts, at this point, because it reloads facts for you, while pluginsync only knows how to reload Puppet libraries. -- Yesterday upon the stair I met a man who wasn''t there. He wasn''t there again today -- I think he''s from the CIA. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
--On Monday, July 16, 2007 03:01:28 PM -0500 Luke Kanies <luke@madstop.com> wrote:>> What about Facter facts? Should one just manage Facter with Puppet >> or does >> it need a special mechanism equivalent to this to distribute new >> fact-getters? > > This libdir is in Ruby''s search path, so you should be able to put > any Ruby library there. > > However, factsync works a bit better for facts, at this point, > because it reloads facts for you, while pluginsync only knows how to > reload Puppet libraries.The documentation makes it seem like what gets synced is actual facts, not the facter libraries (b/c the default path is $vardir/facts instead of $libdir/facter as one might expect). Am I confused? -- Digant C Kasundra <digant@stanford.edu> Technical Lead, ITS Unix Systems and Applications, Stanford University
On Jul 16, 2007, at 3:34 PM, Digant C Kasundra wrote:> The documentation makes it seem like what gets synced is actual > facts, not > the facter libraries (b/c the default path is $vardir/facts instead of > $libdir/facter as one might expect). Am I confused?Hmm, I guess it''s just poorly named or something. Puppet assumes you''ve got Facter libraries, essentially, in that facts/ directory. They''re things you''d put in lib/facter/. -- I don''t deserve this award, but I have arthritis and I don''t deserve that either. -- Jack Benny --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com