SlideShare a Scribd company logo
Sharing information between your systems 
Michael Richardson @m_richo
Agenda 
1.Chef Search 
2.Puppet Exported Resources 
3.PuppetDB query 
4.Confd + etcd
Agenda 
1.Chef Search 
2.Puppet Exported Resources 
3.PuppetDB query 
4.Confd + etcd
Node collaboration - sharing information between your systems
Chef Server 
Stores many useful things including 
• Policies applied to nodes 
• Metadata that describes each node 
(ohai) 
• And more…
Chef Server 
This data is searchable!
Chef Server 
This data is searchable!
Chef Server 
This data is searchable! 
But how?
Chef Server 
1. ‘search’ method within recipe. 
2. Search subcommand of ‘knife’ 
3. /search or /search/INDEX endpoints of Chef 
Server API
Chef Server 
1. ‘search’ method within recipe. 
2. Search subcommand of ‘knife’ 
3. /search or /search/INDEX endpoints of Chef 
Server API
Chef Server 
Search within recipe – simple.
Chef Server 
Search within recipe – simple.
Chef Server 
Search within recipe – simple.
Chef Server 
Search within recipe – simple. 
It’s that simple
Chef Server 
Search within recipe – more complex.
Chef Server 
Chef Search is fantastic for 
• Searching for nodes with particular 
attributes 
• Searching for nodes with particular profiles 
• Using search results to configure services on 
other nodes.
Chef Server 
Common use cases 
• My application talks to a database. What’s its FQDN/IP? 
• How many memcache nodes are there for my application? What are 
there FQDN/IPs? 
• Where should I send my log files? What’s the FQDN of the syslog 
server? 
• I want to provide a white-list of IP’s that can request information from a 
node. 
• What are the IP addresses of the webservers behind my load balancer? 
• My Jenkins slaves need to connect to a Jenkins master. What’s it’s IP? 
• What are the SSH Host keys for particular hosts.
Agenda 
1.Chef Search 
2.Puppet Exported Resources 
3.PuppetDB query 
4.Confd + etcd
Exported Resources 
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. * 
* https://docs.puppetlabs.com/puppet/latest/reference/lang_exported.html
Exported Resources 
Think of it as 
• Node(s) “publish” resources to the Puppet Master 
• Other Node(s) consume those resources 
* https://docs.puppetlabs.com/puppet/latest/reference/lang_exported.html
Node collaboration - sharing information between your systems
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)
Agenda 
1.Chef Search 
2.Puppet Exported Resources 
3.PuppetDB query 
4.Confd + etcd
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. *
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 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
PuppetDB
PuppetDB 
But this talk is about Node Collaboration. 
How can I make use of this data?
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 module 
• Command line tools 
• Puppet functions to query PuppetDB 
• Hiera backend to return query results 
from PuppetDB
PuppetDB 
Puppetdbquery functions 
• query_nodes 
• query_facts
PuppetDB
PuppetDB 
note: Output is abbreviated
PuppetDB 
PuppetDBquery 
• Works great and very similar to Chef 
Search (searching for specific hosts, and 
use their facts for configuring other 
hosts). 
• If you use Roles+Profiles pattern, this is 
a fantastic fit for profiles.
Chef Search and PuppetDB are great!
Chef Search and PuppetDB are great! 
but what if…
Chef Search and PuppetDB are great! 
but what if… 
• You want your infrastructure to react more quickly than 
your Puppet agent / Chef-client run intervals (are you 
even running the agents continuously).
Chef Search and PuppetDB are great! 
but what if… 
• You want your infrastructure to react more quickly than 
your Puppet agent / Chef-client run intervals (are you 
even running the agents continuously). 
• You appreciate “desired state” AND “running state” aren’t 
always the same thing.
Chef Search and PuppetDB are great! 
but what if… 
• You want your infrastructure to react more quickly than 
your Puppet agent / Chef-client run intervals (are you 
even running the agents continuously). 
• You appreciate “desired state” AND “running state” aren’t 
always the same thing. 
• You don’t want to run a Puppet Master or Chef Server 
(masterless Puppet / Chef-solo).
Chef Search and PuppetDB are great! 
but what if… 
• You want your infrastructure to react more quickly than 
your Puppet agent / Chef-client run intervals (are you 
even running the agents continuously). 
• You appreciate “desired state” AND “running state” aren’t 
always the same thing. 
• You don’t want to run a Puppet Master or Chef Server 
(masterless Puppet / Chef-solo). 
• You don’t use Puppet or Chef. 
Agenda 
1.Chef Search 
2.Puppet Exported Resources 
3.PuppetDB query 
4.Confd + etcd
Confd 
• “Lightweight configuration management tool” 
• https://github.com/kelseyhightower/confd 
• Written in go 
• Manage local application configuration files using 
templates and data from etcd or consul.
etcd 
• Highly-available key/value store for shared 
configuration and service discovery 
• https://github.com/coreos/etcd 
• Written in go 
• Typical cluster size or 3-9 peers. 
• CAP theorem
Confd + etcd 
Distributed etcd cluster 
etcd1 
etcd2 etcd3 etcd4 etcd5 
Hosts running applications 
and services configured 
with confd
Confd + etcd 
• Hosts/Services that wish to share 
information post data to etcd. 
• Confd is configured on other hosts 
to use this data to manage local 
configuration files and services.
Confd + etcd 
Distributed etcd cluster 
etcd1 
etcd2 etcd3 etcd4 etcd5 
1 2 
App server DB server 
Example 
1. App server runs Confd which is polling the following keys. 
1. /myapp/db_ip 
2. /myapp/db_port 
3. /myapp/db_adapter 
4. /myapp/db_name 
2. Once up and running DB Server, writes details to etcd 
cluster. 
3. Confd reads key/values. Uses template file to write new 
application configuration file and reloads application.
Confd + etcd 
Demo 
A “working” demo is worth a thousand powerpoint slides…
Summary 
• Share information between your servers. 
• Let them discover each other. 
• Let your nodes collaborate with each 
other.
Thank you

More Related Content

PPTX
Puppetcamp Melbourne - puppetdb
PDF
Writing Well-Behaved Unix Utilities
PPTX
Node collaboration - Exported Resources and PuppetDB
PPTX
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
PDF
Null Bachaav - May 07 Attack Monitoring workshop.
PPTX
The tale of 100 cve's
PPTX
ELK Stack
PDF
Monitoring with Graylog - a modern approach to monitoring?
Puppetcamp Melbourne - puppetdb
Writing Well-Behaved Unix Utilities
Node collaboration - Exported Resources and PuppetDB
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Null Bachaav - May 07 Attack Monitoring workshop.
The tale of 100 cve's
ELK Stack
Monitoring with Graylog - a modern approach to monitoring?

What's hot (20)

PPT
Logstash
PDF
Advanced troubleshooting linux performance
PPT
How ElasticSearch lives in my DevOps life
PDF
Logstash family introduction
PDF
Real time indexes in Sphinx, Yaroslav Vorozhko
PDF
Machine Learning in a Twitter ETL using ELK
PDF
Building GUI App with Electron and Lisp
PDF
Logstash: Get to know your logs
PDF
Redis - for duplicate detection on real time stream
PPTX
MySQL Slow Query log Monitoring using Beats & ELK
PDF
Real time fulltext search with sphinx
PDF
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
PDF
Docker Monitoring Webinar
PDF
Storm crawler apachecon_na_2015
PDF
Experiences in ELK with D3.js for Large Log Analysis and Visualization
PDF
Mobile Analytics mit Elasticsearch und Kibana
PPTX
Logstash
PDF
elk_stack_alexander_szalonnas
PPTX
Scaling an ELK stack at bol.com
PDF
Logging logs with Logstash - Devops MK 10-02-2016
Logstash
Advanced troubleshooting linux performance
How ElasticSearch lives in my DevOps life
Logstash family introduction
Real time indexes in Sphinx, Yaroslav Vorozhko
Machine Learning in a Twitter ETL using ELK
Building GUI App with Electron and Lisp
Logstash: Get to know your logs
Redis - for duplicate detection on real time stream
MySQL Slow Query log Monitoring using Beats & ELK
Real time fulltext search with sphinx
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Docker Monitoring Webinar
Storm crawler apachecon_na_2015
Experiences in ELK with D3.js for Large Log Analysis and Visualization
Mobile Analytics mit Elasticsearch und Kibana
Logstash
elk_stack_alexander_szalonnas
Scaling an ELK stack at bol.com
Logging logs with Logstash - Devops MK 10-02-2016
Ad

Viewers also liked (13)

PDF
Puppet Camp Berlin 2014: Manageable puppet infrastructure
PDF
Chef-Zero & Local Mode
DOCX
Elementos pre textuais (1) (1)
PPTX
The Business of Big Data - IA Ventures
DOC
Some basic unix commands
PDF
Noiazomai kai drw
PPTX
Introduction to chef
PPT
Basic Unix
PPTX
Jenkins and Chef: Infrastructure CI and Automated Deployment
PPTX
Weight loss 30 days
PDF
Linux File System
PDF
Solution de transfert mobile - Formats d'échange
PDF
Scaling Apache Storm - Strata + Hadoop World 2014
Puppet Camp Berlin 2014: Manageable puppet infrastructure
Chef-Zero & Local Mode
Elementos pre textuais (1) (1)
The Business of Big Data - IA Ventures
Some basic unix commands
Noiazomai kai drw
Introduction to chef
Basic Unix
Jenkins and Chef: Infrastructure CI and Automated Deployment
Weight loss 30 days
Linux File System
Solution de transfert mobile - Formats d'échange
Scaling Apache Storm - Strata + Hadoop World 2014
Ad

Similar to Node collaboration - sharing information between your systems (20)

PPTX
DevOps and Chef and puppet presentation.pptx
PDF
SCM Puppet: from an intro to the scaling
PDF
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PDF
One-Man Ops
PDF
Overview of Chef - Fundamentals Webinar Series Part 1
PPTX
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
PDF
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
PDF
Chef: Smart infrastructure automation
KEY
Managing Distributed Systems with Chef
PPTX
Provisioning Oracle Fusion Middleware Environments with Chef and Puppet
PDF
Chef Fundamentals Training Series Module 1: Overview of Chef
PDF
What is Chef and how we use it at tripsta
PDF
PuppetConf 2016: Service Discovery and Puppet – Marc Cluet, Ukon Cherry
PDF
Service discovery and puppet
PDF
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
PDF
Our Puppet Story (Linuxtag 2014)
PPTX
Chef fundamentals
PDF
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
PDF
OpenSlava Infrastructure Automation Patterns
PDF
Chef at WebMD
DevOps and Chef and puppet presentation.pptx
SCM Puppet: from an intro to the scaling
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
One-Man Ops
Overview of Chef - Fundamentals Webinar Series Part 1
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Chef: Smart infrastructure automation
Managing Distributed Systems with Chef
Provisioning Oracle Fusion Middleware Environments with Chef and Puppet
Chef Fundamentals Training Series Module 1: Overview of Chef
What is Chef and how we use it at tripsta
PuppetConf 2016: Service Discovery and Puppet – Marc Cluet, Ukon Cherry
Service discovery and puppet
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
Our Puppet Story (Linuxtag 2014)
Chef fundamentals
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
OpenSlava Infrastructure Automation Patterns
Chef at WebMD

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
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Big Data Technologies - Introduction.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Electronic commerce courselecture one. Pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation
Big Data Technologies - Introduction.pptx
20250228 LYD VKU AI Blended-Learning.pptx
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
Unlocking AI with Model Context Protocol (MCP)
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
Electronic commerce courselecture one. Pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Programs and apps: productivity, graphics, security and other tools
Per capita expenditure prediction using model stacking based on satellite ima...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Node collaboration - sharing information between your systems

  • 1. Sharing information between your systems Michael Richardson @m_richo
  • 2. Agenda 1.Chef Search 2.Puppet Exported Resources 3.PuppetDB query 4.Confd + etcd
  • 3. Agenda 1.Chef Search 2.Puppet Exported Resources 3.PuppetDB query 4.Confd + etcd
  • 5. Chef Server Stores many useful things including • Policies applied to nodes • Metadata that describes each node (ohai) • And more…
  • 6. Chef Server This data is searchable!
  • 7. Chef Server This data is searchable!
  • 8. Chef Server This data is searchable! But how?
  • 9. Chef Server 1. ‘search’ method within recipe. 2. Search subcommand of ‘knife’ 3. /search or /search/INDEX endpoints of Chef Server API
  • 10. Chef Server 1. ‘search’ method within recipe. 2. Search subcommand of ‘knife’ 3. /search or /search/INDEX endpoints of Chef Server API
  • 11. Chef Server Search within recipe – simple.
  • 12. Chef Server Search within recipe – simple.
  • 13. Chef Server Search within recipe – simple.
  • 14. Chef Server Search within recipe – simple. It’s that simple
  • 15. Chef Server Search within recipe – more complex.
  • 16. Chef Server Chef Search is fantastic for • Searching for nodes with particular attributes • Searching for nodes with particular profiles • Using search results to configure services on other nodes.
  • 17. Chef Server Common use cases • My application talks to a database. What’s its FQDN/IP? • How many memcache nodes are there for my application? What are there FQDN/IPs? • Where should I send my log files? What’s the FQDN of the syslog server? • I want to provide a white-list of IP’s that can request information from a node. • What are the IP addresses of the webservers behind my load balancer? • My Jenkins slaves need to connect to a Jenkins master. What’s it’s IP? • What are the SSH Host keys for particular hosts.
  • 18. Agenda 1.Chef Search 2.Puppet Exported Resources 3.PuppetDB query 4.Confd + etcd
  • 19. Exported Resources 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. * * https://docs.puppetlabs.com/puppet/latest/reference/lang_exported.html
  • 20. Exported Resources Think of it as • Node(s) “publish” resources to the Puppet Master • Other Node(s) consume those resources * https://docs.puppetlabs.com/puppet/latest/reference/lang_exported.html
  • 22. 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)
  • 23. Agenda 1.Chef Search 2.Puppet Exported Resources 3.PuppetDB query 4.Confd + etcd
  • 24. 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. *
  • 25. 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
  • 26. 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
  • 27. PuppetDB PuppetDB REST API V3 API includes the following endpoints: • Facts • Resources • Nodes • Fact-names, • Metrics • Reports • Events • And more
  • 30. PuppetDB But this talk is about Node Collaboration. How can I make use of this data?
  • 31. PuppetDB checkout Puppetdbquery module by Erik Dalén https://forge.puppetlabs.com/dalen/puppetdbquery https://github.com/dalen/puppet-puppetdbquery
  • 32. PuppetDB Puppetdbquery module • Command line tools • Puppet functions to query PuppetDB • Hiera backend to return query results from PuppetDB
  • 33. PuppetDB Puppetdbquery module • Command line tools • Puppet functions to query PuppetDB • Hiera backend to return query results from PuppetDB
  • 34. PuppetDB Puppetdbquery functions • query_nodes • query_facts
  • 36. PuppetDB note: Output is abbreviated
  • 37. PuppetDB PuppetDBquery • Works great and very similar to Chef Search (searching for specific hosts, and use their facts for configuring other hosts). • If you use Roles+Profiles pattern, this is a fantastic fit for profiles.
  • 38. Chef Search and PuppetDB are great!
  • 39. Chef Search and PuppetDB are great! but what if…
  • 40. Chef Search and PuppetDB are great! but what if… • You want your infrastructure to react more quickly than your Puppet agent / Chef-client run intervals (are you even running the agents continuously).
  • 41. Chef Search and PuppetDB are great! but what if… • You want your infrastructure to react more quickly than your Puppet agent / Chef-client run intervals (are you even running the agents continuously). • You appreciate “desired state” AND “running state” aren’t always the same thing.
  • 42. Chef Search and PuppetDB are great! but what if… • You want your infrastructure to react more quickly than your Puppet agent / Chef-client run intervals (are you even running the agents continuously). • You appreciate “desired state” AND “running state” aren’t always the same thing. • You don’t want to run a Puppet Master or Chef Server (masterless Puppet / Chef-solo).
  • 43. Chef Search and PuppetDB are great! but what if… • You want your infrastructure to react more quickly than your Puppet agent / Chef-client run intervals (are you even running the agents continuously). • You appreciate “desired state” AND “running state” aren’t always the same thing. • You don’t want to run a Puppet Master or Chef Server (masterless Puppet / Chef-solo). • You don’t use Puppet or Chef. 
  • 44. Agenda 1.Chef Search 2.Puppet Exported Resources 3.PuppetDB query 4.Confd + etcd
  • 45. Confd • “Lightweight configuration management tool” • https://github.com/kelseyhightower/confd • Written in go • Manage local application configuration files using templates and data from etcd or consul.
  • 46. etcd • Highly-available key/value store for shared configuration and service discovery • https://github.com/coreos/etcd • Written in go • Typical cluster size or 3-9 peers. • CAP theorem
  • 47. Confd + etcd Distributed etcd cluster etcd1 etcd2 etcd3 etcd4 etcd5 Hosts running applications and services configured with confd
  • 48. Confd + etcd • Hosts/Services that wish to share information post data to etcd. • Confd is configured on other hosts to use this data to manage local configuration files and services.
  • 49. Confd + etcd Distributed etcd cluster etcd1 etcd2 etcd3 etcd4 etcd5 1 2 App server DB server Example 1. App server runs Confd which is polling the following keys. 1. /myapp/db_ip 2. /myapp/db_port 3. /myapp/db_adapter 4. /myapp/db_name 2. Once up and running DB Server, writes details to etcd cluster. 3. Confd reads key/values. Uses template file to write new application configuration file and reloads application.
  • 50. Confd + etcd Demo A “working” demo is worth a thousand powerpoint slides…
  • 51. Summary • Share information between your servers. • Let them discover each other. • Let your nodes collaborate with each other.

Editor's Notes

  • #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
  • #46: Polls key/value databases for data (etcd or consul). Updates local configuration files with polled data via template files. Reloads applications to pick up config file changes.