ake-persson / pepa

Configuration templating for SaltStack using Hierarchical substitution and Jinja.
Other
14 stars 3 forks source link

[Doc Request] A simple walkthrough/tutorial to show how pepa works #7

Closed number5 closed 5 years ago

number5 commented 9 years ago

Pepa looks like the right tool I need to manage my salt pillar, but I have a hard time to fully understand how it work. So a walkthrough/tutorial similar to http://docs.saltstack.com/en/latest/topics/tutorials/pillar.html will be really helpful.

The questions I have:

  1. How do pepa "target" minions? based on minion_id? is it possible to use other criteria?
  2. What does a typical pepa pillar files layout looks like?
  3. How does override works?

Thanks!

ake-persson commented 9 years ago

Targets are always minion_id since that is how SaltStack works it's host centric. However you can base the substitution chain on any information available as Grains or Pillars. You can also chain ext. pillars for ex. first fetch information from a database and then use Pepa with this information after it.

As for layout look in the Examples directory and look at the instructions for testing them out.

Overrides is every step in the Substitution unless you refer to the directory overide in examples which just works as every other step in the Substitution. In most cases I set this to not being staged since you most likely want host input/overide to be applied immediately rather then going through staging dev->qa->prod...

I'll see if I can add some more comprehensive tutorial, since there are Pepa is very flexible and can be daunting to learn and know how best to utilize it.