One-Click Online Deployment of Klustron Database Cluster
One-Click Online Deployment of Klustron Database Cluster
01 Preparation Before Installation:
To ensure a smooth deployment process, the following key points must be followed for installing the Klustron distributed database:
- Configuration Information: - Please refer to the official documentation:Typical configuration description of Klustron cluster 
- Administrator Permissions: Run the installation script using the root user (password should be consistent) or a user with sudo privileges to ensure the necessary configuration and installation of the system. 
- We provide the XPanel GUI tool, which allows DBAs to easily manage all database operations through a graphical interface. Docker must be installed on at least one server. 
02 Download and Run the Installation Program
git clone -b 1.3.1 https://gitee.com/zettadb/klustron_home.git    
cd klustron_home/install_online
bash install.sh  
Follow the prompts to input the required information:
Please enter server IP addresses separated by spaces (enter 'q' or 'Q' to exit):
Please enter the root user password:
Please enter the SSH port [default is 22, press Enter to accept the default]:
Please enter the installation directory, use an absolute path [default is /home/kunlun/klustron, press Enter to accept the default]:
Please select the installation version [default is 1.3.1, press Enter to accept the default]:
[1]. Latest stable version 1.3.1
[2]. Classic version 1.2.3
Please enter the installation version number:
03 Database Installation Process Illustration


04 Installation with Specified Configuration File
After the successful installation, the configuration file auto_install.json will be automatically updated in the current directory. You can also manually edit this configuration file for relevant settings.
bash install.sh  -f  auto_install.json
The configuration file format is as follows:
{
  "time": "2024-05-15 17:40:30",
  "version": "1.3.1",
  "password": "JyEiIyQlJlwnKCkqKywtLi86Ozw9Pj9AW1xcXV5fYHt8fX4gJwo=",
  "sshport": 22,
  "basedir": "/home/kunlun/klustron",
  "user": "kunlun",
  "machines": [
    {
      "ip": "172.16.125.15"
    },
    {
      "ip": "172.16.125.16"
    },
    {
      "ip": "172.16.125.17"
    }
  ],
  "xpanel": [
    {
      "ip": "172.16.125.17",
      "port": 18080
    }
  ]
}
Configuration File Explanation:
- version: The version to be installed
- password: The password for the user running the installation script, default is root, stored using OpenSSL base64 encryption
- sshport: The SSH server port
- user: The user running the Kunlun database
- basedir: The installation directory for the Kunlun database
- machines: Server-related information
- xpanel: XPanel GUI tool IP and port
