GithubHelp home page GithubHelp logo

scarby / garethr-key_value_config Goto Github PK

View Code? Open in Web Editor NEW

This project forked from garethr/garethr-key_value_config

0.0 2.0 1.0 19 KB

Puppet type and providers for managing configuration in key/value stores

License: Apache License 2.0

Ruby 94.12% Puppet 5.88%

garethr-key_value_config's Introduction

Maybe your configuration data isn't in files on disk, but in a new fancy distributed configuration store. But you still want to manage that configuration in code. Enter the key_value_config type for Puppet.

Puppet Forge Build Status

Usage

Currently this type has two providers for Etcd and Consul but writing other providers for Zookeeper or similar services should be trivial.

So setting a value for Etcd:

key_value_config { '/foo':
  ensure   => present,
  provider => etcd,
  value    => 'bar',
}

Or alternatvely for Consul:

key_value_config { '/foo':
  ensure   => present,
  provider => consul,
  value    => 'bar',
}

Configuration

By default the provider will try and talk with an Etcd node on localhost on port 4001. You can adjust this behaviour using environment variables, specifically: ETCD_HOST, ETCD_PORT, ETCD_USERNAME and ETCD_PASSWORD.

The Consul provider currently tries to access Consul on localhost:8500 and isn't configurable. This is because I couldn't find a configurable Consul client.

A note on error handling

There isn't any. If you don't pass workable keys and values then you'll likely get errors. I'll hopefully add sensible validation and remove this message in the future.

garethr-key_value_config's People

Contributors

garethr avatar scarby avatar

Watchers

 avatar  avatar

Forkers

cartest

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.