Prepare for Container Deployment
Hardware
Note
KWDB uses cross-node replication to maintain data redundancy across multiple nodes. To maintain high availability and protect against data loss, deploy each KWDB node on a separate physical or virtual machine.
The following specifications are required for KWDB deployment:
| Item | Requirements |
|---|---|
| CPU and Memory | - Minimum: 4 CPU cores and 8 GB RAM per node - For high-volume data, complex workloads, high concurrency, or performance-critical applications, allocate additional resources accordingly |
| Disk | - Recommended: SSD or NVMe devices - Minimum performance: 500 IOPS and 30 MB/s throughput - Storage: <1 GB for KWDB system, with additional space needed based on data volume - Avoid shared storage (NFS, CIFS, CEPH) - HDDs not recommended for distributed cluster deployments |
| File System | ext4 recommended for optimal performance |
Operating Systems and CPU Architectures
KWDB can be deployed on the following operating systems with Docker installed:
| Operating System | Version | ARM_64 | x86_64 |
|---|---|---|---|
| Anolis | 7 | ✓ | ✓ |
| 8 | ✓ | ✓ | |
| CentOS | 7 | ✓ | |
| 8 | ✓ | ||
| Debian | V11 | ✓ | |
| KylinOS | V10 SP2 | ✓ | ✓ |
| V10 SP3 2403 | ✓ | ✓ | |
| openEuler | 24.03 | ✓ | |
| Ubuntu | V20.04 | ✓ | ✓ |
| V22.04 | ✓ | ✓ | |
| V24.04 | ✓ | ✓ | |
| UOS | 1050e | ✓ | ✓ |
| 1060e | ✓ | ✓ | |
| 1070e | ✓ | ✓ | |
| Windows Server | WSL2 | ✓ |
Note
- For new Docker installations, follow Install Docker Engine.
- For offline Docker installations, see Install Docker Engine from Binaries and Linux Post-Installation Steps for Docker Engine.
- Operating systems or versions not listed below may work with KWDB but are not officially supported.
Software Dependencies (Optional)
For deployment using scripts, Docker Compose (version 1.20.0 or higher) is required.
- For online installation instructions, see Install Docker Compose.
- For offline installation instructions, see Install Docker Compose Standalone.
To install Docker Compose via the command line:
sudo apt-get install docker-compose
Ports
Ensure these default ports are available and not blocked by firewalls. Port settings can be modified during installation.
| Port | Description |
|---|---|
8080 | Port for HTTP requests and web services |
26257 | Port for connections of clients, applications, and other nodes |
27257 | Port for inter-node brpc communication between KWDB time-series engines |
Installation Packages and Images
Use pre-compiled installation packages or container images as needed.
Installation Package
Obtain the installation package for your system environment, copy the package to the target machine, and then decompress it.
Note
The KWDB repository currently provides installation packages for Ubuntu V22.04 ARM_64 and x86_64 architectures. For installation packages for other system and architectures, please contact KWDB Technical Support.
tar -zxvf <install_package_name>
The extracted kwdb_install directory contains the following files and folders:
| File/Folder | Description |
|---|---|
add_user.sh | Script for creating KWDB users after installation and startup. |
deploy.cfg | Configuration file for node IP addresses, ports, and other options. |
deploy.sh | Script for KWDB installation, uninstallation, start, status check, stop, start, and restart. |
packages | Stores image packages. |
utils | Stores utility scripts. |
Obtaining Container Images
KWDB supports obtaining container images through the following methods:
Installation package: Download the installation package corresponding to your system environment, then import the
KaiwuDB.tarfile from thekwdb_install/packagesdirectory after extraction.docker load < KaiwuDB.tar Loaded image: "image-name"Docker command: Execute
docker pull kwdb/kwdb:<version>to obtain the image.
Node Configuration
SSH Passwordless Login
To enable secure communication between cluster nodes, configure passwordless SSH authentication:
Log into a node and generate a public/private key pair.
ssh-keygen -f ~/.ssh/id_rsa -N ""Parameters:
-f ~/.ssh/id_rsa: Sets the output path for the key files.-N: Creates the key without a passphrase, necessary for automated authentication.
Copy the public key to each cluster node.
ssh-copy-id -f -i ~/.ssh/id_rsa.pub -o StrictHostKeyChecking=no <target_node>Verify SSH connectivity with each node.
ssh <target_node>
Time Synchronization
KWDB requires synchronized time across all nodes to maintain data consistency. If a node's system time differs by more than 80% of the allowed error (default 500 ms) from at least half of the other nodes, it will stop automatically to avoid data inconsistencies. Ensure every node runs NTP or another time synchronization service.
The following example demonstrates how to configure time synchronization on CentOS 7.
SSH into the target node.
Disable the
timesyncdservice.timedatectl set-ntp noInstall the NTP package.
sudo apt install ntpStop any running NTP processes.
service ntp stopSynchronize time with a public NTP server.
ntpdate -u 0.cn.pool.ntp.orgConfigure NTP servers by editing
/etc/ntp.conf.server 0.cn.pool.ntp.org iburst server 1.cn.pool.ntp.org iburst server 2.cn.pool.ntp.org iburst server 3.cn.pool.ntp.org iburstStart and enable the NTP service.
service ntp startRepeat these steps on every node in the cluster.