Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
What is hiera?
How is it different?
Extlookup stores data in CSV format
Why Hiera?
Its fast.
They're same!
Data sample
CSV:
extlookup('host/directi.com/address');
extlookup('host/directi.com/hostgroups')
host/directi.com/address/115.114.213.35
host/directi.com/hostgroups/common
YAML:
hiera('hosts') # => { 'directi.com' => { 'address' => '115.114.213.25',
'hostgroups' => 'common' } }
hosts:
directi.com:
address: 115.114.213.25
hostgroups: common
CSV does two calls to lookup for reading the two values, hence parses the
file twice.
Hiera reads the value in one call (and stores as ruby hash), hence parses
the file only once.
manifests/production/extdata and
manifests/production/sysad_servers/monitor
ing/extdata have been merged into
manifests/production/hieradata
YAML way:
hosts:
newhost.com:
param1: value1
param2: value2
newhost2.com:
param3: value3
param4: value4
| ntpserver: ntp1.dc1.example.com |
| ntpserver: ntp1.dc2.example.com |
| sysadmin: dc1noc@example.com
\-------------------------------/
\-------------------------------/
/
\
| sysadmin: sysadmin@%{domain}
|
\----------------------------------/
Lookup calls
Questions?