CloudDM 4.8.0 adds GreptimeDB as a DataSource
Skip to main content

Upgrade with Docker

Upgrading a single-node CloudDM deployment pulls the latest image and recreates the cgdm-alone container. The new container uses the existing volumes for configuration, logs, application data, and embedded MySQL data.

Prerequisites​

  • Back up the cgdm_alone_conf, cgdm_alone_data, and cgdm_mysql_data volumes.
  • Verify that your container uses the volume names and mount paths in the Docker installation guide.
  • Read the release notes for the new version and schedule a maintenance window.
  • Use the same image registry as your current deployment.

Upgrade with Docker Run​

Docker Hub image​

docker pull bladepipe/cgdm-alone:latest
docker rm -f cgdm-alone

docker run -d --name cgdm-alone \
--restart always \
-p 8222:8222 \
-v cgdm_alone_conf:/root/cgdm/alone/conf \
-v cgdm_alone_logs:/root/cgdm/alone/logs \
-v cgdm_alone_data:/root/cgdm/alone/data \
-v cgdm_mysql_data:/var/lib/mysql \
bladepipe/cgdm-alone:latest

China registry image​

docker pull cloudcanal-registry.cn-shanghai.cr.aliyuncs.com/clougence/cgdm-alone:latest
docker rm -f cgdm-alone

docker run -d --name cgdm-alone \
--restart always \
-p 8222:8222 \
-v cgdm_alone_conf:/root/cgdm/alone/conf \
-v cgdm_alone_logs:/root/cgdm/alone/logs \
-v cgdm_alone_data:/root/cgdm/alone/data \
-v cgdm_mysql_data:/var/lib/mysql \
cloudcanal-registry.cn-shanghai.cr.aliyuncs.com/clougence/cgdm-alone:latest

Upgrade with Docker Compose​

Docker Hub image​

services:
dm_alone:
image: bladepipe/cgdm-alone:latest
container_name: cgdm-alone
restart: always
ports:
- "8222:8222"
volumes:
- cgdm_alone_conf:/root/cgdm/alone/conf
- cgdm_alone_logs:/root/cgdm/alone/logs
- cgdm_alone_data:/root/cgdm/alone/data
- cgdm_mysql_data:/var/lib/mysql

volumes:
cgdm_alone_conf:
cgdm_alone_logs:
cgdm_alone_data:
cgdm_mysql_data:

China registry image​

services:
dm_alone:
image: cloudcanal-registry.cn-shanghai.cr.aliyuncs.com/clougence/cgdm-alone:latest
container_name: cgdm-alone
restart: always
ports:
- "8222:8222"
volumes:
- cgdm_alone_conf:/root/cgdm/alone/conf
- cgdm_alone_logs:/root/cgdm/alone/logs
- cgdm_alone_data:/root/cgdm/alone/data
- cgdm_mysql_data:/var/lib/mysql

volumes:
cgdm_alone_conf:
cgdm_alone_logs:
cgdm_alone_data:
cgdm_mysql_data:

Apply the upgrade​

Run the following commands from your Compose project directory.

docker compose pull
docker compose up -d

Environment variables​

Environment variableDefaultDescription
APP_WEB_PORT8222Web service port. If you change it, update the container port mapping to match.
APP_WEB_JWTValue built into the imageJWT signing key for web sign-in.
APP_SERVE_NAME127.0.0.1Address of the internal CloudDM service.
APP_SERVE_PORT8008Port of the internal CloudDM service.
MYSQL_EMBEDDEDtrueEnables embedded MySQL. Set to false when using an external MySQL database.
MYSQL_ROOT_PASSWORD123456Root password for embedded MySQL.
MYSQL_DATADIR/var/lib/mysqlData directory for embedded MySQL.
MYSQL_SOCKET/run/mysqld/mysqld.sockSocket file path for embedded MySQL.
MYSQL_PID_FILE/run/mysqld/mysqld.pidPID file path for embedded MySQL.
MYSQL_INIT_MARKER$MYSQL_DATADIR/.clouddm_mysql_initializedInitialization marker file path for embedded MySQL.
DB_HOST127.0.0.1Metadata database host.
DB_PORT3306Metadata database port.
DB_DATABASEcdmgrMetadata database name.
DB_USERNAMErootMetadata database username.
DB_PASSWORDSame as MYSQL_ROOT_PASSWORDMetadata database password.
WAIT_DB_TIMEOUT_SECONDS120Seconds to wait for the metadata database to become ready.
WAIT_MYSQL_STOP_SECONDS30Seconds to wait for embedded MySQL to stop.
info

All environment variables are optional. With Docker Run, set a variable at startup with -e NAME=value. With Docker Compose, set variables under environment.