https://github.com/kickstarter/cog-consul-oss
HashiCorp Consul KV read/write bundle for Cog.
https://github.com/kickstarter/cog-consul-oss
Last synced: about 1 year ago
JSON representation
HashiCorp Consul KV read/write bundle for Cog.
- Host: GitHub
- URL: https://github.com/kickstarter/cog-consul-oss
- Owner: kickstarter
- License: mit
- Created: 2016-12-15T16:40:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-19T21:02:11.000Z (over 9 years ago)
- Last Synced: 2025-04-30T04:48:52.774Z (about 1 year ago)
- Language: Ruby
- Homepage: https://bundles.operable.io/bundles/consul/latest
- Size: 20.5 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
`consul`: The Cog Consul Command Bundle
=========================================
`!consul:read`
`!consul:write`
`!consul:list`
## Overview
The `consul` bundle adds two new commands: read and write.
* `read` - Show values associated with a key.
`read `
`read` is a GET call to the Consul API. It will return the value stored.
* `write` - Write values associated with a key.
`write `
`write` is a PUT call to the Consul API. It won't return anything.
* `list` - List all keys associated with an endpoint.
`list `
`list` is a GET call to the Consul API. It will return an array of keys.
## Configuration
* The consul bundle uses the [v1 Consul API](https://www.consul.io/docs/agent/http/kv.html).
Consul uses env vars to configure it. Both commands require
`CONSUL_DOMAIN_NAME` and `CONSUL_MASTER_TOKEN` to be set. These are the
domain name for your consul account and the api token for write privledges respectively. You can find an example of how to set these configurations in the `base/example_dynamic_config.yaml`.
Optionally, you can set `CONSUL_CHANNELS` to restrict permisible channels for `write`.
## Install
git clone git@github.com:kickstarter/cog-consul-oss.git
cogctl bundle install config.yaml
## Build
To build the Docker image, simply run:
`$ docker build .`