You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2021/10/03 09:35:06 UTC
[incubator-eventmesh] branch develop updated: update quickstart
This is an automated email from the ASF dual-hosted git repository.
chenguangsheng pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git
The following commit(s) were added to refs/heads/develop by this push:
new 4b2fef9 update quickstart
4b2fef9 is described below
commit 4b2fef9bb64fc65b2bfef370f6c207569cd5e9f9
Author: qqeasonchen <qq...@gmail.com>
AuthorDate: Sun Oct 3 17:34:52 2021 +0800
update quickstart
Signed-off-by: qqeasonchen <qq...@gmail.com>
---
README.md | 6 +-
README.zh-CN.md | 6 +-
build.gradle | 22 +-
.../eventmesh-runtime-quickstart-with-docker.md | 74 +++++++
.../instructions/eventmesh-runtime-quickstart.md | 236 ++-------------------
docs/en/instructions/quickstart.md | 21 --
eventmesh-connector-plugin/build.gradle | 1 +
eventmesh-runtime/conf/eventmesh.properties | 2 +-
.../spi/loader/JarExtensionClassLoader.java | 4 +-
gradle.properties | 2 +-
10 files changed, 117 insertions(+), 257 deletions(-)
diff --git a/README.md b/README.md
index fc63f2d..1b2d660 100644
--- a/README.md
+++ b/README.md
@@ -78,9 +78,9 @@ The protocol of eventmesh is easier and more convenient, you can read more [here
## Quick Start
-1. Build and deploy event-store(default RocketMQ), see [instruction](https://rocketmq.apache.org/docs/quick-start/).
-2. Build and deploy eventmesh-runtime, see instruction ['eventmesh-runtime quickstart'](docs/en/instructions/eventmesh-runtime-quickstart.md).
-3. Run eventmesh-sdk-java demo, see instruction ['eventmesh-sdk-java quickstart'](docs/en/instructions/eventmesh-sdk-java-quickstart.md).
+1. [event-store](https://rocketmq.apache.org/docs/quick-start/) (RocketMQ, ignore this step if use standalone).
+2. [runtime quickstart](docs/en/instructions/eventmesh-runtime-quickstart.md) or [runtime quickstart with docker](docs/en/instructions/eventmesh-runtime-quickstart-with-docker.md).
+3. [java examples ](docs/en/instructions/eventmesh-sdk-java-quickstart.md).
## Contributing
Contributions are always welcomed! Please see [CONTRIBUTING](CONTRIBUTING.md) for detailed guidelines.
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 4780fdc..bea441b 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -64,9 +64,9 @@ eventmesh的通信协议更加简洁方便,详细内容,阅读更多[这里]
| WIP |Support AsyncAPI|
## 快速开始
-1. 构建并部署event-store(RocketMQ), 请参见[说明](https://rocketmq.apache.org/docs/quick-start/)
-2. 构建并部署eventmesh-runtime,请参见说明['eventmesh-runtime quickstart.zh-CN'](docs/cn/instructions/eventmesh-runtime-quickstart.zh-CN.md)
-3. 运行eventmesh-sdk-java演示,请参见说明['eventmesh-sdk-java quickstart.zh-CN'](docs/cn/instructions/eventmesh-sdk-java-quickstart.zh-CN.md)
+1. [event-store](https://rocketmq.apache.org/docs/quick-start/) (RocketMQ, ignore this step if use standalone).
+2. [runtime quickstart](docs/en/instructions/eventmesh-runtime-quickstart.md) or [runtime quickstart with docker](docs/en/instructions/eventmesh-runtime-quickstart-with-docker.md).
+3. [java examples ](docs/en/instructions/eventmesh-sdk-java-quickstart.md).
## 贡献
永远欢迎参与共建, 请参阅[贡献](CONTRIBUTING.zh-CN.md)了解详细指南
diff --git a/build.gradle b/build.gradle
index a8950a3..ae7f428 100644
--- a/build.gradle
+++ b/build.gradle
@@ -177,10 +177,10 @@ subprojects {
jar {
manifest {
attributes("Specification-Version": project.version,
- "Specification-Vendor": "WeBank, Inc.",
+ "Specification-Vendor": "Apache",
"Specification-Title": project.name,
"Implementation-Version": project.version,
- "Implementation-Vendor": "WeBank, Inc.",
+ "Implementation-Vendor": "Apache",
"Implementation-Title": project.name,
"Build-Jdk": project.findProperty("jdk")
)
@@ -199,13 +199,13 @@ subprojects {
copy {
into('../dist/apps/')
from project.jar.getArchivePath()
- exclude 'eventmesh-common*.jar'
- exclude 'eventmesh-connector-api*.jar'
- exclude 'eventmesh-connector-plugin*.jar'
- exclude 'eventmesh-admin*.jar'
- exclude 'eventmesh-starter*.jar'
- exclude 'eventmesh-test*.jar'
- exclude 'eventmesh-sdk*.jar'
+// exclude 'eventmesh-common*.jar'
+// exclude 'eventmesh-connector-api*.jar'
+// exclude 'eventmesh-connector-plugin*.jar'
+// exclude 'eventmesh-admin*.jar'
+// exclude 'eventmesh-starter*.jar'
+// exclude 'eventmesh-test*.jar'
+// exclude 'eventmesh-sdk*.jar'
}
copy {
into '../dist/lib'
@@ -219,8 +219,8 @@ subprojects {
exclude '**/*log4j2.xml*'
exclude '**/spring-boot-devtools*.jar'
exclude '**/mumble-sdk-test*.jar'
- exclude '*connector-rocketmq*.jar'
- exclude 'eventmesh-runtime*.jar'
+ exclude 'eventmesh*.jar'
+// exclude 'eventmesh-runtime*.jar'
exclude 'commons-collections-3.2.2.jar'
}
diff --git a/docs/en/instructions/eventmesh-runtime-quickstart-with-docker.md b/docs/en/instructions/eventmesh-runtime-quickstart-with-docker.md
new file mode 100644
index 0000000..4dfed55
--- /dev/null
+++ b/docs/en/instructions/eventmesh-runtime-quickstart-with-docker.md
@@ -0,0 +1,74 @@
+# Quick start Instruction
+
+## 3 Run with Docker
+
+### 3.1 Pull
+
+execute `docker pull eventmesh/eventmesh-rocketmq:v1.2.0` , you will get EventMesh image like below
+
+![image-20210309155255510](../../images/docker/docker-image.png)
+
+### 3.2 Configuration
+
+> **prerequisite** : may be you need download the source code from git first and use the contents of these files(eventMesh.properties and rocketmq-client.properties) as a reference for the following actions.
+
+**3.2.1 Files to configure**
+
+Before run the container you should configure some files.
+
+**eventMesh.properties**
+
+| Configuration Key | Default Value | Remarks |
+| ---------------------- | ------------- | -------------------------- |
+| eventMesh.server.http.port | 10105 | EventMesh http server port |
+| eventMesh.server.tcp.port | 10000 | EventMesh tcp server port |
+
+**rocketmq-client.properties**
+
+| Configuration Key | Default Value | Remarks |
+| --------------------------------- | ----------------------------- | -------------------------------- |
+| eventMesh.server.rocketmq.namesrvAddr | 127.0.0.1:9876;127.0.0.1:9876 | RocketMQ namesrv default address |
+
+After pull the EventMesh image to your host machine, you can execute command below to configure **eventMesh.properties**
+and **rocketmq-client.properties**
+
+**3.2.2 Create Files**
+
+```shell
+mkdir -p /data/eventmesh/rocketmq/conf
+cd /data/eventmesh/rocketmq/conf
+vi eventMesh.properties
+vi rocketmq-client.properties
+```
+
+The contents of these files can reference
+from [eventMesh.properties](https://github.com/WeBankFinTech/EventMesh/blob/develop/eventmesh-runtime/conf/eventMesh.properties)
+and [rocketmq-client.properties](https://github.com/WeBankFinTech/EventMesh/blob/develop/eventmesh-runtime/conf/rocketmq-client.properties)
+
+### 3.3 Run
+
+**3.3.1 run**
+
+execute command below to run container
+
+```
+docker run -d -p 10000:10000 -p 10105:10105 -v /data/eventmesh/rocketmq/conf/eventMesh.properties:/data/app/eventmesh/conf/eventMesh.properties -v /data/eventmesh/rocketmq/conf/rocketmq-client.properties:/data/app/eventmesh/conf/rocketmq-client.properties docker.io/eventmesh/eventmesh-rocketmq:v1.2.0
+```
+
+> -p : binding the container port with host machine port
+>
+> -v : mount the container configuration files with host machine files
+
+**3.3.2 check container**
+
+execute `docker ps` to check the container health
+
+![image-docker-ps](../../images/docker/docker-ps.png)
+
+execute `docker logs [container id]` you will get following result:
+
+![image-docker-logs](../../images/docker/docker-logs.png)
+
+execute `docker exec -it [container id] /bin/bash` you will go into the container and see the details:
+
+![image-docker-exec](../../images/docker/docker-exec.png)
diff --git a/docs/en/instructions/eventmesh-runtime-quickstart.md b/docs/en/instructions/eventmesh-runtime-quickstart.md
index 4d38102..e3f7228 100644
--- a/docs/en/instructions/eventmesh-runtime-quickstart.md
+++ b/docs/en/instructions/eventmesh-runtime-quickstart.md
@@ -23,22 +23,25 @@ cd /*YOUR DEPLOY PATH*/EventMesh-master
gradle clean dist copyConnectorPlugin tar -x test
```
-You will get **EventMesh_1.2.0.tar.gz** in directory /* YOUR DEPLOY PATH */EventMesh-master/build
+You will get **EventMesh_1.3.0-SNAPSHOT.tar.gz** in directory /* YOUR DEPLOY PATH */EventMesh-master/build
### 1.4 Deployment
- deploy eventmesh-runtime
```shell
-upload Eventmesh_1.2.0.tar.gz
-tar -zxvf Eventmesh_1.2.0.tar.gz
+tar -zxvf Eventmesh_1.3.0-SNAPSHOT.tar.gz
cd conf
config your eventMesh.properties
cd ../bin
sh start.sh
+tail -f ./logs/eventmesh.out
+EventMeshTCPServer[port=10000] started
+...
+HTTPServer[port=10105] started
+...
```
-If you see "EventMeshTCPServer[port=10000] started....", you setup runtime successfully.
## 2 Run Locally
@@ -50,232 +53,35 @@ Same with 1.1, but it can be only compiled in JDK 1.8
Same with 1.2
-### 2.3 Run
+### 2.3 Configuration
-**2.3.1 Project structure:**
-
-![project-structure.png](../../images/project-structure.png)
-
-- eventmesh-common : eventmesh common classes and method module
-- eventmesh-connector-api : eventmesh connector api definition module
-- eventmesh-connector-plugin : eventmesh connector plugin instance module
-- eventmesh-runtime : eventmesh runtime module
-- eventmesh-sdk-java : eventmesh java client sdk
-- eventmesh-starter : eventmesh project local start entry
-- eventmesh-spi : eventmesh SPI load module
-
-> ps: The plugin module follows the eventmesh SPI specification, custom SPI interface need to be identified with the @EventMeshSPI annotation.
-> The plugin instance needs to be configured in corresponding module under /main/resources/meta-inf/eventmesh with the mapping file of
-> related interface and implementation class. The content of the file is a mapping of plugin instance name to plugin instance, you can find more
-> detail in eventmesh-connector-rocketmq module
-
-The plugin can be loaded from classpath and plugin directory. In local develop, you can declare the used plugins in build.gradle of eventmesh-starter module,
-or execute copyConnectorPlugin task of gradle to copy the plugin instance jar to dist/plugin directory. By default, eventmesh will load the plugins in project's
-dist/plugin, this can be changed by add -DeventMeshPluginDir=your_plugin_directory.
-The plugin instance need to be used at runtime can be configured in eventmesh.properties.
-If you need to use rokectmq plugin to start eventmesh-runtime, you need to declare the dependcy in build.gradle of eventmesh-starter module.
-```
- implementation project(":eventmesh-connector-plugin:eventmesh-connector-rocketmq")
-```
-
-
-**2.3.2 Configure plugin**
-
--Deventmesh.log.home=eventmesh-runtime/logs
+**2.3.1 Configure plugin**
Specify the connector plugin that will be loaded after the project start by declaring in `eventMesh.properties`
Modify the `eventMesh.properties` file in the `confPath` directory
-load **rocketmq connector** configuration:
-
```java
-#connector plugin
-eventMesh.connector.plugin.type=rocketmq
+#connector plugin, default standalone, can be rocketmq
+eventMesh.connector.plugin.type=standalone
```
-**2.3.3 Configure VM Options**
+**2.3.2 Configure VM Options**
```java
-Dlog4j.configurationFile=eventmesh-runtime/conf/log4j2.xml
-Deventmesh.log.home=eventmesh-runtime/logs
--Deventmesh.home=eventmesh-runtime
+-Deventmesh.home=eventmesh-runtime/dist
-DconfPath=eventmesh-runtime/conf
```
> ps: If you use Windows, you may need to replace the file separator to \
-**2.3.4 Run**
-
-running `org.apache.eventmesh.starter.StartUp` main method
-
-## 3 Run with Docker
-
-### 3.1 Pull
-
-execute `docker pull eventmesh/eventmesh-rocketmq:v1.2.0` , you will get EventMesh image like below
-
-![image-20210309155255510](../../images/docker/docker-image.png)
-
-### 3.2 Config
-
-> **prerequisite** : may be you need download the source code from git first and use the contents of these files(eventMesh.properties and rocketmq-client.properties) as a reference for the following actions.
-
-**3.2.1 Files to configure**
-
-Before run the container you should configure some files.
-
-**eventMesh.properties**
-
-| Configuration Key | Default Value | Remarks |
-| ---------------------- | ------------- | -------------------------- |
-| eventMesh.server.http.port | 10105 | EventMesh http server port |
-| eventMesh.server.tcp.port | 10000 | EventMesh tcp server port |
-
-**rocketmq-client.properties**
-
-| Configuration Key | Default Value | Remarks |
-| --------------------------------- | ----------------------------- | -------------------------------- |
-| eventMesh.server.rocketmq.namesrvAddr | 127.0.0.1:9876;127.0.0.1:9876 | RocketMQ namesrv default address |
-
-After pull the EventMesh image to your host machine, you can execute command below to configure **eventMesh.properties**
-and **rocketmq-client.properties**
-
-**3.2.2 Create Files**
-
-```shell
-mkdir -p /data/eventmesh/rocketmq/conf
-cd /data/eventmesh/rocketmq/conf
-vi eventMesh.properties
-vi rocketmq-client.properties
-```
-
-The contents of these files can reference
-from [eventMesh.properties](https://github.com/WeBankFinTech/EventMesh/blob/develop/eventmesh-runtime/conf/eventMesh.properties)
-and [rocketmq-client.properties](https://github.com/WeBankFinTech/EventMesh/blob/develop/eventmesh-runtime/conf/rocketmq-client.properties)
-
-### 3.3 Run
-
-**3.3.1 run**
-
-execute command below to run container
-
-```
-docker run -d -p 10000:10000 -p 10105:10105 -v /data/eventmesh/rocketmq/conf/eventMesh.properties:/data/app/eventmesh/conf/eventMesh.properties -v /data/eventmesh/rocketmq/conf/rocketmq-client.properties:/data/app/eventmesh/conf/rocketmq-client.properties docker.io/eventmesh/eventmesh-rocketmq:v1.2.0
-```
-
-> -p : binding the container port with host machine port
->
-> -v : mount the container configuration files with host machine files
-
-**3.3.2 check container**
-
-execute `docker ps` to check the container health
-
-![image-docker-ps](../../images/docker/docker-ps.png)
-
-execute `docker logs [container id]` you will get following result:
-
-![image-docker-logs](../../images/docker/docker-logs.png)
-
-execute `docker exec -it [container id] /bin/bash` you will go into the container and see the details:
-
-![image-docker-exec](../../images/docker/docker-exec.png)
-
-### 3.4 Test
-
-**Prerequisite** :RocketMQ Namesrv & Broker
-
-you can build the rocketmq image following [here](https://github.com/apache/rocketmq-docker) or get the rocketmq image
-from docker hub.
-
-```
-docker pull rocketmqinc/rocketmq-namesrv:4.5.0-alpine
-docker pull rocketmqinc/rocketmq-broker:4.5.0-alpine
-
-#namesrv
-docker run -d -p 9876:9876 -v `pwd` /data/namesrv/logs:/root/logs -v `pwd`/data/namesrv/store:/root/store --name rmqnamesrv rocketmqinc/rocketmq-namesrv:4.5.0-alpine sh mqnamesrv
-
-#broker
-docker run -d -p 10911:10911 -p 10909:10909 -v `pwd`/data/broker/logs:/root/logs -v `pwd`/data/broker/store:/root/store --name rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" rocketmqinc/rocketmq-broker:4.5.0-alpine sh mqbroker -c ../conf/broker.conf
-```
-
-When we get this point, **rocketmq-broker ip** is the **pod ip**, if you want to change the ip, you can mount the **
-broker.conf** file in container and modify **brokerIP1** configuration in this file to your custom values.
-
-**3.4.1 Run Demo**
-
-Windows
-
-- For demos running under the Windows , you can
- refer [here](https://github.com/WeBankFinTech/EventMesh/blob/develop/docs/en/instructions/eventmesh-sdk-java-quickstart.md)
-
-Linux
-
-- **Get eventmesh-test_1.2.0-SNAPSHOT.tar.gz**
-
- you can get this package from **our releases** or **build with source code**.
-
- **build with source code**:
-
- ```shell
- cd /* Your Deploy Path */EventMesh/eventmesh-test
- gradle clean testdist testtar -x test`
- ```
-
- you will get **eventmesh-test_1.2.0-SNAPSHOT.tar.gz** under the /eventmesh-test/build
-
-- **Modify configuration files**
-
- ```shell
- upload eventmesh-test_1.2.0-SNAPSHOT.tar.gz
- tar -zxvf eventmesh-test_1.2.0-SNAPSHOT.tar.gz
- cd conf
- config your application.properties
- ```
-
-- **Run demo**
-
- TCP Sub
-
- ```shell
- cd bin
- sh tcp_sub.sh
- ```
-
- TCP Pub
-
- ```shell
- cd bin
- sh tcp_pub.sh
- ```
-
- TCP Sub Broadcast
-
- ```shell
- cd bin
- sh tcp_sub_broadcast.sh
- ```
-
- TCP Pub Broadcast
-
- ```shell
- cd bin
- sh tcp_pub_broadcast.sh
- ```
-
- HTTP Sub
-
- ```shell
- cd bin
- sh http_sub.sh
- ```
-
- HTTP Pub
-
- ```shell
- cd bin
- sh http_pub.sh
- ```
-
- After this , you can see result of different mode in logs file under `/logs` directory
+**2.3.3 Run**
+```java
+running `org.apache.eventmesh.starter.StartUp` main method in eventmesh-starter module.
+EventMeshTCPServer[port=10000] started
+...
+HTTPServer[port=10105] started
+...
+```
\ No newline at end of file
diff --git a/docs/en/instructions/quickstart.md b/docs/en/instructions/quickstart.md
deleted file mode 100644
index 697dd7c..0000000
--- a/docs/en/instructions/quickstart.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Quick start Instruction
-
-### dependencies
-
-```
-64bit OS, Linux/Unix is recommended;
-64bit JDK 1.8+;
-Gradle at least 5.6, eg 5.6.*
-```
-
-### Deploy eventmesh-store
-
-Read more [here](eventmesh-store-quickstart.md)
-
-### Deploy eventmesh-runtime
-
-Read more [here](eventmesh-runtime-quickstart.md)
-
-### Run eventmesh sdk demo
-
-Read more [here](eventmesh-sdk-java-quickstart.md)
\ No newline at end of file
diff --git a/eventmesh-connector-plugin/build.gradle b/eventmesh-connector-plugin/build.gradle
index be1a227..3c4555b 100644
--- a/eventmesh-connector-plugin/build.gradle
+++ b/eventmesh-connector-plugin/build.gradle
@@ -31,6 +31,7 @@ task copyConnectorPlugin(dependsOn: ['jar']) {
}
copy {
into '../dist/plugin/connector'
+ from "../eventmesh-connector-plugin/dist/apps/eventmesh-connector-standalone-${version}.jar"
from "../eventmesh-connector-plugin/dist/apps/eventmesh-connector-rocketmq-${version}.jar"
}
}
diff --git a/eventmesh-runtime/conf/eventmesh.properties b/eventmesh-runtime/conf/eventmesh.properties
index b2f18b7..30cdf4d 100644
--- a/eventmesh-runtime/conf/eventmesh.properties
+++ b/eventmesh-runtime/conf/eventmesh.properties
@@ -68,8 +68,8 @@ eventMesh.server.security.enabled=false
eventMesh.security.plugin.type=security
#registry plugin
-eventMesh.registry.plugin.type=namesrv
eventMesh.server.registry.enabled=false
+eventMesh.registry.plugin.type=namesrv
#prometheusPort
eventMesh.metrics.prometheus.port=19090
\ No newline at end of file
diff --git a/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java b/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java
index 7d591a8..dde9fb9 100644
--- a/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java
+++ b/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java
@@ -37,7 +37,7 @@ import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
/**
- * Load extension from '${eventMeshPluginDir}', the default loading directory is './dist/plugin'
+ * Load extension from '${eventMeshPluginDir}', the default loading directory is './plugin'
*/
public class JarExtensionClassLoader implements ExtensionClassLoader {
@@ -47,7 +47,7 @@ public class JarExtensionClassLoader implements ExtensionClassLoader {
new ConcurrentHashMap<>(16);
private static final String EVENTMESH_EXTENSION_PLUGIN_DIR = System.getProperty("eventMeshPluginDir",
- "./dist/plugin");
+ "./plugin");
private static final String EVENTMESH_EXTENSION_META_DIR = "META-INF/eventmesh/";
diff --git a/gradle.properties b/gradle.properties
index 709fead..73dc286 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,7 +18,7 @@
jdk=1.8
snapshot=false
group=org.apache.eventmesh
-version=1.2.0-SNAPSHOT
+version=1.3.0-SNAPSHOT
#last eight bits of public key
signing.keyId=
#passphrase for key pairs
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org