Skip to content

Lance726/kvrocks_controller

 
 

Repository files navigation

Kvrocks Cluster Controller

Build Status Go Report Card codecov

Controller for the Kvrocks cluster has the following key features:

  • Failover - controller will failover or remove the master/slave node when probing failed
  • Scale out the cluster in one line command
  • Manage many clusters in one controller cluster
  • Support multi metadata storages like etcd and so on

Build and Running

Requirements

  • Go >= 1.16

Build binaries

$ git clone https://github.com/KvrocksLabs/kvrocks_controller
$ cd kvrocks_controller
$ make # You can find the binary file in the `_build` dir if all goes good

1. Run the controller server

# Use docker-compose to setup the etcd
$ make setup
# Run the controller server
$ ./_build/kvrocks-controller-server -c config/config.yaml

image

2. Use the controller client to interactive with the server

# Create the namespace `test-ns` 
$ create namespace --namespace test-ns
# Create the cluster `test-cluster` with nodes 127.0.0.1:6666 and 127.0.0.1:6667 
$ create cluster --namespace test-ns --cluster test-cluster --nodes 127.0.0.1:6666,127.0.0.1:6667
# List shard in cluster `test-cluster`
$ list shard --namespace test-ns --cluster test-cluster

image

About

Kvrocks cluster controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.2%
  • Shell 1.4%
  • Python 1.1%
  • Makefile 0.3%