introduction to hiera
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
![Page 1: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/1.jpg)
![Page 2: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/2.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/3.jpg)
Introduction to HieraPuppetCamp Amsterdam
![Page 4: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/4.jpg)
whoami
![Page 5: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/5.jpg)
What is Hiera?
![Page 6: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/6.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/7.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Why Hiera?
![Page 8: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/8.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
● Smarthost setting
Use case
![Page 9: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/9.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/11.jpg)
Hiera fixes.... all the things!
![Page 12: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/12.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Start small.....
![Page 13: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/13.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Expand from there...
![Page 14: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/14.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
But first....
![Page 15: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/15.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/16.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/17.jpg)
create_resources()demo
![Page 18: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/18.jpg)
Hiera &Modules
![Page 19: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/19.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/20.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Modules & Data
● Putting data in the modules file
![Page 21: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/21.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Modules & Data
● Parameterized classes
![Page 22: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/22.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Modules & Data
● Getting the data from Hiera
![Page 23: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/23.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Modules & Data
● Using Data bindings from Puppet 3.x
![Page 24: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/24.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/25.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/26.jpg)
Any questions?
![Page 27: Introduction to Hiera](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/27.jpg)
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](https://reader033.vdocuments.us/reader033/viewer/2022060108/554f5c54b4c905c8088b470e/html5/thumbnails/28.jpg)
PuppetCamp Amsterdam Introduction to Hiera http://www.puppetspecialist.nl
Bye!