Free open-source DB tool: access control, data masking, SQL audit, CI/CD, cross-region deployment.
1.6K
CloudDM Sidecar is the execution-node component in CloudDM cluster mode. It is responsible for remote database access and task execution, and is suitable for multi-network regions, cross-data-center deployments, and restricted network environments. Sidecar cannot be initialized and used independently. Before startup, you must already have a reachable Console, and the AK / SK / WSN for the current Sidecar must already have been generated.
[Website] [Documentation] [Blog] [Gitee] [GitHub]
CloudDM is a free and open-source database management platform for team collaboration scenarios. It provides access control, data masking, SQL auditing, CI/CD, and cross-region deployment capabilities.
It is not just a SQL query tool, and it is not just a database operations platform. It brings the following capabilities into one web product:
If you need a database platform that can be adopted directly rather than only a lightweight command-line client, CloudDM is a better fit.
CloudDM uses the business-friendly Apache 2.0 license.
The following examples assume:
cgdm-consolecgdm-console:8008cgdm-netComplete the following actions in Console:
AK, SK, and WSNAPP_SERVE_NAME:APP_SERVE_PORT for ConsoleAfter Console has been initialized and you have obtained AK / SK / WSN, you can first start Sidecar with the minimum required parameters:
docker run -d --name cgdm-sidecar -p 8080:8080 \
-e APP_WEB_PORT=8080 \
-e APP_SERVE_NAME=<your clouddm APP_SERVE_NAME> \
-e APP_SERVE_PORT=<your clouddm APP_SERVE_PORT default is 8008> \
-e DM_CLIENT_AK=<Worker AK> \
-e DM_CLIENT_SK=<Worker SK> \
-e DM_CLIENT_WSN=<Worker WSN> \
bladepipe/cgdm-sidecar:3.0.7
For mainland China network environments, you can change the image to the accelerated registry address:
image: cloudcanal-registry.cn-shanghai.cr.aliyuncs.com/clougence/cgdm-sidecar:3.0.7
The following methods can all be used to make Sidecar reach Console. You only need to choose the one that fits your deployment environment:
Same machine, same Docker network.
Run docker network create cgdm-net first, then start both Console and Sidecar with --network cgdm-net.
In this case, APP_SERVE_NAME can be set directly to the Console container name, for example cgdm-console.
Same machine, but Console runs on the host.
In this case, the Sidecar container must be able to access the host IP, and APP_SERVE_NAME should be the host address, for example 192.168.1.10.
Also make sure that port 8008 on the host is open to the container network.
Different machines connected through a LAN.
If Console is deployed on another server, APP_SERVE_NAME can be the internal IP or a reachable domain name of the machine where Console runs.
You also need to allow access between the two machines to APP_SERVE_PORT.
Access through reverse proxy, SLB, or load balancer.
If Console is already placed behind Nginx, a layer-4 load balancer, or a cloud load balancer, set APP_SERVE_NAME to the proxied domain name or address.
This is suitable when Sidecar and Console are not in the same network plane and need a unified exposed entry.
Deployment in Kubernetes or a cloud network environment.
If Console is exposed as a Kubernetes Service, Ingress, or a cloud private-service address, set APP_SERVE_NAME to the corresponding Service DNS, Ingress domain name, or private address.
The key point is not whether cgdm-net is used, but whether the environment where Sidecar runs can access APP_SERVE_NAME:APP_SERVE_PORT.
No matter which method you choose, the rule is the same: APP_SERVE_NAME:APP_SERVE_PORT must be reachable from the environment where Sidecar runs.
| Environment Variable | Default | Purpose |
|---|---|---|
APP_WEB_PORT | 8080 | Sidecar's own service port, mapped to server.port |
APP_SERVE_NAME | Placeholder value from image build | Console hostname, container name, or reachable address |
APP_SERVE_PORT | Placeholder value from image build | Console communication port, usually 8008 |
DM_CLIENT_AK | Placeholder value from image build | Access Key generated by Console |
DM_CLIENT_SK | Placeholder value from image build | Secret Key generated by Console |
DM_CLIENT_WSN | Placeholder value from image build | Worker Serial Number generated by Console |
Except for APP_WEB_PORT, the other values are recommended to be set explicitly in real deployments.
| Container Path | Suggested Host Path | Description |
|---|---|---|
/root/cgdm/sidecar/conf | /data/cgdm-sidecar/conf | Configuration directory containing sidecar.properties and global_conf.properties |
/root/cgdm/sidecar/logs | /data/cgdm-sidecar/logs | Log directory |
/root/cgdm/sidecar/data | /data/cgdm-sidecar/data | Runtime data directory |
Recommendations:
conflogsdata| Container Port | Purpose | Required Mapping |
|---|---|---|
8080 | Sidecar's own service port | Depends on deployment mode, but keeping it mapped is usually recommended for troubleshooting |
The core Sidecar-to-Console connection is an active outbound connection to APP_SERVE_NAME:APP_SERVE_PORT, not a connection initiated back by Console.
Sidecar generates configuration from environment variables only when the configuration files do not yet exist:
/root/cgdm/sidecar/conf/global_conf.properties/root/cgdm/sidecar/conf/sidecar.propertiesContent type
Image
Digest
sha256:3153c2108…
Size
428.2 MB
Last updated
about 17 hours ago
docker pull bladepipe/cgdm-sidecar:4.0.2-rc.1