Skip to main content

Offline Deployment of Klustron Database Cluster

KlustronAbout 1 min

Offline 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:

  1. Configuration Information:

    Please refer to the official documentation: https://doc.kunlunbase.com/zh/Typical_configuration_description_of_Klustron_cluster.html

  2. 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.

  3. Ensure the host has the following commands installed: expect, dos2unix, jq, nc

  4. We provide the XPanel GUI tool software, allowing DBAs to easily complete all database operation and maintenance tasks with clicks. Docker must be installed on any of the servers.

02 Download the Klustron Database Program

On a server with internet access, perform the following operations:

git clone https://gitee.com/zettadb/klustron_home.git
cd klustron_home/install_offline
bash getprog.sh 

Once the program is downloaded, copy the entire klustron_home directory to the offline server.

03 Deploy the Klustron Database Cluster

cd klustron_home/install_offline
bash install.sh  

Follow the prompts to input the relevant 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:

04 Database Installation Process Illustration

05 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

END