[Puppet Users] Have Puppet *call* REST APIs

2013-01-03 Thread Rob Johnson
Hi,

I hope this is just not my Google-fu lacking, but can you configure Puppet 
modules to make REST API calls inherently with Puppet?  I'm talking about 
3rd party REST APIs, not Puppet's API.  I'm thinking of rolling my own 
plugin, but wondered if I'm missing something here.

Thanks in advance,
Rob

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JDygUj18h2EJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Have Puppet *call* REST APIs

2013-01-04 Thread Rob Johnson
Hi Craig,

Thanks for your reply.

I'm looking to post requests to a server that configures properties of that 
server after standing it up.  So, I would envision sending requests from 
puppet master in this case to one server.

It would happen likely after a bunch of other installations occurred first 
(that's standard RPM deployment).  So it's:

1) Install a bunch of software on numerous machines including server 
process on a specific machine. (simplified, there's more config I have to 
do here)
2) Start up the master server.
3) Configure the master server via REST API Posts.  I mainly need to check 
the replies for return status I think.  Don't need to process the requests 
too much.

Does that make sense?  I probably have to build some custom plugins or 
something to do this right?  I was thinking about "exec" calls to curl or 
something, but that seems a little kludgy.

Thanks for any advice, it's much appreciated!
Rob

On Friday, January 4, 2013 5:02:16 AM UTC-6, Craig Dunn wrote:
>
>
> > 
> > I hope this is just not my Google-fu lacking, but can you configure 
> > Puppet modules to make REST API calls inherently with Puppet?  I'm 
> > talking about 3rd party REST APIs, not Puppet's API.  I'm thinking of 
> > rolling my own plugin, but wondered if I'm missing something here. 
> > 
> Can you provide a bit more information on what you're trying to do? If 
> are you are trying to look up a value from a REST API call you could use 
> Hiera with the http backend.  Or are you trying to get Puppet to post 
> data to a REST API when it runs?  And if so do you want this to happen 
> on the agent when the resource gets applied, or on the server during 
> catalog compilation in the form of a function? Whether or not you are 
> doing anything with the data returned from your call will make a 
> difference here. 
>
> Craig 
>
> -- 
> Craig Dunn 
> Professional Services 
> Puppet Labs Inc. 
> http://www.puppetlabs.com 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XP2goJEbl-UJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.