Skip to content

Commit 591c31b

Browse files
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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ee6866f9fb95784ecffcdd1a9dbac5e896f6a743467c18a07fdd5c5cda357e7c">+115/-0</a>&nbsp; </td> </tr> <tr> <td><strong>main.go</strong><dd><code>Integrate dashboard command into mo-tool CLI</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-255b0379c33b28bc95b8233bc2c3ba5644340583c2aedf451f202bf28d3d363e">+4/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>start.sh</strong><dd><code>Enhanced script with Grafana checks and profiles</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ccfe9ece6be1eceb4acfb0bd540c978d9fbc10f997dc03aedb85aefca6c4c599">+78/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>update-docker-mirror.sh</strong><dd><code>Docker mirror update utility for better reliability</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-88e2a110c04b8747ee1f8df4ee00e4caa58746240aa9f795eff46da48469bbab">+72/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>Makefile</strong><dd><code>Add 20+ dev-* commands for monitoring and dashboards</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52">+236/-5</a>&nbsp; </td> </tr> <tr> <td><strong>docker-compose.yml</strong><dd><code>Add Prometheus and Grafana services with profiles</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-c3a2864bab8f3801da9e84599b807f85f4821406f73eb2bca81b3e3253359120">+181/-3</a>&nbsp; </td> </tr> <tr> <td><strong>Dockerfile.dev</strong><dd><code>Development Dockerfile with cached dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-400e3018b058be3936485adc960dffcef2c310ce895b143977bd680654a19be1">+61/-0</a>&nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-e6db595f1598cdd1968f25675bddebde43afe7e5a39e0aade96034d51c072ee7">+18/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>README_USER.md</strong><dd><code>Link to development guide for Python SDK users</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-21c28f80c90f942a1da0dd5646a9c43fca10a436e8e2d62081ac3297f759f579">+10/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>README.md</strong><dd><code>Update main README with development guide link</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5">+1/-1</a>&nbsp; &nbsp; &nbsp; </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>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-deb0f3171371dd2d60249b9f60ad50db8509b4d11eef423c5921f803843eefcc">+76/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>prometheus.yml</strong><dd><code>Prometheus config for Docker Compose cluster</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-b9009230a57f77316edb1acfa1bc264864b6733b1984b335b2158bcac2a522ae">+53/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>default.yml</strong><dd><code>Grafana dashboard provisioning configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ef1d58d6418e31ef691da4bd29f5f59e11e6ea4640a7f53ab69c107669feffc0">+13/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>prometheus-cluster.yml</strong><dd><code>Grafana data source config for cluster Prometheus</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-02a4db40adb8cc5b3c2fe5b2e000f4c7978733b3acebf511d3c5190bae9a4c46">+11/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>cn.toml</strong><dd><code>Enable metrics in standalone CN configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-d19a9d5ce28886197f25a7a772e39b836a8300b13adac462bc9db570bcea06a5">+4/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>prometheus.yml</strong><dd><code>Grafana data source config for local Prometheus</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-ee58532b3f5d4a99d590c15433ad746c82a045967181721ade7914f8f55b71bc">+11/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>log.toml</strong><dd><code>Enable metrics in standalone Log service config</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-c7073fc7b1341d4b2b605056dbe7a5cc9545ba3cb6c310c04e937252d25969dc">+6/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>tn.toml</strong><dd><code>Enable metrics in standalone TN configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/matrixorigin/matrixone/pull/23247/files#diff-09fb5c2b4faf297f30de6c0eb85154be01c0f06afe674927d0b025e2cc79eaf1">+5/-0</a>&nbsp; &nbsp; &nbsp; </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>&nbsp; </td> </tr> </table></details></td></tr></tbody></table> </details> ___
1 parent 7a67ffd commit 591c31b

File tree

43 files changed

+3686
-943
lines changed

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

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*.lib
66
*.swp
77
*.fatbin
8+
*.py
9+
*.sh
810
bin/
911
y.go
1012
*.output
@@ -18,10 +20,15 @@ tags
1820
coverage.txt
1921
out.txt
2022
logs/
23+
prometheus-local-data/
24+
prometheus-data/
25+
grafana-local-data/
26+
grafana-data/
2127
sdk_demo/
2228
vendor/
2329
gen_config
2430
main
31+
mo-tool
2532
/mo-server
2633
/mo-service
2734
/mo-debug

Makefile

Lines changed: 320 additions & 5 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ make dev-edit-cn1 # Edit CN1 config
292292
make dev-restart-cn1 # Restart only CN1 (fast!)
293293
```
294294

295-
📖 **[Full Guide & All Commands ](etc/docker-multi-cn-local-disk/)**
295+
📖 **[Complete Development Guide →](etc/DEV_README.md)** - Comprehensive guide covering standalone setup, multi-CN clusters, monitoring, metrics, configuration, and all `make dev-*` commands
296296

297297
### 🎯 Using mo_ctl Tool (Recommended for Production)
298298

README_CN.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,24 @@ for row in results.rows:
270270

271271
MatrixOne 支持多种安装方式,选择最适合您需求的方式:
272272

273+
### 🐳 本地多 CN 开发环境
274+
275+
在本地运行完整的分布式集群,包含多个 CN 节点、负载均衡和便捷的配置管理。
276+
277+
```bash
278+
# 快速开始
279+
make dev-build && make dev-up
280+
281+
# 通过代理连接(负载均衡)
282+
mysql -h 127.0.0.1 -P 6001 -u root -p111
283+
284+
# 配置特定服务(交互式编辑器)
285+
make dev-edit-cn1 # 编辑 CN1 配置
286+
make dev-restart-cn1 # 仅重启 CN1(快速!)
287+
```
288+
289+
📖 **[完整开发指南 →](etc/DEV_README.md)** - 涵盖单机设置、多 CN 集群、监控、指标、配置和所有 `make dev-*` 命令的完整指南
290+
273291
### 🎯 使用 mo_ctl 工具(推荐)
274292

275293
官方 [mo_ctl](https://github.com/matrixorigin/mo_ctl_standalone) 工具提供一键部署和生命周期管理。自动处理安装、升级、备份和健康监控。

clients/python/README_USER.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ A comprehensive, high-level Python SDK for MatrixOne that provides SQLAlchemy-li
1919
- 📋 [Best Practices](https://matrixone.readthedocs.io/en/latest/best_practices.html)
2020
- 📖 [API Reference](https://matrixone.readthedocs.io/en/latest/api/index.html)
2121

22+
**For Developers:**
23+
- 🛠️ [MatrixOne Development Guide](../../etc/DEV_README.md) - Complete guide for setting up MatrixOne locally, multi-CN clusters, monitoring, and all `make dev-*` commands
24+
2225
---
2326

2427
## ✨ Features
@@ -137,6 +140,13 @@ class User(Base):
137140

138141
## Quick Start
139142

143+
> **💡 Need to set up MatrixOne server?**
144+
> If you don't have MatrixOne running yet, check out the [MatrixOne Development Guide](../../etc/DEV_README.md) for instructions on:
145+
> - Starting a standalone MatrixOne instance
146+
> - Setting up a multi-CN cluster with Docker Compose
147+
> - Enabling monitoring and metrics
148+
> - All `make dev-*` commands
149+
140150
### Basic Usage
141151

142152
```python

cmd/mo-dashboard/main.go

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
// Copyright 2024 Matrix Origin
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package mo_dashboard
16+
17+
import (
18+
"fmt"
19+
20+
"github.com/matrixorigin/matrixone/pkg/logutil"
21+
"github.com/matrixorigin/matrixone/pkg/util/metric/v2/dashboard"
22+
"github.com/spf13/cobra"
23+
)
24+
25+
func PrepareCommand() *cobra.Command {
26+
var (
27+
host string
28+
port int
29+
mode string
30+
username string
31+
password string
32+
datasource string
33+
)
34+
35+
cmd := &cobra.Command{
36+
Use: "dashboard",
37+
Short: "Create Grafana dashboards for MatrixOne",
38+
Long: `Create Grafana dashboards for MatrixOne monitoring.
39+
40+
This command connects to a Grafana instance and creates all MatrixOne dashboards.
41+
Supports different modes: local (standalone), cloud (docker compose cluster), k8s, and cloud-ctrl.`,
42+
Example: ` # Create local dashboard (default: port 3001)
43+
mo-tool dashboard
44+
45+
# Create dashboard for docker compose cluster (port 3000)
46+
mo-tool dashboard --mode cloud --port 3000
47+
48+
# Create dashboard with custom host and credentials
49+
mo-tool dashboard --host localhost --port 3001 --username admin --password mypass`,
50+
RunE: func(cmd *cobra.Command, args []string) error {
51+
grafanaURL := fmt.Sprintf("http://%s:%d", host, port)
52+
53+
var creator *dashboard.DashboardCreator
54+
55+
switch mode {
56+
case "local":
57+
creator = dashboard.NewLocalDashboardCreator(
58+
grafanaURL,
59+
username,
60+
password,
61+
"Matrixone-Standalone",
62+
)
63+
logutil.Infof("Creating local dashboard at %s (folder: Matrixone-Standalone)", grafanaURL)
64+
65+
case "cloud":
66+
creator = dashboard.NewCloudDashboardCreator(
67+
grafanaURL,
68+
username,
69+
password,
70+
datasource,
71+
"Matrixone",
72+
)
73+
logutil.Infof("Creating cloud dashboard at %s (datasource: %s, folder: Matrixone)", grafanaURL, datasource)
74+
75+
case "k8s":
76+
creator = dashboard.NewK8SDashboardCreator(
77+
grafanaURL,
78+
username,
79+
password,
80+
datasource,
81+
"Matrixone",
82+
)
83+
logutil.Infof("Creating K8S dashboard at %s (datasource: %s, folder: Matrixone)", grafanaURL, datasource)
84+
85+
case "cloud-ctrl":
86+
creator = dashboard.NewCloudCtrlPlaneDashboardCreator(
87+
grafanaURL,
88+
username,
89+
password,
90+
datasource,
91+
"Matrixone",
92+
)
93+
logutil.Infof("Creating cloud control-plane dashboard at %s (datasource: %s, folder: Matrixone)", grafanaURL, datasource)
94+
95+
default:
96+
return fmt.Errorf("invalid mode '%s'. Valid modes: local, cloud, k8s, cloud-ctrl", mode)
97+
}
98+
99+
if err := creator.Create(); err != nil {
100+
return fmt.Errorf("failed to create dashboard: %w", err)
101+
}
102+
103+
logutil.Infof("Dashboard created successfully!")
104+
return nil
105+
},
106+
}
107+
108+
cmd.Flags().StringVar(&host, "host", "127.0.0.1", "Grafana host address")
109+
cmd.Flags().IntVar(&port, "port", 3001, "Grafana port (default: 3001 for local, 3000 for docker compose)")
110+
cmd.Flags().StringVar(&mode, "mode", "local", "Dashboard mode: local, cloud, k8s, cloud-ctrl (default: local)")
111+
cmd.Flags().StringVar(&username, "username", "admin", "Grafana username (default: admin)")
112+
cmd.Flags().StringVar(&password, "password", "admin", "Grafana password (default: admin)")
113+
cmd.Flags().StringVar(&datasource, "datasource", "Prometheus", "Prometheus datasource name (for cloud/k8s modes, default: Prometheus)")
114+
115+
return cmd
116+
}

cmd/mo-service/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ func (c *Config) createFileService(
397397

398398
func (c *Config) getLogServiceConfig() logservice.Config {
399399
cfg := c.LogService
400-
logutil.Infof("hakeeper client cfg: %v", c.HAKeeperClient)
400+
logutil.Info("logservice.get.config", zap.Any("hakeeper.client", c.HAKeeperClient))
401401
cfg.HAKeeperClientConfig = c.HAKeeperClient
402402
cfg.DataDir = filepath.Join(c.DataDir, "logservice-data", cfg.UUID)
403403
var hostname string

cmd/mo-service/launch.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ func waitHAKeeperRunning(client logservice.CNHAKeeperClient) error {
257257
if moerr.IsMoErrCode(err, moerr.ErrNoHAKeeper) ||
258258
state.State != logpb.HAKeeperRunning {
259259
// not ready
260-
logutil.Info("hakeeper not ready, retry")
260+
logutil.Info("retry.wait.hakeeper.running")
261261
time.Sleep(time.Second)
262262
continue
263263
}
@@ -276,23 +276,23 @@ func waitAnyShardReady(client logservice.CNHAKeeperClient) error {
276276
if err != nil {
277277
if errors.Is(err, context.DeadlineExceeded) {
278278
err = moerr.AttachCause(ctx, err)
279-
logutil.Errorf("wait TN ready timeout: %s", err)
279+
logutil.Error("wait.tn.ready.timeout", zap.Error(err))
280280
return false, err
281281
}
282-
logutil.Errorf("failed to get cluster details %s", err)
282+
logutil.Error("wait.tn.ready.failed", zap.Error(err))
283283
return false, nil
284284
}
285285
for _, store := range details.TNStores {
286286
if len(store.Shards) > 0 {
287287
return true, nil
288288
}
289289
}
290-
logutil.Info("shard not ready")
290+
logutil.Info("wait.tn.ready.not.ready")
291291
return false, nil
292292
}(); err != nil {
293293
return err
294294
} else if ok {
295-
logutil.Info("shard ready")
295+
logutil.Info("wait.tn.ready.ready.completed")
296296
return nil
297297
}
298298
time.Sleep(time.Second)
@@ -312,7 +312,7 @@ func waitClusterCondition(
312312
return err
313313
}
314314
if err := client.Close(); err != nil {
315-
logutil.Error("close hakeeper client failed", zap.Error(err))
315+
logutil.Error("wait.cluster.condition.close.hakeeper.client.failed", zap.Error(err))
316316
}
317317
return nil
318318
}

cmd/mo-tool/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
package main
1616

1717
import (
18+
"os"
19+
20+
dashboard "github.com/matrixorigin/matrixone/cmd/mo-dashboard"
1821
debug "github.com/matrixorigin/matrixone/cmd/mo-debug"
1922
inspect "github.com/matrixorigin/matrixone/cmd/mo-inspect"
2023
"github.com/spf13/cobra"
21-
"os"
2224
)
2325

2426
func main() {
@@ -30,6 +32,7 @@ func main() {
3032

3133
rootCmd.AddCommand(debug.PrepareCommand())
3234
rootCmd.AddCommand(inspect.PrepareCommand())
35+
rootCmd.AddCommand(dashboard.PrepareCommand())
3336

3437
if err := rootCmd.Execute(); err != nil {
3538
os.Exit(1)

0 commit comments

Comments
 (0)