Using the Create-Cluster Tool
#
Using create-cluster toolOnce you clone the github folder you can navigate to utils/create-cluster. This expects you have compiled the program already and binaries have been built in the src folder.
You can see the readme file for this script, however we will go over a quick setup using this utility
You can create a config.sh script in this folder if you do not want to edit create-cluster.sh. If present it will use this rather than the defaults.
Whether you create you own config file or edit top of create-cluster.sh, the values you will update are:
if we specify 6 nodes, with one replica per master, we will end up with 3 masters and 3 replicas/slaves for this cluster setup.
to run simply start (launch cluster instances... runs instances of keydb-server with auto-appended config files instead of creating spearate)
and create the cluster (keydb-cli --cluster create 127.0.0.1:30000 127.0.0.1:30001 127.0.0.1:30002 127.0.0.1:30003 127.0.0.1:30004 127.0.0.1:30005 --cluster-replicas 1
) :
you will see there a bunch of cluster nodes and files creted now in this folder.
in order to stop the cluster:
to clean up files in this folder:
#
Testing the cluster setupconnect with keydb-cli to port 30000 in cluster mode (-c) and try the following: