diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt index c53c758c5c26b17c4b01cbfad72f2e9bbe1db499..86f3baf840be4891b295c36e750403c158c57928 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/execution/TheodoliteExecutor.kt @@ -17,9 +17,12 @@ class TheodoliteExecutor() { kafkaPartition = 40, kafkaReplication = 3, kafkaTopics = listOf("input", "output"), - ucDeploymentPath = "", - ucServicePath = "", - wgDeploymentPath = "" + // TODO("handle path in a more nice way (not absolut)") + ucDeploymentPath = "src/main/resources/yaml/aggregation-deployment.yaml", + ucServicePath = "src/main/resources/yaml/aggregation-service.yaml", + wgDeploymentPath = "src/main/resources/yaml/workloadGenerator.yaml", + ucImageURL = "ghcr.io/cau-se/theodolite-uc1-kstreams-app:latest", + wgImageURL = "ghcr.io/cau-se/theodolite-uc1-kstreams-workload-generator:latest" )) val results: Results = Results() val executionDuration = Duration.ofSeconds(60*5 ) diff --git a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt index ec83c47e4197750a022dc9570b15f4cd6e8e94e6..128fefd2a27010f444dfaf01399d3dadadfa3e51 100644 --- a/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt +++ b/theodolite-quarkus/src/main/kotlin/theodolite/k8s/UC1Benchmark.kt @@ -29,9 +29,6 @@ class UC1Benchmark(config: UC1BenchmarkConfig) : Benchmark(config) { this.serviceManager = ServiceManager(this.kubernetesClient) ucDeployment = this.yamlLoader.loadDeployment(this.config.ucDeploymentPath) ucService = this.yamlLoader.loadService(this.config.ucServicePath) - - - } override fun clearClusterEnvironment() { @@ -48,11 +45,14 @@ class UC1Benchmark(config: UC1BenchmarkConfig) : Benchmark(config) { } override fun startSUT(resources: Resource) { + this.deploymentManager.setImageName(ucDeployment, "uc-application", this.config.ucImageURL) + // set environment variables val environmentVariables: MutableMap<String, String> = mutableMapOf() environmentVariables.put("KAFKA_BOOTSTRAP_SERVER", this.config.kafkaIPConnectionString) environmentVariables.put("SCHEMA_REGISTRY_URL", this.config.schemaRegistryConnectionString) + // setup deployment this.deploymentManager.setReplica(ucDeployment, resources.get()) this.deploymentManager.setWorkloadEnv(ucDeployment,"uc-application", environmentVariables) @@ -63,12 +63,15 @@ class UC1Benchmark(config: UC1BenchmarkConfig) : Benchmark(config) { } override fun startWorkloadGenerator(load: LoadDimension) { + this.deploymentManager.setImageName(ucDeployment, "workload-generator", this.config.wgImageURL) val wgDeployment = this.yamlLoader.loadDeployment(this.config.wgDeploymentPath) - val environmentVariables: MutableMap<String, String> = mutableMapOf() - environmentVariables.put("NUM_SENSORS", load.get().toString()) + // TODO ("calculate number of required instances") val requiredInstances: Int = 1 + val environmentVariables: MutableMap<String, String> = mutableMapOf() + environmentVariables.put("NUM_SENSORS", load.get().toString()) environmentVariables.put("NUM_INSTANCES", requiredInstances.toString()) + this.deploymentManager.setWorkloadEnv(wgDeployment, "workload-generator", environmentVariables) } @@ -81,6 +84,8 @@ class UC1Benchmark(config: UC1BenchmarkConfig) : Benchmark(config) { val kafkaPartition: Int, val ucDeploymentPath: String, val ucServicePath: String, - val wgDeploymentPath: String + val wgDeploymentPath: String, + val ucImageURL: String, + val wgImageURL: String ) {} } \ No newline at end of file diff --git a/theodolite-quarkus/YAML/aggregation-deployment.yaml b/theodolite-quarkus/src/main/resources/yaml/aggregation-deployment.yaml similarity index 100% rename from theodolite-quarkus/YAML/aggregation-deployment.yaml rename to theodolite-quarkus/src/main/resources/yaml/aggregation-deployment.yaml diff --git a/theodolite-quarkus/YAML/aggregation-service.yaml b/theodolite-quarkus/src/main/resources/yaml/aggregation-service.yaml similarity index 100% rename from theodolite-quarkus/YAML/aggregation-service.yaml rename to theodolite-quarkus/src/main/resources/yaml/aggregation-service.yaml diff --git a/theodolite-quarkus/YAML/jmx-configmap.yaml b/theodolite-quarkus/src/main/resources/yaml/jmx-configmap.yaml similarity index 100% rename from theodolite-quarkus/YAML/jmx-configmap.yaml rename to theodolite-quarkus/src/main/resources/yaml/jmx-configmap.yaml diff --git a/theodolite-quarkus/YAML/service-monitor.yaml b/theodolite-quarkus/src/main/resources/yaml/service-monitor.yaml similarity index 100% rename from theodolite-quarkus/YAML/service-monitor.yaml rename to theodolite-quarkus/src/main/resources/yaml/service-monitor.yaml diff --git a/theodolite-quarkus/YAML/theodolite.yaml b/theodolite-quarkus/src/main/resources/yaml/theodolite.yaml similarity index 100% rename from theodolite-quarkus/YAML/theodolite.yaml rename to theodolite-quarkus/src/main/resources/yaml/theodolite.yaml diff --git a/theodolite-quarkus/YAML/workloadGenerator.yaml b/theodolite-quarkus/src/main/resources/yaml/workloadGenerator.yaml similarity index 100% rename from theodolite-quarkus/YAML/workloadGenerator.yaml rename to theodolite-quarkus/src/main/resources/yaml/workloadGenerator.yaml