repositorypackage
0.1.6-snapshot
Repository: https://github.com/exoscale/zlocker.git
Documentation: pkg.go.dev
# README
zlocker: zookeeper based isolated command execution
zlocker is a small tool meant to ease sequential execution of a command across a large number of hosts.
Configuration
zlocker is configured through command line arguments:
-z
Comma-separated list of zookeeper servers to contact
-l
Name of lock node in zookeeper
-w
Optional sleep period, defaults to none
-t
Zookeeper session timeout
The rest of the command line will be fed to the shell if a lock is successfully acquired.
Building
If you wish to inspect zlocker and build it by yourself, you may do so by cloning this repository and peforming the following steps :
mkdir -p $(GOPATH)/src
cd $(GOPATH)/src && git clone https://github.com/pyr/zlocker
make
Updating
It uses godep, so it should be easy.
dep status
dep ensure -update
Example usage
zlocker -z zk01,zk02,zk03 -l /zlock-service-restart service my-daemon restart