Skip to content
Snippets Groups Projects
Commit 447527ad authored by Benedikt Wetzel's avatar Benedikt Wetzel Committed by Lorenz Boguhn
Browse files

introduce a results/ folder to make it possible to mount a volume for that

parent a30c53f4
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!122Update Theodolite Kubernetes Job,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
...@@ -5,10 +5,10 @@ metadata: ...@@ -5,10 +5,10 @@ metadata:
spec: spec:
template: template:
spec: spec:
# volumes: volumes:
# - name: theodolite-pv-storage - name: theodolite-pv-storage
# persistentVolumeClaim: persistentVolumeClaim:
# claimName: theodolite-pv-claim claimName: theodolite-pv-claim
containers: containers:
- name: lag-analysis - name: lag-analysis
image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
...@@ -16,7 +16,7 @@ spec: ...@@ -16,7 +16,7 @@ spec:
- containerPort: 80 - containerPort: 80
name: analysis name: analysis
- name: theodolite - name: theodolite
image: ghcr.io/cau-se/theodolite:theodolite-kotlin-latest image: benediktwetzel/theodolite-test #ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
imagePullPolicy: Always imagePullPolicy: Always
env: env:
- name: NAMESPACE - name: NAMESPACE
...@@ -36,6 +36,8 @@ spec: ...@@ -36,6 +36,8 @@ spec:
mountPath: /etc/benchmark mountPath: /etc/benchmark
- name: execution - name: execution
mountPath: /etc/execution mountPath: /etc/execution
# - name: theodolite-pv-storage
# mountPath: "/deployments"
restartPolicy: Never restartPolicy: Never
# Uncomment if RBAC is enabled and configured # Uncomment if RBAC is enabled and configured
serviceAccountName: theodolite serviceAccountName: theodolite
......
...@@ -33,6 +33,8 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ ...@@ -33,6 +33,8 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \
&& microdnf clean all \ && microdnf clean all \
&& mkdir /deployments \ && mkdir /deployments \
&& chown 1001 /deployments \ && chown 1001 /deployments \
&& mkdir deployments/results \
&& chown 1001 deployments/results \
&& chmod "g+rwX" /deployments \ && chmod "g+rwX" /deployments \
&& chown 1001:root /deployments \ && chown 1001:root /deployments \
&& curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \
......
...@@ -15,12 +15,13 @@ ...@@ -15,12 +15,13 @@
# #
### ###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
WORKDIR /work/ WORKDIR /deployments
RUN chown 1001 /work \ RUN chown 1001 /deployments \
&& chmod "g+rwX" /work \ && mkdir results \
&& chown 1001:root /work && chmod "g+rwX" /deployments \
COPY --chown=1001:root build/*-runner /work/application && chown 1001:root /deployments
COPY config/ /work/config/ COPY --chown=1001:root build/*-runner /deployments/application
COPY config/ /deployments/config/
EXPOSE 8080 EXPOSE 8080
USER 1001 USER 1001
......
...@@ -41,7 +41,7 @@ class AnalysisExecutor( ...@@ -41,7 +41,7 @@ class AnalysisExecutor(
query = "sum by(group)(kafka_consumergroup_group_lag >= 0)" query = "sum by(group)(kafka_consumergroup_group_lag >= 0)"
) )
CsvExporter().toCsv(name = "$executionId-${load.get()}-${res.get()}-${slo.sloType}", prom = prometheusData) CsvExporter().toCsv(name = "results/$executionId-${load.get()}-${res.get()}-${slo.sloType}", prom = prometheusData)
val sloChecker = SloCheckerFactory().create( val sloChecker = SloCheckerFactory().create(
sloType = slo.sloType, sloType = slo.sloType,
externalSlopeURL = slo.externalSloUrl, externalSlopeURL = slo.externalSloUrl,
......
...@@ -97,8 +97,8 @@ class TheodoliteExecutor( ...@@ -97,8 +97,8 @@ class TheodoliteExecutor(
* execution and benchmark objects. * execution and benchmark objects.
*/ */
fun run() { fun run() {
storeAsFile(this.config, "${this.config.executionId}-execution-configuration") storeAsFile(this.config, "results/${this.config.executionId}-execution-configuration")
storeAsFile(kubernetesBenchmark, "${this.config.executionId}-benchmark-configuration") storeAsFile(kubernetesBenchmark, "results/${this.config.executionId}-benchmark-configuration")
val config = buildConfig() val config = buildConfig()
// execute benchmarks for each load // execute benchmarks for each load
...@@ -107,7 +107,7 @@ class TheodoliteExecutor( ...@@ -107,7 +107,7 @@ class TheodoliteExecutor(
config.compositeStrategy.findSuitableResource(load, config.resources) config.compositeStrategy.findSuitableResource(load, config.resources)
} }
} }
storeAsFile(config.compositeStrategy.benchmarkExecutor.results, "${this.config.executionId}-result") storeAsFile(config.compositeStrategy.benchmarkExecutor.results, "results/${this.config.executionId}-result")
} }
private fun <T> storeAsFile(saveObject: T, filename: String) { private fun <T> storeAsFile(saveObject: T, filename: String) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment