diff --git a/theodolite-quarkus/build_jvm.sh b/theodolite-quarkus/build_jvm.sh index f3970d08e62ac3661dac038148b011b774276ceb..95e2e44427a894a0513e6358b439d23e3eea834b 100755 --- a/theodolite-quarkus/build_jvm.sh +++ b/theodolite-quarkus/build_jvm.sh @@ -1,7 +1,6 @@ -./gradlew build +./gradlew build -x test docker build -f src/main/docker/Dockerfile.jvm -t quarkus/theodolite-quarkus-jvm . - docker run -i --rm -p 8080:8080 quarkus/theodolite-quarkus-jvm diff --git a/theodolite-quarkus/build_native.sh b/theodolite-quarkus/build_native.sh index 8b663f6edd909554acf4e53c5ff3304f7c8f150b..1effa3268ce5b863a680c6f4bdc6b4b632b2d4c6 100755 --- a/theodolite-quarkus/build_native.sh +++ b/theodolite-quarkus/build_native.sh @@ -1,6 +1,5 @@ -./gradlew build -Dquarkus.package.type=native - +./gradlew build -Dquarkus.package.type=native -x test docker build -f src/main/docker/Dockerfile.native -t quarkus/theodolite-quarkus . diff --git a/theodolite-quarkus/src/main/docker/Dockerfile.jvm b/theodolite-quarkus/src/main/docker/Dockerfile.jvm index d6a4e05cdef5c8c1e25337b3d5a312e1e98a641a..6733d5d441e8292e02547cf59131c706575e9d86 100644 --- a/theodolite-quarkus/src/main/docker/Dockerfile.jvm +++ b/theodolite-quarkus/src/main/docker/Dockerfile.jvm @@ -44,6 +44,7 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" COPY build/lib/* /deployments/lib/ COPY build/*-runner.jar /deployments/app.jar +COPY config/ /deployments/config/ EXPOSE 8080 USER 1001 diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt index 62b7ba8eb801ab9d20a1d9e8f8eab1fc87ed0e63..b4c9919b8998ca2e7e22f801e57746c20212c4c5 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt @@ -21,9 +21,10 @@ class KubernetesBenchmark : Benchmark { lateinit var loadTypes: List<TypeName> lateinit var kafkaConfig: KafkaConfig lateinit var namespace: String + lateinit var path: String private fun loadKubernetesResources(resources: List<String>): List<Pair<String, KubernetesResource>> { - val basePath = "./../../../resources/main/yaml/" + //val path = "./../../../resources/main/yaml/" val parser = YamlParser() namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE @@ -32,7 +33,7 @@ class KubernetesBenchmark : Benchmark { val loader = K8sResourceLoader(DefaultKubernetesClient().inNamespace(namespace)) return resources .map { resource -> - val resourcePath = "$basePath/$resource" + val resourcePath = "$path/$resource" val kind = parser.parse(resourcePath, HashMap<String, String>()::class.java)?.get("kind")!! val k8sResource = loader.loadK8sResource(kind, resourcePath) Pair(resource, k8sResource) diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt index d6505431c4db92347b1ab8fb90c2b795107d6a9d..66d8b1d9b2a8b7386969616b90b258a5a0ca8a69 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteYamlExecutor.kt @@ -16,7 +16,7 @@ object TheodoliteYamlExecutor { fun main(args: Array<String>) { logger.info { "Theodolite started" } val path = Paths.get("").toAbsolutePath().toString() - logger.info{ path } + logger.info { path } // load the BenchmarkExecution and the BenchmarkType val parser = YamlParser() @@ -25,7 +25,9 @@ object TheodoliteYamlExecutor { val benchmark = parser.parse("./config/BenchmarkType.yaml", KubernetesBenchmark::class.java)!! - logger.info { benchmark.name.toString() } + //logger.info { benchmark.name.toString() } + + benchmark.path = "config/" val executor = TheodoliteExecutor(benchmarkExecution, benchmark) executor.run() diff --git a/theodolite-quarkus/src/main/resources/application.properties b/theodolite-quarkus/src/main/resources/application.properties index e46818b790fadfc5d1e99699b21642af93f3a0a1..318ce68ff1ae344f44288bfaacfbc43538211f50 100644 --- a/theodolite-quarkus/src/main/resources/application.properties +++ b/theodolite-quarkus/src/main/resources/application.properties @@ -1,2 +1,4 @@ quarkus.package.main-class=TheodoliteYamlExecutor -quarkus.native.additional-build-args=--initialize-at-run-time=io.fabric8.kubernetes.client.internal.CertUtils \ No newline at end of file +quarkus.native.additional-build-args=\ + --initialize-at-run-time=io.fabric8.kubernetes.client.internal.CertUtils,\ + --report-unsupported-elements-at-runtime \ No newline at end of file