0.0.3 • Published 6 years ago

@zhike/zk_ops v0.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

zk_ops

This is an ops tool to manipulate our ops infras.

install

$ npm install git+http://code.smartstudy.com/zhangxudong/zk_ops.git --save

quickstart

. zk_ops -h to get help . shared argument --env {dev, prod, test} to specific environment -c, --config: path of project config, ./zk_project.js is default

zk_ops consul

Setup a zk_project.js file like following

[consul]
dest_dir = config
keys = ["imService", "oss", "db.crm2"]
filename = config.json
cache = 10s

then run zk_ops consul it will fetch keys from consul and write to config/config.js. Both config and config.json are configurable.

zk_ops consul -p will fetch keys and only print to std but not write to file.