SlideShare a Scribd company logo
1 of 67
Download to read offline
Finding Waldo…
(“the full data enchilada“ - sorry for the original title, I must
have been hungry)
About Me
• Swedish
• Live on the

island

of Gozo,

Malta
• Father of 3
• Author of the Puppet 4
Language, Hiera 5, and Puppet
Type system, Task Plans.
• On the Puppet Core team
helindbe @hel
Agenda
• What is Hiera?
• What does Hiera do?
• Authoring Data
• Differences hiera 3, (4), and 5
• Writing backends
What is Hiera?
[haɪrɑ] or [haɪərɑ]
“hiera" - the gem“hiera" - the command line tool
“hiera" - the function
What Hiera is
• A key-value store abstraction with multiple and
extensible set of backends (backend API).
• A key lookup resolution mechanism searching
multiple key-value stores (~ query)
• A hierarchical data organization
• A data composition mechanism (defaults,
override, merge, unique - etc.)
What do we use Hiera for?
• Explicit lookup
• Automatic Parameter Lookup (APL)
Why a new Hiera?
hiera 3 does this thing…
• Similar code in every backend - COPY PASTA - very hard to fix
general things when the logic is in each and every backend.
• Easy to make mistakes and leak memory in a backend
• Global & static architecture - must restart after changes
• Global config pointing into environments - all environments
must change at the same time - yeah right, when you have
1000nds forever changing environments…
• Search uses a cartesian product of levels and backends based on file suffix - lots of
trickery and lots of file stats
• Different backend versions not supported in different environments.
• No explanation support - need to trace/debug - must restart server
• Use of dynamic variables (because of lack of suitable features) makes it impossible to
have efficient cashing to speed up performance.
• Has its own backed loading system
• Circular dependency on puppet - made it very hard to fix certain types of issues
Hiera Versions
where a gem in puppet
CLI hiera puppet lookup
hiera.yaml
version
3 5 ( supports 3 and 4)
explicit lookup hiera() hiera_array()
hiera_hash() lookup()
backend API complicated simple using function API
APL options no
lookup_options in data,
explicit and APL the
same!
explain support no --explain
advanced paths no globs, mapped paths
deprecated
Explicit lookup
# get value, and…
# …fail if not present
$x = lookup(‘key’)
# …verify data type
$x = lookup(‘key’, Array)
# …return default if not present
$x = lookup(‘key’, Array, first,[blue])
# …options hash
$x = lookup('key', { <options> })
Many Lookup Options
name the key to lookup
value_type the return type to assert
merge merge options
defalt_value if not found use this
default_values_hash if not found pick lookup here
override look here first
default via code block
$x = lookup(‘mykey’) |$x| {
# calculate the value
compute_it($x)
}
Merge Behaviour
first the first found (default)
unique for Array ( v3 = “array merge”)
hash
merge hash, highest prio key
wins (no recursion)
deep
merge hash, recursive, higher
prio wins on conflict, arrays
made unique
Deep Options
knockout_prefix
string to match for removal
(undef = no knockout)
sort_merged_arrays sorts arrays (false)
merge_hash_arrays
if hashes in arrays should be
merged (false)
APL
class mymodule::myclass($myparam) {
#...
}
include 'mymodule::myclass'
# Automatically looks up:
# 'mymodule::myclass::myparam'
# when value is not given.
explicit lookup vs. APL
• APL = “Inversion of control” - “Push don’t Pull”
• Much easier to test
• Can be overridden!
• Parameterized classes are documented - your
arbitrary keys are not…
• Use APL in your APIs
APL and options
• All lookup options can be set in the data!
• Control “deep merge” etc per key!
• Any backend can return a Hash for the key “lookup_options” with a map of “key” => <options-
hash>
• All “lookup_options” are merged
• You can supply defaults in a module for example
APL and lookup_options !
Authoring Data
where to stick (possibly pieces of) Waldo…
Three Layers
Global Environment Module
Global
Layer
• For operational use
• Across all environments
• Overrides environment and modules
• Ok to use a deprecated version 3 hiera.yaml
• In Hiera 3, the only layer

(with nasty tricks of referencing into each environment).
Environment
Layer
• The typical place to store data
• Across all modules in the env
• Overrides modules
• Use a hiera version 5 hiera.yaml
Module
Layer
• Regular hierarchy for overridable and merge-able
values
• a default_hierarchy only consulted when not
found in regular hierarchy
• Only keys for the module’s namespace
• Must use a hiera 5 version hiera.yaml
themodule’sdefault_hierarchy
A config
Global Environment Module
a::
b::
Strategy ‘first’
Global Environment Module
lookup(‘waldo’)
a::
b::
Strategy ‘first’ - not found
Global Environment Module
lookup(‘waldo’)
a::
b::
not found
error
Strategy ‘first’ - not found
Global Environment Module
lookup(‘b::waldo’)
a::
b::
not found
error
Strategy ‘first’ - simple find
Global Environment Module
lookup(‘b::waldo’)
a::
b::
returned
Strategy ‘first’ - simple find
Global Environment Module
lookup(‘b::waldo’)
a::
b::
Strategy ‘first’ - find in
module
Global Environment Module
lookup(‘b::waldo’)
a::
b::
Strategy ‘first’ - find in
defaults
Global Environment Module
lookup(‘b::key’)
a::
b::
not found
returned
A merging strategy
Global Environment Module
lookup(‘b::key’)
a::
b::
Inside a layer
Highest prio
Lowest prio
levels with named
entries
Search order
Highest prio
Lowest prio
each level in turn
---
version: 5
defaults: # Used for any hierarchy level that omits these keys.
datadir: data # This path is relative to hiera.yaml's directory.
data_hash: yaml_data # Use the built-in YAML backend.
hierarchy:
- name: "Per-node data" # Human-readable name.
path: "nodes/%{trusted.certname}.yaml" # File path, relative to datadir.
# ^^^ IMPORTANT: include the file extension!
- name: "Per-datacenter business group data" # Uses custom facts.
path: "location/%{facts.whereami}/%{facts.group}.yaml"
- name: "Global business group data"
path: "groups/%{facts.group}.yaml"
- name: "Per-datacenter secret data (encrypted)"
lookup_key: eyaml_lookup_key # Uses non-default backend.
path: "secrets/%{facts.whereami}.eyaml"
options:
pkcs7_private_key: "/etc/puppetlabs/puppet/eyaml/private_key.pkcs7.pem"
pkcs7_public_key: "/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem"
- name: "Per-OS defaults"
path: "os/%{facts.os.family}.yaml"
- name: "Common data"
path: "common.yaml"
a level
Inside a layer
Highest prio
Lowest prio
multiple
paths/globs etc.
per level
(backend only called if file exists)
---
version: 5
defaults: # Used for any hierarchy level that omits these keys.
datadir: data # This path is relative to hiera.yaml's directory.
data_hash: yaml_data # Use the built-in YAML backend.
hierarchy:
- name: "Per-node, datacenter, and business group data"
paths:
- "nodes/%{trusted.certname}.yaml"
- "location/%{facts.whereami}/%{facts.group}.yaml"
- "groups/%{facts.group}.yaml"
- name: "Per-datacenter secret data (encrypted)"
lookup_key: eyaml_lookup_key # Uses non-default backend.
path: "secrets/%{facts.whereami}.eyaml"
options:
pkcs7_private_key: "/etc/puppetlabs/puppet/eyaml/private_key.pkcs7.pem"
pkcs7_public_key: "/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem"
- name: "Defaults per os and common"
paths:
- "os/%{facts.os.family}.yaml"
- "common.yaml"
multiple
Different ways to reference
data files / sources
Key Data type Expected value
path
paths
String
Array
One file path.
Any number of file paths. This acts like a sub-hierarchy: if multiple
files exist, Hiera searches all of them, in the order in which they’re
written.
glob
globs
String
Array
One (or several) shell-like glob patterns, which might match any
number of files. If multiple files are found, Hiera searches all of them
in alphanumerical order (ignoring the order in which multiple globs
were given).
uri
uris
String
Array
One, (or several) URIs that are not checked for existence. One call
to the backend is performed for every given URI.
mapped_paths Array or
Hash
A fact that is a collection (array or hash) of values. Hiera expands
these values to produce an array of paths.
mapped_paths: [services, tmp, "service/%{tmp}/common.yaml"]
Tips and Tricks
• Have keys with ‘.’ in them?

Quote the key when looking up to prevents the built
in “dig” behaviour:



lookup("'my.dotted.key'")
Writing Backends
Three kinds of backends
data_hash
Produces all of the

key => value

pairs at once as a Hash
Good for small to moderate data volume and where most of the
data is always used. Limit; static in nature.
Reading a json file
function mymodule::myjson(Hash $options, Puppet::LookupContext $ctx) {
$options[‘path’].file.parsejson()
}
lookup_key
Produces values
per key - called
multiple times.
Slightly more complex because of the added flexibility/power, but still not
complicated to implement.
A “prefixer” added to our
hiera.yaml
- name: "Using example with prefix"
path: “examples/%{trusted.certname}.yaml"
lookup_key: mymodule::json_with_prefix # the example function
options:
prefix: “Yo, Waldo! The value is: "
transforming values by
key…
function mymodule::myjson_with_prefix(
Variant[String, Numeric] $key, # the key being looked up
Hash $options, # the options from hiera.yaml
Puppet::LookupContext $ctx # the context/helper
){
$hash = $ctx.cache_file($options[‘path’]) |$content| {
$content.parsejson()
}
case $val = $hash[$key] {
String : { "${options[‘prefix']}${val}" }
NotUndef: { $val }
default : { $ctx.not_found() }
}
}
data_dig
Like lookup_key but is
responsible for any
digging into the key.
because lookup(“users.jane_doe.pager_nbr”) would be terrible if
there are thousands of users…
Puppet::LookupContext object
Key Expected value
not_found() Immediately returns from the function and tells hiera there is no
value for the key
interpolate(value) Perform hiera style interpolation on the given string value
environment_name()
module_name()
Produces information about the container where this function is
part of a hiera.yaml
cache(key, value)
cache_all(hash)
Adds values to a cache.
cached_value(key)
cache_has_value(key)
cached_entries()
Retrieves value(s) from the cache
cached_file_data(path) |$content|
{...}
Reads and caches the contents of a file, or the transformed
content of a file
explain() || { 'message' } Emits an “explain” message if —explain mode is on
Ideas for backends
• DRY up data - use lookup inside backend to compose
values from lookups - earlier not possible for arrays and
hashes.
• Computed values - given input from hiera.yaml (maybe
even a key), other values can be derived
• Provide different data sets (in a module; for example
“standalone” vs. a “client server” configuration) that can
be integrated. While a module cannot directly supply
global keys, it can provide the data/backend that does
so if added to the env’s hiera.yaml!
Cage Fight !
• Faster
• Cleaner
• More powerful, yet Simpler
• Explain Support
3 vs 5 - deprecated bad magic
• Nothing good came from using these hiera 3 magic variables:
$calling_module
$calling_class
$calling_class_path
• Hiera 3 could use these as a hacky predecessor of module data, but
anything you were doing with them is better accomplished with the
module layer. You can continue using these in a version 3 hiera.yaml
file, but you’ll need to remove them once you update your global config
to version 5.
• If used to split up data in multiple files (per module etc). Use the ‘glob’
pattern.
3 vs 5
• Use lookup() instead of hiera_xxx()
• Use lookup() + include() instead of hiera_include()
• Use lookup CLI instead of hiera CLI
• No global merge/deep-merge setting (was: horrible!) - use lookup options.
• Move to using hiera 5 backends!
• The ‘data binding terminus’ (advanced hackery) is no longer used - write a
backend instead
• Hiera 5 is faster (much thanks to caching) and with greatly reduced risk of
memory leaks due to mistakes in backends
• You can call lookup() from within backend functions! Can do what hiera 3
alias never could (hiera 3 - limited to strings).
• The lookup_key function opens up for advanced data composition - merge
multiple (different) keys into one etc.
And the winner is…
Questions?
PuppetConf 2017: Hiera 5: The Full Data Enchilada- Hendrik Lindberg, Puppet
PuppetConf 2017: Hiera 5: The Full Data Enchilada- Hendrik Lindberg, Puppet

More Related Content

What's hot

Solr 6 Feature Preview
Solr 6 Feature PreviewSolr 6 Feature Preview
Solr 6 Feature PreviewYonik Seeley
 
Enterprise Search Solution: Apache SOLR. What's available and why it's so cool
Enterprise Search Solution: Apache SOLR. What's available and why it's so coolEnterprise Search Solution: Apache SOLR. What's available and why it's so cool
Enterprise Search Solution: Apache SOLR. What's available and why it's so coolEcommerce Solution Provider SysIQ
 
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014Puppet
 
Tutorial on developing a Solr search component plugin
Tutorial on developing a Solr search component pluginTutorial on developing a Solr search component plugin
Tutorial on developing a Solr search component pluginsearchbox-com
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APIlucenerevolution
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes WorkshopErik Hatcher
 
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)Alexandre Rafalovitch
 
Solr Query Parsing
Solr Query ParsingSolr Query Parsing
Solr Query ParsingErik Hatcher
 
code4lib 2011 preconference: What's New in Solr (since 1.4.1)
code4lib 2011 preconference: What's New in Solr (since 1.4.1)code4lib 2011 preconference: What's New in Solr (since 1.4.1)
code4lib 2011 preconference: What's New in Solr (since 1.4.1)Erik Hatcher
 
Get the most out of Solr search with PHP
Get the most out of Solr search with PHPGet the most out of Solr search with PHP
Get the most out of Solr search with PHPPaul Borgermans
 
Solr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachSolr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachAlexandre Rafalovitch
 
Going beyond Code: Driving automation with data via Hiera
Going beyond Code: Driving automation with data via HieraGoing beyond Code: Driving automation with data via Hiera
Going beyond Code: Driving automation with data via HieraDylan Cochran
 
Puppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for EverybodyPuppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for EverybodyPuppet
 
Custom Database Queries in WordPress
Custom Database Queries in WordPressCustom Database Queries in WordPress
Custom Database Queries in WordPresstopher1kenobe
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with SolrErik Hatcher
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with SolrErik Hatcher
 

What's hot (20)

Solr 6 Feature Preview
Solr 6 Feature PreviewSolr 6 Feature Preview
Solr 6 Feature Preview
 
Enterprise Search Solution: Apache SOLR. What's available and why it's so cool
Enterprise Search Solution: Apache SOLR. What's available and why it's so coolEnterprise Search Solution: Apache SOLR. What's available and why it's so cool
Enterprise Search Solution: Apache SOLR. What's available and why it's so cool
 
Apache Solr Workshop
Apache Solr WorkshopApache Solr Workshop
Apache Solr Workshop
 
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
Delegated Configuration with Multiple Hiera Databases - PuppetConf 2014
 
Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014
 
Tutorial on developing a Solr search component plugin
Tutorial on developing a Solr search component pluginTutorial on developing a Solr search component plugin
Tutorial on developing a Solr search component plugin
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST API
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes Workshop
 
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
Rebuilding Solr 6 examples - layer by layer (LuceneSolrRevolution 2016)
 
Solr Query Parsing
Solr Query ParsingSolr Query Parsing
Solr Query Parsing
 
code4lib 2011 preconference: What's New in Solr (since 1.4.1)
code4lib 2011 preconference: What's New in Solr (since 1.4.1)code4lib 2011 preconference: What's New in Solr (since 1.4.1)
code4lib 2011 preconference: What's New in Solr (since 1.4.1)
 
Get the most out of Solr search with PHP
Get the most out of Solr search with PHPGet the most out of Solr search with PHP
Get the most out of Solr search with PHP
 
Solr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approachSolr Troubleshooting - TreeMap approach
Solr Troubleshooting - TreeMap approach
 
Going beyond Code: Driving automation with data via Hiera
Going beyond Code: Driving automation with data via HieraGoing beyond Code: Driving automation with data via Hiera
Going beyond Code: Driving automation with data via Hiera
 
Puppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for EverybodyPuppet Camp DC: Puppet for Everybody
Puppet Camp DC: Puppet for Everybody
 
Custom Database Queries in WordPress
Custom Database Queries in WordPressCustom Database Queries in WordPress
Custom Database Queries in WordPress
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
JSON in Solr: from top to bottom
JSON in Solr: from top to bottomJSON in Solr: from top to bottom
JSON in Solr: from top to bottom
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
Jena
JenaJena
Jena
 

Viewers also liked

PuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, Puppet
PuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, PuppetPuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, Puppet
PuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, PuppetPuppet
 
PuppetConf 2017: The Changing Role of Operations- Michael Stahnke, Puppet
PuppetConf 2017: The Changing Role of Operations- Michael Stahnke, PuppetPuppetConf 2017: The Changing Role of Operations- Michael Stahnke, Puppet
PuppetConf 2017: The Changing Role of Operations- Michael Stahnke, PuppetPuppet
 
PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...
PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...
PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...Puppet
 
PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...
PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...
PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...Puppet
 
PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...
PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...
PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...Puppet
 
3 Steps to Expand DevOps and Automation Throughout the Enterprise
3 Steps to Expand DevOps and Automation Throughout the Enterprise3 Steps to Expand DevOps and Automation Throughout the Enterprise
3 Steps to Expand DevOps and Automation Throughout the EnterprisePuppet
 

Viewers also liked (6)

PuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, Puppet
PuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, PuppetPuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, Puppet
PuppetConf 2017: Puppet Platform: A Path Forward- Eric Sorenson, Puppet
 
PuppetConf 2017: The Changing Role of Operations- Michael Stahnke, Puppet
PuppetConf 2017: The Changing Role of Operations- Michael Stahnke, PuppetPuppetConf 2017: The Changing Role of Operations- Michael Stahnke, Puppet
PuppetConf 2017: The Changing Role of Operations- Michael Stahnke, Puppet
 
PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...
PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...
PuppetConf 2017: The Five Dirty Words of CI- J. Paul Reed, Release Engineerin...
 
PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...
PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...
PuppetConf 2017: Reducing Environment Drift to 0 with Containers- Leigh Capil...
 
PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...
PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...
PuppetConf 2017: Deploying is Only Half the Battle! Operationalizing Applicat...
 
3 Steps to Expand DevOps and Automation Throughout the Enterprise
3 Steps to Expand DevOps and Automation Throughout the Enterprise3 Steps to Expand DevOps and Automation Throughout the Enterprise
3 Steps to Expand DevOps and Automation Throughout the Enterprise
 

Similar to PuppetConf 2017: Hiera 5: The Full Data Enchilada- Hendrik Lindberg, Puppet

Rpug - Puppet 4 Module Data
Rpug - Puppet 4 Module DataRpug - Puppet 4 Module Data
Rpug - Puppet 4 Module DataJere Julian
 
Puppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet Forge
Puppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet ForgePuppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet Forge
Puppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet ForgePuppet
 
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)Puppet
 
Introduction to Hiera
Introduction to HieraIntroduction to Hiera
Introduction to Hieranibalizer
 
Marc’s (bio)perl course
Marc’s (bio)perl courseMarc’s (bio)perl course
Marc’s (bio)perl courseMarc Logghe
 
php fundamental
php fundamentalphp fundamental
php fundamentalzalatarunk
 
Php introduction with history of php
Php introduction with history of phpPhp introduction with history of php
Php introduction with history of phppooja bhandari
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsLuís Carneiro
 
Bioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeBioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeProf. Wim Van Criekinge
 
CCF #1: Taking the reins of your data with Hiera 5
CCF #1: Taking the reins of your data with Hiera 5CCF #1: Taking the reins of your data with Hiera 5
CCF #1: Taking the reins of your data with Hiera 5davidmogar
 
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
 
MIND sweeping introduction to PHP
MIND sweeping introduction to PHPMIND sweeping introduction to PHP
MIND sweeping introduction to PHPBUDNET
 
Advanced symfony Techniques
Advanced symfony TechniquesAdvanced symfony Techniques
Advanced symfony TechniquesKris Wallsmith
 

Similar to PuppetConf 2017: Hiera 5: The Full Data Enchilada- Hendrik Lindberg, Puppet (20)

Rpug - Puppet 4 Module Data
Rpug - Puppet 4 Module DataRpug - Puppet 4 Module Data
Rpug - Puppet 4 Module Data
 
Puppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet Forge
Puppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet ForgePuppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet Forge
Puppet Camp Amsterdam 2015: How To Leverage The Power of the Puppet Forge
 
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
Puppet Camp Portland 2015: Introduction to Hiera (Beginner)
 
Introduction to Hiera
Introduction to HieraIntroduction to Hiera
Introduction to Hiera
 
Marc’s (bio)perl course
Marc’s (bio)perl courseMarc’s (bio)perl course
Marc’s (bio)perl course
 
php fundamental
php fundamentalphp fundamental
php fundamental
 
Php introduction with history of php
Php introduction with history of phpPhp introduction with history of php
Php introduction with history of php
 
php
phpphp
php
 
Drupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First StepsDrupal Camp Porto - Developing with Drupal: First Steps
Drupal Camp Porto - Developing with Drupal: First Steps
 
Php Intermediate
Php IntermediatePhp Intermediate
Php Intermediate
 
Bioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekingeBioinformatics p5-bioperl v2013-wim_vancriekinge
Bioinformatics p5-bioperl v2013-wim_vancriekinge
 
Bioinformatica p6-bioperl
Bioinformatica p6-bioperlBioinformatica p6-bioperl
Bioinformatica p6-bioperl
 
CCF #1: Taking the reins of your data with Hiera 5
CCF #1: Taking the reins of your data with Hiera 5CCF #1: Taking the reins of your data with Hiera 5
CCF #1: Taking the reins of your data with Hiera 5
 
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
 
MIND sweeping introduction to PHP
MIND sweeping introduction to PHPMIND sweeping introduction to PHP
MIND sweeping introduction to PHP
 
Advanced symfony Techniques
Advanced symfony TechniquesAdvanced symfony Techniques
Advanced symfony Techniques
 
Php classes in mumbai
Php classes in mumbaiPhp classes in mumbai
Php classes in mumbai
 
Hiera in-motion
Hiera in-motionHiera in-motion
Hiera in-motion
 
Groovy unleashed
Groovy unleashed Groovy unleashed
Groovy unleashed
 
Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014Bioinformatics p5-bioperlv2014
Bioinformatics p5-bioperlv2014
 

More from 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
 

More from 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
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 

PuppetConf 2017: Hiera 5: The Full Data Enchilada- Hendrik Lindberg, Puppet

  • 1.
  • 2. Finding Waldo… (“the full data enchilada“ - sorry for the original title, I must have been hungry)
  • 3. About Me • Swedish • Live on the
 island
 of Gozo,
 Malta • Father of 3 • Author of the Puppet 4 Language, Hiera 5, and Puppet Type system, Task Plans. • On the Puppet Core team helindbe @hel
  • 4. Agenda • What is Hiera? • What does Hiera do? • Authoring Data • Differences hiera 3, (4), and 5 • Writing backends
  • 5. What is Hiera? [haɪrɑ] or [haɪərɑ]
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. “hiera" - the gem“hiera" - the command line tool “hiera" - the function
  • 13.
  • 14. What Hiera is • A key-value store abstraction with multiple and extensible set of backends (backend API). • A key lookup resolution mechanism searching multiple key-value stores (~ query) • A hierarchical data organization • A data composition mechanism (defaults, override, merge, unique - etc.)
  • 15. What do we use Hiera for? • Explicit lookup • Automatic Parameter Lookup (APL)
  • 16. Why a new Hiera?
  • 17. hiera 3 does this thing… • Similar code in every backend - COPY PASTA - very hard to fix general things when the logic is in each and every backend. • Easy to make mistakes and leak memory in a backend • Global & static architecture - must restart after changes • Global config pointing into environments - all environments must change at the same time - yeah right, when you have 1000nds forever changing environments… • Search uses a cartesian product of levels and backends based on file suffix - lots of trickery and lots of file stats • Different backend versions not supported in different environments. • No explanation support - need to trace/debug - must restart server • Use of dynamic variables (because of lack of suitable features) makes it impossible to have efficient cashing to speed up performance. • Has its own backed loading system • Circular dependency on puppet - made it very hard to fix certain types of issues
  • 19. where a gem in puppet CLI hiera puppet lookup hiera.yaml version 3 5 ( supports 3 and 4) explicit lookup hiera() hiera_array() hiera_hash() lookup() backend API complicated simple using function API APL options no lookup_options in data, explicit and APL the same! explain support no --explain advanced paths no globs, mapped paths deprecated
  • 20. Explicit lookup # get value, and… # …fail if not present $x = lookup(‘key’) # …verify data type $x = lookup(‘key’, Array) # …return default if not present $x = lookup(‘key’, Array, first,[blue]) # …options hash $x = lookup('key', { <options> })
  • 21. Many Lookup Options name the key to lookup value_type the return type to assert merge merge options defalt_value if not found use this default_values_hash if not found pick lookup here override look here first
  • 22. default via code block $x = lookup(‘mykey’) |$x| { # calculate the value compute_it($x) }
  • 23. Merge Behaviour first the first found (default) unique for Array ( v3 = “array merge”) hash merge hash, highest prio key wins (no recursion) deep merge hash, recursive, higher prio wins on conflict, arrays made unique
  • 24. Deep Options knockout_prefix string to match for removal (undef = no knockout) sort_merged_arrays sorts arrays (false) merge_hash_arrays if hashes in arrays should be merged (false)
  • 25. APL class mymodule::myclass($myparam) { #... } include 'mymodule::myclass' # Automatically looks up: # 'mymodule::myclass::myparam' # when value is not given.
  • 26. explicit lookup vs. APL • APL = “Inversion of control” - “Push don’t Pull” • Much easier to test • Can be overridden! • Parameterized classes are documented - your arbitrary keys are not… • Use APL in your APIs
  • 27. APL and options • All lookup options can be set in the data! • Control “deep merge” etc per key! • Any backend can return a Hash for the key “lookup_options” with a map of “key” => <options- hash> • All “lookup_options” are merged • You can supply defaults in a module for example
  • 29. Authoring Data where to stick (possibly pieces of) Waldo…
  • 31. Global Layer • For operational use • Across all environments • Overrides environment and modules • Ok to use a deprecated version 3 hiera.yaml • In Hiera 3, the only layer
 (with nasty tricks of referencing into each environment).
  • 32. Environment Layer • The typical place to store data • Across all modules in the env • Overrides modules • Use a hiera version 5 hiera.yaml
  • 33. Module Layer • Regular hierarchy for overridable and merge-able values • a default_hierarchy only consulted when not found in regular hierarchy • Only keys for the module’s namespace • Must use a hiera 5 version hiera.yaml themodule’sdefault_hierarchy
  • 35. Strategy ‘first’ Global Environment Module lookup(‘waldo’) a:: b::
  • 36. Strategy ‘first’ - not found Global Environment Module lookup(‘waldo’) a:: b:: not found error
  • 37. Strategy ‘first’ - not found Global Environment Module lookup(‘b::waldo’) a:: b:: not found error
  • 38. Strategy ‘first’ - simple find Global Environment Module lookup(‘b::waldo’) a:: b:: returned
  • 39. Strategy ‘first’ - simple find Global Environment Module lookup(‘b::waldo’) a:: b::
  • 40. Strategy ‘first’ - find in module Global Environment Module lookup(‘b::waldo’) a:: b::
  • 41. Strategy ‘first’ - find in defaults Global Environment Module lookup(‘b::key’) a:: b:: not found returned
  • 42. A merging strategy Global Environment Module lookup(‘b::key’) a:: b::
  • 43. Inside a layer Highest prio Lowest prio levels with named entries
  • 44. Search order Highest prio Lowest prio each level in turn
  • 45. --- version: 5 defaults: # Used for any hierarchy level that omits these keys. datadir: data # This path is relative to hiera.yaml's directory. data_hash: yaml_data # Use the built-in YAML backend. hierarchy: - name: "Per-node data" # Human-readable name. path: "nodes/%{trusted.certname}.yaml" # File path, relative to datadir. # ^^^ IMPORTANT: include the file extension! - name: "Per-datacenter business group data" # Uses custom facts. path: "location/%{facts.whereami}/%{facts.group}.yaml" - name: "Global business group data" path: "groups/%{facts.group}.yaml" - name: "Per-datacenter secret data (encrypted)" lookup_key: eyaml_lookup_key # Uses non-default backend. path: "secrets/%{facts.whereami}.eyaml" options: pkcs7_private_key: "/etc/puppetlabs/puppet/eyaml/private_key.pkcs7.pem" pkcs7_public_key: "/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem" - name: "Per-OS defaults" path: "os/%{facts.os.family}.yaml" - name: "Common data" path: "common.yaml" a level
  • 46. Inside a layer Highest prio Lowest prio multiple paths/globs etc. per level (backend only called if file exists)
  • 47. --- version: 5 defaults: # Used for any hierarchy level that omits these keys. datadir: data # This path is relative to hiera.yaml's directory. data_hash: yaml_data # Use the built-in YAML backend. hierarchy: - name: "Per-node, datacenter, and business group data" paths: - "nodes/%{trusted.certname}.yaml" - "location/%{facts.whereami}/%{facts.group}.yaml" - "groups/%{facts.group}.yaml" - name: "Per-datacenter secret data (encrypted)" lookup_key: eyaml_lookup_key # Uses non-default backend. path: "secrets/%{facts.whereami}.eyaml" options: pkcs7_private_key: "/etc/puppetlabs/puppet/eyaml/private_key.pkcs7.pem" pkcs7_public_key: "/etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem" - name: "Defaults per os and common" paths: - "os/%{facts.os.family}.yaml" - "common.yaml" multiple
  • 48. Different ways to reference data files / sources Key Data type Expected value path paths String Array One file path. Any number of file paths. This acts like a sub-hierarchy: if multiple files exist, Hiera searches all of them, in the order in which they’re written. glob globs String Array One (or several) shell-like glob patterns, which might match any number of files. If multiple files are found, Hiera searches all of them in alphanumerical order (ignoring the order in which multiple globs were given). uri uris String Array One, (or several) URIs that are not checked for existence. One call to the backend is performed for every given URI. mapped_paths Array or Hash A fact that is a collection (array or hash) of values. Hiera expands these values to produce an array of paths. mapped_paths: [services, tmp, "service/%{tmp}/common.yaml"]
  • 49. Tips and Tricks • Have keys with ‘.’ in them?
 Quote the key when looking up to prevents the built in “dig” behaviour:
 
 lookup("'my.dotted.key'")
  • 51. Three kinds of backends
  • 52. data_hash Produces all of the
 key => value
 pairs at once as a Hash Good for small to moderate data volume and where most of the data is always used. Limit; static in nature.
  • 53. Reading a json file function mymodule::myjson(Hash $options, Puppet::LookupContext $ctx) { $options[‘path’].file.parsejson() }
  • 54. lookup_key Produces values per key - called multiple times. Slightly more complex because of the added flexibility/power, but still not complicated to implement.
  • 55. A “prefixer” added to our hiera.yaml - name: "Using example with prefix" path: “examples/%{trusted.certname}.yaml" lookup_key: mymodule::json_with_prefix # the example function options: prefix: “Yo, Waldo! The value is: "
  • 56. transforming values by key… function mymodule::myjson_with_prefix( Variant[String, Numeric] $key, # the key being looked up Hash $options, # the options from hiera.yaml Puppet::LookupContext $ctx # the context/helper ){ $hash = $ctx.cache_file($options[‘path’]) |$content| { $content.parsejson() } case $val = $hash[$key] { String : { "${options[‘prefix']}${val}" } NotUndef: { $val } default : { $ctx.not_found() } } }
  • 57. data_dig Like lookup_key but is responsible for any digging into the key. because lookup(“users.jane_doe.pager_nbr”) would be terrible if there are thousands of users…
  • 58. Puppet::LookupContext object Key Expected value not_found() Immediately returns from the function and tells hiera there is no value for the key interpolate(value) Perform hiera style interpolation on the given string value environment_name() module_name() Produces information about the container where this function is part of a hiera.yaml cache(key, value) cache_all(hash) Adds values to a cache. cached_value(key) cache_has_value(key) cached_entries() Retrieves value(s) from the cache cached_file_data(path) |$content| {...} Reads and caches the contents of a file, or the transformed content of a file explain() || { 'message' } Emits an “explain” message if —explain mode is on
  • 59. Ideas for backends • DRY up data - use lookup inside backend to compose values from lookups - earlier not possible for arrays and hashes. • Computed values - given input from hiera.yaml (maybe even a key), other values can be derived • Provide different data sets (in a module; for example “standalone” vs. a “client server” configuration) that can be integrated. While a module cannot directly supply global keys, it can provide the data/backend that does so if added to the env’s hiera.yaml!
  • 61. • Faster • Cleaner • More powerful, yet Simpler • Explain Support
  • 62. 3 vs 5 - deprecated bad magic • Nothing good came from using these hiera 3 magic variables: $calling_module $calling_class $calling_class_path • Hiera 3 could use these as a hacky predecessor of module data, but anything you were doing with them is better accomplished with the module layer. You can continue using these in a version 3 hiera.yaml file, but you’ll need to remove them once you update your global config to version 5. • If used to split up data in multiple files (per module etc). Use the ‘glob’ pattern.
  • 63. 3 vs 5 • Use lookup() instead of hiera_xxx() • Use lookup() + include() instead of hiera_include() • Use lookup CLI instead of hiera CLI • No global merge/deep-merge setting (was: horrible!) - use lookup options. • Move to using hiera 5 backends! • The ‘data binding terminus’ (advanced hackery) is no longer used - write a backend instead • Hiera 5 is faster (much thanks to caching) and with greatly reduced risk of memory leaks due to mistakes in backends • You can call lookup() from within backend functions! Can do what hiera 3 alias never could (hiera 3 - limited to strings). • The lookup_key function opens up for advanced data composition - merge multiple (different) keys into one etc.
  • 64. And the winner is…