rcm
rcm.cr 
Redis Cluster Manager in Crystal
- in beta stage (crystal-0.18.2)
Usage (information features)
nodes
- provides human-friendly output rather than
redis-cli
% rcm -p 7001 nodes
184f03 [127.0.0.1:7001]( 0) master(*) 0-5460
0da314 [127.0.0.1:7004](-1) +slave(!) (slave of 127.0.0.1:7001)
dc512f [127.0.0.1:7007]( 0) +slave(*) (slave of 127.0.0.1:7001)
e3423c [127.0.0.1:7002]( 0) master(*) 5461-10922
177f87 [127.0.0.1:7005]( 0) +slave(*) (slave of 127.0.0.1:7002)
cfd12f [127.0.0.1:7003]( 0) master(*) 10923-16383
b22cef [127.0.0.1:7006]( 0) +slave(*) (slave of 127.0.0.1:7003)
79689c [127.0.0.1:7008]( 0) master(*)
0e78c4 [127.0.0.1:7009]( 0) master(*)
info
- summarize INFO for each nodes
% rcm -p 7001 info
edb22e [127.0.0.1:7001] ver(3.2.0), cnt(7633), mem(2.27M;noev;0%), days(0)
f0da61 [127.0.0.1:7002] ver(3.2.0), cnt(8751), mem(2.61M;noev;0%), days(0)
- arg can be used to select a specific line like
grep
arg INFO
% rcm -p 7001 info role,cnt,day
edb22e [127.0.0.1:7001] role(master), cnt(7633), days(0)
f0da61 [127.0.0.1:7002] role(master), cnt(8751), days(0)
- reserved field names for easy access
v
,ver
,version
: delegate toredis_version
m
,mem
,memory
: summarizeused_memory_human
,maxmemory_policy
andmaxmemory_human
cnt
,count
: extractdb0:keys=(\d+)
d
,day
: delegate touptime_in_days
Usage (replication features)
become slave
meet
andreplicate
(ex. make :7004 slaveof :7001)
% rcm -p 7004 meet 127.0.0.1:7001 # same as "meet :7001" for localhost
% rcm -p 7004 replicate 127.0.0.1:7001 # same as "replicate :7001" for localhost
Usage (utility features)
import
- (experimental) This is too slow deu to step import by one by
% rcm -p 7001 import foo.tsv
Installation
% make
% cp bin/rcm ~/bin/
TODO
- [ ] Dryrun
- [ ] Check
- [ ] Nodes health check
- [ ] Slots coverage check
- [ ] Utils
- [ ] Bulkinsert on import
- [ ] Debug
- [ ] Slots filler
Contributing
- Fork it ( https://github.com/maiha/rcm.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- maiha maiha - creator, maintainer