Deploying High Availability NineData Service
This document introduces how to deploy the high availability version of NineData service.
Step One: Install the Master Node
Download and decompress the installation package on the master node machine:
tar -zxvf ninedata_x.x.x.tar.gzExecute the installation script:
./install.sh --data-dir=/data/ninedata_install/data \
--etcd-data-dir=/root/ninedata_install/data \
--params="-e CLUSTER_MODE=cluster"Parameter DescriptionParameter Description:
--data-dir: NineData data path.--etcd-data-dir: Cluster ETCD data path.--params="-e CLUSTER_MODE=cluster": Indicates installation in cluster mode.
Step Two: Expand Master Nodes
Enter the NineData container's command line on the master node server through the
docker exec -it ninedata niupcommand.Execute the
cluster server_cmdcommand to obtain the installation command for the new node.The command result is as follows:
# ====================== Instructions ======================
# Replace LOCAL_NODE_IP with the local machine IP, which can be obtained through the following command:
# hostname -I | awk '{print \$1}'
# Replace DATA_DIR with the actual data path
# Replace ETCD_DATA_DIR with the actual ETCD data path
# ======================================================
sh install.sh --data-dir=<DATA_DIR> --etcd-data-dir=<ETCD_DATA_DIR> --params="-e SERVER_HOST=https://<LOCAL_NODE_IP>:6443 -e TOKEN=xxxxxxx"Copy the installation package to the new node server.
scp ninedata_x.x.x.tar.gz <SSH_USERNAME>@<NEW_NODE_IP_ADDRESS>:<NEW_NODE_DIRECTORY_PATH>Connect to the new node server, decompress the installation package, and go to the installation package directory to run the installation command for the new node (refer to Step 2 of [Expand Master Nodes]).
NoteAt least 3 hosts are required for high availability mode. Please perform the installation on 2 or more slave node servers through this operation.
Connect to the master node server and run the
docker exec -it ninedata kubectl get nodescommand to confirm the result.NAME STATUS ROLES AGE VERSION
server-73kf8 Ready control-plane,master 1m v1.32.4+k3s1
server-pb4uc Ready control-plane,master 5m v1.32.4+k3s1
server-n99iw Ready control-plane,master 13m v1.32.4+k3s1The above result indicates that NineData service has been successfully deployed on 3 servers.
Step Three: Initialize NineData Cluster
Connect to the master node server and enter the NineData container command line by running docker exec -it ninedata niup, then run the following command.
cluster deploy
The initialization process takes about 5-10 minutes, and the following log indicates success:
Service [jzcloud-console] is started.
Cluster deployment is success.
Step Four: Verify NineData Service Status
- Connect to the master node server and run the
docker exec -it ninedata kubectl get pocommand. - Check the service list to ensure all services are displayed as Running, indicating a successful high availability installation.
- Access
http://<host_ip>:9999, where host_ip can be any host that has deployed the NineData service.
To further inspect real-time Pod and node resource usage in the cluster, see Cluster Operations Dashboard Scripts.