Scale out Cluster
#
- Run the command
spex cluster scale --name <cluster-name> --host <host-ip>
to scale out a cluster.
Example: in demo cluster, scale out the ShardingSphere-Proxy whose IP address is 10.0.1.2.
$ spex cluster scale --name demo --host 10.0.1.2
- Run the command
spex cluster install -n demo --type proxy --host 10.0.1.2
to add a new node.
[root@community /]# spex cluster install -n demo --type proxy --host 10.0.1.2
ShardingSphere-Proxy
check proxy install dir exist!
Completed.......
ShardingSphere-Proxy
create install directory
10.0.1.2:3388 =>success
install proxy
10.0.1.2:3388 =>success
copying shell file
10.0.1.2:3388 =>success
copying config file
10.0.1.2:3388 =>success
copying agent config file
skipped host: 10.0.1.2 item:None
copying depend file
10.0.1.2:3388 =>success
Completed.......
- Run the command
spex cluster start --name demo --type proxy --host 10.0.1.2
to start a new node.
[root@community /]# spex cluster start --name demo --type proxy --host 10.0.1.2
ShardingSphere-Proxy
start proxy
10.0.1.2:3388 =>success
Starting the ShardingSphere-Proxy ...
The port is 3388
The classpath is /root/demo/apache-shardingsphere-5.0.0-shardingsphere-proxy-bin/conf:.:/root/demo/apache-shardingsphere-5.0.0-shardingsphere-proxy-bin/lib/*:/root/demo/apache-shardingsphere-5.0.0-shardingsphere-proxy-bin/ext-lib/*
Please check the STDOUT file: /root/demo/apache-shardingsphere-5.0.0-shardingsphere-proxy-bin/logs/stdout.log
Completed.......