Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garethr/garethr-key_value_config
Puppet type and providers for managing configuration in key/value stores
https://github.com/garethr/garethr-key_value_config
Last synced: 2 months ago
JSON representation
Puppet type and providers for managing configuration in key/value stores
- Host: GitHub
- URL: https://github.com/garethr/garethr-key_value_config
- Owner: garethr
- License: apache-2.0
- Created: 2014-10-11T16:39:21.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-11T10:27:48.000Z (almost 9 years ago)
- Last Synced: 2024-10-15T13:14:07.635Z (2 months ago)
- Language: Ruby
- Size: 158 KB
- Stars: 30
- Watchers: 5
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
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](http://img.shields.io/puppetforge/v/garethr/key_value_config.svg)](https://forge.puppetlabs.com/garethr/key_value_config)
[![Build
Status](https://secure.travis-ci.org/garethr/garethr-key_value_config.png)](http://travis-ci.org/garethr/garethr-key_value_config)## Usage
Currently this type has two providers for
[Etcd](https://github.com/coreos/etcd) and [Consul](http://www.consul.io/) but
writing other providers for Zookeeper or similar services should be trivial.So setting a value for Etcd:
```puppet
key_value_config { '/foo':
ensure => present,
provider => etcd,
value => 'bar',
}
```Or alternatvely for Consul:
```puppet
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.