SlideShare una empresa de Scribd logo
1 de 41
Descargar para leer sin conexión
R.I.Pienaar
PuppetConf 2016
External Data in Puppet 4
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Who am I?
• Puppet User since 0.22
• Really into external data
• Author facts.d, extlookup, Hiera, MCollective
• Consultant - DevOps, Automation,
Architect, Development
• Open Source @ github.com/ripienaar
• Volcane on IRC
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
External Data
Is Configuration For
Your Code
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Hierarchical Data
class monitor (
Array[Monitor::Plugin] $plugins = []
) {
…
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Hierarchical Data
class{“monitor”:
plugins => [
“cpu",
“write_graphite”,
“df”, …
]
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Automatic Param Lookup
include monitor
# hieradb/nodes/host1.yaml
monitor::plugins:
- my_app
class{“monitor”:
plugins => [
“my_app”, “cpu”, “df”, …
]
}
+
=
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Hierarchical Data
host1 host2 host3 host4 host5 host6
prod stage dev
dc1 dc2
Site wide common data
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Hierarchical Data
host1 host2 host3 host4 host5 host6
prod stage dev
dc1 dc2
Site wide common data
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Hierarchical Data
host1 host2 host3 host4 host5 host6
prod stage dev
dc1 dc2
Site wide common data
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Hierarchical Data
host1 host2 host3 host4 host5 host6
prod stage dev
dc1 dc2
Site wide common data
$trusted[“certname”]
$environment
$facts[“dc”]
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Automatic Param Lookup
include monitor
# hieradb/nodes/host1.yaml
monitor::plugins:
- my_app
class{“monitor”:
plugins => [
“my_app”, “cpu”, “df”, …
]
}
+
=
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup
• lookup() function replaces hiera*()
• Automatic Param Lookup more useful
• environment and module aware
• Great CLI
• YAML/JSON out of the box, more to come
• Data compatible with Hiera, cohabits with
Hiera
• Pluggable
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - CLI
$ puppet lookup monitor::plugins —merge unique
——
- my_app
- write_graphite
- cpu
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
$ puppet lookup monitor::plugins —merge unique —explain
Merge strategy unique
…
Data Provider "Nodes"
Path “/etc/…/production/data/nodes/dev3.devco.net.yaml”
Original path: "nodes/%{trusted.certname}"
Found key: "monitor::plugins" value: [
"my_app"
]
…
Data Provider "common"
Path “/etc/…/data/common.yaml”
Original path: "common"
Found key: "monitor::plugins" value: [
"cpu",
"write_graphite"
]
…
Merged result: [
"my_app",
"cpu",
"write_graphite"
]
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
$ puppet lookup monitor::plugins —merge unique —explain
Merge strategy unique
…
Data Provider "Nodes"
Path “/etc/…/production/data/nodes/dev3.devco.net.yaml”
Original path: "nodes/%{trusted.certname}"
Found key: "monitor::plugins" value: [
"my_app"
]
…
Data Provider "common"
Path “/etc/…/data/common.yaml”
Original path: "common"
Found key: "monitor::plugins" value: [
"cpu",
"write_graphite"
]
…
Merged result: [
"my_app",
"cpu",
"write_graphite"
]
Every tier
Final result
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - Config
# environments/production/hiera.yaml
---
version: 4
datadir: data
hierarchy:
- name: "Nodes"
backend: yaml
path: "nodes/%{trusted.certname}"
- name: "common"
backend: yaml
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$plugins = lookup(“monitor::plugins”)
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$plugins = lookup(“monitor::plugins”, {
“value_type” => Array[Monitor::Plugin],
“default_value” => [“cpu”, …]
})
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
function monitor::params() {
$result = {
“monitor::plugins” => [
“cpu”, …
]
}
}
$plugins = lookup(“monitor::plugins”, {
“default_value_hash” => monitor::params()
})
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$servers = lookup(“monitor::plugins”, {
“merge” => “first”
})
Default behaviour
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$servers = lookup(“monitor::plugins”, {
“merge” => “unique”
})
Array Merge (hiera_array())
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$servers = lookup(“monitor::plugins”, {
“merge” => “hash”
})
Shallow Hash Merge (hiera_hash())
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$servers = lookup(“monitor::plugins”, {
“merge” => “deep”,
})
Deep Hash Merge
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
# common.yaml
users::local:
rip:
email: “rip@devco.net"
comment: “R.I.Pienaar”
sudoer: true
shell: “/bin/zsh”
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
# nodes/dev3.devco.net
users::local:
rip:
email: “arri.pienaar@client.com”
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$ puppet lookup users::local —merge deep
---
rip:
email: arri.pienaar@client.com
comment: R.I.Pienaar
sudoer: true
shell: "/bin/zsh"
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Automatic Param Lookup
include monitor
# hieradb/nodes/host1.yaml
monitor::plugins:
- my_app
class{“monitor”:
plugins => [
“my_app”, “cpu”, “df”, …
]
}
+
=
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$lookup_options = {
“merge” => {
“strategy” => “unique”
}
}
$plugins = lookup(“monitor::plugins”, $lookup_options)
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - function
$plugins = lookup(“monitor::plugins”)
# hieradata/common.yaml
lookup_options:
monitor::plugins:
merge:
strategy: unique
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
include monitor
# …/production/hieradata/common.yaml
lookup_options:
monitor::plugins:
strategy: unique
monitor::plugins:
- cpu
- …
class monitor (
Array[Monitor::Plugin] $plugins = []
) {}
Lookup - function
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Lookup - Data In Modules
# modules/monitor/hiera.yaml
---
version: 4
datadir: "data"
hierarchy:
- name: "common"
backend: "yaml"
# modules/monitor/data/common.yaml
lookup_options:
monitor::plugins:
strategy: unique
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
include monitor
# hieradata/common.yaml
monitor::plugins:
- cpu
- write_graphite
Lookup - Data In Modules
# hieradata/nodes/node1.yaml
monitor::plugins:
- my_app
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Tips and Tricks
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
lookup(“classes”, {“merge” => “unique”}).include
hiera_include()
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
hiera_include()
# common.yaml
lookup_options:
classes:
merge:
strategy: “deep”
knockout_prefix: “-“
classes:
- nagios
# nodes/node1.yaml
classes:
- -nagios
- sensu
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
lookup(“classes”).include
hiera_include()
# common.yaml
lookup_options:
classes:
merge:
strategy: “deep”
knockout_prefix: “-“
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
params.pp
# modules/ntp/hiera.yaml
---
version: 4
datadir: data
hierarchy:
- name: "Operating System Family"
backend: yaml
path: "%{facts.os.family}"
- name: "common"
backend: yaml
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
params.pp
# modules/ntp/data/AIX.yaml
---
ntp::driftfile: '/etc/ntp.drift'
ntp::package_name:
- 'bos.net.tcp.client'
ntp::restrict:
- 'default nomodify notrap nopeer noquery'
- '127.0.0.1'
ntp::service_name: 'xntpd'
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
params.pp
# modules/ntp/data/Debian.yaml
ntp::restrict:
- '-4 default kod nomodify notrap nopeer noquery'
- '-6 default kod nomodify notrap nopeer noquery'
- '127.0.0.1'
- '::1'
ntp::service_name: 'ntp'
ntp::servers:
- '0.debian.pool.ntp.org'
- '1.debian.pool.ntp.org'
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Future
• Hiera deprecated
• No more site wide hiera, only environment
and modules
• Pluggable via functions in modules - native or
ruby, much much simpler than old backends
• lookup.yaml or lookup.conf
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Questions?
twitter: @ripienaar
email: rip@devco.net
blog: www.devco.net
github: ripienaar
freenode: Volcane
slack.puppet.com: ripienaar
https://www.devco.net/

Más contenido relacionado

Destacado

Puppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worldsPuppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worldsPuppet
 
Functional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadFunctional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadPuppet
 
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.Puppet
 
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...Puppet
 
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...Puppet
 
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...Puppet
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T Puppet
 
PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...
PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...
PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...Puppet
 
High availability for puppet - 2016
High availability for puppet - 2016High availability for puppet - 2016
High availability for puppet - 2016Zack Smith
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
 
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...Puppet
 
PuppetConf track overview: Modern Infrastructure
PuppetConf track overview: Modern InfrastructurePuppetConf track overview: Modern Infrastructure
PuppetConf track overview: Modern InfrastructurePuppet
 
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...Puppet
 
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...Puppet
 
PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...
PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...
PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...Puppet
 
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water OperationsPuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water OperationsPuppet
 
PuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells Fargo
PuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells FargoPuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells Fargo
PuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells FargoPuppet
 
Icinga @ OSMC 2014
Icinga @ OSMC 2014Icinga @ OSMC 2014
Icinga @ OSMC 2014Icinga
 
Icinga2 at PuppetLabs
Icinga2 at PuppetLabsIcinga2 at PuppetLabs
Icinga2 at PuppetLabsIcinga
 

Destacado (20)

Puppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worldsPuppet and AWS: Getting the best of both worlds
Puppet and AWS: Getting the best of both worlds
 
Functional Hostnames and Why they are Bad
Functional Hostnames and Why they are BadFunctional Hostnames and Why they are Bad
Functional Hostnames and Why they are Bad
 
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.
 
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
PuppetConf 2016: Running Puppet Software in Docker Containers – Gareth Rushgr...
 
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
 
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...
PuppetConf 2016: Site Launch Automation: From Days to Minutes – Kristen Crawf...
 
Nantes M1 Meraud
Nantes M1 MeraudNantes M1 Meraud
Nantes M1 Meraud
 
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
PuppetConf 2016: Enjoying the Journey from Puppet 3.x to 4.x – Rob Nelson, AT&T
 
PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...
PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...
PuppetConf 2016: Case Study: Puppets in the Government – Kathy Lee (co-author...
 
High availability for puppet - 2016
High availability for puppet - 2016High availability for puppet - 2016
High availability for puppet - 2016
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
 
PuppetConf track overview: Modern Infrastructure
PuppetConf track overview: Modern InfrastructurePuppetConf track overview: Modern Infrastructure
PuppetConf track overview: Modern Infrastructure
 
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
PuppetConf 2016: Best Practices for Puppet in the Cloud – Randall Hunt, Amazo...
 
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
PuppetConf 2016: Implementing Puppet within a Complex Enterprise – Jerry Caup...
 
PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...
PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...
PuppetConf 2016: Can You Manage Me Now? Humanizing Configuration Management a...
 
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water OperationsPuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
PuppetConf 2016: Watching the Puppet Show – Sean Porter, Heavy Water Operations
 
PuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells Fargo
PuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells FargoPuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells Fargo
PuppetConf 2016: Puppet Troubleshooting – Thomas Uphill, Wells Fargo
 
Icinga @ OSMC 2014
Icinga @ OSMC 2014Icinga @ OSMC 2014
Icinga @ OSMC 2014
 
Icinga2 at PuppetLabs
Icinga2 at PuppetLabsIcinga2 at PuppetLabs
Icinga2 at PuppetLabs
 

Similar a PuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar

Puppet Performance Profiling
Puppet Performance ProfilingPuppet Performance Profiling
Puppet Performance Profilingripienaar
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsGraham Dumpleton
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with BackstageOpsta
 
Whirlwind Tour of Puppet 4
Whirlwind Tour of Puppet 4Whirlwind Tour of Puppet 4
Whirlwind Tour of Puppet 4ripienaar
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk PemulaOon Arfiandwi
 
Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015ripienaar
 
Hands-on go profiling
Hands-on go profilingHands-on go profiling
Hands-on go profilingDaniel Ammar
 
Large Scale Continuous Delivery
Large Scale Continuous DeliveryLarge Scale Continuous Delivery
Large Scale Continuous Deliveryripienaar
 
Introduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R ShinyIntroduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R Shinyanamarisaguedes
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
Monitoring using Sensu
Monitoring using SensuMonitoring using Sensu
Monitoring using Sensuripienaar
 
Introduction to Configuration Management
Introduction to Configuration ManagementIntroduction to Configuration Management
Introduction to Configuration Managementripienaar
 
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015Innomatic Platform
 
Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.CocoaHeads France
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with pythonroskakori
 
Advanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automationAdvanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automationCysinfo Cyber Security Community
 
Virtual Environment and Web development using Django
Virtual Environment and Web development using DjangoVirtual Environment and Web development using Django
Virtual Environment and Web development using DjangoSunil kumar Mohanty
 
2nd Content Providers Community Call
2nd Content Providers Community Call2nd Content Providers Community Call
2nd Content Providers Community CallOpenAIRE
 

Similar a PuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar (20)

Puppet Performance Profiling
Puppet Performance ProfilingPuppet Performance Profiling
Puppet Performance Profiling
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
 
Whirlwind Tour of Puppet 4
Whirlwind Tour of Puppet 4Whirlwind Tour of Puppet 4
Whirlwind Tour of Puppet 4
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk Pemula
 
Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015Puppet Performance Profiling - CM Camp 2015
Puppet Performance Profiling - CM Camp 2015
 
Hands-on go profiling
Hands-on go profilingHands-on go profiling
Hands-on go profiling
 
Large Scale Continuous Delivery
Large Scale Continuous DeliveryLarge Scale Continuous Delivery
Large Scale Continuous Delivery
 
Introduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R ShinyIntroduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R Shiny
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Monitoring using Sensu
Monitoring using SensuMonitoring using Sensu
Monitoring using Sensu
 
Introduction to Configuration Management
Introduction to Configuration ManagementIntroduction to Configuration Management
Introduction to Configuration Management
 
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
 
Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.Découvrir dtrace en ligne de commande.
Découvrir dtrace en ligne de commande.
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Open source projects with python
Open source projects with pythonOpen source projects with python
Open source projects with python
 
Advanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automationAdvanced malware analysis training session5 reversing automation
Advanced malware analysis training session5 reversing automation
 
Virtual Environment and Web development using Django
Virtual Environment and Web development using DjangoVirtual Environment and Web development using Django
Virtual Environment and Web development using Django
 
实战Ecos
实战Ecos实战Ecos
实战Ecos
 
2nd Content Providers Community Call
2nd Content Providers Community Call2nd Content Providers Community Call
2nd Content Providers Community Call
 

Más de Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyamlPuppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)Puppet
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscodePuppet
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codePuppet
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approachPuppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationPuppet
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliancePuppet
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowPuppet
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Puppet
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppetPuppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkPuppet
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping groundPuppet
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy SoftwarePuppet
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User GroupPuppet
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsPuppet
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 

Más de Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

PuppetConf. 2016: External Data in Puppet 4 – R.I. Pienaar

  • 2. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Who am I? • Puppet User since 0.22 • Really into external data • Author facts.d, extlookup, Hiera, MCollective • Consultant - DevOps, Automation, Architect, Development • Open Source @ github.com/ripienaar • Volcane on IRC
  • 3. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar External Data Is Configuration For Your Code
  • 4. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Hierarchical Data class monitor ( Array[Monitor::Plugin] $plugins = [] ) { … }
  • 5. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Hierarchical Data class{“monitor”: plugins => [ “cpu", “write_graphite”, “df”, … ] }
  • 6. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Automatic Param Lookup include monitor # hieradb/nodes/host1.yaml monitor::plugins: - my_app class{“monitor”: plugins => [ “my_app”, “cpu”, “df”, … ] } + =
  • 7. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Hierarchical Data host1 host2 host3 host4 host5 host6 prod stage dev dc1 dc2 Site wide common data
  • 8. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Hierarchical Data host1 host2 host3 host4 host5 host6 prod stage dev dc1 dc2 Site wide common data
  • 9. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Hierarchical Data host1 host2 host3 host4 host5 host6 prod stage dev dc1 dc2 Site wide common data
  • 10. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Hierarchical Data host1 host2 host3 host4 host5 host6 prod stage dev dc1 dc2 Site wide common data $trusted[“certname”] $environment $facts[“dc”]
  • 11. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Automatic Param Lookup include monitor # hieradb/nodes/host1.yaml monitor::plugins: - my_app class{“monitor”: plugins => [ “my_app”, “cpu”, “df”, … ] } + =
  • 12. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup • lookup() function replaces hiera*() • Automatic Param Lookup more useful • environment and module aware • Great CLI • YAML/JSON out of the box, more to come • Data compatible with Hiera, cohabits with Hiera • Pluggable
  • 13. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - CLI $ puppet lookup monitor::plugins —merge unique —— - my_app - write_graphite - cpu
  • 14. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar $ puppet lookup monitor::plugins —merge unique —explain Merge strategy unique … Data Provider "Nodes" Path “/etc/…/production/data/nodes/dev3.devco.net.yaml” Original path: "nodes/%{trusted.certname}" Found key: "monitor::plugins" value: [ "my_app" ] … Data Provider "common" Path “/etc/…/data/common.yaml” Original path: "common" Found key: "monitor::plugins" value: [ "cpu", "write_graphite" ] … Merged result: [ "my_app", "cpu", "write_graphite" ]
  • 15. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar $ puppet lookup monitor::plugins —merge unique —explain Merge strategy unique … Data Provider "Nodes" Path “/etc/…/production/data/nodes/dev3.devco.net.yaml” Original path: "nodes/%{trusted.certname}" Found key: "monitor::plugins" value: [ "my_app" ] … Data Provider "common" Path “/etc/…/data/common.yaml” Original path: "common" Found key: "monitor::plugins" value: [ "cpu", "write_graphite" ] … Merged result: [ "my_app", "cpu", "write_graphite" ] Every tier Final result
  • 16. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - Config # environments/production/hiera.yaml --- version: 4 datadir: data hierarchy: - name: "Nodes" backend: yaml path: "nodes/%{trusted.certname}" - name: "common" backend: yaml
  • 17. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $plugins = lookup(“monitor::plugins”)
  • 18. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $plugins = lookup(“monitor::plugins”, { “value_type” => Array[Monitor::Plugin], “default_value” => [“cpu”, …] })
  • 19. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function function monitor::params() { $result = { “monitor::plugins” => [ “cpu”, … ] } } $plugins = lookup(“monitor::plugins”, { “default_value_hash” => monitor::params() })
  • 20. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $servers = lookup(“monitor::plugins”, { “merge” => “first” }) Default behaviour
  • 21. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $servers = lookup(“monitor::plugins”, { “merge” => “unique” }) Array Merge (hiera_array())
  • 22. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $servers = lookup(“monitor::plugins”, { “merge” => “hash” }) Shallow Hash Merge (hiera_hash())
  • 23. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $servers = lookup(“monitor::plugins”, { “merge” => “deep”, }) Deep Hash Merge
  • 24. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function # common.yaml users::local: rip: email: “rip@devco.net" comment: “R.I.Pienaar” sudoer: true shell: “/bin/zsh”
  • 25. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function # nodes/dev3.devco.net users::local: rip: email: “arri.pienaar@client.com”
  • 26. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $ puppet lookup users::local —merge deep --- rip: email: arri.pienaar@client.com comment: R.I.Pienaar sudoer: true shell: "/bin/zsh"
  • 27. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Automatic Param Lookup include monitor # hieradb/nodes/host1.yaml monitor::plugins: - my_app class{“monitor”: plugins => [ “my_app”, “cpu”, “df”, … ] } + =
  • 28. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $lookup_options = { “merge” => { “strategy” => “unique” } } $plugins = lookup(“monitor::plugins”, $lookup_options)
  • 29. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - function $plugins = lookup(“monitor::plugins”) # hieradata/common.yaml lookup_options: monitor::plugins: merge: strategy: unique
  • 30. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar include monitor # …/production/hieradata/common.yaml lookup_options: monitor::plugins: strategy: unique monitor::plugins: - cpu - … class monitor ( Array[Monitor::Plugin] $plugins = [] ) {} Lookup - function
  • 31. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Lookup - Data In Modules # modules/monitor/hiera.yaml --- version: 4 datadir: "data" hierarchy: - name: "common" backend: "yaml" # modules/monitor/data/common.yaml lookup_options: monitor::plugins: strategy: unique
  • 32. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar include monitor # hieradata/common.yaml monitor::plugins: - cpu - write_graphite Lookup - Data In Modules # hieradata/nodes/node1.yaml monitor::plugins: - my_app
  • 33. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Tips and Tricks
  • 34. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar lookup(“classes”, {“merge” => “unique”}).include hiera_include()
  • 35. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar hiera_include() # common.yaml lookup_options: classes: merge: strategy: “deep” knockout_prefix: “-“ classes: - nagios # nodes/node1.yaml classes: - -nagios - sensu
  • 36. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar lookup(“classes”).include hiera_include() # common.yaml lookup_options: classes: merge: strategy: “deep” knockout_prefix: “-“
  • 37. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar params.pp # modules/ntp/hiera.yaml --- version: 4 datadir: data hierarchy: - name: "Operating System Family" backend: yaml path: "%{facts.os.family}" - name: "common" backend: yaml
  • 38. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar params.pp # modules/ntp/data/AIX.yaml --- ntp::driftfile: '/etc/ntp.drift' ntp::package_name: - 'bos.net.tcp.client' ntp::restrict: - 'default nomodify notrap nopeer noquery' - '127.0.0.1' ntp::service_name: 'xntpd'
  • 39. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar params.pp # modules/ntp/data/Debian.yaml ntp::restrict: - '-4 default kod nomodify notrap nopeer noquery' - '-6 default kod nomodify notrap nopeer noquery' - '127.0.0.1' - '::1' ntp::service_name: 'ntp' ntp::servers: - '0.debian.pool.ntp.org' - '1.debian.pool.ntp.org'
  • 40. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Future • Hiera deprecated • No more site wide hiera, only environment and modules • Pluggable via functions in modules - native or ruby, much much simpler than old backends • lookup.yaml or lookup.conf
  • 41. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Questions? twitter: @ripienaar email: rip@devco.net blog: www.devco.net github: ripienaar freenode: Volcane slack.puppet.com: ripienaar https://www.devco.net/