Skip to content
Snippets Groups Projects
Commit 5321cfd2 authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

merged theodolit-kotlin

parents 08e610ab f136cc65
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!108Feature/185 Make Paths Configurable,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
Showing
with 1416 additions and 28 deletions
......@@ -33,3 +33,6 @@ tmp/
# Python cache files
*.pyc
# Helm
Chart.lock
......@@ -15,6 +15,17 @@ stages:
variables:
DOCKER_TLS_CERTDIR: "/certs"
# Theodolite Helm Chart
lint-helm:
stage: check
image:
name: alpine/helm:3.5.2
entrypoint: [""]
tags:
- exec-docker
script: helm lint execution/helm/
# Theodolite Benchmarks
......@@ -38,6 +49,7 @@ build-benchmarks:
artifacts:
paths:
- "theodolite-benchmarks/build/libs/*.jar"
- "theodolite-benchmarks/*/build/libs/*.jar"
- "theodolite-benchmarks/*/build/distributions/*.tar"
expire_in: 1 day
......@@ -116,61 +128,86 @@ spotbugs-benchmarks:
- changes:
- theodolite-benchmarks/*
- theodolite-benchmarks/$JAVA_PROJECT_NAME/**/*
- theodolite-benchmarks/application-kafkastreams-commons/**/*
- theodolite-benchmarks/workload-generator-commons/**/*
- theodolite-benchmarks/kstreams-commons/**/*
- theodolite-benchmarks/flink-commons/**/*
- theodolite-benchmarks/load-generator-commons/**/*
if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME"
when: always
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME"
when: manual
allow_failure: true
deploy-uc1-kstreams-app:
deploy-uc1-kstreams:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc1-kstreams-app"
JAVA_PROJECT_NAME: "uc1-application"
JAVA_PROJECT_NAME: "uc1-kstreams"
deploy-uc2-kstreams-app:
deploy-uc2-kstreams:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-kstreams-app"
JAVA_PROJECT_NAME: "uc2-application"
JAVA_PROJECT_NAME: "uc2-kstreams"
deploy-uc3-kstreams-app:
deploy-uc3-kstreams:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-kstreams-app"
JAVA_PROJECT_NAME: "uc3-application"
JAVA_PROJECT_NAME: "uc3-kstreams"
deploy-uc4-kstreams-app:
deploy-uc4-kstreams:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-kstreams-app"
JAVA_PROJECT_NAME: "uc4-application"
JAVA_PROJECT_NAME: "uc4-kstreams"
deploy-uc1-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc1-flink"
JAVA_PROJECT_NAME: "uc1-flink"
deploy-uc2-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-flink"
JAVA_PROJECT_NAME: "uc2-flink"
deploy-uc3-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-flink"
JAVA_PROJECT_NAME: "uc3-flink"
deploy-uc4-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-flink"
JAVA_PROJECT_NAME: "uc4-flink"
deploy-uc1-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc1-workload-generator"
JAVA_PROJECT_NAME: "uc1-workload-generator"
JAVA_PROJECT_NAME: "uc1-load-generator"
deploy-uc2-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-workload-generator"
JAVA_PROJECT_NAME: "uc2-workload-generator"
JAVA_PROJECT_NAME: "uc2-load-generator"
deploy-uc3-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-workload-generator"
JAVA_PROJECT_NAME: "uc3-workload-generator"
JAVA_PROJECT_NAME: "uc3-load-generator"
deploy-uc4-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-workload-generator"
JAVA_PROJECT_NAME: "uc4-workload-generator"
JAVA_PROJECT_NAME: "uc4-load-generator"
# Theodolite Framework
......
......@@ -10,7 +10,7 @@ authors:
given-names: Wilhelm
orcid: "https://orcid.org/0000-0001-6625-4335"
title: Theodolite
version: "0.3.0"
version: "0.4.0"
repository-code: "https://github.com/cau-se/theodolite"
license: "Apache-2.0"
doi: "10.1016/j.bdr.2021.100209"
......@@ -6,7 +6,7 @@ Theodolite is a framework for benchmarking the horizontal and vertical scalabili
## Theodolite Benchmarks
Theodolite contains 4 application benchmarks, which are based on typical use cases for stream processing within microservices. For each benchmark, a corresponding workload generator is provided. Currently, this repository provides benchmark implementations for Apache Kafka Streams. Benchmark implementation for Apache Flink are currently under development and can be found in the *apache-flink* branch of this repository. The benchmark sources can be found in [Thedolite benchmarks](benchmarks).
Theodolite contains 4 application benchmarks, which are based on typical use cases for stream processing within microservices. For each benchmark, a corresponding workload generator is provided. Currently, this repository provides benchmark implementations for Apache Kafka Streams and Apache Flink. The benchmark sources can be found in [Thedolite benchmarks](benchmarks).
## Theodolite Execution Framework
......
......@@ -5,10 +5,10 @@
"codeRepository": "https://github.com/cau-se/theodolite",
"dateCreated": "2020-03-13",
"datePublished": "2020-07-27",
"dateModified": "2021-02-11",
"dateModified": "2021-03-18",
"downloadUrl": "https://github.com/cau-se/theodolite/releases",
"name": "Theodolite",
"version": "0.3.0",
"version": "0.4.0",
"description": "Theodolite is a framework for benchmarking the horizontal and vertical scalability of stream processing engines.",
"developmentStatus": "active",
"referencePublication": "https://doi.org/10.1016/j.bdr.2021.100209",
......
apiVersion: v1
entries:
theodolite:
- apiVersion: v2
appVersion: 0.4.0
created: "2021-03-18T15:50:50.930902088+01:00"
dependencies:
- condition: grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.0.0
- condition: kube-prometheus-stack.enabled
name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 12.0.0
- condition: cp-helm-charts.enabled
name: cp-helm-charts
repository: https://soerenhenning.github.io/cp-helm-charts
version: 0.6.0
- condition: kafka-lag-exporter.enabled
name: kafka-lag-exporter
repository: https://lightbend.github.io/kafka-lag-exporter/repo/
version: 0.6.6
description: Theodolite is a framework for benchmarking the scalability stream
processing engines.
digest: 45975b61b79547b152241cfc6dcf5e640090ff2c08ff9120275c77c9d9054155
home: https://cau-se.github.io/theodolite
maintainers:
- email: soeren.henning@email.uni-kiel.de
name: Sören Henning
url: https://www.se.informatik.uni-kiel.de/en/team/soeren-henning-m-sc
name: theodolite
sources:
- https://github.com/cau-se/theodolite
type: application
urls:
- https://github.com/cau-se/theodolite/releases/download/v0.4.0/theodolite-0.4.0.tgz
version: 0.4.0
generated: "2021-03-18T15:50:50.897801281+01:00"
......@@ -11,20 +11,42 @@ This document describes how to perform a new Theodolite release.
We assume that we are creating the release `v0.3.1`. Please make sure to adjust
the following steps according to the release, you are actually performing.
1. Update `codemeta.json` to match the new version. In particular, make sure that `version` points to the version you are releasing and `dateModified` points to the date you are relasing this version. [CodeMeata generator](https://codemeta.github.io/codemeta-generator/) may help you in updating the file.
1. Create a new branch `v0.3` if it does not already exist. This branch will never
again be merged into master.
2. Update `CITATION.cff` to match the new version. At least update the `version` field.
2. Checkout the `v0.3` branch.
3. Create a new branch `v0.3` if it does not already exists. This branch will never
again be merged into master.
3. Update all references to artifacts which are versioned. This includes:
1. Update all references to Theodolite Docker images to tag `v0.3.1`. These are the Kubernetes resource definitions in
`execution`, the references to *latest* in `run_uc.py`, the Docker Compose files in `theodolite-benchmarks/docker-test` and the example `theodolite.yaml` job.
2. Update both, the `version` and the `appVersion` fields, in the Helm `Charts.yaml` file to `0.3.1`.
3. Update `codemeta.json` to match the new version. In particular, make sure that `version` points to the version you are releasing and `dateModified` points to the date you are relasing this version. [CodeMeata generator](https://codemeta.github.io/codemeta-generator/) may help you in updating the file.
4. Update `CITATION.cff` to match the new version. At least update the `version` field.
4. Create a Helm package by running `./build-package.sh` from the chart directory.
5. Update the Helm repository index of located at `/docs` by running `./update-index.sh v0.3.1`.
6. Commit these changes to the `v0.3` branch.
7. Tag this commit `v0.3.1` (can be done via GitLab). The corresponding Docker images will be uploaded.
8. Create *releases* on GitLab and GitHub. Upload the generated Helm package to these releases.
9. Switch to the `master` branch.
10. Re-run `./update-index.sh v0.3.1` to include the latest release in the *upstream* Helm repository. You can now delete the packaged Helm chart.
4. Checkout the `v0.3` branch.
11. If this release increments Theodolite's *latest* version number,
5. Update all references to Theodolite Docker images to tag `v0.3.1`. These are the Kubernetes resource definitions in
`execution`, the references to *latest* in `run_uc.py`, the Docker Compose files in `docker-test` and the example `theodolite.yaml` job.
1. Update the Helm `Charts.yaml` file to `0.4.0-SNAPSHOT` (see Step 3).
6. Commit these changes.
2. Update the `codemeta.json` file according to Step 3.
7. Tag this commit with `v0.3.1`. The corresponding Docker images will be uploaded.
3. Update the `CITATION.cff` file according to Step 3.
8. Create *releases* for this tag in both, GitLab and GitHub.
12. Commit these changes to the `master` branch.
......@@ -6,6 +6,8 @@ in realistic execution environments, some third-party components are [required](
After everything is installed and configured, you can move on the [execution of
benchmarks](#execution).
*Note: The currently released version of Theodolite only allows running Kafka Streams benchmarks. With the upcoming release `0.5`, we plan to support arbitrary stream processing engines, in particular, our already available implementations for Apache Flink. To already run them now, please contact us.*
## Installation
For executing benchmarks, access to a Kubernetes cluster is required. If you already run other applications inside your
......
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v2
name: theodolite
description: Theodolite is a framework for benchmarking the scalability stream processing engines.
home: https://cau-se.github.io/theodolite
sources:
- https://github.com/cau-se/theodolite
maintainers:
- name: Sören Henning
email: soeren.henning@email.uni-kiel.de
url: https://www.se.informatik.uni-kiel.de/en/team/soeren-henning-m-sc
type: application
dependencies:
- name: grafana
version: 6.0.0
repository: https://grafana.github.io/helm-charts
condition: grafana.enabled
- name: kube-prometheus-stack
version: 12.0.0
repository: https://prometheus-community.github.io/helm-charts
condition: kube-prometheus-stack.enabled
- name: cp-helm-charts
version: 0.6.0
repository: https://soerenhenning.github.io/cp-helm-charts
condition: cp-helm-charts.enabled
- name: kafka-lag-exporter
version: 0.6.6
repository: https://lightbend.github.io/kafka-lag-exporter/repo/
condition: kafka-lag-exporter.enabled
version: 0.5.0-SNAPSHOT
appVersion: 0.5.0-SNAPSHOT
# Theodolite Helm Chart
## Installation
Install the chart via:
```sh
helm dependencies update .
helm install my-confluent .
```
**Please note: Theodolite currently uses hard-coded URLs, to connect to Kafka and Zookeeper. For that reason, the name of this chart must be `my-confluent`.** We will change this behavior soon.
This chart installs requirements to execute benchmarks with Theodolite.
Dependencies and subcharts:
- Prometheus Operator
- Prometheus
- Grafana (incl. dashboard and data source configuration)
- Kafka
- Zookeeper
- A Kafka client pod
## Test
Test the installation:
```sh
helm test <release-name>
```
Our test files are located [here](templates/../../theodolite-chart/templates/tests). Many subcharts have their own tests, these are also executed and are placed in the respective /templates folders.
Please note: If a test fails, Helm will stop testing.
It is possible that the tests are not running successfully at the moment. This is because the Helm tests of the subchart cp-confluent receive a timeout exception. There is an [issue](https://github.com/confluentinc/cp-helm-charts/issues/318) for this problem on GitHub.
## Configuration
In development environments Kubernetes resources are often low. To reduce resource consumption, we provide an `one-broker-value.yaml` file. This file can be used with:
```sh
helm install theodolite . -f preconfigs/one-broker-values.yaml
```
## Development
**Hints**:
- Grafana configuration: Grafana ConfigMaps contains expressions like {{ topic }}. Helm uses the same syntax for template function. More information [here](https://github.com/helm/helm/issues/2798)
- Escape braces: {{ "{{" topic }}
- Let Helm render the template as raw string: {{ `{{ <config>}}` }}
\ No newline at end of file
#!/usr/bin/env sh
helm package . --dependency-update && rm -r charts # We don't want to include dependencies in our index
cp-helm-charts:
## ------------------------------------------------------
## Zookeeper
## ------------------------------------------------------
cp-zookeeper:
servers: 1 # default: 3
## ------------------------------------------------------
## Kafka
## ------------------------------------------------------
cp-kafka:
brokers: 1 # deauflt: 10
configurationOverrides:
offsets.topic.replication.factor: "1"
\ No newline at end of file
Welcome to Theodolite!
Visit https://cau-se.github.io/theodolite for getting started and more information.
{{/*
Expand the name of the chart.
*/}}
{{- define "theodolite.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "theodolite.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "theodolite.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "theodolite.labels" -}}
helm.sh/chart: {{ include "theodolite.chart" . }}
{{ include "theodolite.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "theodolite.selectorLabels" -}}
app.kubernetes.io/name: {{ include "theodolite.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "theodolite.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "theodolite.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{- if .Values.prometheus.clusterRoleBinding.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: {{ .Release.Namespace }}
{{- end}}
\ No newline at end of file
{{- if .Values.prometheus.clusterRole.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
rules:
- apiGroups: [""]
resources:
- nodes
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
{{- end }}
\ No newline at end of file
This diff is collapsed.
{{- if .Values.kafkaClient.enabled -}}
apiVersion: v1
kind: Pod
metadata:
# name: {{ template "theodolite.fullname" . }}-kafka-client
name: kafka-client
spec:
containers:
- name: kafka-client
image: confluentinc/cp-enterprise-kafka:5.4.0
command:
- sh
- -c
- "exec tail -f /dev/null"
{{- with .Values.kafkaClient.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
\ No newline at end of file
{{- if .Values.grafana.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus
labels:
grafana_datasource: "1"
data:
datasource.yaml: |-
# config file version
apiVersion: 1
datasources:
# <string, required> name of the datasource. Required
- name: Prometheus
# <string, required> datasource type. Required
type: prometheus
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
access: proxy
# <bool> mark as default datasource. Max one per org
isDefault: true
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
url: http://prometheus-operated:9090 #http://localhost:9090
# <map> fields that will be converted to json and stored in json_data
jsonData:
timeInterval: "15s"
version: 1
# <bool> allow users to edit datasources from the UI.
editable: true
{{- end }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment