GitXplorerGitXplorer
d

puppet-rest

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
d7cbce830fe1c795e150b94d50f9da2636265311

Bump to 0.0.3

llardcanoe committed 9 years ago
Unverified
09c428e35cb5b65090946ac20acc0092c4e4c1d7

Support 2015.2 rest endpoints

llardcanoe committed 9 years ago
Unverified
8cc58ee9a85eb78fa09365cb0c7da3fd117f293d

Prep to support tests

llardcanoe committed 9 years ago
Unverified
23a0190b0658004edfdd5c92d51e2b7f6991d4ed

Prep to support tests

llardcanoe committed 9 years ago
Unverified
992dd4d88aa3c9f1ce2eedfdd45ec367c79e9b4e

Remove dep

llardcanoe committed 10 years ago
Unverified
c02f5afb1b854c7afa1294bc3f53df8489b8c98c

CA Cert

llardcanoe committed 11 years ago

README

The README file for this repository.

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.