lewispeckover / consulator Goto Github PK
View Code? Open in Web Editor NEWImport and synchronize your Consul KV data from JSON and YAML
License: MIT License
Import and synchronize your Consul KV data from JSON and YAML
License: MIT License
Walking the tree is only required for sync
.
Add examples for consulator dump please
Would you consider the addition of an "export" feature and associated command? The idea basically to mirror the import
facility. Take the contents of Consul and export it as either JSON or YAML.
I'm hesitant to make sync
a 3-way sync; but if you are open to the above we can explore that layer or just make this a "user problem" to deal with.
I'm a little confused of the option path
that can be supplied to consulator import ...
as well as (by the looks) just consulator
too (_judging from the --help
).
Can you explain how path
is used when many of the -yaml
, -json
, etc options of consulator import
clearly state they read the data from STDIN.
I look at the code a bit but didn't understand what was happening with c.flags.Args()
.
Hi, we're using consulator to populate KV store via YAML files and it works perfectly.
The other part of our deployment tooling is consul-template
We're listening for KV updates and doing some actions on update event.
What is happening is that if we want to change multiple values in KV using consulator we are noticing "double" actions by consul-template since the values and keys are updated one at a time multiple events are received.
Luckily Consul supports transactions which I beleive should address our "issue".
Unfortunately I do not have Golang experience at all so I cannot try to write and extend consulator features.
Do you think this would be interesting for you to think about adding as another cli flag maybe?
Best,
Marko
my yaml file:
docker:
- image: ubuntu:14.04
- image: mongo:2.6.8
command: [mongod, --smallfiles]
- image: postgres:9.4.1
i run this command:
consulator import -glue=, /usr/local/ns-configs/dev/
but the result is Error: Invalid type map[string]interface {} in array. Only strings, numbers and boolean values are supported. did it support this format?
That would allow us to pipe directly from a git archive
, and other fun things.
I've just started playing with the tool and noticed that all the previously existing keys got purged from Consul prior to importing. I found out that if I specify -prefix then it will delete only inside that path which helps, but I can still imagine scenario when I have >1 source of data writing to the same path and I would prefer the keys to not to be purged.
Would you consider making delete (purge) optional, so that one would have to add, say -delete option?
It looks like consulator doesn't understand hot to import the following:
config:
foo:
rules:
- foo: bar
exp:
type: A
You end up with an err rlike:
Error: Invalid type map[string]interface {} in array. Only strings, numbers and boolean values are supported.
Is this a KP or intentional?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.