0.0
No release in over 3 years
Low commit activity in last 3 years
Interact with the Puppet REST Api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 0.8.8
 Project Readme

Puppet Ruby REST Client

Interact with Puppet and PuppetDB through their REST Apis

Certificates

  • On Puppet Master: sudo puppet cert --generate learning.puppetlabs.vm
  • Copy the 3 files to a remote computer:
    • /etc/puppetlabs/puppet/ssl/private_keys/learning.puppetlabs.vm.pem
    • /etc/puppetlabs/puppet/ssl/certs/learning.puppetlabs.vm.pem
    • /etc/puppetlabs/puppet/ssl/certs/ca.pem
  • Test 2015.02+
    • Puppet Enterprise
      • curl -X GET --cacert ca.pem --cert learning.puppetlabs.vm.cert.pem --key learning.puppetlabs.vm.priv-key.pem -H 'Accept: pson' 'https://learning.puppetlabs.vm:8140/puppet/v3/node/learning.puppetlabs.vm?environment=production'
    • PuppetDB
      • curl -X GET -H 'Accept: application/json' --cacert ca.pem --cert learning.puppetlabs.vm.cert.pem --key learning.puppetlabs.vm.priv-key.pem 'https://learning.puppetlabs.vm:8081/pdb/query/v4/facts'
  • Test Legacy
    • Puppet Enterprise
      • curl -X GET --cacert ca.pem --cert learning.puppetlabs.vm.cert.pem --key learning.puppetlabs.vm.priv-key.pem 'https://learning.puppetlabs.vm:8140/v2/catalogs/learning.puppetlabs.vm'
    • PuppetDB
      • curl -X GET --cacert ca.pem --cert learning.puppetlabs.vm.cert.pem --key learning.puppetlabs.vm.priv-key.pem 'https://learning.puppetlabs.vm:8081/v2/facts'

Configure PuppetDB

  • Change PuppetDB Listen Directive
    • If puppet is not managing puppetdb:
    • Otherwise, change through the puppet portal
      • Add listen_host to pe_puppetdb class with value of 0.0.0.0
      • Force a puppet run to change in /etc/puppetlabs/puppetdb/conf.d/jetty.ini
  • If PuppetDB is using its own certs, and not the Puppet Master's:
    • sudo /opt/puppet/sbin/puppetdb-ssl-setup -f
    • sudo /etc/init.d/pe-puppetdb restart
    • (Wait a few min for it to actually restart)
  • Make sure your ec2 security groups have 8081 open between your internal instances

Configure Puppet Master

  • Edit /etc/puppetlabs/puppet/auth.conf, and change:
path ~ ^/catalog/([^/]+)$
method find
auth yes
allow $1

to

path ~ ^/catalog/([^/]+)$
method find
auth yes
allow $1, aggregator

Useful Links

About

puppet-rest was inspired by spice and follows its framework.

Copyright

Copyright (c) 2013 CloudHealth Tech. See LICENSE.txt for further details.

Puppet, PuppetDB and related trademarks are Copyright (c) 2005-2013 Puppet Labs Inc. Puppet and PuppetDB are released under the Apache 2.0 license.