A set of tools that can run series of benchmarks on a Kubernetes cluster based on configuration parameters from a spreadsheet. If you don't have a Kubernetes cluster yet, have a look at Camunda 8 Kubernetes Installation.
- Clone the following GitHub projects into the same parrent folder:
- https://github.com/camunda-consulting/zeebe-tuner (this project)
- https://github.com/camunda-community-hub/camunda-8-helm-profiles (dependencies)
- Create a copy of the Zeebe Benchmark Result Template. This is were you will plan your test runs. (see also: Camunda Blog: Zeebe Performance Tuning tool)
- Enter the id of your spreadsheet in application.yml as
google.sheetIdand ensure thatgoogle.inputsmatches your sheet's parameter range. - Enter your Google username in application.yml as
google.oauth.username. This will be the user whom's data are accessed, e.g. the spreadsheet above. - Create a Google Cloud project.
- Create OAuth client credentials for a desktop application, refer to Create credentials.
- Enter the app credentials in application.yml as
google.oauth.clientidandgoogle.oauth.clientsecret. - Start the Spring Boot application for the first time using your IDE or
./gradlew bootRunand it will print an authentication link in the console that you have to open in your browser. - After that you will get an error message in the console containing another link to enable the Google Sheets API for your project.
Please open the following address in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=000000000000-your-client-id-will-appear-here.apps.googleusercontent.com&redirect_uri=http://localhost:8888/Callback&response_type=code&scope=https://www.googleapis.com/auth/spreadsheets
- Click on the link and allow Zeebe Tuner to read your spreadsheet.
- Enter the configuration parameters for the benchmarks you want to schedule in your copy of the Zeebe Benchmark Result Template.
- Start the Spring Boot application using your IDE or
./gradlew bootRun. For each row in the spreadsheet it will create a folder and generate Helm chart values, Kubernetes manifests and a Makefile to run the benchmark inrunner/testruns. - The Spring Boot application will automatically stop once all test runs have been generated.
- Go to
runner/testrunsand delete older test runs that you already executed in earlier runs. Currently, the tool will export all rows regardless of whether they have results or not (see #3). - Ensure
kubectlis setup to connect to your Kubernetes cluster that should have Prometheus and Grafana set up already. - Open a terminal in
runnerand run./run-all-tests.shto kick off the iteration through your scheduled benchmarks. (see./run-all-tests.sh -hfor available parameters, e.g. where to move finished testruns and create CSV file. Default isrunner/testruns-done) - Import the generated CSV file into Google Sheets and copy the first two collums with Grafana link and Timestamp into your result spreadsheet.
- Use Grafana to measure performance and enter the readings into the spreadsheet.
If you get the following error when starting the application:
com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request
POST https://oauth2.googleapis.com/token
{
"error": "invalid_grant",
"error_description": "Bad Request"
}
delete the file credStore/StoredCredential
and follow steps 7 to 9 of the initial setup described above.
- Check log output of
job.batch/zbctl-deployfor deployment failures using:There could be messages indicating BPMN parsing issues or duplicate process idscd runner/current/run make logs-job-deploy-models - Check log output of
benchmarkpod for startup failures using:cd runner/current/run make logs-benchmark - Check Grafana > gRPC >
Total gRPC reqestsfor anyCreateProcessInstance (NOT_FOUND).This could indicate that the process id configured in the spreadsheet does not match the one in the deployed BPMN file.cd runner/current/run make open-grafana
- Check Grafana > Throughput >
Job Completion Per Secondand compare it with the rate ofProcess instance completion per secondmultiplied with the number of jobs your are expecting to execute. If too few jobs are executed you may have:- Payload variables that
- Make Gateways routing the wrong way
- Cause incidents (can be detected by checking the
metrics
zeebe_incident_events_totalandzeebe_pending_incidents_total, which are not (yet) exposed by the Zeebe Grafana Dashboard)
- Payload variables that