Giter Site home page Giter Site logo

pepa's People

Contributors

westurner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pepa's Issues

Add Etcd support

Add support for getting Keys out of Etcd. This could be done by the Etcd ext. pillar but would be more limited since it can't be templated.

Can this be combined with other pillars

This looks like a very interesting approach to solving the hierarchical override problem. Can it be combined with pillar data that is stored in a VCS repo and mounted via gitfs or hgfs? For example, is it possible to store all of the pepa templates in git and then apply the overrides on the master using the pepa ext pillar?

Add support for Merge and Immutable

Add support for Merge and Immutable as in Distill. Useful to merge key/value across templates and immutable can be used to make sure a key/value pair won't be overwritten.

Repeated nested keynames raise Exceptions

If the string for a key is repeated, key_value_to_tree() produces strange results, up to and including exceptions:

In [1]: import collections

In [2]: import pepa

In [3]: data = collections.OrderedDict([('foo..bar..foo', True), ('foo..bar..baz', True)])

In [4]: pepa.key_value_to_tree(data, '..')
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-f64c7011dc9a> in <module>()
----> 1 pepa.key_value_to_tree(data, '..')

/mnt/c/Users/bewing/PycharmProjects/pepa/pepa/__init__.pyc in key_value_to_tree(data, delimiter)
     28                 t[key] = value
     29             else:
---> 30                 t = t.setdefault(key, {})
     31     return tree
     32

AttributeError: 'bool' object has no attribute 'setdefault'

In order to avoid this, we will probably have to track the number of times a key appears in the hierarchy, and only set once we really are on the last key.

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

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!

Hierarchy on the file system.

In Hiera it's possible to specify the configuration in a hierarchy of directories on the file system, like so:

common.yaml
locations/dc1/common.yaml
locations/dc1/hosts/hosta.yaml
locations/dc1/hosts/hostb.yaml
locations/dc2/common.yaml
locations/dc2/hosts/hostc.yaml
locations/dc2/hosts/hostd.yaml

So far in pepa the closest I can arrive at is:

default/default.yaml
locations/dc1.yaml
locations/dc2.yaml
hosts/hosta.yaml
hosts/hostb.yaml
hosts/hostc.yaml
hosts/hostd.yaml

However, it's not immediately obvious from the layout what location a given host belongs to. This gets more complex when you have a lot of hosts and more steps in the sequence (environments etc.)

Is a similar approach to the first example possible with pepa or is there another, pepa specific, way to handle this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.