Hi all, I''m looking into getting some configuration management stuff running for my servers as I move roles into a new environment (yay for virtualization!). I''ve been looking into bcfg2 and puppet, and though I like the model of bcfg2 more, I''m leaning towards puppet for other reasons. I do have some questions, however, mostly of the status-checkup variety. For all of these, assume an implicit "and how can I help?", as I am a dev/admin, and I use Ruby for all my scripting already. 1) Is it possible, using stored configurations, to access all of the attributes of all clients from inside a template? 2) How is the transaction log stored on the puppetmaster server? 3) I saw some documentation on the wiki about Prefetch and Flush[1]. I couldn''t find any sign of implementation of that in the code. Has there been any progress made? This would be awesome for apt-get/aptitude on Debian. [1] http://reductivelabs.com/trac/puppet/wiki/PrefetchAndFlush 4) One of the things I really like about bcfg2 is the ability to enumerate unmanaged configuration. It seems that there''s a start to that looking at Puppet::Type.instances, but it doesn''t seem to really be fleshed out, and only seems to be supported through "resources { purge => x}". Are there plans to extend this further? Anyone hacked something like this together for now? Thanks in advance for your help, I''m looking forward to trying out puppet. Cheers, -- Eric Gerlach, Network Administrator Federation of Students University of Waterloo p: (519) 888-4567 x36329 e: egerlach@feds.uwaterloo.ca --~--~---------~--~----~------------~-------~--~----~ 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 Dec 15, 2008, at 12:58 PM, Eric Gerlach wrote:> I do have some questions, however, mostly of the status-checkup > variety. > For all of these, assume an implicit "and how can I help?", as I am a > dev/admin, and I use Ruby for all my scripting already. > > 1) Is it possible, using stored configurations, to access all of the > attributes of all clients from inside a template?You can use Stored Configs, which will store Puppet Types in a MySQL database, or you can use iClassify, which will work as an external node tool that tracks attributes in a database and indexes them in Solr. (you can then query the full text search interface from your templates.)> 3) I saw some documentation on the wiki about Prefetch and > Flush[1]. I > couldn''t find any sign of implementation of that in the code. Has > there > been any progress made? This would be awesome for apt-get/aptitude on > Debian. > > [1] http://reductivelabs.com/trac/puppet/wiki/PrefetchAndFlushI do not believe there has been, but I may be corrected. You likely don''t care, either - it will make a performance difference, but it likely isn''t an optimization that''s going to bother you that much. Adam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Eric Gerlach
2008-Dec-17 00:12 UTC
[Puppet Users] Re: Some high-level pre-install questions
On Tue, Dec 16, 2008 at 10:36:03AM -0800, Adam Jacob wrote:> > On Dec 15, 2008, at 12:58 PM, Eric Gerlach wrote: > > I do have some questions, however, mostly of the status-checkup > > variety. > > For all of these, assume an implicit "and how can I help?", as I am a > > dev/admin, and I use Ruby for all my scripting already. > > > > 1) Is it possible, using stored configurations, to access all of the > > attributes of all clients from inside a template? > > You can use Stored Configs, which will store Puppet Types in a MySQL > database,To narrow my question, then: What syntax would one use to access facts from Node A in a template being instantiated by Node B? (Assuming one has stored configs enabled)> or you can use iClassify, which will work as an external > node tool that tracks attributes in a database and indexes them in > Solr. (you can then query the full text search interface from your > templates.)iClassify looks quite neat, but I''m not sure that it''s what I''m really looking for in this case. I might add it to my mix later, though.> > 3) I saw some documentation on the wiki about Prefetch and > > Flush[1]. I > > couldn''t find any sign of implementation of that in the code. Has > > there > > been any progress made? This would be awesome for apt-get/aptitude on > > Debian. > > > > [1] http://reductivelabs.com/trac/puppet/wiki/PrefetchAndFlush > > I do not believe there has been, but I may be corrected. You likely > don''t care, either - it will make a performance difference, but it > likely isn''t an optimization that''s going to bother you that much.I''m not so much interested in the performance difference, but if I''m installing a bunch of new packages in Debian, I would want them to install together to avoid pulling incorrect dependencies. If they install one at a time, one package might pull in a package I don''t want (to satisfy a dependency I''m intending to satisfy with another package). It''s not a big deal, as I''ve had to solve that problem already (just create meta-packages that depend on the real packages you want to install), but prefetch and flush would be a better way to do it. Cheers, -- Eric Gerlach, Network Administrator Federation of Students University of Waterloo p: (519) 888-4567 x36329 e: egerlach@feds.uwaterloo.ca --~--~---------~--~----~------------~-------~--~----~ 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 Dec 16, 2008, at 4:12 PM, Eric Gerlach wrote:>> >> You can use Stored Configs, which will store Puppet Types in a MySQL >> database, > > To narrow my question, then: What syntax would one use to access > facts from > Node A in a template being instantiated by Node B? (Assuming one > has stored > configs enabled)You''ll have to get that from someone else - ordinarily, you will export entire resources from one node to another, not individual attributes, as I understand it. (But I do not use stored configs) So something like: class nagios-target { @@nagios_host { $fqdn: ensure => present, alias => $hostname, address => $ipaddress, use => "generic-host", } @@nagios_service { "check_ping_${hostname}": check_command => "check_ping!100.0,20%!500.0,60%", use => "generic-service", host_name => "$fqdn", notification_period => "24x7", service_description => "${hostname}_check_ping" } } class nagios-monitor { package { [ nagios, nagios-plugins ]: ensure => installed, } service { nagios: ensure => running, enable => true, #subscribe => File[$nagios_cfgdir], require => Package[nagios], } # collect resources and populate /etc/nagios/nagios_*.cfg Nagios_host <<||>> Nagios_service <<||>> } (Taken directly from ExportedResources on the wiki) It''s not like you can use the facts in a template directly.>> or you can use iClassify, which will work as an external >> node tool that tracks attributes in a database and indexes them in >> Solr. (you can then query the full text search interface from your >> templates.) > > iClassify looks quite neat, but I''m not sure that it''s what I''m > really looking > for in this case. I might add it to my mix later, though.Yep - the only reason you would care is if you can''t access facts from Node A in a template on Node B via stored configs, whcih I don''t believe you can at this stage. If you query them via iClassify, you could.> I''m not so much interested in the performance difference, but if I''m > installing > a bunch of new packages in Debian, I would want them to install > together to > avoid pulling incorrect dependencies. If they install one at a > time, one > package might pull in a package I don''t want (to satisfy a > dependency I''m > intending to satisfy with another package). > > It''s not a big deal, as I''ve had to solve that problem already (just > create > meta-packages that depend on the real packages you want to install), > but > prefetch and flush would be a better way to do it.Gotcha - yeah, puppet has no way to handle this right now. Adam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Eric Gerlach
2008-Dec-17 17:28 UTC
[Puppet Users] Re: Some high-level pre-install questions
On Tue, Dec 16, 2008 at 11:14:32PM -0800, Adam Jacob wrote: [snip]> It''s not like you can use the facts in a template directly.[snip]> Yep - the only reason you would care is if you can''t access facts from > Node A in a template on Node B via stored configs, whcih I don''t > believe you can at this stage. If you query them via iClassify, you > could.Which is what I''m interested in doing :-) Based on the second quote, there, if I''m understanding this correctly, I could do something like (stealing a bit from the Capistrano example): --- /etc/hosts.erb <% require ''iclassify'' # More setup goes here ic = IClassify::Client.new(ic_server, ic_user, ic_password) nodes = ic.search(''tag:web-server'', [ ''fqdn'', ''ipaddress'' ]) %> <% nodes.each do |n| %> <%= n.attrib?(''ipaddress'') %> <%= n.attrib(''fqdn'') %> <% end %> --- Am I correct? (Now that I think about it, if I am, I can just write my own class to query the stored configs and be done with it :-)> > I''m not so much interested in the performance difference, but if I''m > > installing > > a bunch of new packages in Debian, I would want them to install > > together to > > avoid pulling incorrect dependencies. If they install one at a > > time, one > > package might pull in a package I don''t want (to satisfy a > > dependency I''m > > intending to satisfy with another package). > > > > It''s not a big deal, as I''ve had to solve that problem already (just > > create > > meta-packages that depend on the real packages you want to install), > > but > > prefetch and flush would be a better way to do it. > > Gotcha - yeah, puppet has no way to handle this right now.Maybe I''ll take this to the dev list after the holidays to get some help working on it. It''s something I''d like to use. Cheers, -- Eric Gerlach, Network Administrator Federation of Students University of Waterloo p: (519) 888-4567 x36329 e: egerlach@feds.uwaterloo.ca --~--~---------~--~----~------------~-------~--~----~ 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 Dec 17, 2008, at 9:28 AM, Eric Gerlach wrote:> Which is what I''m interested in doing :-) > > Based on the second quote, there, if I''m understanding this > correctly, I could > do something like (stealing a bit from the Capistrano example): > > --- /etc/hosts.erb > <% require ''iclassify'' > > # More setup goes here > > ic = IClassify::Client.new(ic_server, ic_user, ic_password) > nodes = ic.search(''tag:web-server'', [ ''fqdn'', ''ipaddress'' ]) %> > > <% nodes.each do |n| %> > <%= n.attrib?(''ipaddress'') %> <%= n.attrib(''fqdn'') %> > <% end %> > --- > > Am I correct?Yes.> (Now that I think about it, if I am, I can just write my own class > to query the > stored configs and be done with it :-)Yes.> Maybe I''ll take this to the dev list after the holidays to get some > help > working on it. It''s something I''d like to use.Awesome. Adam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---