diff --git a/execution/theodolite-kotlin.yaml b/execution/theodolite-kotlin.yaml index 6588a101d033d55d06fde45ab694c8be1ff13630..25330f588404e5bb6f7bd22a7fe758b580421a74 100644 --- a/execution/theodolite-kotlin.yaml +++ b/execution/theodolite-kotlin.yaml @@ -5,10 +5,10 @@ metadata: spec: template: spec: - # volumes: - # - name: theodolite-pv-storage - # persistentVolumeClaim: - # claimName: theodolite-pv-claim + volumes: + - name: theodolite-pv-storage + persistentVolumeClaim: + claimName: theodolite-pv-claim containers: - name: lag-analysis image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest @@ -16,7 +16,7 @@ spec: - containerPort: 80 name: analysis - 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 env: - name: NAMESPACE @@ -36,6 +36,8 @@ spec: mountPath: /etc/benchmark - name: execution mountPath: /etc/execution + # - name: theodolite-pv-storage + # mountPath: "/deployments" restartPolicy: Never # Uncomment if RBAC is enabled and configured serviceAccountName: theodolite diff --git a/theodolite-quarkus/src/main/docker/Dockerfile.jvm b/theodolite-quarkus/src/main/docker/Dockerfile.jvm index 6733d5d441e8292e02547cf59131c706575e9d86..758358fe4b0acfe89d2fbbbf6e1e5fb4534e5b4d 100644 --- a/theodolite-quarkus/src/main/docker/Dockerfile.jvm +++ b/theodolite-quarkus/src/main/docker/Dockerfile.jvm @@ -33,6 +33,8 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ && microdnf clean all \ && mkdir /deployments \ && chown 1001 /deployments \ + && mkdir deployments/results \ + && chown 1001 deployments/results \ && chmod "g+rwX" /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 \ diff --git a/theodolite-quarkus/src/main/docker/Dockerfile.native b/theodolite-quarkus/src/main/docker/Dockerfile.native index 37a5a4bd8472a358194dbb14a5fce61df94804d3..7c0f04a01c4ba6cf751cb0f97c0119a860e9e6e4 100644 --- a/theodolite-quarkus/src/main/docker/Dockerfile.native +++ b/theodolite-quarkus/src/main/docker/Dockerfile.native @@ -15,12 +15,13 @@ # ### FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 -WORKDIR /work/ -RUN chown 1001 /work \ - && chmod "g+rwX" /work \ - && chown 1001:root /work -COPY --chown=1001:root build/*-runner /work/application -COPY config/ /work/config/ +WORKDIR /deployments +RUN chown 1001 /deployments \ + && mkdir results \ + && chmod "g+rwX" /deployments \ + && chown 1001:root /deployments +COPY --chown=1001:root build/*-runner /deployments/application +COPY config/ /deployments/config/ EXPOSE 8080 USER 1001 diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt index e76f6cf34fdec447fa4d581b94bbb51b972d888a..ddf2c7b5c34aaf9fa3abfec8ad02bab830fefc35 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/evaluation/AnalysisExecutor.kt @@ -41,7 +41,7 @@ class AnalysisExecutor( 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( sloType = slo.sloType, externalSlopeURL = slo.externalSloUrl, diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt index c2b8cc7d2ebc60b7cbb8328dfe1d7830ec5b5aff..e8008a0fd8dc4e2df3b146e81fb505f418025584 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -97,8 +97,8 @@ class TheodoliteExecutor( * execution and benchmark objects. */ fun run() { - storeAsFile(this.config, "${this.config.executionId}-execution-configuration") - storeAsFile(kubernetesBenchmark, "${this.config.executionId}-benchmark-configuration") + storeAsFile(this.config, "results/${this.config.executionId}-execution-configuration") + storeAsFile(kubernetesBenchmark, "results/${this.config.executionId}-benchmark-configuration") val config = buildConfig() // execute benchmarks for each load @@ -107,7 +107,7 @@ class TheodoliteExecutor( 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) {