Cluster Topology Profile Description #
When deploying a cluster through SphereEx-Boot, you need to provide a cluster topology configuration file in yaml format. The configuration data is as follows:
- cluster_name: the name of the cluster
- install_user: the user name when logging into the worker node
- install_password: the user password when logging into the worker node
- proxy: ShardingSphere-Proxy configuration
- version: ShardingSphere-Proxy’s version identification
- file: installation package file path of ShardingSphere-Proxy’s manager node
- conf_dir: service profile directory of ShardingSphere-Proxy’s manager node
- depend_files: driver jar package file path of ShardingSphere-Proxy’s manager node
- install_dir: deployment directory of ShardingSphere-Proxy’s worker node
- port: startup port ShardingSphere-Proxy’s worker node
- overwrite: If the worker node installation directory already exists, it will reinstall it.
- servers: the information list of worker node
- host: the IP address of worker node
- port: the startup port of ShardingSphere-Proxy’s worker node (not necessary, if not configured, the configuration in proxy shall prevail).
- install_dir: installation directory of ShardingSphere-Proxy’s worker node (not necessary, if not configured, the configuration in proxy shall prevail).
- agent_conf_file:agent configuration file path of ShardingSphere-Proxy’s manager node. (not necessary, if not configured, the configuration in proxy shall prevail)
- overwrite: If the worker node installation directory already exists, it will reinstall it. (The parameter overwrite is not necessary, if not configured, the configuration in proxy shall prevail).
- zookeeper: ZooKeeper’s configuration (if ZooKeeper is not required, it can not be configured)
- version:ZooKeeper’s version identification
- file: the installation file path of ZooKeeper’s manager node
- conf_file: the configuration file path of manager node ZooKeeper zoo.cfg
- install_dir:the installation directory of Zookeeper’s worker node
- data_dir: dataDir configuration value in configuration file zoo.cfg of ZooKeeper’s worker node
- port: the startup port of ZooKeeper’s worker node
- overwrite: If the worker node installation directory already exists, it will reinstall it.
- servers: list of ZooKeeper
- host: IP address of worker node
- myid: myid value of ZooKeeper cluster
- port: the startup port ZooKeeper’s of worker node (not necessary, if not configured, the configuration in ZooKeeper shall prevail)
- install_dir: the installation directory of ZooKeeper’s worker node (not necessary, if not configured, the configuration in ZooKeeper shall prevail)
- conf_file: the zoo.cfg configuration file path Zookeeper’s manager node (not necessary, if not configured, the configuration in ZooKeeper shall prevail)
- data_dir: the configuration value of dataDir in configuration file zoo.cfg on ZooKeeper’s worker node ZooKeeper (not necessary, if not configured, the configuration in ZooKeeper shall prevail)
- overwrite: If the worker node installation directory already exists, it will reinstall it. (The parameter overwrite is not necessary, if not configured, the configuration in ZooKeeper shall prevail)
Cluster topology configuration example:
cluster_name: demo
install_user: root
install_password: 'root'
proxy:
version: '5.0.0'
install_dir: /opt/shardingsphere-proxy
conf_dir: /root/demo/conf
file: /root/demo/apache-shardingsphere-5.0.0-shardingsphere-proxy-bin.tar.gz
depend_files:
- /root/demo/mysql-connector-java-5.1.47.jar
port: 3307
overwrite: true
servers:
- host: 10.0.1.1
zookeeper:
version: '3.6.3'
install_dir: /opt/zookeeper
data_dir: /tmp/zookeeper
conf_file: /root/demo/zoo.cfg
file: /root/demo/apache-zookeeper-3.6.3-bin.tar.gz
port: 2181
overwrite: true
servers:
- host: 10.0.1.1
myid: 1