Workflow
Preparation
Before deploying a KWDB cluster, verify that the hardware and software environment of the nodes meets the requirements:
Cluster Deployment
Choose from the following deployment methods:
| Method | Description | Best For | Requirements |
|---|---|---|---|
| Deploy Using Scripts (Recommended) | Automated deployment with a few commands. Includes built-in fault detection and node recovery. | Quick setup of test or production environments | - |
| Deploy Using kwbase CLI | Manual deployment using kwbase CLI commands with full customization control. | Advanced users needing fine-grained configuration | - |
| Deploy Using Docker Run Command | Container-based deployment. | Lightweight containerized development and testing | Docker installed |
Cluster Configuration
After the cluster is deployed and started, complete the following operations:
1. Create Database Users (Optional): Create database users using the add_user.sh script in the installation package directory or using kwbase CLI, then use the credentials to connect and operate the database. For details, see Create Users.
2. Configure Cluster Parameters (Optional): Configuration methods vary depending on your deployment type:
Script Deployment: using the following files to set startup flags and CPU resource usage:
- Bare Metal:
kaiwudb_envandkaiwudb.service. For details, see Configure Bare-Metal Deployments. - Container:
docker-compose.yml. For details, see Configure Container Deployments.
- Bare Metal:
kwbase CLI and Docker Run Deployment: set cluster startup flags through the following commands:
kwbase startfor multi-replica clusterskwbase start-single-replicafor for single-replica clusters
3. Connect to Cluster: Connect to the cluster for data operations using any of the following methods:
kwbaseCLI tool- KaiwuDB Developer Center
- Connectors supported by KWDB
Cluster Management
- To stop or restart a single node in the cluster, see Start and Stop KWDB Services.
- To uninstall the cluster, see Uninstall Cluster.