Install Cluster #
Requirements
The manager node and the worker node need to log in with SSH account and password through sshpass for mutual trust authorization.
Environment Preparation
Run the command spex cluster download
to download all installation packages, including:
- ZooKeeper
- ShardingSphere-Proxy
- MySQL Driver
Operation
- Cluster topology file initialization. Please refer to “Cluster Topology File Initialization” for details.
- Check the cluster topology file. Please refer to “Check the Cluster Topology File” for details.
- Add a cluster topology file. Please refer to “Add Cluster Topology Information” for details.
- Run the command
spex cluster install --name <cluster-name>
to install the cluster. Example: install the added cluster named demo.
[root@centos71 demo]# spex cluster install --name demo
Operation ShardingSphere-Proxy
check proxy install dir exist!
Completed......
Operation ShardingSphere-Proxy
create install directory
10.0.1.1 : 3307 => success
install proxy
10.0.1.1 : 3307 => success
copying shell file
10.0.1.1 : 3307 => success
copying config file
10.0.1.1 : 3307 => success
copying agent config file
skipped host : 10.0.1.1 item : None
copying depend file
10.0.1.1 : 3307 => success
Completed......
Operation ZooKeeper
check ZooKeeper install dir exist!
Completed......
Operation ZooKeeper
create ZooKeeper install directory
10.0.1.1 : 2181 => success
create ZooKeeper data directory
10.0.1.1 : 2181 => success
install ZooKeeper
10.0.1.1 : 2181 => success
copy ZooKeeper config file
10.0.1.1 : 2181 => success
create myid
10.0.1.1 : 2181 => success
Completed......
Note:
After updating the cluster configuration file, you must run the command spex config add
to update the new cluster topology configuration file information to SphereEx-Boot, and then continue the installation.