Deploying and Accessing NineData Cluster
This document describes how to deploy the NineData cluster using the NiUP command-line tool, and how to access the NineData Cluster after deployment.
Installation Contents Description
NiUP will automatically install the following components: Container Service (Docker), Kubernetes (K3S), Image Repository, Metadata Database (MySQL), NineData Service.
Minimum Hardware Requirements
- CPU: X86 architecture with 4 cores
- Memory: 8 GB
- Storage Space: 40 GB
It is recommended to deploy on two or more servers.
Operating System Requirements
Linux kernel version 3.10 or above, CentOS 7 is recommended.
Prerequisites
- Contact support personnel to obtain the installation package and copy it to the server where NineData needs to be deployed.
- If deploying on two or more hosts simultaneously, ensure that there is internal network connectivity between the hosts.
Step One: Generate Configuration File
Log in to the host where NineData will be deployed. If deploying on a remote machine, remotely log in to the target host.
ssh -p<remote_host_port> <remote_host_username>@<remote_host_name/IP>
// Example: ssh -p22 root@192.168.1.100Navigate to the installation directory of NineData and unzip the
niup.tar.gz
installation package. In this example, it's in the "private_install" directory under the current user's home directory.cd ~/private_install
tar -zxvf niup.tar.gzEnter the installation package directory
cd niup
, and execute the following command to generate the installation configuration file../niup config cluster ninedata
tipIn this command,
niup config cluster
is a fixed command, andninedata
is the cluster name. You can specify a different name.Follow the prompts to complete the configuration. See the table below for details:
Steps Prompt Text Description Example 1 Enter the data disk directory. Default is the root directory:
Specify the directory for storing NineData system files. Press Enter to default to the root directory /
.~/ninedata
2 Enter the console access address (can be left empty):
Specify the IP address for accessing the NineData cluster. Press Enter to default to the local machine IP address. 192.168.2.100
2-1 Enter the console access port:
After entering the IP address in 2, you need to customize the port for accessing the NineData service. 80
3 Enter machine information. Leave IP empty to finish input:
Provide host information. None 3-1 Enter IP:
Enter the intranet address of the first host to deploy the NineData cluster and press Enter. 192.168.2.100
3-2 Enter Port:
Enter the SSH login port of the first host to deploy the NineData cluster, default is 22
, then press Enter.22
3-3 Continue adding machines? (y/N):
Would you like to continue adding hosts? Since we are deploying a dual-node setup, input y
and press Enter, then repeat 3-1 and 3-2. If you no longer need to add hosts, inputN
and press Enter.y
3-4 Enter the SSH connection username:
Enter the SSH login username of the host, then press Enter. root
3-5 Enter the SSH connection method, 'pwd' for password-based, 'pem' for key-based:
Enter the SSH login method, supporting password ( pwd
) and key (pem
). Press Enter after input.pwd
3-6 Enter the SSH login password:
After inputting pwd
in 3-5, enter the SSH login password here and press Enter.123456
3-7 Enter the absolute file path of the PEM file
After inputting pem
in 3-5, enter the absolute path where the SSH key is located here./home/ninedata/.ssh/id_rsa
4 Enter database connection URL:
Enter the address of the MySQL database used to store NineData metadata. To ensure database availability, please input your own MySQL access address during actual configuration. Press Enter to automatically deploy a single-node MySQL container for testing on the host. rm-**eo.rds.aliyuncs.com
4-1 Enter connection port:
Enter the access port of the MySQL database, then press Enter. 3306
4-2 Enter connection username:
Enter the username of the MySQL database, then press Enter. root
4-3 Enter connection password:
Enter the access password of the MySQL database, then press Enter. Test123456
5 Starting to input object storage information, Leave it blank to skip:
Configure information for the storage repository component (MinIO). None 5-1 Enter the storage deployment machine (default is the current machine):
Configure the installation location of the MinIO component. You can enter the intranet IP address of either of the two hosts. Press Enter to default to the current host. 192.168.2.100
5-2 Enter the username, Leave it blank to skip:
Configure the username of the MinIO component. Press Enter to skip the configuration. minio_user
5-3 Enter the password, Leave it blank to skip:
Configure the password of the MinIO component. Press Enter to skip the configuration. Test123456
5-4 Enter the storage access domain, Leave it blank to skip:
Configure the domain for accessing MinIO. Press Enter to skip the configuration. example.com
Once the configuration file is generated, you can view and modify it in the
<installation_directory>/niup/config/<cluster_name>-config.yaml
configuration file. See the example below:
Step Two: One-click Deployment
Execute the following command in the command line to start one-click deployment.
./niup install cluster ninedata
After execution, wait for the command line to display the following prompt indicating successful deployment.
Cluster [ninedata] was installed successfully
At this point, the components will start automatically in the background. You can check the startup status of each component by executing
kubectl get pod -ALL
command on both host's command lines. Once all components are started, you can start using the NineData service by entering its access address in the browser.
Step Three: Accessing NineData cluster
Open the NiUP configuration file. For the path to find this configuration file, Please refer to the Fifth step of Step One.
In the configuration file, find the
domain
anddomain_port
parameters, as shown in the image below.The format of the access address for the NineData cluster console is
<host_IP_address>:<port_number>
. <host_IP_address> corresponds to thedomain
parameter in the installation package configuration file, and <port_number> corresponds to thedomain_port
parameter. So, in this example, the access address for the NineData cluster console is:http://172.21.192.41:30081
.On the login page, enter the administrator account and password for the NineData cluster. The initial administrator account and password are as follows:
- Administrator Account: admin
- Administrator Password: admin