-
Notifications
You must be signed in to change notification settings - Fork 555
How to test workflow engine changes manually
If you implement an enhancement for the workflow engine or fix a bug then it is recommended to test the changes manually.
This guide shows you how to build the Zeebe distribution and how to test the changes locally by using either Operate/Tasklist or Zeebe-Play.
- Build Zeebe
- Run the following Maven command in the project root directory
mvn clean install -DskipTests -DskipChecks
- Build a Docker image
- Run the following Docker build command in the project root directory
- Use a custom image tag to identify the image (e.g.
8.1.0-issue-9185
)
docker build --build-arg DISTBALL='dist/target/camunda-zeebe*.tar.gz' -t camunda/zeebe:8.1.0-issue-9185 --target app .
- Check out the camunda-platform project
- Change the version of the Zeebe image to the custom image tag that was used for the Docker image
- Change the Zeebe docker image version in the
docker-compose
file manually (e.g.camunda/zeebe:8.1.0-issue-9185
)
- Change the Zeebe docker image version in the
- Start Docker containers
- Run the following
docker-compose
command in the project root directory - (Optionally) Enable the profile kibana
--profile kibana
to include Kibana for inspecting Elasticsearch.
- Run the following
- If you are using Colima on Mac then it is better to start Colima with
colima start --memory 8
to give it enough resource (particularly if running with --profile kibana)
docker-compose -f docker-compose-core.yaml up -d
- Open the Operate Web-App http://localhost:8081/
- Login with
demo/demo
- Login with
- Open the Tasklist Web-App http://localhost:8082
- Login with
demo/demo
- Login with
- Download the lastest Hazelcast exporter from GitHub (e.g. zeebe-hazelcast-exporter-1.2.1-jar-with-dependencies.jar)
- Extract the Zeebe distribution form
zeebe/dist/target/
(e.g.camunda-zeebe-8.1.0-SNAPSHOT.tar.gz
) - Run the following command in the folder of the extracted distribution
- Change the value of the environment variable
ZEEBE_BROKER_EXPORTERS_HAZELCAST_JARPATH
to the path of the exporter
- Change the value of the environment variable
export ZEEBE_BROKER_EXPORTERS_HAZELCAST_CLASSNAME=io.zeebe.hazelcast.exporter.HazelcastExporter
export ZEEBE_BROKER_EXPORTERS_HAZELCAST_JARPATH=/home/philipp/zeebe/exporters/zeebe-hazelcast-exporter-1.2.1-jar-with-dependencies.jar
export ZEEBE_CLOCK_CONTROLLED=true
./bin/broker
- Run the Java class
io.camunda.zeebe.broker.StandaloneBroker
in the Zeebe moduledist
- Configure the Hazelcast exporter, for example, by setting the following environment variables (in IntelliJ IDEA
Run/Debug Configurations > Build and run > Modify options > Environment variables
) - Change the value of the environment variable
ZEEBE_BROKER_EXPORTERS_HAZELCAST_JARPATH
to the path of the exporter
- Configure the Hazelcast exporter, for example, by setting the following environment variables (in IntelliJ IDEA
ZEEBE_BROKER_EXPORTERS_HAZELCAST_JARPATH=/home/philipp/zeebe/exporters/zeebe-hazelcast-exporter-1.2.1-jar-with-dependencies.jar;ZEEBE_BROKER_EXPORTERS_HAZELCAST_CLASSNAME=io.zeebe.hazelcast.exporter.HazelcastExporter;ZEEBE_CLOCK_CONTROLLED=true
For Linux systems and using the distribution, run the following Docker command:
docker run --network="host" -e ZEEBE_ENGINE=remote ghcr.io/camunda-community-hub/zeebe-play:latest
For other systems or using StandaloneBroker
, run the following Docker command:
- Change the value of
<MY_BROKER_IP>
to the IP of your broker - The IP is printed in the logs when the broker starts the Hazelcast exporter
docker run -p 8080:8080 \
-e ZEEBE_ENGINE=remote \
-e ZEEBE_CLIENT_BROKER_GATEWAYADDRESS=<MY_BROKER_IP>:26500 \
-e ZEEBE_CLOCK_ENDPOINT=<MY_BROKER_IP>:9600/actuator/clock \
-e ZEEBE_CLIENT_WORKER_HAZELCAST_CONNECTION=<MY_BROKER_IP>:5701 \
ghcr.io/camunda-community-hub/zeebe-play:latest
Open Zeebe-Play http://localhost:8080/
Zeebe has an official exporter for Elasticsearch (ES). It exports data to ES based on the exporter configuration. The inspection of this data in ES can be useful for manual testing of new or updated ES index templates. The inspection is based on Kibana.
- Follow the guide to Build Zeebe
- Follow the guide to Test with the Camuda Platform
- Enable the profile kibana
docker-compose --profile kibana -f docker-compose-core.yaml up -d
- Open the Kibana Web-App http://localhost:5601
- In Kibana, configure the Data Views (formally index patterns)
- Go to
Management > Stack Management > Kibana > Data Views
- Create a new Data View for
zeebe-record-*
- If you don't see any indexes then make sure to export some data first (e.g. deploy a process). The indexes of the records are created when the first record of this type is exported.
- Go to
- In Kibana, inspect the data
- Go to
Analytics > Discover
- Select the Data View
- Now, you should see some data
- If you don't see any data then you should check the time selector
- Check also the filter to limit the data
- Go to
It can happen that the default version of Operate/Tasklist is incompatible with your local build Zeebe version.
How to detect? Check the Operate/Tasklist logs (e.g. docker logs operate
), for Import is not possible for Zeebe version
2022-07-04 14:58:34.496 ERROR 7 --- [import_2] i.c.o.z.ImportJob : Import is not possible for Zeebe version: 8.1
How to solve? Switch the docker image to a newer Operate release/Tasklist release; or switch to their SNAPSHOT
images:
camunda/operate:SNAPSHOT
camunda/tasklist:SNAPSHOT