Skip to main content
Version: v1.7.0

EventMesh Runtime (Docker)

The documentation introduces the steps to install the latest release of EventMesh Runtime with Docker and connect to Apache RocketMQ. It's recommended to use a Linux-based system with Docker Engine. Please follow the Docker tutorial to get familiar with the basic concepts (registry, volume, etc.) and commands of Docker.

Dependencies

64-bit OS,we recommend Linux/Unix;
64-bit JDK 1.8+;
Gradle 7.0+, we recommend 7.0.*
4g+ available disk to deploy eventmesh-store
If you choose standalone mode, you could skip this file and go to the next step: Start Eventmesh-Runtime; if not, you could choose RocketMQ as the store layer.

Pull EventMesh Image

Download the pre-built image of eventmesh from Docker Hub with docker pull:

$ sudo docker pull eventmesh/eventmesh:v1.4.0

To verify that the eventmesh/eventmesh image is successfully installed, list the downloaded images with docker images:

$ sudo docker images
eventmesh/eventmesh v1.4.0 6e2964599c78 2 weeks ago 937MB

Edit Configuration

Edit the eventmesh.properties to change the configuration (e.g. TCP port, client blacklist) of EventMesh Runtime. To integrate RocketMQ as a connector, these two configuration files should be created: eventmesh.properties and rocketmq-client.properties.

sudo mkdir -p /data/eventmesh/rocketmq/conf
cd /data/eventmesh/rocketmq/conf
sudo touch eventmesh.properties
sudo touch rocketmq-client.properties

eventmesh.properties

The eventmesh.properties file contains the properties of EventMesh runtime environment and integrated plugins. Please refer to the default configuration file for the available configuration keys.

sudo vim eventmesh.properties
Configuration KeyDefault ValueDescription
eventMesh.server.http.port10105EventMesh HTTP server port
eventMesh.server.tcp.port10000EventMesh TCP server port
eventMesh.server.grpc.port10205EventMesh gRPC server port

rocketmq-client.properties

The rocketmq-client.properties file contains the properties of the Apache RocketMQ nameserver.

sudo vim rocketmq-client.properties

Please refer to the default configuration file and change the value of eventMesh.server.rocketmq.namesrvAddr to the nameserver address of RocketMQ.

Configuration KeyDefault ValueDescription
eventMesh.server.rocketmq.namesrvAddr127.0.0.1:9876;127.0.0.1:9876The address of RocketMQ nameserver

Run and Manage EventMesh Container

Run an EventMesh container from the eventmesh/eventmesh image with the docker run command. The -p option of the command binds the container port with the host machine port. The -v option of the command mounts the configuration files from files in the host machine.

sudo 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 \
eventmesh/eventmesh:v1.4.0

The docker ps command lists the details (id, name, status, etc.) of the running containers. The container id is the unique identifier of the container.

$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<container_id> eventmesh/eventmesh:v1.4.0 "/bin/sh -c 'sh star…" About a minute ago Up About a minute 0.0.0.0:10000->10000/tcp, :::10000->10000/tcp, 0.0.0.0:10105->10105/tcp, :::10105->10105/tcp <container_name>

To connect to the EventMesh container:

sudo docker exec -it [container id or name] /bin/bash

To read the log of the EventMesh container:

tail -f ../logs/eventmesh.out

To stop or remove the container:

sudo docker stop [container id or name]

sudo docker rm -f [container id or name]