Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/slurpy
Replicate local files matching a glob into etcd
https://github.com/binocarlos/slurpy
Last synced: 10 days ago
JSON representation
Replicate local files matching a glob into etcd
- Host: GitHub
- URL: https://github.com/binocarlos/slurpy
- Owner: binocarlos
- License: mit
- Created: 2014-07-28T21:26:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-28T21:31:43.000Z (over 10 years ago)
- Last Synced: 2024-09-18T09:36:12.758Z (2 months ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
slurpy
------Replicate local files matching a glob into etcd
## install
```bash
$ npm install slurpy -g
```or if you can [install docker](https://github.com/binocarlos/docker-install) to use the docker image
```bash
$ docker pull binocarlos/slurpy
```## usage
slurpy will copy matching files into etcd keys matching the filepath.
If we have a folder (/home/myconfigs) with the following files:
* /config/test.json
* /data/apples.txtBoth of these files contain text content - slurpy does not work with binary files (and so is ideal for config scenarios)
To commit these files to etcd:
```bash
$ slurpy push --folder /home/myconfigs --key /myconfigs --etcd 127.0.0.1:4001
```To pull those files from another etcd:
```bash
$ slurpy pull --key /myconfigs --folder /home/myconfigs --etcd 127.0.0.1:4001
```## docker
To run as a docker container - you must mount the folder as a volume.
You must pass a routable address for etcd from within the docker container.
To push:
```bash
$ docker run --rm -v /home/myconfigs:/myfiles binocarlos/slurpy push --folder /myfiles --key /myfiles --etcd 192.168.8.120:4001
```To pull:
```bash
$ docker run --rm -v /home/myconfigs:/myfiles binocarlos/slurpy pull --folder /myfiles --key /myfiles --etcd 192.168.8.120:4001
```## globs
when pushing - you can provide a `--glob` argument which will filter the local files:
```bash
$ slurpy push --folder /home/myconfigs --key /myconfigs --glob *.txt
```## api
```
usage: slurpy push [options]
usage: slurpy pull [options]options:
--folder - the local folder
--key - the etcd key
--glob - a file glob to match local files being pushed
--etcd - the address of an etcd cluster
```## license
MIT