Introduction to Hiera

Post on 10-May-2015

3.743 views 0 download

Tags:

description

An Introduction to Hiera, by Ger Apeldoorn, at Puppet Camp Amsterdam 2013. Find a Puppet Camp near you: http://puppetlabs.com/community/puppet-camp/

Transcript of Introduction to Hiera

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

whoami

● Ger Apeldoorn– Freelancer

● Puppet Consultancy● Puppet trainer for NL via AmazicSoft

– AutiPlan VOF

Introduction to HieraPuppetCamp Amsterdam

whoami

What is Hiera?

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

What is Hiera?

Hierarchical Data store

an organizational structure

in which items are ranked

according to levels of

importance

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Why Hiera?

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

● Smarthost setting

Use case

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

● Smarthost setting– Identical for all your hosts, except one.

Use case

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

● Smarthost setting– Identical for all your hosts, except one.– Oh... and a seperate smarthost for the DMZ

Use case

Hiera fixes.... all the things!

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Start small.....

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Expand from there...

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

But first....

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

● Use any fact– fqdn– domain– environment– operatingsystem– uptime_seconds

Determine your Hierarchy

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

● Smarthost setting– Identical for all your hosts, except one.– Oh... and a seperate smarthost for the DMZ

Use case

create_resources()demo

Hiera &Modules

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Modules without data

● Easy to share● Easier to maintain● Enhanced flexibility● Puppet 3.x → Data bindings

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Modules & Data

● Putting data in the modules file

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Modules & Data

● Parameterized classes

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Modules & Data

● Getting the data from Hiera

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Modules & Data

● Using Data bindings from Puppet 3.x

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Benefits of Hiera

● Dealing with exceptions● Easily share your modules● No more massive testing for minor

changes in data

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

How to start?

● Create hiera.yaml● Restart Puppet master● Start improving

Some dutch tutorials are available on http://puppetspecialist.nl

Any questions?

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

WWW: http://www.puppetspecialist.nl

Mail: info@gerapeldoorn.nl

Twitter: @gerapeldoorn

Thanks!

PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl

Bye!