SlideShare a Scribd company logo
Michael Richardson
@m_richo
This talk contains both Facts and Opinions*.
*don’t believe everything I say.
Puppet’s answer
Puppet’s answer
Exported Resources!
Exported Resources
* https://docs.puppetlabs.com/puppet/latest/reference/lang_exported.html
Definition:
An exported resource declaration specifies a desired
state for a resource, does not manage the resource on
the target system, and publishes the resource for use by
other nodes. Any node (including the node that
exported it) can then collect the exported resource and
manage its own copy of it. *
Exported Resources
Exported Resources
For those that can’t afford DNS servers…
Exported Resources
Common Examples
• Backend servers configured in a load balancer
• Monitoring Servers updated with monitoring
clients (nagios_host / nagios_service)
• Distribute public keys (ssh and openssl)
Exported Resources
Question for the audience
Exported Resources
Question for the audience
What do you think of Exported Resources?
Exported Resources
Question for the audience
What do you think of Exported Resources?
Great. Alright. So so.
Let’s explore alternatives
What about our friends @
Ohai Node data (think facter) is
automatically added, indexed and
searchable in the Chef Server.
No need to export facts or resources.
How to use Chef
Search
Query the the Chef server data via
• Method within recipe (think puppet manifest)
• Search subcommand of ‘knife’
• /search or /search/INDEX endpoints of Chef
Server API
How to use Chef
Search
1. Method within recipe (think puppet manifest)
How to use Chef
Search
1. Method within recipe (think puppet manifest)
Chef Search
What do people think?
Chef Search
What do people think?
Personally I feel this approach can sometimes
be better than exported resources approach. *
* Remember this is an opinion 
But what about Puppet?
Introducing PuppetDB
PuppetDB
Definition:
collects data generated by Puppet. It enables
advanced Puppet features like the inventory
service and exported resources, and can be the
foundation for other applications that use
Puppet’s data. *
https://docs.puppetlabs.com/puppetdb/2.1/index.html
PuppetDB
• Written in Clojure.
• Runs on the JVM
• Backed by PostgreSQL
• Scales horizontally
PuppetDB
PuppetDB stores:
• The most recent facts from every node
• The most recent catalog for every node
• Optionally, 14 days of event reports for
every node
• Exported Resources
PuppetDB
PuppetDB REST API
V3 API includes the following endpoints:
• Facts
• Resources
• Nodes
• Fact-names,
• Metrics
• Reports
• Events
• And more
PuppetDB
GET /v3/nodes/
PuppetDB
GET /v3/nodes/
QUERY = (JSON array of queries)
PuppetDB
GET /v3/nodes/<NODE>/facts
Return all facts for given node
PuppetDB
GET
/v3/nodes/<NODE>/facts/<NAME>
Return facts by their name
PuppetDB
I know what you’re thinking
So much awesome information
How can I make use of it?
PuppetDB
checkout
Puppetdbquery module
by Erik Dalén
https://forge.puppetlabs.com/dalen/puppetdbquery
https://github.com/dalen/puppet-puppetdbquery
PuppetDB
Puppetdbquery module
• Command line tools
• Puppet functions to query PuppetDB
• Hiera backend to return query results from
PuppetDB
PuppetDB
Puppetdbquery CLI - nodes
PuppetDB
Puppetdbquery CLI – facts
PuppetDB
Puppetdbquery functions in manifests
• query_nodes
• query_facts
PuppetDB
Puppetdbquery functions
PuppetDB
Puppetdbquery functions
note: Output is abbreviated
Where to from here?
Exported Resources
vs
PuppetDB + puppetdbquery
Where to from here?
What about something
completely different
Where to from here?
What about something
completely different
• Confd
• Etcd
• Consul
• Zookeeper
• Doozer
• Skydns
Where to from here?
What about something
completely different
• Confd
• Etcd
• Consul
• Zookeeper
• Doozer
• Skydns
Really interesting space…
but that’s for another talk. 
Summary
How can you share information between your nodes/servers?
Summary
How can you share information between your nodes/servers?
Plenty of ways
• Exported resources
• PuppetDB
• Many, many others.
Summary
How can you share information between your nodes/servers?
Plenty of ways
• Exported resources
• PuppetDB
• Many, many others.
Pick the method that works best for you
Thank you
Thank you
#protip
go buy this book now
By Alessandro Franceschi
It is excellent!
IS HIRING
QUESTIONS?

More Related Content

PDF
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PPTX
Node collaboration - sharing information between your systems
PDF
ElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
PPTX
Elk stack
PDF
Logstash-Elasticsearch-Kibana
PDF
Side by Side with Elasticsearch and Solr
PPTX
Elk with Openstack
PDF
Hands On Spring Data
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
Node collaboration - sharing information between your systems
ElasticES-Hadoop: Bridging the world of Hadoop and Elasticsearch
Elk stack
Logstash-Elasticsearch-Kibana
Side by Side with Elasticsearch and Solr
Elk with Openstack
Hands On Spring Data

What's hot (20)

PPTX
RethinkDB - the open-source database for the realtime web
PDF
Introduction to Elasticsearch
PDF
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
PDF
Presto in Treasure Data
PPTX
Using Cerberus and PySpark to validate semi-structured datasets
PDF
PDF
Programming with Python and PostgreSQL
PPTX
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
PDF
Large Scale Log Analytics with Solr (from Lucene Revolution 2015)
PDF
Hadoop meetup : HUGFR Construire le cluster le plus rapide pour l'analyse des...
PPTX
Psycopg2 - Connect to PostgreSQL using Python Script
PDF
OpenStack Log Mining
PPTX
MongoDB Chunks - Distribution, Splitting, and Merging
PDF
Elasticsearch War Stories
PDF
Everything as Code with Terraform
PDF
Simple search with elastic search
PPTX
Dapper performance
PPTX
CouchDB Day NYC 2017: Full Text Search
PDF
Your Data, Your Search, ElasticSearch (EURUKO 2011)
ODP
Using Logstash, elasticsearch & kibana
RethinkDB - the open-source database for the realtime web
Introduction to Elasticsearch
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
Presto in Treasure Data
Using Cerberus and PySpark to validate semi-structured datasets
Programming with Python and PostgreSQL
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
Large Scale Log Analytics with Solr (from Lucene Revolution 2015)
Hadoop meetup : HUGFR Construire le cluster le plus rapide pour l'analyse des...
Psycopg2 - Connect to PostgreSQL using Python Script
OpenStack Log Mining
MongoDB Chunks - Distribution, Splitting, and Merging
Elasticsearch War Stories
Everything as Code with Terraform
Simple search with elastic search
Dapper performance
CouchDB Day NYC 2017: Full Text Search
Your Data, Your Search, ElasticSearch (EURUKO 2011)
Using Logstash, elasticsearch & kibana
Ad

Viewers also liked (7)

PDF
Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
PDF
Puppet Camp Charlotte 2015: Introduction to SIMP: An Open Source Infrastructu...
PPTX
Custom Facts - Raleigh Puppet User Group 2016
PDF
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
KEY
Managing Distributed Systems with Chef
PPTX
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
PDF
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
Puppet Camp Charlotte 2015: Introduction to SIMP: An Open Source Infrastructu...
Custom Facts - Raleigh Puppet User Group 2016
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Managing Distributed Systems with Chef
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Ad

Similar to Node collaboration - Exported Resources and PuppetDB (20)

PPTX
Puppetcamp Melbourne - puppetdb
PPTX
Exported resources design patterns
PDF
PuppetDB, Puppet Explorer and puppetdbquery
ODP
Puppet Node Classifiers Talk - Patrick Buckley
PDF
SCM Puppet: from an intro to the scaling
PDF
Puppet Camp Dallas 2014: Puppet Keynote
PDF
Our Puppet Story (GUUG FFG 2015)
PDF
Puppet Camp Tokyo 2014: Keynote
PDF
Puppet Camp Chicago 2014: Keynote
PDF
Puppet Camp London 2014: Keynote
PDF
Puppet Camp New York Keynote
PDF
Puppet Camp Boston 2014: Keynote
PDF
Puppet Keynote by Ralph Luchs
PDF
Webinar - PuppetDB
ODP
Who pulls the strings?
PDF
One-Man Ops
PPT
State of Puppet 2013 - Puppet Camp DC
PPTX
Puppet
PDF
Our Puppet Story (Linuxtag 2014)
Puppetcamp Melbourne - puppetdb
Exported resources design patterns
PuppetDB, Puppet Explorer and puppetdbquery
Puppet Node Classifiers Talk - Patrick Buckley
SCM Puppet: from an intro to the scaling
Puppet Camp Dallas 2014: Puppet Keynote
Our Puppet Story (GUUG FFG 2015)
Puppet Camp Tokyo 2014: Keynote
Puppet Camp Chicago 2014: Keynote
Puppet Camp London 2014: Keynote
Puppet Camp New York Keynote
Puppet Camp Boston 2014: Keynote
Puppet Keynote by Ralph Luchs
Webinar - PuppetDB
Who pulls the strings?
One-Man Ops
State of Puppet 2013 - Puppet Camp DC
Puppet
Our Puppet Story (Linuxtag 2014)

More from m_richardson (8)

PPTX
Persistence in the cloud with bosh
PPTX
bootstrapping containers with confd
PPTX
Docker Service Registration and Discovery
PPTX
Serverspec and Sensu - Testing and Monitoring collide
PPTX
Cooking with Chef
PPT
System Availability Talk
PPT
Chef - managing yours servers with Code
PPTX
Open Source Monitoring Tools
Persistence in the cloud with bosh
bootstrapping containers with confd
Docker Service Registration and Discovery
Serverspec and Sensu - Testing and Monitoring collide
Cooking with Chef
System Availability Talk
Chef - managing yours servers with Code
Open Source Monitoring Tools

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation theory and applications.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
Encapsulation theory and applications.pdf
Encapsulation_ Review paper, used for researhc scholars
20250228 LYD VKU AI Blended-Learning.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx

Node collaboration - Exported Resources and PuppetDB

Editor's Notes

  • #21: The Datastore for information generated by Puppet
  • #22: Large inventory of metadata about every node in your infrastructure and a searchable database of every single resource being managed on any node.
  • #23: Large inventory of metadata about every node in your infrastructure and a searchable database of every single resource being managed on any node.
  • #25: Return all nodes matching the given queryprocessorcount
  • #26: Return all nodes matching the given queryprocessorcount
  • #27: Return all nodes matching the given queryprocessorcount
  • #28: Return all nodes matching the given queryprocessorcount
  • #32: Query based upon resources and facts Returns a list of nodes
  • #33: Returns a hash of facts
  • #34: Returns a hash of facts
  • #35: Returns a hash of facts
  • #36: Query_node - Accepts 2 arguments Query to discover nodes Fact that should be returned (optional) Returns array of certnames or fact values Query_facts – requires 2 arguments query list of facts to return in a nested hash
  • #37: Accepts 2 arguments Query to discover nodes Fact that should be returned (optional) Returns array of certnames or fact values
  • #38: Problems with PuppetDB – puppetdbquery generates results based on compiled catalogs by the puppet master. We are not actually sure whether resources have been applied successfully How frequently do you run Puppet? Too slowly and infrastructure is slow to adapt to change Too fast and there maybe race conditions.