Skip to content

Commit

Permalink
[ISSUE #94] Provide EngVer README (#95)
Browse files Browse the repository at this point in the history
* Update auto deploy branch from `dev` to `main`

* README EngVer

* README zh-CN ver
  • Loading branch information
Pil0tXia authored Apr 8, 2024
1 parent d296881 commit 76eb1ba
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 20 deletions.
63 changes: 48 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,78 @@
# EventMesh Dashboard

## 介绍
[🌐 简体中文](README.zh-CN.md)

## 业务架构
## Introduction

## 技术架构
The EventMesh Dashboard is under development and will support functionalities such as Connection management, cluster health checks, etc. Feel free to reach out to the [EventMesh Assistant](https://github.com/apache/eventmesh?tab=readme-ov-file#community) to contribute.

### 环境
The Dashboard for EventMesh, maintained during v1.8.0 ~ v1.10.0, is a pure frontend project located at the [Next.js Dashboard branch](https://github.com/apache/eventmesh-dashboard/tree/nextjs-dashboard).

Weekly development meeting documents for EventMesh Dashboard: https://docs.qq.com/doc/DQmhVbklUdGNNWGZi

## Technical Architecture

### Environment

- JDK 8/11
- Maven 3.8.1
- Spring Boot 2.7.x

### 模块依赖图
### Module Introduction

1. eventmesh-dashboard-console: Code for business modules, invoking service interfaces.
2. eventmesh-dashboard-observe: Code for monitoring modules.
3. eventmesh-dashboard-core: Code for EventMesh Runtime, Meta, and related components, providing service implementations.
4. eventmesh-dashboard-service: Common API interfaces, abstracting core functionalities.
5. eventmesh-dashboard-common: Code for common modules.
6. eventmesh-dashboard-view: Frontend code.

## Auto Deploy EventMesh Dashboard

When the repository code is updated, the script will build and run the EventMesh Dashboard based on the latest version of the code.

### Usage

```
cd ~/service
git clone https://github.com/apache/eventmesh-dashboard.git
cd eventmesh-dashboard/deployment/
```

Edit credentials:

### 模块介绍
```
cp .env.example .env
vim .env
```

1. eventmesh-dashboard-console 业务模块的代码,调用service接口
2. eventmesh-dashboard-observe 监控模块的代码
3. eventmesh-dashboard-core 对EventMesh Runtime, Meta以及相关组件的代码,提供service实现
4. eventmesh-dashboard-service 公用API接口,对core的抽象
5. eventmesh-dashboard-common 公共模块的代码
6. eventmesh-dashboard-view 前端代码
Add task to crontab:

```
crontab -e
```

### eventmesh-dashboard-core 介绍
```
0 * * * * bash ~/service/eventmesh-dashboard/deployment/auto-deploy-eventmesh-dashboard.sh
```

## Build

### Build on source code

```
cd eventmesh-dashboard
./gradlew clean bootJar
mvn clean package
```

```
java -jar build/libs/eventmesh-dashboard-0.0.1-SNAPSHOT.jar
java -DDB_ADDRESS=$DB_ADDRESS -DDB_USERNAME=$DB_USERNAME -DDB_PASSWORD=$DB_PASSWORD -jar eventmesh-dashboard-console/target/eventmesh-dashboard-console-0.0.1-SNAPSHOT.jar
```

### Build and Run with Docker

>To be updated
```
cd eventmesh-dashboard
./gradlew clean bootJar
Expand Down
84 changes: 84 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# EventMesh Dashboard

[🌐 English Version](README.md)

## 介绍

EventMesh Dashboard 处于开发中,将支持 Connection 管理、集群健康检查等功能。欢迎联系 [EventMesh 小助手](https://github.com/apache/eventmesh?tab=readme-ov-file#community)参与贡献。

EventMesh 于 v1.8.0 ~ v1.10.0 期间维护的 Dashboard 纯前端项目位于 [Next.js Dashboard 分支](https://github.com/apache/eventmesh-dashboard/tree/nextjs-dashboard)

EventMesh Dashboard 每周开发例会文档:https://docs.qq.com/doc/DQmhVbklUdGNNWGZi

## 技术架构

### 环境

- JDK 8/11
- Maven 3.8.1
- Spring Boot 2.7.x

### 模块介绍

1. eventmesh-dashboard-console 业务模块的代码,调用service接口
2. eventmesh-dashboard-observe 监控模块的代码
3. eventmesh-dashboard-core 对EventMesh Runtime, Meta以及相关组件的代码,提供service实现
4. eventmesh-dashboard-service 公用API接口,对core的抽象
5. eventmesh-dashboard-common 公共模块的代码
6. eventmesh-dashboard-view 前端代码

## 自动部署最新版 EventMesh Dashboard

当仓库代码更新后,脚本将基于最新版本的代码构建并运行 EventMesh Dashboard。

### 快速开始

```
cd ~/service
git clone https://github.com/apache/eventmesh-dashboard.git
cd eventmesh-dashboard/deployment/
```

编辑凭据:

```
cp .env.example .env
vim .env
```

添加定时任务:

```
crontab -e
```

```
0 * * * * bash ~/service/eventmesh-dashboard/deployment/auto-deploy-eventmesh-dashboard.sh
```

## 构建

### 使用源代码构建

```
cd eventmesh-dashboard
mvn clean package
```

```
java -DDB_ADDRESS=$DB_ADDRESS -DDB_USERNAME=$DB_USERNAME -DDB_PASSWORD=$DB_PASSWORD -jar eventmesh-dashboard-console/target/eventmesh-dashboard-console-0.0.1-SNAPSHOT.jar
```

### 构建并运行 Docker 镜像

>To be updated
```
cd eventmesh-dashboard
./gradlew clean bootJar
docker build -t yourname/eventmesh-dashboard -f docker/Dockerfile .
```

```
docker run -d --name eventmesh-dashboard -p 8080:8080 yourname/eventmesh-dashboard
```
10 changes: 5 additions & 5 deletions deployment/auto-deploy-eventmesh-dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ is_process_running() {

# Update the git repository
cd $REPO_PATH
git fetch origin dev
git fetch origin main
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse origin/dev)
REMOTE=$(git rev-parse origin/main)

if [ $LOCAL != $REMOTE ]; then
# If the remote dev branch is newer than the local one, update the local dev branch code
git pull origin dev
# If the remote branch is newer than the local one, update the local branch code
git pull origin main

# Log the event
echo "$(date +"%Y-%m-%d %H:%M:%S") - change detected." >> $AUTO_DEPLOY_LOG
Expand All @@ -76,7 +76,7 @@ if [ $LOCAL != $REMOTE ]; then
# Log the event
echo "$(date +"%Y-%m-%d %H:%M:%S") - start new application." >> $AUTO_DEPLOY_LOG
else
# If there are no new changes in the remote dev branch
# If there are no new changes in the remote branch

# Log the event
echo "$(date +"%Y-%m-%d %H:%M:%S") - no change detected." >> $AUTO_DEPLOY_LOG
Expand Down

0 comments on commit 76eb1ba

Please sign in to comment.