Create and administrate your Redis Cluster from the Command Line.
Inspired heavily by ruster and the original redis-trib.rb.
Dependencies are handled by gpm, simple install it and type gpm
to fetch them.
git clone https://github.com/badboy/redis-trib.go.git
cd redis-trib.go
make
# Execute a command on each cluster node
./redis-trib each 127.0.0.1:7001 info memory
# Check that the cluster is ok
./redis-trib check 127.0.0.1:7001
This project needs a lot of work. I listed some things in no particular order:
- Implement more subcommands
create
add-node
del-node
reshard
fix
- Find a nice and easy way to implement these subcommands
- Write tests
- Better logging functions
- Documentation about the code
- Documentation about how to use
- License, contributions guideline, ...
- Release a proper version
This is the first Go code I ever wrote. It is not really good, the program is not anywhere near to be a complete replacement for either ruster or redis-trib.rb and it lacks a few basic things (proper error checks, cleaned-up code, tests, comments, ...)
I will try to improve it and I welcome all ideas, bug reports or code improvements. Just open an issue, drop me a message on twitter or write an email.