All Projects → lewispeckover → consulator

lewispeckover / consulator

Licence: MIT license
Import and synchronize your Consul KV data from JSON and YAML

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to consulator

Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (+511.11%)
Mutual labels:  yaml, consul
obp-apis
OpenBankingProject.ch Community APIs
Stars: ✭ 18 (-33.33%)
Mutual labels:  yaml
QArchive
Async C++ Cross-Platform library that modernizes libarchive using Qt5 🚀. Simply extracts 7z 🍔, Tarballs 🎱 and other supported formats by libarchive. ❤️
Stars: ✭ 66 (+144.44%)
Mutual labels:  tar
remark-frontmatter
remark plugin to support frontmatter (YAML, TOML, and more)
Stars: ✭ 167 (+518.52%)
Mutual labels:  yaml
skycloud-base
🔥springcloud脚手架,配置中心(apollo/nacos) 注册中心(consul/nacos) 分布式事物(seata) 调用链(skywalking) 日志(ELK)监控(prometheus与grafana) 等,适合学习与快速开发使用
Stars: ✭ 80 (+196.3%)
Mutual labels:  consul
coqpit
Simple but maybe too simple config management through python data classes. We use it for machine learning.
Stars: ✭ 67 (+148.15%)
Mutual labels:  yaml
sample-micronaut-microservices
sample micronaut application illustrates using basic microservices patterns like distributed configuration and service discovery with Consul, distributed tracing with Zipkin, inter-service communication with micronaut http client
Stars: ✭ 38 (+40.74%)
Mutual labels:  consul
meshery
Meshery, the cloud native manager
Stars: ✭ 1,587 (+5777.78%)
Mutual labels:  consul
paerser
No description or website provided.
Stars: ✭ 38 (+40.74%)
Mutual labels:  yaml
gen-cisco
🧨 Generates Cisco scripts based on YAML files
Stars: ✭ 29 (+7.41%)
Mutual labels:  yaml
import-command
Imports content from a given WXR file.
Stars: ✭ 19 (-29.63%)
Mutual labels:  import
RentHouseWeb
使用 go+docker+go-micro微服务框架开发的租房网系统,符合RESTful架构风格。
Stars: ✭ 28 (+3.7%)
Mutual labels:  consul
vscode-dart-import
A simple plugin for VSCode to change all Dart/Flutter imports to relative format.
Stars: ✭ 48 (+77.78%)
Mutual labels:  import
zf-dependency-injection
Advanced dependency injection for laminas framework
Stars: ✭ 17 (-37.04%)
Mutual labels:  yaml
kahoy
Simple Kubernetes raw manifests deployment tool
Stars: ✭ 33 (+22.22%)
Mutual labels:  yaml
k8s-deployer
Deploy Kubernetes service and store retrieved information in the Consul K/V store
Stars: ✭ 23 (-14.81%)
Mutual labels:  consul
eslint-plugin-yml
This ESLint plugin provides linting rules for YAML.
Stars: ✭ 40 (+48.15%)
Mutual labels:  yaml
Prinder
Free Pull Request reminder for Github. Has configurations to post reminders to Slack and email along with jinja templating
Stars: ✭ 21 (-22.22%)
Mutual labels:  yaml
go-config
Configuration file loader for Go
Stars: ✭ 27 (+0%)
Mutual labels:  yaml
icingaweb2-module-fileshipper
Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files
Stars: ✭ 25 (-7.41%)
Mutual labels:  yaml

Consulator

Consulator lets you import and synchronize your KV data from JSON or YAML sources directly to Consul. This allows you to easily version your configuration data, storing it in git or anywhere else you see fit.

CircleCI

Getting Consulator

Docker is the easiest way. You can find it on the Docker Hub.

docker run -it --rm lewispeckover/consulator -help

Alternatively, download a binary from the releases page, or clone the repo and build it yourself.

Running Consulator

Usage: consulator [--version] [--help] <command> [<options>] [<path> ...]

Available commands are:
    dump       Dumps parsed config as JSON suitable for use with consul kv import
    import     Imports data into consul
    sync       Syncs data into consul (like import, but with deletes)
    version    Prints the version

Options:
  -glue string
    	Glue to use for joining array values (default "\n")
  -json
    	Parse stdin as JSON
  -prefix string
    	Key prefix to use for output / Consul import destination
  -tar
    	Parse stdin as a tarball
  -yaml
    	Parse stdin as YAML

Multiple paths (files or directories) may be provided, they are parsed in order. 
This allows you to specify some default values in the first path.
If no paths are provided, stdin is used. In this case, -yaml or -json must be specified.

The usual Consul client environment variables can be used to configure the connection:

 - CONSUL_HTTP_ADDR
 - CONSUL_HTTP_TOKEN
 - CONSUL_HTTP_SSL

Etc. See https://www.consul.io/docs/commands/ for a complete list.

Source data

JSON, YAML, and plain text sources are supported. Data can be loaded from files, piped directly to standard input, or provided as a tarball. Note that Consul KV values are only allowed to be strings, so non-string values are converted where possible. Most significantly, array values are joined with a configurable glue string (default: "\n").

Given a myapp.yaml:

tags:
 - production
 - web

or equivalent myapp.json:

{ 
 "tags": ["production", "web"]
}

Running consulator import -glue=, myapp.yaml will result in a Consul key tags with the value production,web

When a directory is specified as the source, it is scanned for files with extensions .json, .yaml or .yml. Subdirectories and filenames are used to build key prefixes.

Suppose that the above file is located at /etc/consuldata/config/myapp.yaml. When consulator is executed as consulator import -glue=, /etc/consuldata, it will result in a Consul key config/myapp/tags with value production,web.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].