So, I started with puppet about two years ago (December 2008). At the time, I was under the impression that the list of Types would grow a lot (i.e. http://docs.puppetlabs.com/references/stable/type.html ). In fact, the file type says: If you find that you are often copying files in from a central location, rather than using native resources, please contact Puppet Labs and we can hopefully work with you to develop a native resource to support what you are doing. The thing is, that list hasn''t actually changed all that much as far as I can recall. Instead, what seems to have happened is a lot of user-made modules as the code re-use unit; using the native features of puppet (i.e. lots of file{...} and exec{...}) to emulate new types, essentially; see http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Modules I don''t mean this as any kind of criticism, I''m just wondering if this was on purpose? The goal with puppet seemed to be a simple, declarative configuration system, where as many things as possible were handled with native types, and that doesn''t seem to be how things have actually gone, and I''m wondering if this represents an injection of pragmatism or a deliberate decision. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
It''s my understanding that we''d like to have more of both! People do write native (ruby) Types and Providers, and people do write them in Puppet language. We''re working on some new features to make it easier to write Types in the Puppet Language, and we''re working on some new features that make it easier to write Types and Providers in ruby. Eventually we''d like to decouple many of the bundled ruby-language Providers from the Puppet core codebase, so they can be developed in parallel to the framework. I don''t think there''s a philosophical decision in play - sometimes it''s easier to express problems in the ruby, but often people already have working Puppet code that they want to convert into a Type. ~Jesse Wolfe On Mon, Jan 10, 2011 at 7:57 PM, Robin Lee Powell < rlpowell@digitalkingdom.org> wrote:> > So, I started with puppet about two years ago (December 2008). At > the time, I was under the impression that the list of Types would > grow a lot (i.e. > http://docs.puppetlabs.com/references/stable/type.html ). In fact, > the file type says: > > If you find that you are often copying files in from a central > location, rather than using native resources, please contact > Puppet Labs and we can hopefully work with you to develop a native > resource to support what you are doing. > > The thing is, that list hasn''t actually changed all that much as far > as I can recall. > > Instead, what seems to have happened is a lot of user-made modules > as the code re-use unit; using the native features of puppet > (i.e. lots of file{...} and exec{...}) to emulate new types, > essentially; see > http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Modules > > I don''t mean this as any kind of criticism, I''m just wondering if > this was on purpose? > > The goal with puppet seemed to be a simple, declarative > configuration system, where as many things as possible were handled > with native types, and that doesn''t seem to be how things have > actually gone, and I''m wondering if this represents an injection of > pragmatism or a deliberate decision. > > -Robin > > -- > http://singinst.org/ : Our last, best hope for a fantastic future. > Lojban (http://www.lojban.org/): The language in which "this parrot > is dead" is "ti poi spitaki cu morsi", but "this sentence is false" > is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Jan 10, 2011 at 08:33:06PM -0800, Jesse Wolfe wrote:> It''s my understanding that we''d like to have more of both!So what should people who have developed new types do to get them included?> People do write native (ruby) Types and Providers, and people do > write them in Puppet language.Huh? You can write a Type in Puppet? How? I''m only aware of classes and defines, neither of which are that. You go on to say several things that hinge on this question, so I didn''t actually respond to them. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> Huh? You can write a Type in Puppet? How? I''m only aware of > classes and defines, neither of which are that. > >A "define" is a "defined type" - it really fills the same role as both a type and a provider. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Jan 10, 2011 at 11:00:24PM -0800, Jesse A Wolfe wrote:> > Huh? You can write a Type in Puppet? How? I''m only aware of > > classes and defines, neither of which are that. > > A "define" is a "defined type" - it really fills the same role as > both a type and a provider.Well, except for the part where it generally wraps a collection of exec{...} and file{...} calls, which the Puppet documentation says are to be avoided (I assume because they are procedural rather than declarative). So if you''re saying those are fine, then that''s exactly the change I was talking about. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 01/11/2011 05:53 AM, Robin Lee Powell wrote:> On Mon, Jan 10, 2011 at 08:33:06PM -0800, Jesse Wolfe wrote: >> It''s my understanding that we''d like to have more of both! > > So what should people who have developed new types do to get them > included? > >> People do write native (ruby) Types and Providers, and people do >> write them in Puppet language. > > Huh? You can write a Type in Puppet? How? I''m only aware of > classes and defines, neither of which are that. > > You go on to say several things that hinge on this question, so I > didn''t actually respond to them.The way I understand it, it''s more desirable to write actual plugins in ruby. You can download them in modules from the Forge and your puppetmaster can distribute them. The clients need not rely on execs and files but run the ruby snippets locally instead. I cannot comment on how difficult it is to make a plugin part of the official distribution. Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jan 10, 10:53 pm, Robin Lee Powell <rlpow...@digitalkingdom.org> wrote:> Huh? You can write a Type in Puppet? How? I''m only aware of > classes and defines, neither of which are that.Yes, you can, and you can distribute them to clients via Puppet itself. See http://docs.puppetlabs.com/#extending-puppet, and especially http://docs.puppetlabs.com/guides/custom_types.html. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Jan 10, 2011 at 7:57 PM, Robin Lee Powell <rlpowell@digitalkingdom.org> wrote:> > So, I started with puppet about two years ago (December 2008). At > the time, I was under the impression that the list of Types would > grow a lot (i.e. > http://docs.puppetlabs.com/references/stable/type.html ). In fact, > the file type says: > > If you find that you are often copying files in from a central > location, rather than using native resources, please contact > Puppet Labs and we can hopefully work with you to develop a native > resource to support what you are doing. > > The thing is, that list hasn''t actually changed all that much as far > as I can recall. > > Instead, what seems to have happened is a lot of user-made modules > as the code re-use unit; using the native features of puppet > (i.e. lots of file{...} and exec{...}) to emulate new types, > essentially; see > http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Modules > > I don''t mean this as any kind of criticism, I''m just wondering if > this was on purpose? > > The goal with puppet seemed to be a simple, declarative > configuration system, where as many things as possible were handled > with native types, and that doesn''t seem to be how things have > actually gone, and I''m wondering if this represents an injection of > pragmatism or a deliberate decision.I don''t think there''s anything deliberate there. We don''t have native Ruby libraries for many of the things sysadmins need to do, and so even when you write a Ruby type/provider, you''re often execing out to external binaries anyway. Given the barrier to writing anything in Ruby is higher than doing the same thing in Puppet DSL, I think it''s reasonable that people are collecting execs and files together to achieve something concrete. Also I think people have often come to the conclusion that they need several related types in a given problem domain, and so it becomes natural that they distribute these as a module.> > -Robin > > -- > http://singinst.org/ : Our last, best hope for a fantastic future. > Lojban (http://www.lojban.org/): The language in which "this parrot > is dead" is "ti poi spitaki cu morsi", but "this sentence is false" > is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tue, Jan 11, 2011 at 08:17, Nigel Kersten <nigel@puppetlabs.com> wrote:> On Mon, Jan 10, 2011 at 7:57 PM, Robin Lee Powell > <rlpowell@digitalkingdom.org> wrote: >> >> So, I started with puppet about two years ago (December 2008). At >> the time, I was under the impression that the list of Types would >> grow a lot (i.e. http://docs.puppetlabs.com/references/stable/type.html ). >> In fact, the file type says: >> >> If you find that you are often copying files in from a central >> location, rather than using native resources, please contact >> Puppet Labs and we can hopefully work with you to develop a native >> resource to support what you are doing.[...]> I don''t think there''s anything deliberate there. > > We don''t have native Ruby libraries for many of the things sysadmins > need to do, and so even when you write a Ruby type/provider, you''re > often execing out to external binaries anyway.The other thing I keep in mind is that using a ''define'' that wraps some file and exec operations *is* keeping with the spirit of that statement, if not the letter: sure, it defines the type in the DSL, but it means that your nodes are referring to high level types and concepts, not low level implementation details. For example, you could rewrite your ''define apache::site'' into a Ruby type/provider pair and *nothing* would have to change for users of it – the fact that it happens to be implemented one way or the other is encapsulated. For what that is worth... Daniel -- ✉ Daniel Pittman <daniel@rimspace.net> ⌨ daniel@rimspace.net (XMPP) ☎ +1 503 893 2285 ♻ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Robin Lee Powell
2011-Jan-11 18:58 UTC
Re: [Puppet Users] Re: Puppet''s direction in theory?
On Tue, Jan 11, 2011 at 07:07:58AM -0800, jcbollinger wrote:> > > On Jan 10, 10:53 pm, Robin Lee Powell > <rlpow...@digitalkingdom.org> wrote: > > Huh? You can write a Type in Puppet? How? I''m only aware of > > classes and defines, neither of which are that. > > Yes, you can, and you can distribute them to clients via Puppet > itself. See http://docs.puppetlabs.com/#extending-puppet, and > especially http://docs.puppetlabs.com/guides/custom_types.html.That''s not in the Puppet *language*, that''s in Ruby. It was "Puppet Types written in the Puppet language" that I was expressing surprise at. There are defines, but that''s not really the same thing. Again: I don''t see anybody distributing custom *resource types*, I see people distributing custom *modules* and defines. Since the docs at http://docs.puppetlabs.com/references/latest/type.html#exec and http://docs.puppetlabs.com/references/latest/type.html#file both say that actual resource types should be use wherever possible. I would therefore expect there to either be a bunch of new types added to Puppet, or a well-known repository of user-created Puppet types, but there are neither of these things AFAICT. Hence, I''m confused. Philosophically speaking, at least. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tue, Jan 11, 2011 at 10:41:13AM -0800, Daniel Pittman wrote:> The other thing I keep in mind is that using a ''define'' that wraps > some file and exec operations *is* keeping with the spirit of that > statement, if not the letter: sure, it defines the type in the > DSL, but it means that your nodes are referring to high level > types and concepts, not low level implementation details. > > For example, you could rewrite your ''define apache::site'' into a > Ruby type/provider pair and *nothing* would have to change for > users of it – the fact that it happens to be implemented one way > or the other is encapsulated.I didn''t realize it was that clean, actually. Thanks. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 01/11/2011 07:59 PM, Robin Lee Powell wrote:> On Tue, Jan 11, 2011 at 10:41:13AM -0800, Daniel Pittman wrote: >> The other thing I keep in mind is that using a ''define'' that wraps >> some file and exec operations *is* keeping with the spirit of that >> statement, if not the letter: sure, it defines the type in the >> DSL, but it means that your nodes are referring to high level >> types and concepts, not low level implementation details. >> >> For example, you could rewrite your ''define apache::site'' into a >> Ruby type/provider pair and *nothing* would have to change for >> users of it – the fact that it happens to be implemented one way >> or the other is encapsulated. > > I didn''t realize it was that clean, actually. Thanks.In practice, I''d say it''s not. Sure, your manifest is equally simple if the custom provider is implemented in DSL. But for users who are in the habit of applying new configs using puppet agent --test, the output will be quite cluttered because all resources that work together to form the provider chirp their respective change notices. On the other hand, if there''s an actual piece of ruby code that "knows" how to set a FooResource''s "ensure" to "present", the puppet agent will confirm just that. But then, this is all merely cosmetic, and it is by no means unsound to implement your custom providers in DSL. Regards, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.