Hi, I would like to query the puppetmaster (or the puppet nodes...) for some facts and display/use these in an external web application (written django) using the certificates from Puppet. What''s the correct (nice) way to do this? REST? Can I find some code examples for this? Met vriendelijke groeten, Pieter Baele www.pieterb.be -- 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 Tuesday 09 Nov 2010 15:06:28 Pieter Baele wrote:> Hi, > > I would like to query the puppetmaster (or the puppet nodes...) for some > facts and display/use these in an external web application (written > django) using the certificates from Puppet. > > What''s the correct (nice) way to do this? REST? > Can I find some code examples for this?Hi, I''m looking at doing a similar thing for Edison [0] (also written in Django!). For the moment, I''ve written "pyfacter" - a basic python wrapper around the command line [1] - however I''d like to improve on this if possible. One thing I was planning on looking at was writing a python client for MCollective and using the audit tools available as part of MC to collect the facts either into a database or at runtime but that requires the ability to use Python with MC (nudge @rip :P) The only other solution I can think of is a cronjob that runs on each host on a regular basis and posts/puts to an API to fill the relevant field in the database. Kind regards, Matt [0] https://github.com/proffalken/edison [1] https://github.com/proffalken/randomscripts/tree/master/puppet/ -- 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.
Stefan Goethals
2010-Nov-09 14:18 UTC
Re: [Puppet Users] Query facter ''facts'' from webapp
On Tue, Nov 9, 2010 at 3:06 PM, Pieter Baele <pieter.baele@gmail.com> wrote:> Hi, > > I would like to query the puppetmaster (or the puppet nodes...) for some > facts > and display/use these in an external web application (written django) > using the certificates from Puppet. > > What''s the correct (nice) way to do this? REST? > Can I find some code examples for this? > > Met vriendelijke groeten, > Pieter Baele > www.pieterb.be > > -- > 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. > >My suggestion would be to use storeconfigs and just read the facts from the db. The structure of the db is quite simple. Regards, Stefan Goethals. -- 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 could query foreman to get the facts via rest, see : http://theforeman.org/projects/foreman/wiki/API Ohad On Tue, Nov 9, 2010 at 4:06 PM, Pieter Baele <pieter.baele@gmail.com> wrote:> Hi, > > I would like to query the puppetmaster (or the puppet nodes...) for some > facts > and display/use these in an external web application (written django) > using the certificates from Puppet. > > What''s the correct (nice) way to do this? REST? > Can I find some code examples for this? > > Met vriendelijke groeten, > Pieter Baele > www.pieterb.be > > -- > 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.
James Turnbull
2010-Nov-09 20:55 UTC
Re: [Puppet Users] Query facter ''facts'' from webapp
Pieter Baele wrote:> Hi, > > I would like to query the puppetmaster (or the puppet nodes...) for some facts > and display/use these in an external web application (written django) > using the certificates from Puppet. > > What''s the correct (nice) way to do this? REST? > Can I find some code examples for this? >Puppet 2.6.1+ has a Fact CouchDB REST terminus you can use to do this. http://projects.puppetlabs.com/projects/puppet/repository/revisions/97936c6d3fa3950d22266679b65d4a6877008a74 Regards James -- Puppet Labs - http://www.puppetlabs.com C: 503-734-8571 -- 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 Nov 9, 6:06 am, Pieter Baele <pieter.ba...@gmail.com> wrote:> Hi, > > I would like to query the puppetmaster (or the puppet nodes...) for some facts > and display/use these in an external web application (written django) > using the certificates from Puppet. > > What''s the correct (nice) way to do this? REST? > Can I find some code examples for this? > > Met vriendelijke groeten, > Pieter Baelewww.pieterb.bePieter, It''s not a solution today but it sounds like you''re looking for the Inventory Service[1]. The basic idea is to collect, and export, the client facts using a REST interface from a central service. There''s a push to get this in to 2.7[2], so some of your work may be done for you already. The mcollective registration method also works great, if you want to go that route. [1] http://projects.puppetlabs.com/projects/1/wiki/InventoryServiceArchitecture [2] http://groups.google.com/group/puppet-dev/browse_thread/thread/4fa1c3dc34725004/5e822ab9c65dadee -- 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.
James Turnbull
2010-Nov-11 19:06 UTC
Re: [Puppet Users] Re: Query facter ''facts'' from webapp
donavan wrote:> Pieter, It''s not a solution today but it sounds like you''re looking > for the Inventory Service[1]. The basic idea is to collect, and > export, the client facts using a REST interface from a central > service. There''s a push to get this in to 2.7[2], so some of your work > may be done for you already. >We just demo''ed the Inventory Service internally this morning and it works brilliantly - support for it will be in 2.7.0 and in Dashboard 1.0.5. Regards James Turnbull -- Puppet Labs - http://www.puppetlabs.com C: 503-734-8571 -- 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.
Paul Nasrat
2010-Nov-13 12:39 UTC
Re: [Puppet Users] Re: Query facter ''facts'' from webapp
On 11 November 2010 19:06, James Turnbull <james@puppetlabs.com> wrote:> donavan wrote: >> Pieter, It''s not a solution today but it sounds like you''re looking >> for the Inventory Service[1]. The basic idea is to collect, and >> export, the client facts using a REST interface from a central >> service. There''s a push to get this in to 2.7[2], so some of your work >> may be done for you already. >> > > We just demo''ed the Inventory Service internally this morning and it > works brilliantly - support for it will be in 2.7.0 and in Dashboard 1.0.5.Just a thought if you are doing end of iteration showcases, maybe knocking up screen shots of new upcoming shinyness would be interesting for those unable to be physically present. Paul -- 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.
Nigel Kersten
2010-Nov-13 16:32 UTC
Re: [Puppet Users] Re: Query facter ''facts'' from webapp
On Sat, Nov 13, 2010 at 4:39 AM, Paul Nasrat <pnasrat@gmail.com> wrote:> On 11 November 2010 19:06, James Turnbull <james@puppetlabs.com> wrote: >> donavan wrote: >>> Pieter, It''s not a solution today but it sounds like you''re looking >>> for the Inventory Service[1]. The basic idea is to collect, and >>> export, the client facts using a REST interface from a central >>> service. There''s a push to get this in to 2.7[2], so some of your work >>> may be done for you already. >>> >> >> We just demo''ed the Inventory Service internally this morning and it >> works brilliantly - support for it will be in 2.7.0 and in Dashboard 1.0.5. > > Just a thought if you are doing end of iteration showcases, maybe > knocking up screen shots of new upcoming shinyness would be > interesting for those unable to be physically present.Absolutely. We''re working out a way to do decent screencasts of new and existing features. Would people be interested in tuning into such demos live? I understand we have a rather wide spread of timezones here, but it would be kind of cool if we could do live demos to our whole community with questions over IRC.> > Paul > > -- > 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. > >-- Nigel Kersten - Puppet Labs - http://www.puppetlabs.com -- 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.
R.I.Pienaar
2010-Nov-13 16:35 UTC
Re: [Puppet Users] Re: Query facter ''facts'' from webapp
----- "Nigel Kersten" <nigel@puppetlabs.com> wrote:> We''re working out a way to do decent screencasts of new and existing > features. > > Would people be interested in tuning into such demos live? I > understand we have a rather wide spread of timezones here, but it > would be kind of cool if we could do live demos to our whole > community with questions over IRC.Live might be too hard :( but I''d be very keen to try anyway, failing that screencasts are great, I''m a big fan. -- 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.
James Turnbull
2010-Nov-13 17:25 UTC
Re: [Puppet Users] Re: Query facter ''facts'' from webapp
Paul Nasrat wrote:> On 11 November 2010 19:06, James Turnbull <james@puppetlabs.com> wrote: >> donavan wrote: >>> Pieter, It''s not a solution today but it sounds like you''re looking >>> for the Inventory Service[1]. The basic idea is to collect, and >>> export, the client facts using a REST interface from a central >>> service. There''s a push to get this in to 2.7[2], so some of your work >>> may be done for you already. >>> >> We just demo''ed the Inventory Service internally this morning and it >> works brilliantly - support for it will be in 2.7.0 and in Dashboard 1.0.5. > > Just a thought if you are doing end of iteration showcases, maybe > knocking up screen shots of new upcoming shinyness would be > interesting for those unable to be physically present.That''s the plan going forward is to produce videos on the demos. Regards James Turnbull -- Puppet Labs - http://www.puppetlabs.com C: 503-734-8571 -- 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.
Paul Nasrat
2010-Nov-13 18:53 UTC
Re: [Puppet Users] Re: Query facter ''facts'' from webapp
On 13 November 2010 16:35, R.I.Pienaar <rip@devco.net> wrote:> > ----- "Nigel Kersten" <nigel@puppetlabs.com> wrote: > >> We''re working out a way to do decent screencasts of new and existing >> features. >> >> Would people be interested in tuning into such demos live? I >> understand we have a rather wide spread of timezones here, but it >> would be kind of cool if we could do live demos to our whole >> community with questions over IRC. > > Live might be too hard :( but I''d be very keen to try anyway, failing > that screencasts are great, I''m a big fan.Yeah live demos are hard - I''d probably avoid unless it''s a proper rehearsed launch/talk type thing (even then I''d have back up for if live broke). Getting stuff out early, with a demo and an easy way to clone/play with might help get wider testing of features. Particularly for stuff which people are going to interact with. Paul -- 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.