Hello everyone! Is there any REST API avaiable for puppet? In the documentation page ( http://docs.puppetlabs.com/) there is a message saying that the doc will be comming soon.. but I am in doubt... the REST API exists, but it is not documented or it does not exist? If it exists, does anyone know what can kind of thing can be done with the API? Thanks in advance, Gus -- 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 does exist! Sadly, the documentation is the code, as far as I''ve been able to determine. You can get a fair amount of information if you are using a webserver like Apache in front of puppetmasterd by watching your access logs. --Paul On Tue, Mar 30, 2010 at 3:13 PM, Gustavo Soares <gustavosoares@gmail.com> wrote:> Hello everyone! > > > Is there any REST API avaiable for puppet? In the documentation page > (http://docs.puppetlabs.com/) > there is a message saying that the doc will be comming soon.. but I am in > doubt... > the REST API exists, but it is not documented or it does not exist? > If it exists, does anyone know what can kind of thing can be done with the > API? > Thanks in advance, > Gus > > -- > 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 31 March 2010 11:36, Paul Lathrop <paul.lathrop@gmail.com> wrote:> It does exist! > > Sadly, the documentation is the code, as far as I''ve been able to > determine. You can get a fair amount of information if you are using a > webserver like Apache in front of puppetmasterd by watching your > access logs. >Paul''s quite right - the docs are currently the Code. It''s on the radar (because I also nagged Luke et al about it) to do a simple explanation of the API along the lines of: URL -> /environment/blah/blah Post/Get Payload in JSON, etc There is a ticket for this you can +1 or vote for: http://projects.reductivelabs.com/issues/3016 Cheers James -- Author of: * Pro Linux System Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -- 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.
Ok, thanks. I''ll check the code too. Gus ------- Original message -------> From: James Turnbull <james@lovedthanlost.net> > To: puppet-users@googlegroups.com > Sent: 30.3.''10, 22:58 > > On 31 March 2010 11:36, Paul Lathrop <paul.lathrop@gmail.com> wrote: >> It does exist! >> >> Sadly, the documentation is the code, as far as I''ve been able to >> determine. You can get a fair amount of information if you are using a >> webserver like Apache in front of puppetmasterd by watching your >> access logs. >> > > Paul''s quite right - the docs are currently the Code. It''s on the > radar (because I also nagged Luke et al about it) to do a simple > explanation of the API along the lines of: > > URL -> /environment/blah/blah > Post/Get > Payload in JSON, etc > > There is a ticket for this you can +1 or vote for: > > http://projects.reductivelabs.com/issues/3016 > > Cheers > > James > > -- > Author of: > * Pro Linux System Administration (http://tinyurl.com/linuxadmin) > * Pulling Strings with Puppet (http://tinyurl.com/pupbook) > * Pro Nagios 2.0 (http://tinyurl.com/pronagios) > * Hardening Linux (http://tinyurl.com/hardeninglinux) > > -- > 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 Wed, 2010-03-31 at 10:45 -0300, Gustavo Soares wrote:> Ok, thanks. > > I''ll check the code too.You can also have a look to the auth.conf file which lists most of the REST urls. -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- 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 Wed, Mar 31, 2010 at 7:19 AM, Brice Figureau <brice-puppet@daysofwonder.com> wrote:> On Wed, 2010-03-31 at 10:45 -0300, Gustavo Soares wrote: >> Ok, thanks. >> >> I''ll check the code too. > > You can also have a look to the auth.conf file which lists most of the > REST urls.I found that using ssldump to sniff the connection traffic was quite illuminating as you need to set the Accept header at least appropriately. ie GET /production/file_metadatas/plugins?links=manage&recurse=true ignore=---+%0A-+.svn%0A-+CVS%0A-+.git%0A& HTTP/1.1 ----------> Accept: pson, b64_zlib_yaml, yaml, marshal, raw> > -- > Brice Figureau > Follow the latest Puppet Community evolutions on www.planetpuppet.org! > > -- > 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 -- 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, Mar 30, 2010 at 8:36 PM, Paul Lathrop <paul.lathrop@gmail.com>wrote:> It does exist! > > Sadly, the documentation is the code, as far as I''ve been able to > determine. You can get a fair amount of information if you are using a > webserver like Apache in front of puppetmasterd by watching your > access logs. > > --Paul >One of the things I want eventually is for us to have documentation on what is possible in a user API at docs.puppetlabs.com. Our top end API doesn''t have a lot for you to "drive" the puppetmaster or dashboard programmatically yet, and it''s more puppetmaster-to-node. I think you''ll see that evolve over time. We should definitely clarify a bit more (in those docs) what is possible via REST now for scripting against Puppet, though I think for the most part you can look at REST today as largely an internals feature (faster/better RPC) and over the long hall you''ll see that become more of a strategic documented integration API. It''s certaintly the kind of thing we want to enable, allowing other tools to "latch on" to Puppet to use it as their configuration management engine. (Just as we want to (and do) enable Puppet to latch on to those external systems, as we do with things like custom functions and external nodes). Hope that helps, --Michael -- 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 Wed, Mar 31, 2010 at 10:30 AM, Michael DeHaan <michael@puppetlabs.com>wrote:> > > On Tue, Mar 30, 2010 at 8:36 PM, Paul Lathrop <paul.lathrop@gmail.com>wrote: > >> It does exist! >> >> Sadly, the documentation is the code, as far as I''ve been able to >> determine. You can get a fair amount of information if you are using a >> webserver like Apache in front of puppetmasterd by watching your >> access logs. >> >> --Paul >> > > > One of the things I want eventually is for us to have documentation on what > is possible in a user API at docs.puppetlabs.com. > > Our top end API doesn''t have a lot for you to "drive" the puppetmaster or > dashboard programmatically yet, and it''s more puppetmaster-to-node. > > I think you''ll see that evolve over time. > > We should definitely clarify a bit more (in those docs) what is possible > via REST now for scripting against Puppet, though I think for the most part > you can look at REST today as largely an internals feature (faster/better > RPC) and over the long hall you''ll see that become more of a strategic > documented integration API. It''s certaintly the kind of thing we want to > enable, allowing other tools to "latch on" to Puppet to use it as their > configuration management engine. (Just as we want to (and do) enable > Puppet to latch on to those external systems, as we do with things like > custom functions and external nodes). > > Hope that helps, > > --Michael > >That should be "long haul", as a long hall is something different entirely :) -- 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 Wed, 2010-03-31 at 07:29 -0700, Nigel Kersten wrote:> On Wed, Mar 31, 2010 at 7:19 AM, Brice Figureau > <brice-puppet@daysofwonder.com> wrote: > > On Wed, 2010-03-31 at 10:45 -0300, Gustavo Soares wrote: > >> Ok, thanks. > >> > >> I''ll check the code too. > > > > You can also have a look to the auth.conf file which lists most of the > > REST urls. > > I found that using ssldump to sniff the connection traffic was quite > illuminating as you need to set the Accept header at least > appropriately. > > ie > > GET /production/file_metadatas/plugins?links=manage&recurse=true > ignore=---+%0A-+.svn%0A-+CVS%0A-+.git%0A& HTTP/1.1 > ----------> Accept: pson, b64_zlib_yaml, yaml, marshal, rawIf you use nginx or apache as a front-end SSL termination, you can grep your access log files for the same result (except of course access to the headers). -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- 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.
ok, I will do that. I am using apache + passenger. Thanks. On Wed, Mar 31, 2010 at 12:05 PM, Brice Figureau < brice-puppet@daysofwonder.com> wrote:> On Wed, 2010-03-31 at 07:29 -0700, Nigel Kersten wrote: > > On Wed, Mar 31, 2010 at 7:19 AM, Brice Figureau > > <brice-puppet@daysofwonder.com> wrote: > > > On Wed, 2010-03-31 at 10:45 -0300, Gustavo Soares wrote: > > >> Ok, thanks. > > >> > > >> I''ll check the code too. > > > > > > You can also have a look to the auth.conf file which lists most of the > > > REST urls. > > > > I found that using ssldump to sniff the connection traffic was quite > > illuminating as you need to set the Accept header at least > > appropriately. > > > > ie > > > > GET /production/file_metadatas/plugins?links=manage&recurse=true > > ignore=---+%0A-+.svn%0A-+CVS%0A-+.git%0A& HTTP/1.1 > > ----------> Accept: pson, b64_zlib_yaml, yaml, marshal, raw > > If you use nginx or apache as a front-end SSL termination, you can grep > your access log files for the same result (except of course access to > the headers). > -- > Brice Figureau > Follow the latest Puppet Community evolutions on www.planetpuppet.org! > > -- > 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.