Skip to content

Conversation

@cprice404
Copy link
Contributor

This PR adds:

  • A sample hiera.yaml file with a hierarchy that mirrors our ops team
  • A bunch of hiera data that approximates the same number / size / organization of files that we have in ops
  • A hiera_check puppet class that validates that hiera is working properly
  • Some ruby scripts for generating bunk yaml data that is similar to the ops yaml data.

@cprice404
Copy link
Contributor Author

This file:

https://github.com/cprice404/puppetlabs-puppetserver_perf_control/blob/SERVER_1448_add_hiera/root_files/hiera.yaml

and this file:

https://github.com/cprice404/puppetlabs-puppetserver_perf_control/blob/SERVER_1448_add_hiera/site/profile/manifests/hiera_check.pp

are moderately interesting. The rest of this PR is almost entirely just yaml data whose structure isn't actually important.

@rlinehan
Copy link
Contributor

rlinehan commented Aug 5, 2016

I think my only comments are hat I'm confused by this comment:

# datadir is empty here, so hiera uses its defaults:
# - /etc/puppetlabs/code/environments/%{environment}/hieradata on *nix
# - %CommonAppData%\PuppetLabs\code\environments\%{environment}\hieradata on Windows
# When specifying a datadir, make sure the directory exists.
:datadir:

in the hiera.yaml. Does that mean you should specify a default, or that you should use the defaults? (it seems like maybe some of that is just from the default hiera.yaml).

Also, if the directions in the README.md in How to use this repo during development underneath the example r10k.yaml could be wrapped that would be awesome, cuz I had to scroll way over to read them.

@rlinehan
Copy link
Contributor

rlinehan commented Aug 5, 2016

It might also be useful somewhere to have a description of what the hierarchy looks like - it's in the hiera.yaml, but that has all the placeholders - it might be helpful to have something written somewhere about what actually is in the hierarchy as far as fake_domain, group, etc. go? Although maybe it's enough that you can get that by doing tree hieradata....

@cprice404
Copy link
Contributor Author

it seems like maybe some of that is just from the default hiera.yaml

Yep, literally copy/pasted from a PE install, so I think if we don't like the wording we should probably target a change at puppet-agent? But the comment is just saying "here's what the defaults will be if you don't specify a value for datadir, and we have not specified one in this config file. If you do specify one make sure it's a valid path."

Also, if the directions in the README.md in How to use this repo during development underneath the example r10k.yaml could be wrapped that would be awesome, cuz I had to scroll way over to read them.

But that's just in the PR diff, right? They will show up w/line wraps if you are actually looking at the rendered markdown on github? I feel like docs people are always telling me not to put line wraps in those, but I don't necessarily have any other objection to adding them.

@cprice404
Copy link
Contributor Author

It might also be useful somewhere to have a description of what the hierarchy looks like

Any thoughts on where? I guess I had minor concerns about keeping notes/docs in sync with the actual hierarchy definition if anything changes, and felt like there is kind of a requirement to understand hiera a little if you even want to try to reason about the hierarchy... and if you you know enough about hiera to know that you want to understand the hierarchy, then you probably already know to go look at that file?

I'd be happy to add some more notes somewhere, just not entirely sure what to say or where to put them.

@rlinehan
Copy link
Contributor

rlinehan commented Aug 5, 2016

Yep, literally copy/pasted from a PE install, so I think if we don't like the wording we should probably target a change at puppet-agent? But the comment is just saying "here's what the defaults will be if you don't specify a value for datadir, and we have not specified one in this config file. If you do specify one make sure it's a valid path."

I guess I was more thinking in the context of this PR, the info in the README says to put a value for datadir, so I was confused to see that comment in the hiera.yaml that seemed to be saying to do something else.

But that's just in the PR diff, right? They will show up w/line wraps if you are actually looking at the rendered markdown on github? I feel like docs people are always telling me not to put line wraps in those, but I don't necessarily have any other objection to adding them.

I was just looking at in vim cuz I gave up on the PR diff/looking at this in Github. But I guess https://confluence.puppetlabs.com/display/DOCS/Markdown+Tips+for+Puppet+Labs+Stuff#MarkdownTipsforPuppetLabsStuff-ThingsThatAren%27tAllThey%27reCrackedUpToBe sort of advises against it, so (shrug) I don't care that much.

I'd be happy to add some more notes somewhere, just not entirely sure what to say or where to put them.

Hmm... maybe actually just in the commit message it would have been helpful to say like "this PR adds the following domains/groups/etc." but I don't think it's worthwhile enough to go back and do that and you're right that this requires some amount of understanding about hiera anyway, and at that point you ca just go and look.

@cprice404
Copy link
Contributor Author

I guess I was more thinking in the context of this PR, the info in the README says to put a value for datadir, so I was confused to see that comment in the hiera.yaml that seemed to be saying to do something else.

ah, gotcha. I can add a note in the README explaining that you can ignore that comment :)

@cprice404
Copy link
Contributor Author

Added a commit with a note about that misleading comment in hiera.yaml.

@rlinehan
Copy link
Contributor

rlinehan commented Aug 5, 2016

👍 haven't fully grokked all the hiera data, but also it probably would be a waste of time to actually understand 600 files of yaml, so 💥 .

@rlinehan rlinehan merged commit 8e4886d into puppetlabs:production Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants