SlideShare a Scribd company logo
1 of 52
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
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
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

What's hot

Advanced troubleshooting linux performance
Advanced troubleshooting linux performanceAdvanced troubleshooting linux performance
Advanced troubleshooting linux performanceForthscale
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life琛琳 饶
 
Logstash family introduction
Logstash family introductionLogstash family introduction
Logstash family introductionOwen Wu
 
Real time indexes in Sphinx, Yaroslav Vorozhko
Real time indexes in Sphinx, Yaroslav VorozhkoReal time indexes in Sphinx, Yaroslav Vorozhko
Real time indexes in Sphinx, Yaroslav VorozhkoFuenteovejuna
 
Machine Learning in a Twitter ETL using ELK
Machine Learning in a Twitter ETL using ELK Machine Learning in a Twitter ETL using ELK
Machine Learning in a Twitter ETL using ELK hypto
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lispfukamachi
 
Logstash: Get to know your logs
Logstash: Get to know your logsLogstash: Get to know your logs
Logstash: Get to know your logsSmartLogic
 
Redis - for duplicate detection on real time stream
Redis - for duplicate detection on real time streamRedis - for duplicate detection on real time stream
Redis - for duplicate detection on real time streamCodemotion
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKYoungHeon (Roy) Kim
 
Real time fulltext search with sphinx
Real time fulltext search with sphinxReal time fulltext search with sphinx
Real time fulltext search with sphinxAdrian Nuta
 
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupLogstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupStartit
 
Storm crawler apachecon_na_2015
Storm crawler apachecon_na_2015Storm crawler apachecon_na_2015
Storm crawler apachecon_na_2015ontopic
 
Experiences in ELK with D3.js for Large Log Analysis and Visualization
Experiences in ELK with D3.js  for Large Log Analysis  and VisualizationExperiences in ELK with D3.js  for Large Log Analysis  and Visualization
Experiences in ELK with D3.js for Large Log Analysis and VisualizationSurasak Sanguanpong
 
Mobile Analytics mit Elasticsearch und Kibana
Mobile Analytics mit Elasticsearch und KibanaMobile Analytics mit Elasticsearch und Kibana
Mobile Analytics mit Elasticsearch und Kibanainovex GmbH
 
Scaling an ELK stack at bol.com
Scaling an ELK stack at bol.comScaling an ELK stack at bol.com
Scaling an ELK stack at bol.comRenzo Tomà
 
Logging logs with Logstash - Devops MK 10-02-2016
Logging logs with Logstash - Devops MK 10-02-2016Logging logs with Logstash - Devops MK 10-02-2016
Logging logs with Logstash - Devops MK 10-02-2016Steve Howe
 

What's hot (20)

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

Viewers also liked

Puppet Camp Berlin 2014: Manageable puppet infrastructure
Puppet Camp Berlin 2014: Manageable puppet infrastructurePuppet Camp Berlin 2014: Manageable puppet infrastructure
Puppet Camp Berlin 2014: Manageable puppet infrastructurePuppet
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local ModeMichael Goetz
 
Elementos pre textuais (1) (1)
Elementos pre textuais (1) (1)Elementos pre textuais (1) (1)
Elementos pre textuais (1) (1)Lucas Sousa
 
The Business of Big Data - IA Ventures
The Business of Big Data - IA VenturesThe Business of Big Data - IA Ventures
The Business of Big Data - IA VenturesBen Siscovick
 
Some basic unix commands
Some basic unix commandsSome basic unix commands
Some basic unix commandsaaj_sarkar06
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentDan Stine
 
Weight loss 30 days
Weight loss 30 daysWeight loss 30 days
Weight loss 30 daysMass Loss
 
Solution de transfert mobile - Formats d'échange
Solution de transfert mobile - Formats d'échangeSolution de transfert mobile - Formats d'échange
Solution de transfert mobile - Formats d'échangeOCTO Technology
 
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014P. Taylor Goetz
 

Viewers also liked (13)

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

Similar to Node collaboration - sharing information between your systems

Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB Puppet
 
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDBPuppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDBPuppet
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for OpenstackMohit Sethi
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflowTomas Doran
 
Atmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil DibowitzAtmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil DibowitzPROIDEA
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...Yury Bushmelev
 
What is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaWhat is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaGiedrius Rimkus
 
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...HostedbyConfluent
 
Puppet Camp Tokyo 2014: Keynote
Puppet Camp Tokyo 2014: KeynotePuppet Camp Tokyo 2014: Keynote
Puppet Camp Tokyo 2014: KeynotePuppet
 
Kubernetes intro public - kubernetes meetup 4-21-2015
Kubernetes intro   public - kubernetes meetup 4-21-2015Kubernetes intro   public - kubernetes meetup 4-21-2015
Kubernetes intro public - kubernetes meetup 4-21-2015Rohit Jnagal
 
Kubernetes intro public - kubernetes user group 4-21-2015
Kubernetes intro   public - kubernetes user group 4-21-2015Kubernetes intro   public - kubernetes user group 4-21-2015
Kubernetes intro public - kubernetes user group 4-21-2015reallavalamp
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nltieleman
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)DECK36
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowMatt Ray
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nlbartzon
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with ChefBryan McLellan
 
Treasure Data Summer Internship 2016
Treasure Data Summer Internship 2016Treasure Data Summer Internship 2016
Treasure Data Summer Internship 2016Yuta Iwama
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and YouBryan Berry
 

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

Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
 
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDBPuppet Camp Melbourne 2014: Node Collaboration with PuppetDB
Puppet Camp Melbourne 2014: Node Collaboration with PuppetDB
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
Atmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil DibowitzAtmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil Dibowitz
 
From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...From SaltStack to Puppet and beyond...
From SaltStack to Puppet and beyond...
 
What is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaWhat is Chef and how we use it at tripsta
What is Chef and how we use it at tripsta
 
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
 
Puppet Camp Tokyo 2014: Keynote
Puppet Camp Tokyo 2014: KeynotePuppet Camp Tokyo 2014: Keynote
Puppet Camp Tokyo 2014: Keynote
 
Kubernetes intro public - kubernetes meetup 4-21-2015
Kubernetes intro   public - kubernetes meetup 4-21-2015Kubernetes intro   public - kubernetes meetup 4-21-2015
Kubernetes intro public - kubernetes meetup 4-21-2015
 
Kubernetes intro public - kubernetes user group 4-21-2015
Kubernetes intro   public - kubernetes user group 4-21-2015Kubernetes intro   public - kubernetes user group 4-21-2015
Kubernetes intro public - kubernetes user group 4-21-2015
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with Chef
 
Treasure Data Summer Internship 2016
Treasure Data Summer Internship 2016Treasure Data Summer Internship 2016
Treasure Data Summer Internship 2016
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
 

More from m_richardson

Persistence in the cloud with bosh
Persistence in the cloud with boshPersistence in the cloud with bosh
Persistence in the cloud with boshm_richardson
 
bootstrapping containers with confd
bootstrapping containers with confdbootstrapping containers with confd
bootstrapping containers with confdm_richardson
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discoverym_richardson
 
Serverspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collideServerspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collidem_richardson
 
System Availability Talk
System Availability TalkSystem Availability Talk
System Availability Talkm_richardson
 
Chef - managing yours servers with Code
Chef - managing yours servers with CodeChef - managing yours servers with Code
Chef - managing yours servers with Codem_richardson
 
Open Source Monitoring Tools
Open Source Monitoring ToolsOpen Source Monitoring Tools
Open Source Monitoring Toolsm_richardson
 

More from m_richardson (8)

Persistence in the cloud with bosh
Persistence in the cloud with boshPersistence in the cloud with bosh
Persistence in the cloud with bosh
 
bootstrapping containers with confd
bootstrapping containers with confdbootstrapping containers with confd
bootstrapping containers with confd
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discovery
 
Serverspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collideServerspec and Sensu - Testing and Monitoring collide
Serverspec and Sensu - Testing and Monitoring collide
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
System Availability Talk
System Availability TalkSystem Availability Talk
System Availability Talk
 
Chef - managing yours servers with Code
Chef - managing yours servers with CodeChef - managing yours servers with Code
Chef - managing yours servers with Code
 
Open Source Monitoring Tools
Open Source Monitoring ToolsOpen Source Monitoring Tools
Open Source Monitoring Tools
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

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
  • 4.
  • 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
  • 21.
  • 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

  1. 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
  2. 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.