diff --git a/docs/crd-docu.md b/docs/crd-docu.md index f97164a29d7b2c86286265f3047b4216c3c3da74..400e888af53a59353e68440ceb34d32c6a72506f 100644 --- a/docs/crd-docu.md +++ b/docs/crd-docu.md @@ -79,19 +79,21 @@ Resource Types: </tr> </thead> <tbody><tr> - <td><b>name</b></td> - <td>string</td> + <td><b><a href="#benchmarkspecinfrastructure">infrastructure</a></b></td> + <td>object</td> <td> - This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten.<br/> + (Optional) A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure.<br/> + <br/> + <i>Default</i>: map[]<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecinfrastructureindex">infrastructure</a></b></td> - <td>[]object</td> + <td><b>name</b></td> + <td>string</td> <td> - A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure.<br/> + This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten.<br/> </td> - <td>true</td> + <td>false</td> </tr><tr> <td><b><a href="#benchmarkspeckafkaconfig">kafkaConfig</a></b></td> <td>object</td> @@ -100,8 +102,8 @@ Resource Types: </td> <td>true</td> </tr><tr> - <td><b><a href="#benchmarkspecloadgeneratorindex">loadGenerator</a></b></td> - <td>[]object</td> + <td><b><a href="#benchmarkspecloadgenerator">loadGenerator</a></b></td> + <td>object</td> <td> The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet.<br/> </td> @@ -121,8 +123,8 @@ Resource Types: </td> <td>true</td> </tr><tr> - <td><b><a href="#benchmarkspecsutindex">sut</a></b></td> - <td>[]object</td> + <td><b><a href="#benchmarkspecsut">sut</a></b></td> + <td>object</td> <td> The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet.<br/> </td> @@ -131,11 +133,40 @@ Resource Types: </table> -### benchmark.spec.infrastructure[index] +### benchmark.spec.infrastructure <sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> +(Optional) A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b><a href="#benchmarkspecinfrastructureresourcesindex">resources</a></b></td> + <td>[]object</td> + <td> + <br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.infrastructure.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecinfrastructure)</sup></sup> + + + <table> @@ -148,14 +179,14 @@ Resource Types: </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecinfrastructureindexconfigmap">configMap</a></b></td> + <td><b><a href="#benchmarkspecinfrastructureresourcesindexconfigmap">configMap</a></b></td> <td>object</td> <td> The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap.<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecinfrastructureindexfilesystem">fileSystem</a></b></td> + <td><b><a href="#benchmarkspecinfrastructureresourcesindexfilesystem">fileSystem</a></b></td> <td>object</td> <td> The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> @@ -165,8 +196,8 @@ Resource Types: </table> -### benchmark.spec.infrastructure[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecinfrastructureindex)</sup></sup> +### benchmark.spec.infrastructure.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> @@ -199,8 +230,8 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf </table> -### benchmark.spec.infrastructure[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecinfrastructureindex)</sup></sup> +### benchmark.spec.infrastructure.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecinfrastructureresourcesindex)</sup></sup> @@ -323,11 +354,40 @@ Contains the Kafka configuration. </table> -### benchmark.spec.loadGenerator[index] +### benchmark.spec.loadGenerator <sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> +The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b><a href="#benchmarkspecloadgeneratorresourcesindex">resources</a></b></td> + <td>[]object</td> + <td> + <br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.loadGenerator.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecloadgenerator)</sup></sup> + + + <table> @@ -340,14 +400,14 @@ Contains the Kafka configuration. </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecloadgeneratorindexconfigmap">configMap</a></b></td> + <td><b><a href="#benchmarkspecloadgeneratorresourcesindexconfigmap">configMap</a></b></td> <td>object</td> <td> The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap.<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecloadgeneratorindexfilesystem">fileSystem</a></b></td> + <td><b><a href="#benchmarkspecloadgeneratorresourcesindexfilesystem">fileSystem</a></b></td> <td>object</td> <td> The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> @@ -357,8 +417,8 @@ Contains the Kafka configuration. </table> -### benchmark.spec.loadGenerator[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorindex)</sup></sup> +### benchmark.spec.loadGenerator.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</sup></sup> @@ -391,8 +451,8 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf </table> -### benchmark.spec.loadGenerator[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorindex)</sup></sup> +### benchmark.spec.loadGenerator.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecloadgeneratorresourcesindex)</sup></sup> @@ -587,11 +647,40 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </table> -### benchmark.spec.sut[index] +### benchmark.spec.sut <sup><sup>[↩ Parent](#benchmarkspec)</sup></sup> +The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. + +<table> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Description</th> + <th>Required</th> + </tr> + </thead> + <tbody><tr> + <td><b><a href="#benchmarkspecsutresourcesindex">resources</a></b></td> + <td>[]object</td> + <td> + <br/> + <br/> + <i>Default</i>: []<br/> + </td> + <td>false</td> + </tr></tbody> +</table> + + +### benchmark.spec.sut.resources[index] +<sup><sup>[↩ Parent](#benchmarkspecsut)</sup></sup> + + + <table> @@ -604,14 +693,14 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </tr> </thead> <tbody><tr> - <td><b><a href="#benchmarkspecsutindexconfigmap">configMap</a></b></td> + <td><b><a href="#benchmarkspecsutresourcesindexconfigmap">configMap</a></b></td> <td>object</td> <td> The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap.<br/> </td> <td>false</td> </tr><tr> - <td><b><a href="#benchmarkspecsutindexfilesystem">fileSystem</a></b></td> + <td><b><a href="#benchmarkspecsutresourcesindexfilesystem">fileSystem</a></b></td> <td>object</td> <td> The fileSystem resourceSet loads the Kubernetes manifests from the filesystem.<br/> @@ -621,8 +710,8 @@ The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. </table> -### benchmark.spec.sut[index].configMap -<sup><sup>[↩ Parent](#benchmarkspecsutindex)</sup></sup> +### benchmark.spec.sut.resources[index].configMap +<sup><sup>[↩ Parent](#benchmarkspecsutresourcesindex)</sup></sup> @@ -655,8 +744,8 @@ The configMap resourceSet loads the Kubernetes manifests from an Kubernetes conf </table> -### benchmark.spec.sut[index].fileSystem -<sup><sup>[↩ Parent](#benchmarkspecsutindex)</sup></sup> +### benchmark.spec.sut.resources[index].fileSystem +<sup><sup>[↩ Parent](#benchmarkspecsutresourcesindex)</sup></sup> diff --git a/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml index 33c120371155134dae73ff78b42869ab64fdd0fe..686a98a77c2c46d93542df32a0337d3c4b22d7de 100644 --- a/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc1-flink/uc1-flink-benchmark-operator.yaml @@ -3,24 +3,25 @@ kind: benchmark metadata: name: uc1-flink spec: - infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc1-flink" - files: - - "uc1-flink/flink-configuration-configmap.yaml" - - "uc1-flink/taskmanager-deployment.yaml" - - "uc1-flink/taskmanager-service.yaml" - - "uc1-flink/service-monitor.yaml" - - "uc1-flink/jobmanager-service.yaml" - - "uc1-flink/jobmanager-deployment.yaml" - #- "uc1-flink/jobmanager-rest-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc1-flink" + files: + - "uc1-flink/flink-configuration-configmap.yaml" + - "uc1-flink/taskmanager-deployment.yaml" + - "uc1-flink/taskmanager-service.yaml" + - "uc1-flink/service-monitor.yaml" + - "uc1-flink/jobmanager-service.yaml" + - "uc1-flink/jobmanager-deployment.yaml" + #- "uc1-flink/jobmanager-rest-service.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc1-loadgen" - files: - - "uc1-kstreams/uc1-load-generator-deployment.yaml" - - "uc1-kstreams/uc1-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc1-loadgen" + files: + - "uc1-kstreams/uc1-load-generator-deployment.yaml" + - "uc1-kstreams/uc1-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml index 8dade1e1db560106b3617e649c1163084cee468c..0fb630107598a6d1373763847c7ed3ef3b717278 100644 --- a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-operator.yaml @@ -3,21 +3,22 @@ kind: benchmark metadata: name: uc1-kstreams spec: - infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc1-kstreams" - files: - - "uc1-kstreams/uc1-kstreams-deployment.yaml" - - "uc1-kstreams/uc1-kstreams-service.yaml" - - "uc1-kstreams/uc1-jmx-configmap.yaml" - - "uc1-kstreams/uc1-service-monitor.yaml" + resources: + - configMap: + name: "benchmark-resources-uc1-kstreams" + files: + - "uc1-kstreams/uc1-kstreams-deployment.yaml" + - "uc1-kstreams/uc1-kstreams-service.yaml" + - "uc1-kstreams/uc1-jmx-configmap.yaml" + - "uc1-kstreams/uc1-service-monitor.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc1-loadgen" - files: - - "uc1-kstreams/uc1-load-generator-deployment.yaml" - - "uc1-kstreams/uc1-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc1-loadgen" + files: + - "uc1-kstreams/uc1-load-generator-deployment.yaml" + - "uc1-kstreams/uc1-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml index 0b04e69f6937567b0c6f05178c29b6fd6b9140a1..d0ef1bbc87b4e92a09ccf669deeeb36b04677044 100644 --- a/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc1-kstreams/uc1-benchmark-standalone.yaml @@ -1,19 +1,20 @@ name: "uc1-kstreams" -infrastructure: [] -appResourceSet: - - configMap: - name: "benchmark-resources-uc1-kstreams" - files: - - "uc1-kstreams/uc1-kstreams-deployment.yaml" - - "uc1-kstreams/uc1-kstreams-service.yaml" - - "uc1-kstreams/uc1-jmx-configmap.yaml" - - "uc1-kstreams/uc1-service-monitor.yaml" -loadGenResourceSet: - - configMap: - name: "benchmark-resources-uc1-loadgen" - files: - - "uc1-kstreams/uc1-load-generator-deployment.yaml" - - "uc1-kstreams/uc1-load-generator-service.yaml" +sut: + resources: + - configMap: + name: "benchmark-resources-uc1-kstreams" + files: + - "uc1-kstreams/uc1-kstreams-deployment.yaml" + - "uc1-kstreams/uc1-kstreams-service.yaml" + - "uc1-kstreams/uc1-jmx-configmap.yaml" + - "uc1-kstreams/uc1-service-monitor.yaml" +loadGenerator: + resources: + - configMap: + name: "benchmark-resources-uc1-loadgen" + files: + - "uc1-kstreams/uc1-load-generator-deployment.yaml" + - "uc1-kstreams/uc1-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml index 6990538013cc5fd4f1c1fbf92098c73d544a05c7..c838fb098b15cc5a2a83e8df5d412c75351d845c 100644 --- a/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc2-flink/uc2-flink-benchmark-operator.yaml @@ -3,24 +3,25 @@ kind: benchmark metadata: name: uc2-flink spec: - infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc2-flink" - files: - - "uc2-flink/flink-configuration-configmap.yaml" - - "uc2-flink/taskmanager-deployment.yaml" - - "uc2-flink/taskmanager-service.yaml" - - "uc2-flink/service-monitor.yaml" - - "uc2-flink/jobmanager-service.yaml" - - "uc2-flink/jobmanager-deployment.yaml" - #- "uc2-flink/jobmanager-rest-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc2-flink" + files: + - "uc2-flink/flink-configuration-configmap.yaml" + - "uc2-flink/taskmanager-deployment.yaml" + - "uc2-flink/taskmanager-service.yaml" + - "uc2-flink/service-monitor.yaml" + - "uc2-flink/jobmanager-service.yaml" + - "uc2-flink/jobmanager-deployment.yaml" + #- "uc2-flink/jobmanager-rest-service.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc2-loadgen" - files: - - "uc2-kstreams/uc2-load-generator-deployment.yaml" - - "uc2-kstreams/uc2-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc2-loadgen" + files: + - "uc2-kstreams/uc2-load-generator-deployment.yaml" + - "uc2-kstreams/uc2-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml index b97902c075ef88139533c18469c86fc77b6ef4ba..e94cce184f205fc59a2314a4fe7d59f681f37058 100644 --- a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-operator.yaml @@ -3,8 +3,8 @@ kind: benchmark metadata: name: uc2-kstreams spec: - infrastructure: [] sut: + resources: - configMap: name: "benchmark-resources-uc2-kstreams" files: @@ -13,11 +13,12 @@ spec: - "uc2-kstreams/uc2-jmx-configmap.yaml" - "uc2-kstreams/uc2-service-monitor.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc2-loadgen" - files: - - "uc2-kstreams/uc2-load-generator-deployment.yaml" - - "uc2-kstreams/uc2-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc2-loadgen" + files: + - "uc2-kstreams/uc2-load-generator-deployment.yaml" + - "uc2-kstreams/uc2-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml index 9306b8839da2a80e9aad9bbb24dcfdbf70e56f0b..f9e5e2c170c9d84238f252adbddc2bf108a832e3 100644 --- a/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc2-kstreams/uc2-benchmark-standalone.yaml @@ -1,19 +1,20 @@ name: "uc2-kstreams" -infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc2-kstreams" - files: - - "uc2-kstreams/uc2-kstreams-deployment.yaml" - - "uc2-kstreams/uc2-kstreams-service.yaml" - - "uc2-kstreams/uc2-jmx-configmap.yaml" - - "uc2-kstreams/uc2-service-monitor.yaml" + resources: + - configMap: + name: "benchmark-resources-uc2-kstreams" + files: + - "uc2-kstreams/uc2-kstreams-deployment.yaml" + - "uc2-kstreams/uc2-kstreams-service.yaml" + - "uc2-kstreams/uc2-jmx-configmap.yaml" + - "uc2-kstreams/uc2-service-monitor.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc2-loadgen" - files: - - "uc2-kstreams/uc2-load-generator-deployment.yaml" - - "uc2-kstreams/uc2-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc2-loadgen" + files: + - "uc2-kstreams/uc2-load-generator-deployment.yaml" + - "uc2-kstreams/uc2-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc3-flink/test-exec.yaml b/theodolite-benchmarks/definitions/uc3-flink/test-exec.yaml deleted file mode 100644 index 48151dc3c3ba473a6725e1dfceb8b67f60f6f890..0000000000000000000000000000000000000000 --- a/theodolite-benchmarks/definitions/uc3-flink/test-exec.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: theodolite.com/v1 -kind: execution -metadata: - name: uc3-flink-template -spec: - benchmark: "uc3-flink" - load: - loadType: "NumSensors" - loadValues: [100] - resources: - resourceType: "Instances" - resourceValues: [1] - slos: - - sloType: "lag trend percent" - prometheusUrl: "http://prometheus-operated:9090" - offset: 0 - properties: - percent: 0.05 - externalSloUrl: "http://localhost:80/evaluate-slope" - warmup: 60 # in seconds - execution: - strategy: "LinearSearch" - duration: 300 # in seconds - repetitions: 1 - loadGenerationDelay: 30 # in seconds - restrictions: - - "LowerBound" - configOverrides: - - patcher: - type: "ResourceLimitPatcher" - resource: "uc3-flink/jobmanager-deployment.yaml" - properties: - container: "jobmanager" - limitedResource: "cpu" - value: "200m" - - patcher: - type: "ResourceLimitPatcher" - resource: "uc3-flink/jobmanager-deployment.yaml" - properties: - container: "jobmanager" - limitedResource: "memory" - value: "1Gi" - - patcher: - type: "ResourceLimitPatcher" - resource: "uc3-flink/taskmanager-deployment.yaml" - properties: - container: "taskmanager" - limitedResource: "cpu" - value: "200m" - - patcher: - type: "ResourceLimitPatcher" - resource: "uc3-flink/taskmanager-deployment.yaml" - properties: - container: "taskmanager" - limitedResource: "memory" - value: "1Gi" \ No newline at end of file diff --git a/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml index af126fe8b2a203481213be617aa9e20dd59eea1f..cd6ee5b9c175b707c383a9cd229e9ee8e2d463d6 100644 --- a/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc3-flink/uc3-flink-benchmark-operator.yaml @@ -3,24 +3,25 @@ kind: benchmark metadata: name: uc3-flink spec: - infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc3-flink" - files: - - "uc3-flink/flink-configuration-configmap.yaml" - - "uc3-flink/taskmanager-deployment.yaml" - - "uc3-flink/taskmanager-service.yaml" - - "uc3-flink/service-monitor.yaml" - - "uc3-flink/jobmanager-service.yaml" - - "uc3-flink/jobmanager-deployment.yaml" - #- "uc3-flink/jobmanager-rest-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc3-flink" + files: + - "uc3-flink/flink-configuration-configmap.yaml" + - "uc3-flink/taskmanager-deployment.yaml" + - "uc3-flink/taskmanager-service.yaml" + - "uc3-flink/service-monitor.yaml" + - "uc3-flink/jobmanager-service.yaml" + - "uc3-flink/jobmanager-deployment.yaml" + #- "uc3-flink/jobmanager-rest-service.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc3-loadgen" - files: - - "uc3-kstreams/uc3-load-generator-deployment.yaml" - - "uc3-kstreams/uc3-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc3-loadgen" + files: + - "uc3-kstreams/uc3-load-generator-deployment.yaml" + - "uc3-kstreams/uc3-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml index d51cc9a94ad814622862c5d6630de3b05eda9ad9..003ce2fae0f91252a3aff6b7ad673fa88286b1dc 100644 --- a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-operator.yaml @@ -3,21 +3,22 @@ kind: benchmark metadata: name: uc3-kstreams spec: - infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc3-kstreams" - files: - - "uc3-kstreams/uc3-kstreams-deployment.yaml" - - "uc3-kstreams/uc3-kstreams-service.yaml" - - "uc3-kstreams/uc3-jmx-configmap.yaml" - - "uc3-kstreams/uc3-service-monitor.yaml" + resources: + - configMap: + name: "benchmark-resources-uc3-kstreams" + files: + - "uc3-kstreams/uc3-kstreams-deployment.yaml" + - "uc3-kstreams/uc3-kstreams-service.yaml" + - "uc3-kstreams/uc3-jmx-configmap.yaml" + - "uc3-kstreams/uc3-service-monitor.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc3-loadgen" - files: - - "uc3-kstreams/uc3-load-generator-deployment.yaml" - - "uc3-kstreams/uc3-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc3-loadgen" + files: + - "uc3-kstreams/uc3-load-generator-deployment.yaml" + - "uc3-kstreams/uc3-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml index 13c499d63b902c93091b48608a020003f52ae6fc..48f2501928924677e5c5590a0d84c80e033c8f23 100644 --- a/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc3-kstreams/uc3-benchmark-standalone.yaml @@ -1,19 +1,20 @@ name: "uc3-kstreams" -infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc3-kstreams" - files: - - "uc3-kstreams/uc3-kstreams-deployment.yaml" - - "uc3-kstreams/uc3-kstreams-service.yaml" - - "uc3-kstreams/uc3-jmx-configmap.yaml" - - "uc3-kstreams/uc3-service-monitor.yaml" + resources: + - configMap: + name: "benchmark-resources-uc3-kstreams" + files: + - "uc3-kstreams/uc3-kstreams-deployment.yaml" + - "uc3-kstreams/uc3-kstreams-service.yaml" + - "uc3-kstreams/uc3-jmx-configmap.yaml" + - "uc3-kstreams/uc3-service-monitor.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc3-loadgen" - files: - - "uc3-kstreams/uc3-load-generator-deployment.yaml" - - "uc3-kstreams/uc3-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc3-loadgen" + files: + - "uc3-kstreams/uc3-load-generator-deployment.yaml" + - "uc3-kstreams/uc3-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml index dd99cfebca451326dc5757206ffaf7ae1dd3c017..74d445bee18d7e5c1b6345a3c432e8c3eb5d2729 100644 --- a/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc4-flink/uc4-flink-benchmark-operator.yaml @@ -3,24 +3,25 @@ kind: benchmark metadata: name: uc4-flink spec: - infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc4-flink" - files: - - "uc4-flink/flink-configuration-configmap.yaml" - - "uc4-flink/taskmanager-deployment.yaml" - - "uc4-flink/taskmanager-service.yaml" - - "uc4-flink/service-monitor.yaml" - - "uc4-flink/jobmanager-service.yaml" - - "uc4-flink/jobmanager-deployment.yaml" - #- "uc4-flink/jobmanager-rest-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc4-flink" + files: + - "uc4-flink/flink-configuration-configmap.yaml" + - "uc4-flink/taskmanager-deployment.yaml" + - "uc4-flink/taskmanager-service.yaml" + - "uc4-flink/service-monitor.yaml" + - "uc4-flink/jobmanager-service.yaml" + - "uc4-flink/jobmanager-deployment.yaml" + #- "uc4-flink/jobmanager-rest-service.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc4-loadgen" - files: - - "uc4-kstreams/uc4-load-generator-deployment.yaml" - - "uc4-kstreams/uc4-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc4-loadgen" + files: + - "uc4-kstreams/uc4-load-generator-deployment.yaml" + - "uc4-kstreams/uc4-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml index ab3b5f95f60411225a1e8200aee5a34f728b1c3d..6f991eb5e76fa164eb7949985452f1b63a55e857 100644 --- a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml +++ b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-operator.yaml @@ -3,21 +3,22 @@ kind: benchmark metadata: name: uc4-kstreams spec: - infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc4-kstreams" - files: - - "uc4-kstreams/uc4-kstreams-deployment.yaml" - - "uc4-kstreams/uc4-kstreams-service.yaml" - - "uc4-kstreams/uc4-jmx-configmap.yaml" + resources: + - configMap: + name: "benchmark-resources-uc4-kstreams" + files: + - "uc4-kstreams/uc4-kstreams-deployment.yaml" + - "uc4-kstreams/uc4-kstreams-service.yaml" + - "uc4-kstreams/uc4-jmx-configmap.yaml" - "uc4-kstreams/uc4-service-monitor.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc4-loadgen" - files: - - "uc4-kstreams/uc4-load-generator-deployment.yaml" - - "uc4-kstreams/uc4-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc4-loadgen" + files: + - "uc4-kstreams/uc4-load-generator-deployment.yaml" + - "uc4-kstreams/uc4-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml index 76ca678d0d223a0485bac3425905288851b7eefd..b09cd420b39b0189090ad8895fda30fb7fd4bddc 100644 --- a/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml +++ b/theodolite-benchmarks/definitions/uc4-kstreams/uc4-benchmark-standalone.yaml @@ -1,19 +1,20 @@ name: "uc4-kstreams" -infrastructure: [] sut: - - configMap: - name: "benchmark-resources-uc4-kstreams" - files: - - "uc4-kstreams/uc4-kstreams-deployment.yaml" - - "uc4-kstreams/uc4-kstreams-service.yaml" - - "uc4-kstreams/uc4-jmx-configmap.yaml" - - "uc4-kstreams/uc4-service-monitor.yaml" + resources: + - configMap: + name: "benchmark-resources-uc4-kstreams" + files: + - "uc4-kstreams/uc4-kstreams-deployment.yaml" + - "uc4-kstreams/uc4-kstreams-service.yaml" + - "uc4-kstreams/uc4-jmx-configmap.yaml" + - "uc4-kstreams/uc4-service-monitor.yaml" loadGenerator: - - configMap: - name: "benchmark-resources-uc4-loadgen" - files: - - "uc4-kstreams/uc4-load-generator-deployment.yaml" - - "uc4-kstreams/uc4-load-generator-service.yaml" + resources: + - configMap: + name: "benchmark-resources-uc4-loadgen" + files: + - "uc4-kstreams/uc4-load-generator-deployment.yaml" + - "uc4-kstreams/uc4-load-generator-service.yaml" resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite/crd/crd-benchmark.yaml b/theodolite/crd/crd-benchmark.yaml index c5d08e78685e17ad65bd60c12656ea81c9c47e7b..befab6f98c2d376218de49bf88e5a037ec13d525 100644 --- a/theodolite/crd/crd-benchmark.yaml +++ b/theodolite/crd/crd-benchmark.yaml @@ -20,110 +20,123 @@ spec: properties: spec: type: object - required: ["infrastructure", "sut", "loadGenerator", "resourceTypes", "loadTypes", "kafkaConfig"] + required: ["sut", "loadGenerator", "resourceTypes", "loadTypes", "kafkaConfig"] properties: name: description: This field exists only for technical reasons and should not be set by the user. The value of the field will be overwritten. type: string infrastructure: - description: A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure. - type: array - items: - type: object - oneOf: - - required: [ configMap ] - - required: [ fileSystem ] - properties: - configMap: - description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. - type: object - properties: - name: - description: The name of the configMap - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string - fileSystem: - description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + description: (Optional) A list of file names that reference Kubernetes resources that are deployed on the cluster to create the required infrastructure. + type: object + default: {} + properties: + resources: + type: array + default: [] + items: type: object + oneOf: + - required: [ configMap ] + - required: [ fileSystem ] properties: - path: - description: The path to the folder which contains the Kubernetes manifests files. - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string + configMap: + description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. + type: object + properties: + name: + description: The name of the configMap + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + fileSystem: + description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + path: + description: The path to the folder which contains the Kubernetes manifests files. + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string sut: description: The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. - type: array - items: - type: object - oneOf: - - required: [ configMap ] - - required: [ fileSystem ] - properties: - configMap: - description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. - type: object - properties: - name: - description: The name of the configMap - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string - fileSystem: - description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + resources: + type: array + default: [ ] + items: type: object + oneOf: + - required: [ configMap ] + - required: [ fileSystem ] properties: - path: - description: The path to the folder which contains the Kubernetes manifests files. - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string + configMap: + description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. + type: object + properties: + name: + description: The name of the configMap + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + fileSystem: + description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + path: + description: The path to the folder which contains the Kubernetes manifests files. + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string loadGenerator: description: The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet. - type: array - items: - type: object - oneOf: - - required: [ configMap ] - - required: [ fileSystem ] - properties: - configMap: - description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. - type: object - properties: - name: - description: The name of the configMap - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string - fileSystem: - description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + resources: + type: array + default: [] + items: type: object + oneOf: + - required: [ configMap ] + - required: [ fileSystem ] properties: - path: - description: The path to the folder which contains the Kubernetes manifests files. - type: string - files: - description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. - type: array - items: - type: string + configMap: + description: The configMap resourceSet loads the Kubernetes manifests from an Kubernetes configMap. + type: object + properties: + name: + description: The name of the configMap + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string + fileSystem: + description: The fileSystem resourceSet loads the Kubernetes manifests from the filesystem. + type: object + properties: + path: + description: The path to the folder which contains the Kubernetes manifests files. + type: string + files: + description: (Optional) Specifies which files from the configMap should be loaded. If this field is not set, all files are loaded. + type: array + items: + type: string resourceTypes: description: A list of resource types that can be scaled for this `benchmark` resource. For each resource type the concrete values are defined in the `execution` object. type: array diff --git a/theodolite/examples/operator/example-benchmark.yaml b/theodolite/examples/operator/example-benchmark.yaml index e9c6b2f33e8d8af6f8bcec9cfea68d06168a3d32..3452fff9c729d680890d6eafa685ce2f13b098d6 100644 --- a/theodolite/examples/operator/example-benchmark.yaml +++ b/theodolite/examples/operator/example-benchmark.yaml @@ -3,18 +3,19 @@ kind: benchmark metadata: name: uc1-kstreams spec: - infrastructure: [] sut: - - configMap: - name: "example-configmap" - files: - - "uc1-kstreams-deployment.yaml" + resources: + - configMap: + name: "example-configmap" + files: + - "uc1-kstreams-deployment.yaml" loadGenerator: - - configMap: - name: "example-configmap" - files: - - uc1-load-generator-service.yaml - - uc1-load-generator-deployment.yaml + resources: + - configMap: + name: "example-configmap" + files: + - uc1-load-generator-service.yaml + - uc1-load-generator-deployment.yaml resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite/examples/resources/test-service.yaml b/theodolite/examples/resources/test-service.yaml deleted file mode 100644 index 2b502810b55cfc04ce94cd9b14c6e98a7d5ddb87..0000000000000000000000000000000000000000 --- a/theodolite/examples/resources/test-service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: test-service - labels: - app: test-service -spec: - type: ClusterIP - clusterIP: None - selector: - app: test - ports: - - name: coordination - port: 5701 - targetPort: 5701 - protocol: TCP diff --git a/theodolite/examples/standalone/example-benchmark.yaml b/theodolite/examples/standalone/example-benchmark.yaml index e9ec8fc15006151a9bee837d516419f02e07042b..0d5df81b163c1285f12971d08518dddf4b451d0f 100644 --- a/theodolite/examples/standalone/example-benchmark.yaml +++ b/theodolite/examples/standalone/example-benchmark.yaml @@ -1,16 +1,18 @@ name: "uc1-kstreams" infrastructure: [] sut: - - configMap: - name: "example-configmap" - files: - - "uc1-kstreams-deployment.yaml" + resources: + - configMap: + name: "example-configmap" + files: + - "uc1-kstreams-deployment.yaml" loadGenerator: - - configMap: - name: "example-configmap" - files: - - uc1-load-generator-service.yaml - - uc1-load-generator-deployment.yaml + resources: + - configMap: + name: "example-configmap" + files: + - uc1-load-generator-service.yaml + - uc1-load-generator-deployment.yaml resourceTypes: - typeName: "Instances" patchers: diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt index b6eb1d149cd46f011fd61be70af6f18786afd2ed..5b6f956ec236ac8113a426dc22d0d08a968ca7b9 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/KubernetesBenchmark.kt @@ -40,9 +40,9 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { lateinit var resourceTypes: List<TypeName> lateinit var loadTypes: List<TypeName> lateinit var kafkaConfig: KafkaConfig - lateinit var infrastructure: List<ResourceSets> - lateinit var sut: List<ResourceSets> - lateinit var loadGenerator: List<ResourceSets> + lateinit var infrastructure: Resources + lateinit var sut: Resources + lateinit var loadGenerator: Resources var namespace = System.getenv("NAMESPACE") ?: DEFAULT_NAMESPACE @Transient @@ -59,14 +59,14 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { override fun setupInfrastructure() { val kubernetesManager = K8sManager(this.client) - loadKubernetesResources(this.infrastructure) + loadKubernetesResources(this.infrastructure.resources) .map{it.second} .forEach { kubernetesManager.deploy(it) } } override fun teardownInfrastructure() { val kubernetesManager = K8sManager(this.client) - loadKubernetesResources(this.infrastructure) + loadKubernetesResources(this.infrastructure.resources) .map{it.second} .forEach { kubernetesManager.remove(it) } } @@ -89,8 +89,8 @@ class KubernetesBenchmark : KubernetesResource, Benchmark { ): BenchmarkDeployment { logger.info { "Using $namespace as namespace." } - val appResources = loadKubernetesResources(this.sut) - val loadGenResources = loadKubernetesResources(this.loadGenerator) + val appResources = loadKubernetesResources(this.sut.resources) + val loadGenResources = loadKubernetesResources(this.loadGenerator.resources) val patcherFactory = PatcherFactory() diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt b/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt new file mode 100644 index 0000000000000000000000000000000000000000..0187735b8fd273419874942cb7ed68797732c84c --- /dev/null +++ b/theodolite/src/main/kotlin/theodolite/benchmark/Resources.kt @@ -0,0 +1,13 @@ +package theodolite.benchmark + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize +import com.fasterxml.jackson.databind.annotation.JsonSerialize +import io.quarkus.runtime.annotations.RegisterForReflection + +@JsonDeserialize +@RegisterForReflection +class Resources { + + lateinit var resources: List<ResourceSets> + +} \ No newline at end of file diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt index 4f5430eb6bd9a799774decd33ada3055b2f72ed4..14d13160909817dc43d118173bf3ceee9bb47520 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt @@ -68,8 +68,8 @@ class TheodoliteController( try { val modifier = ConfigOverrideModifier( execution = execution, - resources = benchmark.loadKubernetesResources(benchmark.sut).map { it.first } - + benchmark.loadKubernetesResources(benchmark.loadGenerator).map { it.first } + resources = benchmark.loadKubernetesResources(benchmark.sut.resources).map { it.first } + + benchmark.loadKubernetesResources(benchmark.loadGenerator.resources).map { it.first } ) modifier.setAdditionalLabels( labelValue = execution.name, diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt index a5955e83bc29bbe43a839e8df71dffa267449958..e294ea539ea60104cc00e9f73de790302ad52670 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt @@ -1,6 +1,7 @@ package theodolite.execution.operator import theodolite.benchmark.KubernetesBenchmark +import theodolite.benchmark.Resources import theodolite.model.crd.BenchmarkCRD import theodolite.util.KafkaConfig @@ -24,9 +25,14 @@ class BenchmarkCRDummy(name: String) { benchmarkCR.kind = "Benchmark" benchmarkCR.apiVersion = "v1" - benchmark.infrastructure = emptyList() - benchmark.sut = emptyList() - benchmark.loadGenerator = emptyList() + + benchmark.infrastructure = Resources() + benchmark.sut = Resources() + benchmark.loadGenerator = Resources() + + benchmark.infrastructure.resources = emptyList() + benchmark.sut.resources = emptyList() + benchmark.loadGenerator.resources = emptyList() benchmark.resourceTypes = emptyList() benchmark.loadTypes = emptyList() diff --git a/theodolite/src/test/resources/k8s-resource-files/test-benchmark.yaml b/theodolite/src/test/resources/k8s-resource-files/test-benchmark.yaml index 8cd4be5fa0855e0cef8b456230242a863f819999..e690aa56d74d695b0b81469023ccf82d0046cf45 100644 --- a/theodolite/src/test/resources/k8s-resource-files/test-benchmark.yaml +++ b/theodolite/src/test/resources/k8s-resource-files/test-benchmark.yaml @@ -3,7 +3,6 @@ kind: benchmark metadata: name: example-benchmark spec: - infrastructure: [] appResource: - "uc1-kstreams-deployment.yaml" - "aggregation-service.yaml"