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.sheetId
and ensure thatgoogle.inputs
matches 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.clientid
andgoogle.oauth.clientsecret
. - Start the Spring Boot application for the first time using your IDE or
./gradlew bootRun
and 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/testruns
and 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
kubectl
is setup to connect to your Kubernetes cluster that should have Prometheus and Grafana set up already. - Open a terminal in
runner
and run./run-all-tests.sh
to kick off the iteration through your scheduled benchmarks. (see./run-all-tests.sh -h
for 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.