Skip to content
Snippets Groups Projects
Commit 7a56556c authored by Marcel Samir Becker's avatar Marcel Samir Becker
Browse files

Merge branch 'master' into issue-259

parents 33524079 584f5617
No related branches found
No related tags found
1 merge request!215Redesign Strategy, Load, and Resources data types
Showing
with 362 additions and 25 deletions
workflow: workflow:
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"' - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_PROTECTED != "true"'
when: never when: never
- when: always - when: always
...@@ -10,6 +10,7 @@ stages: ...@@ -10,6 +10,7 @@ stages:
- test - test
- check - check
- deploy - deploy
- smoketest
default: default:
tags: tags:
...@@ -20,9 +21,9 @@ default: ...@@ -20,9 +21,9 @@ default:
- exec-dind - exec-dind
# see https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled # see https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
# for image usage and settings for building with TLS and docker in docker # for image usage and settings for building with TLS and docker in docker
image: docker:19.03.1 image: docker:20.10.12
services: services:
- docker:19.03.1-dind - docker:20.10.12-dind
variables: variables:
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: "/certs"
...@@ -45,6 +46,10 @@ default: ...@@ -45,6 +46,10 @@ default:
fi fi
- "[ $DOCKERFILE ] && KANIKO_DOCKERFILE=\"--dockerfile $DOCKERFILE\"" - "[ $DOCKERFILE ] && KANIKO_DOCKERFILE=\"--dockerfile $DOCKERFILE\""
- /kaniko/executor --context `pwd`/$CONTEXT $KANIKO_DOCKERFILE $KANIKO_D - /kaniko/executor --context `pwd`/$CONTEXT $KANIKO_DOCKERFILE $KANIKO_D
- echo "PUBLISHED_IMAGE_TAG=${CI_COMMIT_TAG-$CI_COMMIT_SHORT_SHA}" >> build.env
artifacts:
reports:
dotenv: build.env
# Theodolite Docs # Theodolite Docs
...@@ -373,6 +378,173 @@ deploy-uc4-load-generator: ...@@ -373,6 +378,173 @@ deploy-uc4-load-generator:
JAVA_PROJECT_NAME: "uc4-load-generator" JAVA_PROJECT_NAME: "uc4-load-generator"
JAVA_PROJECT_DEPS: "load-generator-commons" JAVA_PROJECT_DEPS: "load-generator-commons"
deploy-http-bridge:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-http-bridge"
JAVA_PROJECT_NAME: "http-bridge"
JAVA_PROJECT_DEPS: "load-generator-commons"
.smoketest-benchmarks:
stage: smoketest
extends:
- .dind
image: ghcr.io/cau-se/theodolite-build-docker-compose-jq:20.10.12
before_script:
- cd theodolite-benchmarks/docker-test
# variables:
# TEST_LOG_FILE: "test.log"
script:
- export THEODOLITE_TAG=$PUBLISHED_IMAGE_TAG
- ./smoketest-runner.sh ./$DOCKER_COMPOSE_DIR
# - cat test.log
after_script:
- cd ./$DOCKER_COMPOSE_DIR
- docker-compose down
rules:
- changes:
- theodolite-benchmarks/*
- theodolite-benchmarks/{$JAVA_PROJECT_DEPS}/**/*
if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $DOCKER_COMPOSE_DIR && $JAVA_PROJECT_DEPS"
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $DOCKER_COMPOSE_DIR && $JAVA_PROJECT_DEPS"
when: manual
allow_failure: true
smoketest-uc1-kstreams:
extends: .smoketest-benchmarks
needs:
- deploy-uc1-kstreams
- deploy-uc1-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc1-kstreams"
JAVA_PROJECT_DEPS: "uc1-kstreams,kstreams-commons,uc1-load-generator,load-generator-commons"
smoketest-uc1-flink:
extends: .smoketest-benchmarks
needs:
- deploy-uc1-flink
- deploy-uc1-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc1-flink"
JAVA_PROJECT_DEPS: "uc1-flink,flink-commons,uc1-load-generator,load-generator-commons"
smoketest-uc1-beam-flink:
extends: .smoketest-benchmarks
needs:
- deploy-uc1-beam-flink
- deploy-uc1-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc1-beam-flink"
JAVA_PROJECT_DEPS: "uc1-beam-flink,uc1-beam,beam-commons,uc1-load-generator,load-generator-commons"
smoketest-uc1-beam-samza:
extends: .smoketest-benchmarks
needs:
- deploy-uc1-beam-samza
- deploy-uc1-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc1-beam-samza"
JAVA_PROJECT_DEPS: "uc1-beam-samza,uc1-beam,beam-commons,uc1-load-generator,load-generator-commons"
smoketest-uc2-kstreams:
extends: .smoketest-benchmarks
needs:
- deploy-uc2-kstreams
- deploy-uc2-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc2-kstreams"
JAVA_PROJECT_DEPS: "uc2-kstreams,kstreams-commons,uc2-load-generator,load-generator-commons"
smoketest-uc2-flink:
extends: .smoketest-benchmarks
needs:
- deploy-uc2-flink
- deploy-uc2-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc2-flink"
JAVA_PROJECT_DEPS: "uc2-flink,flink-commons,uc2-load-generator,load-generator-commons"
smoketest-uc2-beam-flink:
extends: .smoketest-benchmarks
needs:
- deploy-uc2-beam-flink
- deploy-uc2-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc2-beam-flink"
JAVA_PROJECT_DEPS: "uc2-beam-flink,uc2-beam,beam-commons,uc2-load-generator,load-generator-commons"
smoketest-uc2-beam-samza:
extends: .smoketest-benchmarks
needs:
- deploy-uc2-beam-samza
- deploy-uc2-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc2-beam-samza"
JAVA_PROJECT_DEPS: "uc2-beam-samza,uc2-beam,beam-commons,uc2-load-generator,load-generator-commons"
smoketest-uc3-kstreams:
extends: .smoketest-benchmarks
needs:
- deploy-uc3-kstreams
- deploy-uc3-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc3-kstreams"
JAVA_PROJECT_DEPS: "uc3-kstreams,kstreams-commons,uc3-load-generator,load-generator-commons"
smoketest-uc3-beam-flink:
extends: .smoketest-benchmarks
needs:
- deploy-uc3-beam-flink
- deploy-uc3-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc3-beam-flink"
JAVA_PROJECT_DEPS: "uc3-beam-flink,uc3-beam,beam-commons,uc3-load-generator,load-generator-commons"
smoketest-uc3-beam-samza:
extends: .smoketest-benchmarks
needs:
- deploy-uc3-beam-samza
- deploy-uc3-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc3-beam-samza"
JAVA_PROJECT_DEPS: "uc3-beam-samza,uc3-beam,beam-commons,uc3-load-generator,load-generator-commons"
smoketest-uc4-kstreams:
extends: .smoketest-benchmarks
needs:
- deploy-uc4-kstreams
- deploy-uc4-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc4-kstreams"
JAVA_PROJECT_DEPS: "uc4-kstreams,kstreams-commons,uc4-load-generator,load-generator-commons"
smoketest-uc4-flink:
extends: .smoketest-benchmarks
needs:
- deploy-uc4-flink
- deploy-uc4-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc4-flink"
JAVA_PROJECT_DEPS: "uc4-flink,flink-commons,uc4-load-generator,load-generator-commons"
smoketest-uc4-beam-flink:
extends: .smoketest-benchmarks
needs:
- deploy-uc4-beam-flink
- deploy-uc4-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc4-beam-flink"
JAVA_PROJECT_DEPS: "uc4-beam-flink,uc4-beam,beam-commons,uc4-load-generator,load-generator-commons"
smoketest-uc4-beam-samza:
extends: .smoketest-benchmarks
needs:
- deploy-uc4-beam-samza
- deploy-uc4-load-generator
variables:
DOCKER_COMPOSE_DIR: "uc4-beam-samza"
JAVA_PROJECT_DEPS: "uc4-beam-samza,uc4-beam,beam-commons,uc4-load-generator,load-generator-commons"
# Theodolite Framework # Theodolite Framework
......
...@@ -8,7 +8,7 @@ authors: ...@@ -8,7 +8,7 @@ authors:
given-names: Wilhelm given-names: Wilhelm
orcid: "https://orcid.org/0000-0001-6625-4335" orcid: "https://orcid.org/0000-0001-6625-4335"
title: Theodolite title: Theodolite
version: "0.6.3" version: "0.6.4"
repository-code: "https://github.com/cau-se/theodolite" repository-code: "https://github.com/cau-se/theodolite"
license: "Apache-2.0" license: "Apache-2.0"
doi: "10.1016/j.bdr.2021.100209" doi: "10.1016/j.bdr.2021.100209"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"dateModified": "2022-01-24", "dateModified": "2022-01-24",
"downloadUrl": "https://github.com/cau-se/theodolite/releases", "downloadUrl": "https://github.com/cau-se/theodolite/releases",
"name": "Theodolite", "name": "Theodolite",
"version": "0.6.3", "version": "0.6.4",
"description": "Theodolite is a framework for benchmarking the horizontal and vertical scalability of cloud-native applications.", "description": "Theodolite is a framework for benchmarking the horizontal and vertical scalability of cloud-native applications.",
"developmentStatus": "active", "developmentStatus": "active",
"relatedLink": [ "relatedLink": [
......
...@@ -53,6 +53,27 @@ Patchers can be seen as functions which take a value as input and modify a Kuber ...@@ -53,6 +53,27 @@ Patchers can be seen as functions which take a value as input and modify a Kuber
* **resource**: "uc1-kstreams-deployment.yaml" * **resource**: "uc1-kstreams-deployment.yaml"
* **example value**: "random-scheduler" * **example value**: "random-scheduler"
* **LabelPatcher**: Changes the label of a Kubernetes Deployment or StatefulSet. The patched field is: `metadata.labels`
* **type**: "LabelPatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
* **properties**:
* variableName: "app"
* **example value**: "theodolite-sut"
* **MatchLabelPatcher**: Changes the match labels of a Kubernetes Deployment or StatefulSet. The patched field is: `spec.selector.matchLabels`
* **type**: "MatchLabelPatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
* **properties**:
* variableName: "app"
* **example value**: "theodolite-sut"
* **TemplateLabelPatcher**: Changes the template labels of a Kubernetes Deployment or StatefulSet. The patched field is: `spec.template.metadata.labels`
* **type**: "MatchLabelPatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
* **properties**:
* variableName: "app"
* **example value**: "theodolite-sut"
* **ImagePatcher**: Changes the image of a Kubernetes resource. **Currently not fully implemented.** * **ImagePatcher**: Changes the image of a Kubernetes resource. **Currently not fully implemented.**
* **type**: "ImagePatcher" * **type**: "ImagePatcher"
* **resource**: "uc1-kstreams-deployment.yaml" * **resource**: "uc1-kstreams-deployment.yaml"
......
apiVersion: v1 apiVersion: v1
entries: entries:
theodolite: theodolite:
- apiVersion: v2
appVersion: 0.6.4
created: "2022-02-16T16:09:11.967649304+01:00"
dependencies:
- condition: grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.17.5
- condition: kube-prometheus-stack.enabled
name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 20.0.1
- 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://seanglover.com/kafka-lag-exporter/repo
version: 0.6.7
description: Theodolite is a framework for benchmarking the horizontal and vertical
scalability of cloud-native applications.
digest: 10156d9917233ffa297aab093532038667d25b2babb2b2058a0a32e1dccb0cca
home: https://www.theodolite.rocks
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.6.4/theodolite-0.6.4.tgz
version: 0.6.4
- apiVersion: v2 - apiVersion: v2
appVersion: 0.6.3 appVersion: 0.6.3
created: "2022-01-24T13:40:40.07330713+01:00" created: "2022-01-24T13:40:40.07330713+01:00"
...@@ -141,6 +176,41 @@ entries: ...@@ -141,6 +176,41 @@ entries:
urls: urls:
- https://github.com/cau-se/theodolite/releases/download/v0.6.0/theodolite-0.6.0.tgz - https://github.com/cau-se/theodolite/releases/download/v0.6.0/theodolite-0.6.0.tgz
version: 0.6.0 version: 0.6.0
- apiVersion: v2
appVersion: 0.5.2
created: "2022-02-16T15:43:43.534374597+01:00"
dependencies:
- condition: grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.17.5
- 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://seanglover.com/kafka-lag-exporter/repo
version: 0.6.6
description: Theodolite is a framework for benchmarking the scalability stream
processing engines.
digest: 72df752883d2161fdfc0e96bb90fe11f9c0ed4f71013e588ec170f2cbb178e9c
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.5.2/theodolite-0.5.2.tgz
version: 0.5.2
- apiVersion: v2 - apiVersion: v2
appVersion: 0.5.1 appVersion: 0.5.1
created: "2021-11-12T16:15:01.629937292+01:00" created: "2021-11-12T16:15:01.629937292+01:00"
...@@ -246,4 +316,4 @@ entries: ...@@ -246,4 +316,4 @@ entries:
urls: urls:
- https://github.com/cau-se/theodolite/releases/download/v0.4.0/theodolite-0.4.0.tgz - https://github.com/cau-se/theodolite/releases/download/v0.4.0/theodolite-0.4.0.tgz
version: 0.4.0 version: 0.4.0
generated: "2022-01-24T13:40:40.036786105+01:00" generated: "2022-02-16T16:09:11.93111234+01:00"
...@@ -17,7 +17,7 @@ For each benchmark, we provide a [load generator as OCI container image](https:/ ...@@ -17,7 +17,7 @@ For each benchmark, we provide a [load generator as OCI container image](https:/
You can simply run a load generator container, for example, for benchmark UC1 with: You can simply run a load generator container, for example, for benchmark UC1 with:
```sh ```sh
docker run ghcr.io/cau-se/theodolite-uc1-workload-generator docker run -it ghcr.io/cau-se/theodolite-uc1-workload-generator
``` ```
### Message format ### Message format
......
...@@ -26,7 +26,7 @@ dependencies: ...@@ -26,7 +26,7 @@ dependencies:
condition: cp-helm-charts.enabled condition: cp-helm-charts.enabled
- name: kafka-lag-exporter - name: kafka-lag-exporter
version: 0.6.7 version: 0.6.7
repository: https://lightbend.github.io/kafka-lag-exporter/repo/ repository: https://seanglover.com/kafka-lag-exporter/repo
condition: kafka-lag-exporter.enabled condition: kafka-lag-exporter.enabled
version: 0.7.0-SNAPSHOT version: 0.7.0-SNAPSHOT
......
...@@ -16,8 +16,8 @@ dependencies { ...@@ -16,8 +16,8 @@ dependencies {
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true } implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true } implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation group: 'org.apache.beam', name: 'beam-sdks-java-core', version: '2.22.0' implementation group: 'org.apache.beam', name: 'beam-sdks-java-core', version: '2.35.0'
implementation('org.apache.beam:beam-sdks-java-io-kafka:2.22.0'){ implementation('org.apache.beam:beam-sdks-java-io-kafka:2.35.0'){
exclude group: 'org.apache.kafka', module: 'kafka-clients' exclude group: 'org.apache.kafka', module: 'kafka-clients'
} }
implementation ('io.confluent:kafka-streams-avro-serde:5.3.2') implementation ('io.confluent:kafka-streams-avro-serde:5.3.2')
......
...@@ -3,6 +3,6 @@ plugins { ...@@ -3,6 +3,6 @@ plugins {
} }
dependencies { dependencies {
implementation group: 'org.apache.beam', name: 'beam-runners-flink-1.12', version: '2.27.0' implementation group: 'org.apache.beam', name: 'beam-runners-flink-1.13', version: '2.35.0'
implementation group: 'org.apache.flink', name: 'flink-statebackend-rocksdb_2.11', version: '1.12.0' implementation group: 'org.apache.flink', name: 'flink-statebackend-rocksdb_2.11', version: '1.13.0'
} }
\ No newline at end of file
...@@ -18,13 +18,12 @@ repositories { ...@@ -18,13 +18,12 @@ repositories {
} }
} }
def apacheBeamVersion = '2.22.0' //'2.27.0' // '2.34.0' def apacheBeamVersion = '2.35.0'
dependencies { dependencies {
// These dependencies are used internally, and not exposed to consumers on their own compile classpath. // These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true } implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true } implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.guava:guava:24.1-jre' implementation 'com.google.guava:guava:24.1-jre'
implementation 'org.slf4j:slf4j-simple:1.7.25' implementation 'org.slf4j:slf4j-simple:1.7.25'
implementation project(':beam-commons') implementation project(':beam-commons')
......
...@@ -3,7 +3,8 @@ plugins { ...@@ -3,7 +3,8 @@ plugins {
} }
dependencies { dependencies {
implementation('org.apache.beam:beam-runners-samza:2.22.0') { implementation('org.apache.beam:beam-runners-samza:2.35.0') {
exclude group: 'org.apache.samza', module: 'samza-yarn_2.11' exclude group: 'org.apache.samza', module: 'samza-yarn_2.11'
} }
implementation 'org.apache.samza:samza-kafka_2.11:1.5.0'
} }
\ No newline at end of file
...@@ -20,7 +20,7 @@ shadowJar { ...@@ -20,7 +20,7 @@ shadowJar {
tasks.distZip.enabled = false tasks.distZip.enabled = false
ext { ext {
flinkVersion = '1.12.2' flinkVersion = '1.13.5'
scalaBinaryVersion = '2.12' scalaBinaryVersion = '2.12'
} }
...@@ -41,7 +41,6 @@ dependencies { ...@@ -41,7 +41,6 @@ dependencies {
implementation 'org.apache.kafka:kafka-clients:2.2.0' implementation 'org.apache.kafka:kafka-clients:2.2.0'
implementation 'com.google.guava:guava:30.1-jre' implementation 'com.google.guava:guava:30.1-jre'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'org.slf4j:slf4j-simple:1.6.1' implementation 'org.slf4j:slf4j-simple:1.6.1'
implementation project(':flink-commons') implementation project(':flink-commons')
......
...@@ -22,8 +22,7 @@ dependencies { ...@@ -22,8 +22,7 @@ dependencies {
// These dependencies are used internally, and not exposed to consumers on their own compile classpath. // These dependencies are used internally, and not exposed to consumers on their own compile classpath.
implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true } implementation('org.industrial-devops:titan-ccp-common:0.1.0-SNAPSHOT') { changing = true }
implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true } implementation('org.industrial-devops:titan-ccp-common-kafka:0.1.0-SNAPSHOT') { changing = true }
implementation 'org.apache.kafka:kafka-streams:2.6.0' // enable TransformerSuppliers implementation 'org.apache.kafka:kafka-streams:3.1.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.guava:guava:24.1-jre' implementation 'com.google.guava:guava:24.1-jre'
implementation 'org.slf4j:slf4j-simple:1.7.25' implementation 'org.slf4j:slf4j-simple:1.7.25'
implementation project(':kstreams-commons') implementation project(':kstreams-commons')
......
...@@ -5,4 +5,7 @@ ...@@ -5,4 +5,7 @@
<Rank value="16" /> <Rank value="16" />
</Match> </Match>
<!-- Temporary disabled due to potential false positive reported in https://github.com/spotbugs/spotbugs/issues/1923. -->
<Bug code="NP" />
</FindBugsFilter> </FindBugsFilter>
\ No newline at end of file
...@@ -36,3 +36,19 @@ the host, for example, from the IDE or Gradle. In such cases, the following adju ...@@ -36,3 +36,19 @@ the host, for example, from the IDE or Gradle. In such cases, the following adju
You can now connect to Kafka from your host system with bootstrap server `localhost:19092` and contact the Schema You can now connect to Kafka from your host system with bootstrap server `localhost:19092` and contact the Schema
Registry via `localhost:8081`. **Pay attention to the Kafka port, which is *19092* instead of the default one *9092*.** Registry via `localhost:8081`. **Pay attention to the Kafka port, which is *19092* instead of the default one *9092*.**
## Running Smoke Tests
The `smoketest-runner.sh` script can be used to run a simple test for a specific Docker Compose file. You can call it with
```sh
./smoketest-runner.sh <docker-compose-dir>
```
where `<docker-compose-dir>` is the directory of a Docker-Compose file, for example, `uc2-beam-samza`. The script exists with a zero exit code in case of success and a non-zero exit code otherwise.
You can also run the set of all smoke test with:
```sh
./smoketest-runner-all.sh
```
#!/bin/sh
find . -name 'test.sh' -type f -exec dirname {} \; |
sort |
xargs -I %s sh -c "./smoketest-runner.sh %s 1>&2; echo $?" |
sort |
awk 'BEGIN {count[0]=0; count[1]=0} {count[$1!=0]++} END {print count[0] " tests successful, " count[1] " test failed."; exit count[1]}'
#!/bin/sh
COMPOSE_FILE_PATH=$1
echo "Run test for '$COMPOSE_FILE_PATH'."
cd $COMPOSE_FILE_PATH
docker-compose pull -q
docker-compose up -d kafka zookeeper schema-registry
sleep 30s
docker-compose up -d
sleep 5s
docker-compose ps
if test -f "./test.sh"; then
#timeout --foreground 3m ./test.sh
./test.sh
RETURN=$?
else
RETURN=$?
echo "test.sh does not exists for '$COMPOSE_FILE_PATH'."
fi
if [ $RETURN -eq 0 ]; then
echo "Test for '$COMPOSE_FILE_PATH' has passed."
else
echo "Test for '$COMPOSE_FILE_PATH' has failed."
fi
docker-compose down
exit $RETURN
...@@ -20,18 +20,23 @@ services: ...@@ -20,18 +20,23 @@ services:
KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 30000 KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 30000
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false" KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_CREATE_TOPICS: "input:3:1" KAFKA_CREATE_TOPICS: "input:3:1"
kcat:
image: edenhill/kcat:1.7.1
entrypoint: "sh"
tty: true
schema-registry: schema-registry:
image: confluentinc/cp-schema-registry:5.3.1 image: confluentinc/cp-schema-registry:7.0.1
depends_on: depends_on:
- zookeeper - zookeeper
- kafka - kafka
restart: "on-failure"
expose: expose:
- "8081" - "8081"
#ports: #ports:
# - 8081:8081 # - 8081:8081
environment: environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper:2181' SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka:9092
load-generator: load-generator:
image: ghcr.io/cau-se/theodolite-uc1-workload-generator:${THEODOLITE_TAG:-latest} image: ghcr.io/cau-se/theodolite-uc1-workload-generator:${THEODOLITE_TAG:-latest}
depends_on: depends_on:
......
#!/bin/sh
sleep 55s # to let the benchmark and produce some output
docker-compose logs --tail 100 benchmark-taskmanager |
sed -n "s/^.*Key:\s\(\S*\), Value:\s\(\S*\).*$/\2/p" |
tee /dev/stderr |
jq .identifier |
sort |
uniq |
wc -l |
grep "\b10\b"
...@@ -22,18 +22,23 @@ services: ...@@ -22,18 +22,23 @@ services:
KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 30000 KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 30000
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false" KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_CREATE_TOPICS: "input:3:1" KAFKA_CREATE_TOPICS: "input:3:1"
kcat:
image: edenhill/kcat:1.7.1
entrypoint: "sh"
tty: true
schema-registry: schema-registry:
image: confluentinc/cp-schema-registry:5.3.1 image: confluentinc/cp-schema-registry:7.0.1
depends_on: depends_on:
- zookeeper - zookeeper
- kafka - kafka
restart: "on-failure"
expose: expose:
- "8081" - "8081"
#ports: #ports:
# - 8081:8081 # - 8081:8081
environment: environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper:2181' SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka:9092
benchmark: benchmark:
image: ghcr.io/cau-se/theodolite-uc1-beam-samza:${THEODOLITE_TAG:-latest} image: ghcr.io/cau-se/theodolite-uc1-beam-samza:${THEODOLITE_TAG:-latest}
scale: 1 scale: 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment