Install
openclaw skills install kwdb-install-deployTriggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.
openclaw skills install kwdb-install-deployThis skill provides script-based deployment for KaiwuDB, suitable for bare-metal or container deployment in Linux environments. Supports single-replica and multi-replica cluster deployments with complete deployment workflow guidance.
The following three rules must be strictly followed:
Do not guess or assume any installation parameters and proceed with installation unless explicitly specified by the user.
When the installation command fails, you must read the log files in the log/ directory under the same path as the installation script to obtain detailed failure information.
Log file path: /opt/kaiwudb/<package-name>/log/ or kaiwudb_install/log/
# After installation failure, first read the logs
ls -la log/
cat log/install.log # or the latest generated log file
After installation failure, you must:
Exception: Only when the user explicitly requests "retry", you may execute the installation command again.
root or have sudo privilegesdocker groupFirst, I need to confirm the deployment mode you need:
Ask: "Please select the deployment mode: single-node deployment (single) or cluster deployment (cluster)?"
If cluster deployment is selected, I need to further confirm the number of replicas:
Ask: "Please select the cluster deployment type: single-replica cluster (single-replica) or multi-replica cluster (multi-replica)?"
Next, I need to confirm the location of the KaiwuDB installation package with you. The installation package should be a .tar.gz file with KaiwuDB as the prefix, for example: KaiwuDB-1.0.0.tar.gz.
Ask: "Please provide the full path (including filename) of the KaiwuDB installation package. The installation package should be a tar.gz file with KaiwuDB as the prefix, for example /path/to/KaiwuDB-1.0.0.tar.gz."
Note: You must wait for the user to provide the exact path and must not guess on your own.
After confirming the installation package location, verify that the file exists and has the correct format:
# Check if the installation package exists
if [ ! -f "$INSTALL_PACKAGE_PATH" ]; then
echo "Error: Installation package does not exist, please check if the path is correct"
exit 1
fi
# Check filename format
if [[ "$(basename $INSTALL_PACKAGE_PATH)" != KaiwuDB*.tar.gz ]]; then
echo "Error: Installation package filename is incorrect. It should be a tar.gz file with KaiwuDB as the prefix"
exit 1
fi
# Create installation directory
sudo mkdir -p /opt/kaiwudb
# Extract installation package
tar -xzf "$INSTALL_PACKAGE_PATH" -C /opt/kaiwudb
# Enter installation directory
cd /opt/kaiwudb/kaiwudb_install
I will ask you about each configuration item step by step according to the deployment mode you selected, and then modify the deploy.cfg configuration file based on your answers.
Mandatory: Unless the user voluntarily says "all defaults" or explicitly specifies parameter values, each item must be confirmed one by one. Even if the user selects default values, the defaults must be displayed and confirmed.
Security Mode (secure_mode):
Management User (management_user):
RESTful Port (rest_port):
KaiwuDB Service Port (kaiwudb_port):
BRPC Port (brpc_port):
Data Directory (data_root):
CPU Resource Usage (cpu):
Other Cluster Node IP Addresses (cluster_node_ips):
SSH Port (ssh_port):
SSH Username (ssh_user):
Based on your answers, I will automatically generate the corresponding deploy.cfg configuration file. The cluster configuration section will be automatically omitted for single-node deployment.
Execute the corresponding installation command based on your selection:
Single-node deployment:
./deploy.sh install --single
Single-replica cluster deployment:
./deploy.sh install --single-replica
Multi-replica cluster deployment:
./deploy.sh install --multi-replica
Important: Before execution, all configuration parameters must be displayed to the user and confirmed before proceeding.
After checking that the configuration is correct, enter Y or y. If you need to return to modify the configuration file, enter N or n.
================= KaiwuDB Basic Info =================
Deploy Mode: bare-metal
Management User: kaiwudb
Start Mode: single
RESTful Port: 8080
KaiwuDB Port: 26257
BRPC Port: 27257
Data Root: /var/lib/kaiwudb
Secure Mode: tls
CPU Usage Limit: 1
Local Node Address: 192.168.122.221
=========================================================
Please confirm the installation information above(Y/n):
If the installation command execution fails (returns a non-zero exit code), the following operations must be performed:
# 1. Enter the log directory
cd log/
# 2. List log files
ls -la
# 3. Read the latest log file (usually install.log or a file with a timestamp)
cat install.log
# or
tail -100 <latest log file>
Report failure information to the user:
Example report format:
Installation failed!
Error information (from logs):
[Specific error content extracted from log/install.log]
Possible causes:
- [Possible causes analyzed based on the error information]
Please check the above issues and let me know if you need to retry or have other instructions.
After successful installation, execute:
./deploy.sh cluster -i
# or
./deploy.sh cluster --init
Check service status:
systemctl status kaiwudb
Check cluster status (cluster mode only):
./deploy.sh cluster -s
# or
./deploy.sh cluster --status
# or use the convenience script
kw-status
systemctl enable kaiwudb
Contains KaiwuDB related documents:
installation_guide.md - Detailed installation guidetroubleshooting.md - Common issues and solutionsContains KaiwuDB configuration file templates and resources:
deploy.cfg - Deployment configuration file template