Alonexc commented on code in PR #4709:
URL: https://github.com/apache/eventmesh/pull/4709#discussion_r1445785950


##########
README.zh-CN.md:
##########
@@ -61,27 +61,569 @@ Apache EventMesh提供了许多功能来帮助用户实现他们的目标,以
 - [EventMesh-catalog](https://github.com/apache/eventmesh-catalog): 使用 
AsyncAPI 进行事件模式管理的目录服务。
 - [EventMesh-go](https://github.com/apache/eventmesh-go): EventMesh 运行时的 Go 
语言实现。
 
-## 快速开始
+## 快速入门  
+本段指南将指导您完成EventMesh的部署步骤   
+- [部署EventMesh Store](#部署eventmesh-store-)
+- [部署EventMesh Runtime](#部署eventmesh-runtime)
+  - [本地构建运行](#本地构建运行)
+    - [源码启动](#1源码启动-)
+    - [本地二进制构建](#2-本地二进制构建)
+  - [远程部署](#远程部署)  
+  - [Docker部署EventMesh Runtime](#docker部署eventmesh-runtime)
+- [eventmesh-sdk-java demo](#eventmesh-sdk-java-demo-)
+  - [TCP](#1tcp-)
+  - [HTTP](#2http)
+  - [GRPC](#3grpc)
+  - [测试](#4测试-)
+- [运行EventMesh-Operator](#运行eventmesh-operator)
+  - [本地源码运行](#本地源码运行)  
+  - [部署operator到k8s](#部署operator到k8s)
+
+### 部署EventMesh Store  
+
+> EventMesh现在支持`standalone`、`RocketMQ`、`Kafka`等中间件作为存储   
+> 如果是在非`standalone`模式下,需要先部署所需的`store`,以`rocketmq`模式为例: 
部署[RocketMQ](https://rocketmq.apache.org/docs/quickStart/01quickstart/)
+
+### 部署EventMesh Runtime
+EventMesh Runtime是EventMesh集群中有状态的Mesh节点,负责Source Connector与Sink 
Connector之间的事件传输,并可以使用EventMesh Storage作为事件的存储队列。
+
+#### 本地构建运行
+
+依赖准备: 
+
+- 建议使用64位操作系统,建议使用Linux / Unix;
+- 64位JDK 1.8+;
+- Gradle至少为7.0, 推荐 7.0.*
+
+##### 1)源码启动  
+
+1.下载源码:   
+从[EventMesh 
download](https://eventmesh.apache.org/download/)下载并提取最新版本的源代码。您将获得`apache-eventmesh-1.10.0-source.tar.gz`。
+
+2.安装插件:   
+
+有两种方式安装插件:  
+
+- classpath加载: 本地开发可以通过在 eventmesh-starter 模块 build.gradle 中进行声明,例如声明使用 
rocketmq 插件  
+```
+implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq")
+```
+
+- 文件加载: 通过将插件安装到插件目录,EventMesh在运行时会根据条件自动加载插件目录下的插件,可以通过执行以下命令安装插件  
+```
+./gradlew clean jar dist && ./gradlew installPlugin
+```
+
+3.使用插件  
+EventMesh 
会默认加载`dist/plugin`目录下的插件,可以通过`-DeventMeshPluginDir=your_plugin_directory`来改变插件目录。运行时需要使用的插件实例可以在`confPath`目录下面的`eventmesh.properties`中进行配置。例如通过以下设置声明在运行时使用rocketmq插件。
  
+```
+#connector plugin
+eventMesh.connector.plugin.type=rocketmq
+```
+
+4.配置VM启动参数  
+```
+-Dlog4j.configurationFile=eventmesh-runtime/conf/log4j2.xml
+-Deventmesh.log.home=eventmesh-runtime/logs
+-Deventmesh.home=eventmesh-runtime
+-DconfPath=eventmesh-runtime/conf
+```
+> 注:如果操作系统为Windows, 可能需要将文件分隔符换成`'\'`
+
+5.启动运行
+```
+运行org.apache.eventmesh.starter.StartUp的主要方法
+```
+
+##### 2) 本地二进制构建
+
+1.下载源码  
+
+从[EventMesh 
download](https://eventmesh.apache.org/download/)下载并提取最新版本的源代码。比如目前最新版,您将获得`apache-eventmesh-1.9.0-source.tar.gz`。
+```
+tar -xvzf apache-eventmesh-1.10.0-source.tar.gz
+cd apache-eventmesh-1.10.0-src/
+```
+
+使用 Gradle 构建源代码。
+```
+gradle clean dist
+```
+
+编辑`eventmesh.properties`以更改EventMesh Runtime的配置(如 TCP 端口、客户端黑名单)。
+```
+cd dist
+vim conf/eventmesh.properties
+```
+
+2.构建并加载插件  
+Apache EventMesh引入了 SPI 机制,使 EventMesh 能够在运行时发现并加载插件。有两种方式安装插件:  
+- Gradle依赖项: 在`eventmesh-starter/build.gradle`中将插件声明为构建依赖项。  
+```
+dependencies {
+   implementation project(":eventmesh-runtime")
+
+    // 示例: 加载 RocketMQ 插件
+   implementation project(":eventmesh-connectors:eventmesh-connector-rocketmq")
+}
+```
+
+- 插件目录: 
EventMesh会根据`eventmesh.properties`加载`dist/plugin`目录中的插件。Gradle的`installPlugin`任务会构建插件并将其移动到`dist/plugin`目录中。
  
+```
+gradle installPlugin
+```
+
+3.启动Runtime   
+
+执行`start.sh`脚本启动EventMesh Runtime服务器。
+```
+bash bin/start.sh
+```
+
+查看输出日志:  
+```
+tail -f logs/eventmesh.out
+```
+
+#### 远程部署
+
+在[EventMesh download](https://eventmesh.apache.org/download/)页面选择所需要版本的Binary 
Distribution进行下载,您将获得`apache-eventmesh-1.10.0-bin.tar.gz`。   
+1.下载:  
+```
+# 解压
+tar -xvzf apache-eventmesh-1.10.0-bin.tar.gz
+cd apache-eventmesh-1.10.0
+```
+
+2.部署  
+
+编辑`eventmesh.properties`以更改EventMesh Runtime的配置(如 TCP 端口、客户端黑名单)。
+```
+vim conf/eventmesh.properties
+```
+
+执行`start.sh`脚本启动EventMesh Runtime服务器。  
+```
+bash bin/start.sh
+```
+如果看到`EventMeshTCPServer[port=10000] started....`, 则说明设置成功。   
+
+查看输出日志:  
+```
+cd /root/apache-eventmesh-1.10.0/logs
+tail -f eventmesh.out
+```
+
+停止:  
+```
+bash bin/stop.sh
+```
+
+#### Docker部署EventMesh Runtime
+
+准备:   
+- 建议使用64位的linux系统。
+- 请预先安装Docker 
Engine。Docker的安装过程可以参考[docker官方文档](https://docs.docker.com/engine/install/)。
+- 建议掌握基础的docker概念和命令行,例如注册中心、挂载等等。不过这不是必须的,因为本次操作所需的命令都已为您列出。
+- 
若您选择非standalone模式,请确保[RocketMQ](https://rocketmq.apache.org/docs/quickStart/01quickstart/)已成功启动并且可以使用ip地址访问到;若您选择standalone模式,则无需启动RocketMQ
 。
+
+1.获取EventMesh镜像  
+首先,你可以打开一个命令行,并且使用下面的`pull`命令从[Docker 
Hub](https://hub.docker.com)中下载最新发布的[EventMesh](https://hub.docker.com/r/apache/eventmesh)。
   
+```
+sudo docker pull apache/eventmesh:v1.10.0
+```
+
+您可以使用以下命令列出并查看本地已有的镜像。
+```
+sudo docker images
+```
+
+如果终端显示如下所示的镜像信息,则说明 EventMesh 镜像已经成功下载到本地。
+```
+$ sudo docker images
+REPOSITORY            TAG       IMAGE ID       CREATED         SIZE
+apache/eventmesh     v1.10.0    6e2964599c78   10 days ago     937MB
+```
+
+2.创建配置文件:  
+在根据EventMesh镜像运行对应容器之前,你需要创建两个配置文件,分别是:`eventmesh.properties`和`rocketmq-client.properties`。
  
+首先,你需要使用下面的命令创建这两个文件。  
+```
+sudo mkdir -p /data/eventmesh/rocketmq/conf
+cd /data/eventmesh/rocketmq/conf
+sudo touch eventmesh.properties
+sudo touch rocketmq-client.properties
+```
+
+3.配置`eventmesh.properties`  
+
+这个配置文件中包含 EventMesh 运行时环境和集成进来的其他插件所需的参数。  
+使用下面的`vim`命令编辑`eventmesh.properties`。  
+```
+sudo vim eventmesh.properties
+```
+你可以直接将 GitHub 
仓库中的对应[配置文件](https://github.com/apache/eventmesh/blob/1.10.0-prepare/eventmesh-runtime/conf/eventmesh.properties)中的内容复制过来。
  

Review Comment:
   @Pil0tXia I think it is still necessary, the previous connection is to jump 
to the official website, there are a lot of outdated, not updated in time, 
which is not conducive to rapid understanding, because the user must first want 
to run the project deployment. If the home page contains this guide, it can be 
updated in time, and the command error can be corrected in time. Of course, 
this is only a simple introduction guide, more detailed official documents are 
needed to interpret. What do you think ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to