28

Introduction to Hiera

Embed Size (px)

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/

Citation preview

Page 1: Introduction to Hiera
Page 2: 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

Page 3: Introduction to Hiera

Introduction to HieraPuppetCamp Amsterdam

Page 4: Introduction to Hiera

whoami

Page 5: Introduction to Hiera

What is Hiera?

Page 6: Introduction to 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

Page 7: Introduction to Hiera

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

Why Hiera?

Page 8: Introduction to Hiera

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

● Smarthost setting

Use case

Page 9: Introduction to Hiera

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

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

Use case

Page 10: Introduction to Hiera

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

Page 11: Introduction to Hiera

Hiera fixes.... all the things!

Page 12: Introduction to Hiera

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

Start small.....

Page 13: Introduction to Hiera

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

Expand from there...

Page 14: Introduction to Hiera

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

But first....

Page 15: Introduction to Hiera

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

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

Determine your Hierarchy

Page 16: Introduction to Hiera

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

Page 17: Introduction to Hiera

create_resources()demo

Page 18: Introduction to Hiera

Hiera &Modules

Page 19: Introduction to Hiera

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

Page 20: Introduction to Hiera

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

Modules & Data

● Putting data in the modules file

Page 21: Introduction to Hiera

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

Modules & Data

● Parameterized classes

Page 22: Introduction to Hiera

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

Modules & Data

● Getting the data from Hiera

Page 23: Introduction to Hiera

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

Modules & Data

● Using Data bindings from Puppet 3.x

Page 24: Introduction to Hiera

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

Page 25: Introduction to Hiera

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

Page 26: Introduction to Hiera

Any questions?

Page 27: Introduction to Hiera

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

WWW: http://www.puppetspecialist.nl

Mail: [email protected]

Twitter: @gerapeldoorn

Thanks!

Page 28: Introduction to Hiera

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

Bye!