# tencentblueking/blueking-dbm architecture

> Architecture diagram of the GitHub repository tencentblueking/blueking-dbm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tencentblueking/blueking-dbm
- Repository: https://github.com/tencentblueking/blueking-dbm

## Overview

DBM is a database-management platform for operating multiple database technologies, with batch lifecycle management, cluster toolboxes, shared services, monitoring, and approval-driven execution. The main workflow is a user-submitted service request, approval through a task flow, and operational execution. The tree and excerpts substantiate the task engine and actuator capabilities, but do not show their integration wiring or the implementation paths for several README-level platform services; those relationships are therefore kept conservative.

Main entry points: [`dbm-services/bigdata/db-tools/dbactuator/internal/subcmd/subcmd.go`](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/internal/subcmd/subcmd.go) (DB actuator), [`dbm-ui/backend/ticket/todos/pipeline_todo.py`](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/ticket/todos/pipeline_todo.py) (Service tickets), [`dbm-ui/backend/db_meta/flatten/storage_instance.py`](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_meta/flatten/storage_instance.py) (Instance metadata), [`dbm-ui/backend/flow/engine/bamboo/engine.py`](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/flow/engine/bamboo/engine.py) (Flow engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Service workflow"]
  node_tickets["Service tickets<br/>[pipeline_todo.py]"]
  node_flowengine["Flow engine<br/>[engine.py]"]
  node_todoapproval["Approval todos<br/>[pipeline_todo.py]"]
end

subgraph group_metadata["Metadata and access"]
  node_storageinstances["Instance metadata"]
  node_storagevalidation["Instance validation"]
  node_storagegroups["Cluster storage sets<br/>[storage_set_dtl.py]"]
  node_permissions["File permissions<br/>[storage.py]"]
end

subgraph group_actuator["Database operations"]
  node_actuator["DB actuator<br/>[subcmd.go]"]
  node_doris["Doris operations"]
  node_elasticsearch["Elasticsearch operations"]
  node_hdfs["HDFS operations"]
  node_kafka["Kafka operations"]
  node_pulsar["Pulsar operations"]
  node_influxdb["InfluxDB operations"]
  node_metrics["VictoriaMetrics operations"]
end

subgraph group_shared["Shared operations"]
  node_artifactstorage["Artifact storage<br/>[storage.py]"]
  node_machineinventory["Machine inventory<br/>[machine_storage.py]"]
  node_featureflags["Feature flags"]
  node_mysqlfailover["MySQL failover"]
end

node_operator(("DBM user"))

node_operator -->|"submits request"| node_tickets
node_tickets -->|"runs pipeline"| node_flowengine
node_tickets -->|"creates approval"| node_todoapproval
node_todoapproval -->|"callbacks or fails"| node_flowengine
node_storagevalidation -->|"checks membership"| node_storageinstances
node_storageinstances -->|"associates clusters"| node_storagegroups
node_permissions -->|"guards file access"| node_artifactstorage
node_actuator -->|"dispatches operations"| node_doris
node_actuator -->|"dispatches operations"| node_elasticsearch
node_actuator -->|"dispatches operations"| node_hdfs
node_actuator -->|"dispatches operations"| node_kafka
node_actuator -->|"dispatches operations"| node_pulsar
node_actuator -->|"dispatches operations"| node_influxdb
node_actuator -->|"dispatches operations"| node_metrics
node_machineinventory -->|"updates inventory"| node_operator
node_featureflags -->|"provides UI flags"| node_operator
node_mysqlfailover -->|"updates instance roles"| node_storageinstances

click node_tickets "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/ticket/todos/pipeline_todo.py"
click node_flowengine "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/flow/engine/bamboo/engine.py"
click node_todoapproval "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/ticket/todos/pipeline_todo.py"
click node_storageinstances "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_meta/flatten/storage_instance.py"
click node_storagevalidation "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_meta/request_validator/storage_instance.py"
click node_storagegroups "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_meta/models/storage_set_dtl.py"
click node_permissions "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/iam_app/handlers/drf_perm/storage.py"
click node_actuator "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/internal/subcmd/subcmd.go"
click node_doris "https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/doris"
click node_elasticsearch "https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/elasticsearch"
click node_hdfs "https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/hdfs"
click node_kafka "https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/kafka"
click node_pulsar "https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/pulsar"
click node_influxdb "https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/influxdb"
click node_metrics "https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/victoriametrics"
click node_artifactstorage "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/core/storages/storage.py"
click node_machineinventory "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_services/dbresource/machine_storage.py"
click node_featureflags "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/frontend/src/stores/useFunController.ts"
click node_mysqlfailover "https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-services/common/dbha/ha-module/dbmodule/dbmysql/SpiderStorageLayer_switch.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tickets,node_flowengine,node_todoapproval,node_operator toneBlue
class node_storageinstances,node_storagevalidation,node_storagegroups,node_permissions toneAmber
class node_actuator,node_doris,node_elasticsearch,node_hdfs,node_kafka,node_pulsar,node_influxdb,node_metrics toneMint
class node_artifactstorage,node_machineinventory,node_featureflags,node_mysqlfailover toneRose
```

## Components

### Service workflow

- [Service tickets](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/ticket/todos/pipeline_todo.py): `dbm-ui/backend/ticket/todos/pipeline_todo.py`
- [Flow engine](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/flow/engine/bamboo/engine.py): `dbm-ui/backend/flow/engine/bamboo/engine.py`
- [Approval todos](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/ticket/todos/pipeline_todo.py): `dbm-ui/backend/ticket/todos/pipeline_todo.py`

### Metadata and access

- [Instance metadata](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_meta/flatten/storage_instance.py): `dbm-ui/backend/db_meta/flatten/storage_instance.py`
- [Instance validation](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_meta/request_validator/storage_instance.py): `dbm-ui/backend/db_meta/request_validator/storage_instance.py`
- [Cluster storage sets](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_meta/models/storage_set_dtl.py): `dbm-ui/backend/db_meta/models/storage_set_dtl.py`
- [File permissions](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/iam_app/handlers/drf_perm/storage.py): `dbm-ui/backend/iam_app/handlers/drf_perm/storage.py`

### Database operations

- [DB actuator](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/internal/subcmd/subcmd.go): `dbm-services/bigdata/db-tools/dbactuator/internal/subcmd/subcmd.go`
- [Doris operations](https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/doris): `dbm-services/bigdata/db-tools/dbactuator/pkg/components/doris`
- [Elasticsearch operations](https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/elasticsearch): `dbm-services/bigdata/db-tools/dbactuator/pkg/components/elasticsearch`
- [HDFS operations](https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/hdfs): `dbm-services/bigdata/db-tools/dbactuator/pkg/components/hdfs`
- [Kafka operations](https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/kafka): `dbm-services/bigdata/db-tools/dbactuator/pkg/components/kafka`
- [Pulsar operations](https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/pulsar): `dbm-services/bigdata/db-tools/dbactuator/pkg/components/pulsar`
- [InfluxDB operations](https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/influxdb): `dbm-services/bigdata/db-tools/dbactuator/pkg/components/influxdb`
- [VictoriaMetrics operations](https://github.com/tencentblueking/blueking-dbm/tree/v1.5.0/dbm-services/bigdata/db-tools/dbactuator/pkg/components/victoriametrics): `dbm-services/bigdata/db-tools/dbactuator/pkg/components/victoriametrics`

### Shared operations

- [Artifact storage](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/core/storages/storage.py): `dbm-ui/backend/core/storages/storage.py`
- [Machine inventory](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/backend/db_services/dbresource/machine_storage.py): `dbm-ui/backend/db_services/dbresource/machine_storage.py`
- [Feature flags](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-ui/frontend/src/stores/useFunController.ts): `dbm-ui/frontend/src/stores/useFunController.ts`
- [MySQL failover](https://github.com/tencentblueking/blueking-dbm/blob/v1.5.0/dbm-services/common/dbha/ha-module/dbmodule/dbmysql/SpiderStorageLayer_switch.go): `dbm-services/common/dbha/ha-module/dbmodule/dbmysql/SpiderStorageLayer_switch.go`

### Other components

- **DBM user**

## Connections

- DBM user → Service tickets: submits request
- Service tickets → Flow engine: runs pipeline
- Service tickets → Approval todos: creates approval
- Approval todos → Flow engine: callbacks or fails
- Instance validation → Instance metadata: checks membership
- Instance metadata → Cluster storage sets: associates clusters
- File permissions → Artifact storage: guards file access
- DB actuator → Doris operations: dispatches operations
- DB actuator → Elasticsearch operations: dispatches operations
- DB actuator → HDFS operations: dispatches operations
- DB actuator → Kafka operations: dispatches operations
- DB actuator → Pulsar operations: dispatches operations
- DB actuator → InfluxDB operations: dispatches operations
- DB actuator → VictoriaMetrics operations: dispatches operations
- Machine inventory → DBM user: updates inventory
- Feature flags → DBM user: provides UI flags
- MySQL failover → Instance metadata: updates instance roles
