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

Changed path KubernetesBenchmark.kt + native.image.build.args + fix build scripts

parent f11b95b3
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
./gradlew build ./gradlew build -x test
docker build -f src/main/docker/Dockerfile.jvm -t quarkus/theodolite-quarkus-jvm . docker build -f src/main/docker/Dockerfile.jvm -t quarkus/theodolite-quarkus-jvm .
docker run -i --rm -p 8080:8080 quarkus/theodolite-quarkus-jvm docker run -i --rm -p 8080:8080 quarkus/theodolite-quarkus-jvm
./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 . docker build -f src/main/docker/Dockerfile.native -t quarkus/theodolite-quarkus .
......
...@@ -44,6 +44,7 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ ...@@ -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" 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/lib/* /deployments/lib/
COPY build/*-runner.jar /deployments/app.jar COPY build/*-runner.jar /deployments/app.jar
COPY config/ /deployments/config/
EXPOSE 8080 EXPOSE 8080
USER 1001 USER 1001
......
...@@ -21,9 +21,10 @@ class KubernetesBenchmark : Benchmark { ...@@ -21,9 +21,10 @@ class KubernetesBenchmark : Benchmark {
lateinit var loadTypes: List<TypeName> lateinit var loadTypes: List<TypeName>
lateinit var kafkaConfig: KafkaConfig lateinit var kafkaConfig: KafkaConfig
lateinit var namespace: String lateinit var namespace: String
lateinit var path: String
private fun loadKubernetesResources(resources: List<String>): List<Pair<String, KubernetesResource>> { private fun loadKubernetesResources(resources: List<String>): List<Pair<String, KubernetesResource>> {
val basePath = "./../../../resources/main/yaml/" //val path = "./../../../resources/main/yaml/"
val parser = YamlParser() val parser = YamlParser()
namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE
...@@ -32,7 +33,7 @@ class KubernetesBenchmark : Benchmark { ...@@ -32,7 +33,7 @@ class KubernetesBenchmark : Benchmark {
val loader = K8sResourceLoader(DefaultKubernetesClient().inNamespace(namespace)) val loader = K8sResourceLoader(DefaultKubernetesClient().inNamespace(namespace))
return resources return resources
.map { resource -> .map { resource ->
val resourcePath = "$basePath/$resource" val resourcePath = "$path/$resource"
val kind = parser.parse(resourcePath, HashMap<String, String>()::class.java)?.get("kind")!! val kind = parser.parse(resourcePath, HashMap<String, String>()::class.java)?.get("kind")!!
val k8sResource = loader.loadK8sResource(kind, resourcePath) val k8sResource = loader.loadK8sResource(kind, resourcePath)
Pair(resource, k8sResource) Pair(resource, k8sResource)
......
...@@ -16,7 +16,7 @@ object TheodoliteYamlExecutor { ...@@ -16,7 +16,7 @@ object TheodoliteYamlExecutor {
fun main(args: Array<String>) { fun main(args: Array<String>) {
logger.info { "Theodolite started" } logger.info { "Theodolite started" }
val path = Paths.get("").toAbsolutePath().toString() val path = Paths.get("").toAbsolutePath().toString()
logger.info{ path } logger.info { path }
// load the BenchmarkExecution and the BenchmarkType // load the BenchmarkExecution and the BenchmarkType
val parser = YamlParser() val parser = YamlParser()
...@@ -25,7 +25,9 @@ object TheodoliteYamlExecutor { ...@@ -25,7 +25,9 @@ object TheodoliteYamlExecutor {
val benchmark = val benchmark =
parser.parse("./config/BenchmarkType.yaml", KubernetesBenchmark::class.java)!! 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) val executor = TheodoliteExecutor(benchmarkExecution, benchmark)
executor.run() executor.run()
......
quarkus.package.main-class=TheodoliteYamlExecutor quarkus.package.main-class=TheodoliteYamlExecutor
quarkus.native.additional-build-args=--initialize-at-run-time=io.fabric8.kubernetes.client.internal.CertUtils quarkus.native.additional-build-args=\
\ No newline at end of file --initialize-at-run-time=io.fabric8.kubernetes.client.internal.CertUtils,\
--report-unsupported-elements-at-runtime
\ 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