Skip to content
Snippets Groups Projects
Commit 53128498 authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

Add image url as configuration parameter

parent 9702e885
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus,!78Resolve "Implement Quarkus/Kotlin protype"
......@@ -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 )
......
......@@ -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
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