Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Puppet 5

You're reading from   Mastering Puppet 5 Optimize enterprise-grade environment performance with Puppet

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781788831864
Length 292 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jason Southgate Jason Southgate
Author Profile Icon Jason Southgate
Jason Southgate
Ryan Russell-Yates Ryan Russell-Yates
Author Profile Icon Ryan Russell-Yates
Ryan Russell-Yates
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Authoring Modules FREE CHAPTER 2. Roles and Profiles 3. Extending Puppet 4. Hiera 5 5. Managing Code 6. Workflow 7. Continuous Integration 8. Extending Puppet with Tasks and Discovery 9. Exported Resources 10. Application Orchestration 11. Scaling Puppet 12. Troubleshooting and Profiling 13. Other Books You May Enjoy

Introducing a frame for the environment

Here's a typical scenario for Hiera: you find yourself having to override the DNS setting for your development environment because that environment can't connect to the production resolver on your network. You then deploy your production in a second data center, and you need that location to be different. Hiera allows us to model settings such as the production DNS resolver is 10.20.1.3, and the development DNS server is 10.199.30.2.

To accommodate this type of scenario, we can introduce what's best described as an environment frame within the Hiera hierarchy, as follows:

---
version: 5
hierarchy:
- name: "Per-node data"
path: "nodes/%{trusted.certname}.yaml"

- name: "Per-environment data"
path: "%{server_facts.environment}.yaml"

- name: Common
path: common.yaml...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image