Skip to content

Commit 77ec0c7

Browse files
committed
fix: translate docs
1 parent be2c698 commit 77ec0c7

3 files changed

Lines changed: 122 additions & 122 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
*/
17+
18+
19+
# DevLake Development Environment Deployment Guide
20+
21+
## Environment Requirements
22+
- Docker v19.03.10+
23+
- Golang v1.19+
24+
- GNU Make
25+
- Mac (pre-installed)
26+
- Windows: [Download](http://gnuwin32.sourceforge.net/packages/make.htm)
27+
- Ubuntu: `sudo apt-get install build-essential libssl-dev`
28+
29+
## How to Set Up the Development Environment
30+
The following guide will explain how to run DevLake's frontend (config-ui) and backend in development mode.
31+
32+
### Clone the Repository
33+
Navigate to where you want to install this project and clone the repository:
34+
35+
```bash
36+
git clone https://github.com/apache/incubator-devlake.git
37+
cd incubator-devlake
38+
```
39+
40+
### Install Plugin Dependencies
41+
42+
RefDiff plugin:
43+
Install Go packages
44+
```bash
45+
cd backend
46+
go get
47+
cd ..
48+
```
49+
50+
### Configure Environment File
51+
Copy the example configuration file to a new local file:
52+
53+
```bash
54+
cp env.example .env
55+
```
56+
57+
Update the following variables in the `.env` file:
58+
59+
- `DB_URL`: Replace `mysql:3306` with `127.0.0.1:3306`
60+
- `DISABLED_REMOTE_PLUGINS`: Set to `True`
61+
62+
### Start MySQL and Grafana Containers
63+
64+
Make sure the Docker daemon is running before this step.
65+
66+
> Grafana needs to rebuild the image, then change the image in docker-compose.datasources.yml to `image: grafana:latest`
67+
68+
```bash
69+
docker-compose -f docker-compose-dev.yml up -d mysql grafana
70+
```
71+
72+
### Run in Development Mode
73+
Run devlake and config-ui in development mode in two separate terminals:
74+
75+
```bash
76+
# Install poetry, follow the guide: https://python-poetry.org/docs/#installation
77+
# Run devlake, only using the q dev plugin here
78+
DEVLAKE_PLUGINS=q_dev nohup make dev &
79+
# Run config-ui
80+
make configure-dev
81+
```
82+
83+
For common errors, please refer to the troubleshooting documentation.
84+
85+
Config UI runs on localhost:4000

backend/plugins/q_dev/Q_DEV版本部署流程.md

Lines changed: 0 additions & 85 deletions
This file was deleted.

backend/plugins/q_dev/README.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
1717

18-
# Q Developer 插件
18+
# Q Developer Plugin
1919

20-
本插件用于从AWS S3获取AWS Q Developer的使用数据,并进行处理和分析。
20+
This plugin is used to retrieve AWS Q Developer usage data from AWS S3, and process and analyze it.
2121

22-
## 功能
22+
## Features
2323

24-
- 从AWS S3指定前缀下获取CSV文件
25-
- 解析CSV文件中的用户使用数据
26-
- 按用户聚合数据,计算各项指标
24+
- Retrieve CSV files from a specified prefix in AWS S3
25+
- Parse user usage data from CSV files
26+
- Aggregate data by user and calculate various metrics
2727

28-
## 配置
28+
## Configuration
2929

30-
配置项包括:
30+
Configuration items include:
3131

32-
1. AWS访问密钥ID
33-
2. AWS秘钥
34-
3. AWS区域
35-
4. S3桶名称
36-
5. 速率限制(每小时)
32+
1. AWS Access Key ID
33+
2. AWS Secret Key
34+
3. AWS Region
35+
4. S3 Bucket Name
36+
5. Rate Limit (per hour)
3737

38-
通过下面的curl可以创建connection
38+
You can create a connection using the following curl command:
3939
```bash
4040
curl 'http://localhost:8080/plugins/q_dev/connections' \
4141
--header 'Content-Type: application/json' \
@@ -48,38 +48,38 @@ curl 'http://localhost:8080/plugins/q_dev/connections' \
4848
"rateLimitPerHour": 20000
4949
}'
5050
```
51-
请将以下占位符替换为实际值:
52-
<YOUR_ACCESS_KEY_ID>:您的 AWS 访问密钥 ID
53-
<YOUR_SECRET_ACCESS_KEY>:您的 AWS 访问密钥
54-
<YOUR_S3_BUCKET_NAME>:您要使用的 S3 存储桶名称
55-
<AWS_REGION>: 您要使用的 S3 所在的区域
51+
Please replace the following placeholders with actual values:
52+
<YOUR_ACCESS_KEY_ID>: Your AWS access key ID
53+
<YOUR_SECRET_ACCESS_KEY>: Your AWS secret access key
54+
<YOUR_S3_BUCKET_NAME>: The S3 bucket name you want to use
55+
<AWS_REGION>: The region where your S3 bucket is located
5656

57-
通过下面的curl可以获取所有的connection
57+
You can get all connections using the following curl command:
5858
```bash
59-
curl Get 'http://localhost:8080/plugins/q_dev/connections'
59+
curl Get 'http://localhost:8080/plugins/q_dev/connections'
6060
```
6161

62-
## 数据流程
62+
## Data Flow
6363

64-
插件包含以下任务:
64+
The plugin includes the following tasks:
6565

66-
1. `collectQDevS3Files`: 从S3收集文件元数据信息,不下载文件内容
67-
2. `extractQDevS3Data`: 使用S3文件元数据,下载CSV数据并解析存储到数据库
68-
3. `convertQDevUserMetrics`: 将用户数据转换为聚合指标,计算平均值和总值
66+
1. `collectQDevS3Files`: Collects file metadata information from S3, without downloading file content
67+
2. `extractQDevS3Data`: Uses S3 file metadata to download CSV data and parse it into the database
68+
3. `convertQDevUserMetrics`: Converts user data into aggregated metrics, calculating averages and totals
6969

70-
## 数据表
70+
## Data Tables
7171

72-
- `_tool_q_dev_connections`: 存储AWS S3连接信息
73-
- `_tool_q_dev_s3_file_meta`: 存储S3文件元数据
74-
- `_tool_q_dev_user_data`: 存储从CSV文件中解析的用户数据
75-
- `_tool_q_dev_user_metrics`: 存储聚合后的用户指标
72+
- `_tool_q_dev_connections`: Stores AWS S3 connection information
73+
- `_tool_q_dev_s3_file_meta`: Stores S3 file metadata
74+
- `_tool_q_dev_user_data`: Stores user data parsed from CSV files
75+
- `_tool_q_dev_user_metrics`: Stores aggregated user metrics
7676

77-
## 数据收集配置
78-
收集数据步骤
79-
1. 在Config UI页面上选择左侧的`Advanced Mode`,点击`Blueprints`
80-
2. 新建Blueprint
81-
3. ![img.png](img.png) 点击右侧齿轮
82-
4. `JSON Configuration`粘贴如下JSON配置:
77+
## Data Collection Configuration
78+
Steps to collect data:
79+
1. On the Config UI page, select `Advanced Mode` on the left, click `Blueprints`
80+
2. Create a new Blueprint
81+
3. ![img.png](img.png) Click the gear icon on the right
82+
4. Paste the following JSON configuration into `JSON Configuration`:
8383

8484
```json
8585
[

0 commit comments

Comments
 (0)