Commit 591c31b
authored
feat: add Complete Workflows for Standalone and Multi-CN Setup with Metrics (#23247)
### **User description**
## What type of PR is this?
- [ ] API-change
- [ ] BUG
- [x] Improvement
- [x] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring
## Which issue(s) this PR fixes:
issue #23246
## What this PR does / why we need it:
#### Standalone MatrixOne
```bash
# Quick start
make build
./mo-service -launch ./etc/launch/launch.toml
mysql -h 127.0.0.1 -P 6001 -u root -p111
# With monitoring
make build
# Edit etc/launch/cn.toml, tn.toml, log.toml to enable metrics
./mo-service -launch ./etc/launch/launch.toml
make dev-up-grafana-local
make dev-check-grafana
make dev-create-dashboard-local
```
#### Multi-CN Cluster
```bash
# Quick start
make dev-build && make dev-up
mysql -h 127.0.0.1 -P 6001 -u root -p111
# With monitoring
make dev-build && make dev-up
make dev-edit-cn1 # Enable metrics in configs
make dev-restart
make dev-up-grafana
make dev-check-grafana
make dev-create-dashboard-cluster
```
___
### **PR Type**
Enhancement, Documentation
___
### **Description**
- Add comprehensive Grafana dashboard creation tool (`mo-dashboard`)
with support for multiple deployment modes (local, cloud, K8S,
cloud-ctrl)
- Implement complete development guide (`DEV_README.md`) covering
standalone and multi-CN cluster setups with monitoring workflows
- Enhance Docker Compose setup with Prometheus and Grafana services,
including cluster and local monitoring profiles
- Add Docker registry mirror configuration scripts for faster image
pulls in regions with slow Docker Hub access
- Extend Makefile with 20+ new development commands for monitoring,
dashboard creation, and service management
- Improve `start.sh` script with Grafana health checks, enhanced
permission handling, and profile support
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["mo-dashboard<br/>Command Tool"] -->|Creates| B["Grafana<br/>Dashboards"]
C["Docker Compose<br/>Services"] -->|Includes| D["Prometheus<br/>Metrics"]
D -->|Feeds| B
E["DEV_README.md<br/>Documentation"] -->|Guides| F["Development<br/>Workflows"]
G["Enhanced<br/>Makefile"] -->|Provides| H["20+ dev-*<br/>Commands"]
H -->|Manages| C
I["start.sh<br/>Script"] -->|Supports| J["Health Checks<br/>& Profiles"]
```
<details><summary><h3>File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>8
files</summary><table>
<tr>
<td><strong>main.go</strong><dd><code>New Grafana dashboard creation
command tool</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ee6866f9fb95784ecffcdd1a9dbac5e896f6a743467c18a07fdd5c5cda357e7c">+115/-0</a>
</td>
</tr>
<tr>
<td><strong>main.go</strong><dd><code>Integrate dashboard command into
mo-tool CLI</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-255b0379c33b28bc95b8233bc2c3ba5644340583c2aedf451f202bf28d3d363e">+4/-1</a>
</td>
</tr>
<tr>
<td><strong>start.sh</strong><dd><code>Enhanced script with Grafana
checks and profiles</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-6ae22aa8ec2b039a1f9d53c62e3a4dd46bb06623a3ec0bf145c8e88d62af1eb6">+225/-23</a></td>
</tr>
<tr>
<td><strong>setup-docker-mirror.sh</strong><dd><code>New Docker registry
mirror configuration script</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ccfe9ece6be1eceb4acfb0bd540c978d9fbc10f997dc03aedb85aefca6c4c599">+78/-0</a>
</td>
</tr>
<tr>
<td><strong>update-docker-mirror.sh</strong><dd><code>Docker mirror
update utility for better reliability</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-88e2a110c04b8747ee1f8df4ee00e4caa58746240aa9f795eff46da48469bbab">+72/-0</a>
</td>
</tr>
<tr>
<td><strong>Makefile</strong><dd><code>Add 20+ dev-* commands for
monitoring and dashboards</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52">+236/-5</a>
</td>
</tr>
<tr>
<td><strong>docker-compose.yml</strong><dd><code>Add Prometheus and
Grafana services with profiles</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-c3a2864bab8f3801da9e84599b807f85f4821406f73eb2bca81b3e3253359120">+181/-3</a>
</td>
</tr>
<tr>
<td><strong>Dockerfile.dev</strong><dd><code>Development Dockerfile with
cached dependencies</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-400e3018b058be3936485adc960dffcef2c310ce895b143977bd680654a19be1">+61/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>4
files</summary><table>
<tr>
<td><strong>DEV_README.md</strong><dd><code>Comprehensive development
guide with all workflows</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-71ef0b6c2617dd81654dca538af01d544e9cdfdb92239bf702e26f874427ca91">+1532/-0</a></td>
</tr>
<tr>
<td><strong>README_CN.md</strong><dd><code>Add Chinese documentation for
development setup</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-e6db595f1598cdd1968f25675bddebde43afe7e5a39e0aade96034d51c072ee7">+18/-0</a>
</td>
</tr>
<tr>
<td><strong>README_USER.md</strong><dd><code>Link to development guide
for Python SDK users</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-21c28f80c90f942a1da0dd5646a9c43fca10a436e8e2d62081ac3297f759f579">+10/-0</a>
</td>
</tr>
<tr>
<td><strong>README.md</strong><dd><code>Update main README with
development guide link</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5">+1/-1</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>8 files</summary><table>
<tr>
<td><strong>prometheus-local.yml</strong><dd><code>Prometheus config for
monitoring local MatrixOne</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-deb0f3171371dd2d60249b9f60ad50db8509b4d11eef423c5921f803843eefcc">+76/-0</a>
</td>
</tr>
<tr>
<td><strong>prometheus.yml</strong><dd><code>Prometheus config for
Docker Compose cluster</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-b9009230a57f77316edb1acfa1bc264864b6733b1984b335b2158bcac2a522ae">+53/-0</a>
</td>
</tr>
<tr>
<td><strong>default.yml</strong><dd><code>Grafana dashboard provisioning
configuration</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ef1d58d6418e31ef691da4bd29f5f59e11e6ea4640a7f53ab69c107669feffc0">+13/-0</a>
</td>
</tr>
<tr>
<td><strong>prometheus-cluster.yml</strong><dd><code>Grafana data source
config for cluster Prometheus</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-02a4db40adb8cc5b3c2fe5b2e000f4c7978733b3acebf511d3c5190bae9a4c46">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>cn.toml</strong><dd><code>Enable metrics in standalone CN
configuration</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-d19a9d5ce28886197f25a7a772e39b836a8300b13adac462bc9db570bcea06a5">+4/-0</a>
</td>
</tr>
<tr>
<td><strong>prometheus.yml</strong><dd><code>Grafana data source config
for local Prometheus</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ee58532b3f5d4a99d590c15433ad746c82a045967181721ade7914f8f55b71bc">+11/-0</a>
</td>
</tr>
<tr>
<td><strong>log.toml</strong><dd><code>Enable metrics in standalone Log
service config</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-c7073fc7b1341d4b2b605056dbe7a5cc9545ba3cb6c310c04e937252d25969dc">+6/-1</a>
</td>
</tr>
<tr>
<td><strong>tn.toml</strong><dd><code>Enable metrics in standalone TN
configuration</code>
</dd></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-09fb5c2b4faf297f30de6c0eb85154be01c0f06afe674927d0b025e2cc79eaf1">+5/-0</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>README.md</strong></td>
<td><a
href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-aa4eb3ac4305f6ffd94291a832df3e83c65a1c3077d15cdf9371f2b7b2c31a9d">+0/-829</a>
</td>
</tr>
</table></details></td></tr></tbody></table>
</details>
___1 parent 7a67ffd commit 591c31b
File tree
43 files changed
+3686
-943
lines changed- clients/python
- cmd
- mo-dashboard
- mo-service
- mo-tool
- etc
- docker-multi-cn-local-disk
- grafana-provisioning
- dashboards
- datasources
- launch-minio-local
- launch
- optools/images
- pkg
- cdc
- fileservice
- hakeeper/checkers/cnservice
- incrservice
- queryservice
- taskservice
- txn/service
- util/trace/impl/motrace
- vm/engine/tae
- logtail
- service
- rpc
- tasks
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+3686
-943
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
273 | 291 | | |
274 | 292 | | |
275 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
140 | 150 | | |
141 | 151 | | |
142 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | | - | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
0 commit comments