Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • she/theodolite
1 result
Show changes
Commits on Source (61)
Showing
with 900 additions and 152 deletions
......@@ -307,11 +307,23 @@ deploy-theodolite:
# Theodolite SLO Checker: Lag Trend
test-slo-checker-lag-trend:
stage: test
image: python:3.7-slim
tags:
- exec-docker
script:
- cd slope-evaluator
- pip install -r requirements.txt
- cd app
- python -m unittest
deploy-slo-checker-lag-trend:
stage: deploy
extends:
- .dind
needs: []
needs:
- test-slo-checker-lag-trend
script:
- DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
- docker build --pull -t theodolite-slo-checker-lag-trend slope-evaluator
......
charts
\ No newline at end of file
......@@ -253,7 +253,7 @@ data:
"steppedLine": false,
"targets": [
{
"expr": "sum by(group, topic) (kafka_consumergroup_group_lag > 0)",
"expr": "sum by(group, topic) (kafka_consumergroup_group_lag >= 0)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{topic}}",
......@@ -436,7 +436,7 @@ data:
"steppedLine": false,
"targets": [
{
"expr": "sum by(group,topic) (kafka_consumergroup_group_offset > 0)",
"expr": "sum by(group,topic) (kafka_consumergroup_group_offset >= 0)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{topic}}",
......@@ -527,7 +527,7 @@ data:
"steppedLine": false,
"targets": [
{
"expr": "count by(group,topic) (kafka_consumergroup_group_offset > 0)",
"expr": "count by(group,topic) (kafka_consumergroup_group_offset >= 0)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{topic}}",
......@@ -892,7 +892,7 @@ data:
"steppedLine": false,
"targets": [
{
"expr": "sum by(group) (kafka_consumergroup_group_lag > 0)",
"expr": "sum by(group) (kafka_consumergroup_group_lag >= 0)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "total lag",
......
{{- if .Values.benchmarkCRD.create -}}
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: benchmarks.theodolite.com
spec:
group: theodolite.com
version: v1alpha1
names:
kind: benchmark
plural: benchmarks
shortNames:
- bench
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required: ["spec"]
properties:
spec:
type: object
required: []
properties:
name:
type: string
appResource:
type: array
minItems: 1
items:
type: string
loadGenResource:
type: array
minItems: 1
items:
type: string
resourceTypes:
type: array
minItems: 1
items:
type: object
properties:
typeName:
type: string
patchers:
type: array
minItems: 1
items:
type: object
properties:
type:
type: string
default: ""
resource:
type: string
default: ""
config:
type: object
additionalProperties: true
x-kubernetes-map-type: "granular"
default:
"": ""
loadTypes:
type: array
minItems: 1
items:
type: object
properties:
typeName:
type: string
patchers:
type: array
minItems: 1
items:
type: object
properties:
type:
type: string
default: ""
resource:
type: string
default: ""
config:
type: object
additionalProperties: true
x-kubernetes-map-type: "granular"
default:
"": ""
kafkaConfig:
type: object
properties:
bootstrapServer:
type: string
topics:
type: array
minItems: 1
items:
type: object
required: []
properties:
name:
type: string
default: ""
numPartitions:
type: integer
default: 0
replicationFactor:
type: integer
default: 0
removeOnly:
type: boolean
default: false
additionalPrinterColumns:
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
scope: Namespaced
subresources:
status: {}
{{- end }}
\ No newline at end of file
{{- if .Values.executionCRD.create -}}
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: executions.theodolite.com
spec:
group: theodolite.com
version: v1alpha1
names:
kind: execution
plural: executions
scope: Namespaced
subresources:
status: {}
{{- end }}
\ No newline at end of file
shortNames:
- exec
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required: ["spec"]
properties:
spec:
type: object
required: ["benchmark", "load", "resources", "slos", "execution", "configOverrides"]
properties:
name:
type: string
default: ""
benchmark:
type: string
load: # definition of the load dimension
type: object
required: ["loadType", "loadValues"]
properties:
loadType:
type: string
loadValues:
type: array
items:
type: integer
resources: # definition of the resource dimension
type: object
required: ["resourceType", "resourceValues"]
properties:
resourceType:
type: string
resourceValues:
type: array
items:
type: integer
slos: # def of service level objectives
type: array
items:
type: object
required: ["sloType", "threshold", "prometheusUrl", "externalSloUrl", "offset", "warmup"]
properties:
sloType:
type: string
threshold:
type: integer
prometheusUrl:
type: string
externalSloUrl:
type: string
offset:
type: integer
warmup:
type: integer
execution: # def execution config
type: object
required: ["strategy", "duration", "repetitions", "restrictions"]
properties:
strategy:
type: string
duration:
type: integer
repetitions:
type: integer
loadGenerationDelay:
type: integer
restrictions:
type: array
items:
type: string
configOverrides:
type: array
items:
type: object
properties:
patcher:
type: object
properties:
type:
type: string
default: ""
resource:
type: string
default: ""
config:
type: object
additionalProperties: true
x-kubernetes-map-type: "granular"
default:
"": ""
value:
type: string
status:
type: object
properties:
executionState:
description: ""
type: string
executionDuration:
description: "Duration of the execution in seconds"
type: string
additionalPrinterColumns:
- name: STATUS
type: string
description: State of the execution
jsonPath: .status.executionState
- name: Duration
type: string
description: Duration of the execution
jsonPath: .status.executionDuration
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
scope: Namespaced
\ No newline at end of file
......@@ -56,5 +56,14 @@ rules:
- watch
- update
- patch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- delete
- get
- create
- update
{{- end }}
{{- end }}
\ No newline at end of file
......@@ -25,8 +25,16 @@ grafana:
adminUser: admin
adminPassword: admin
grafana.ini:
#org_name: Theodolite
auth.anonymous:
# enable anonymous access
enabled: true
org_role: Admin # Role for unauthenticated users, other valid values are `Viewer`, `Editor` and `Admin`
users:
default_theme: light
#dashboards: # the following doesn't work but is planed
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
#default_home_dashboard_path: "/tmp/dashboards/k8s-dashboard.json"
## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
sidecar:
......
......@@ -52,4 +52,12 @@ rules:
- watch
- update
- patch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- delete
- get
- create
- update
\ No newline at end of file
......@@ -5,7 +5,7 @@
For development:
```sh
uvicorn main:app --reload
uvicorn main:app --reload # run this command inside the app/ folder
```
## Build the docker image:
......@@ -32,7 +32,7 @@ The running webserver provides a REST API with the following route:
* /evaluate-slope
* Method: POST
* Body:
* total_lag
* total_lags
* threshold
* warmup
......@@ -40,14 +40,16 @@ The body of the request must be a JSON string that satisfies the following condi
* **total_lag**: This property is based on the [Range Vector type](https://www.prometheus.io/docs/prometheus/latest/querying/api/#range-vectors) from Prometheus and must have the following JSON structure:
```
{
"metric": {
"group": "<label_value>"
},
"values": [
[
<unix_timestamp>,
"<sample_value>"
{
[
"metric": {
"group": "<label_value>"
},
"values": [
[
<unix_timestamp>,
"<sample_value>"
]
]
]
}
......
......@@ -5,6 +5,7 @@ import os
import pandas as pd
import json
import sys
from statistics import median
app = FastAPI()
......@@ -20,7 +21,7 @@ elif os.getenv('LOG_LEVEL') == 'WARNING':
elif os.getenv('LOG_LEVEL') == 'DEBUG':
logger.setLevel(logging.DEBUG)
def execute(results, threshold, warmup):
def calculate_slope_trend(results, warmup):
d = []
for result in results:
group = result['metric']['group']
......@@ -39,13 +40,16 @@ def execute(results, threshold, warmup):
logger.error('Mark this subexperiment as not successful and continue benchmark.')
return False
result = trend_slope < threshold
logger.info("Computed lag trend slope is '%s'. Result is: %s", trend_slope, result)
return result
logger.info("Computed lag trend slope is '%s'", trend_slope)
return trend_slope
def check_service_level_objective(results, threshold):
return median(results) < threshold
@app.post("/evaluate-slope",response_model=bool)
async def evaluate_slope(request: Request):
data = json.loads(await request.body())
return execute(data['total_lag'], data['threshold'], data['warmup'])
results = [calculate_slope_trend(total_lag, data['warmup']) for total_lag in data['total_lags']]
return check_service_level_objective(results=results, threshold=data["threshold"])
logger.info("Slope evaluator is online")
\ No newline at end of file
logger.info("SLO evaluator is online")
\ No newline at end of file
import unittest
from main import app, check_service_level_objective
import json
from fastapi.testclient import TestClient
class TestSloEvaluation(unittest.TestCase):
client = TestClient(app)
def test_1_rep(self):
with open('../resources/test-1-rep-success.json') as json_file:
data = json.load(json_file)
response = self.client.post("/evaluate-slope", json=data)
self.assertEquals(response.json(), True)
def test_3_rep(self):
with open('../resources/test-3-rep-success.json') as json_file:
data = json.load(json_file)
response = self.client.post("/evaluate-slope", json=data)
self.assertEquals(response.json(), True)
def test_check_service_level_objective(self):
list = [1,2,3,4]
self.assertEquals(check_service_level_objective(list, 2), False)
self.assertEquals(check_service_level_objective(list, 3), True)
list = [1,2,3,4,5]
self.assertEquals(check_service_level_objective(list, 2), False)
self.assertEquals(check_service_level_objective(list, 4), True)
if __name__ == '__main__':
unittest.main()
\ No newline at end of file
fastapi==0.55.1
scikit-learn==0.20.3
pandas==1.0.3
uvicorn
requests
{
"total_lags": [
[
{
"metric": {
"group": "theodolite-uc1-application-0.0.1"
},
"values": [
[
1.621008960827E9,
"234"
],
[
1.621008965827E9,
"234"
],
[
1.621008970827E9,
"234"
],
[
1.621008975827E9,
"719"
],
[
1.621008980827E9,
"719"
],
[
1.621008985827E9,
"719"
],
[
1.621008990827E9,
"1026"
],
[
1.621008995827E9,
"1026"
],
[
1.621009000827E9,
"1026"
],
[
1.621009005827E9,
"534"
],
[
1.621009010827E9,
"534"
],
[
1.621009015827E9,
"534"
],
[
1.621009020827E9,
"943"
],
[
1.621009025827E9,
"943"
],
[
1.621009030827E9,
"943"
],
[
1.621009035827E9,
"66"
],
[
1.621009040827E9,
"66"
],
[
1.621009045827E9,
"66"
],
[
1.621009050827E9,
"841"
],
[
1.621009055827E9,
"841"
],
[
1.621009060827E9,
"841"
],
[
1.621009065827E9,
"405"
],
[
1.621009070827E9,
"405"
],
[
1.621009075827E9,
"405"
],
[
1.621009080827E9,
"201"
],
[
1.621009085827E9,
"201"
],
[
1.621009090827E9,
"201"
],
[
1.621009095827E9,
"227"
],
[
1.621009100827E9,
"227"
],
[
1.621009105827E9,
"227"
],
[
1.621009110827E9,
"943"
]
]
}
]
],
"threshold": 2000,
"warmup": 0
}
\ No newline at end of file
{
"total_lags": [
[
{
"metric": {
"group": "theodolite-uc1-application-0.0.1"
},
"values": [
[
1.621012384232E9,
"6073"
],
[
1.621012389232E9,
"6073"
],
[
1.621012394232E9,
"6073"
],
[
1.621012399232E9,
"227"
],
[
1.621012404232E9,
"227"
],
[
1.621012409232E9,
"227"
],
[
1.621012414232E9,
"987"
],
[
1.621012419232E9,
"987"
],
[
1.621012424232E9,
"987"
],
[
1.621012429232E9,
"100"
],
[
1.621012434232E9,
"100"
],
[
1.621012439232E9,
"100"
],
[
1.621012444232E9,
"959"
],
[
1.621012449232E9,
"959"
],
[
1.621012454232E9,
"959"
],
[
1.621012459232E9,
"625"
],
[
1.621012464232E9,
"625"
],
[
1.621012469232E9,
"625"
],
[
1.621012474232E9,
"683"
],
[
1.621012479232E9,
"683"
],
[
1.621012484232E9,
"683"
],
[
1.621012489232E9,
"156"
]
]
}
],
[
{
"metric": {
"group": "theodolite-uc1-application-0.0.1"
},
"values": [
[
1.621012545211E9,
"446"
],
[
1.621012550211E9,
"446"
],
[
1.621012555211E9,
"446"
],
[
1.621012560211E9,
"801"
],
[
1.621012565211E9,
"801"
],
[
1.621012570211E9,
"801"
],
[
1.621012575211E9,
"773"
],
[
1.621012580211E9,
"773"
],
[
1.621012585211E9,
"773"
],
[
1.621012590211E9,
"509"
],
[
1.621012595211E9,
"509"
],
[
1.621012600211E9,
"509"
],
[
1.621012605211E9,
"736"
],
[
1.621012610211E9,
"736"
],
[
1.621012615211E9,
"736"
],
[
1.621012620211E9,
"903"
],
[
1.621012625211E9,
"903"
],
[
1.621012630211E9,
"903"
],
[
1.621012635211E9,
"512"
],
[
1.621012640211E9,
"512"
],
[
1.621012645211E9,
"512"
]
]
}
],
[
{
"metric": {
"group": "theodolite-uc1-application-0.0.1"
},
"values": [
[
1.621012700748E9,
"6484"
],
[
1.621012705748E9,
"6484"
],
[
1.621012710748E9,
"6484"
],
[
1.621012715748E9,
"505"
],
[
1.621012720748E9,
"505"
],
[
1.621012725748E9,
"505"
],
[
1.621012730748E9,
"103"
],
[
1.621012735748E9,
"103"
],
[
1.621012740748E9,
"103"
],
[
1.621012745748E9,
"201"
],
[
1.621012750748E9,
"201"
],
[
1.621012755748E9,
"201"
],
[
1.621012760748E9,
"965"
],
[
1.621012765748E9,
"965"
],
[
1.621012770748E9,
"965"
],
[
1.621012775748E9,
"876"
],
[
1.621012780748E9,
"876"
],
[
1.621012785748E9,
"876"
],
[
1.621012790748E9,
"380"
],
[
1.621012795748E9,
"380"
],
[
1.621012800748E9,
"380"
]
]
}
]
],
"threshold": 2000,
"warmup": 0
}
\ No newline at end of file
......@@ -25,9 +25,12 @@ dependencies {
implementation 'io.quarkus:quarkus-kubernetes-client'
implementation 'org.apache.kafka:kafka-clients:2.7.0'
implementation 'khttp:khttp:1.0.0'
compile 'junit:junit:4.12'
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'io.rest-assured:rest-assured'
testImplementation 'org.junit-pioneer:junit-pioneer:1.4.0'
}
group 'theodolite'
......
......@@ -19,14 +19,16 @@ resourceTypes:
patchers:
- type: String
resources: String
<Patcher Arguments> ...
properties:
<Patcher Arguments> ...
...
loadTypes:
- typeName: String
patchers:
- type: String
resources: String
<Patcher Arguments> ...
properties:
<Patcher Arguments> ...
...
kafkaConfig:
bootstrapServer: String
......@@ -49,7 +51,7 @@ The properties have the following definitions:
* **patchers**: List of [patchers](#Patchers) used to scale this resource type. Each patcher has the following structure:
* **type**: Type of the [patcher](#Patchers). The concrete types can be looked up in the list of [patchers](#Patchers).
* **resources**: Specifies the Kubernetes resource to be patched.
* **Patcher Arguments**: (Optional) Patcher specific additional arguments.
* **properties**: *Patcher Arguments*: (Optional) Patcher specific additional arguments.
* **loadTypes**: A list of load types that can be scaled for this *benchmark*. For each load type the concrete values are defined in the *execution* object. Each load type has the following structure:
* **typeName**: Name of the load type.
* **patchers**: List of patchers used to scale * **resourceTypes**: A list of resource types that can be scaled for this *benchmark*. For each resource type the concrete values are defined in the *execution* resource object.Each resource type has the following structure:
......@@ -57,7 +59,7 @@ The properties have the following definitions:
* **patchers**: List of patchers used to scale this resource type. Each patcher has the following structure:
* **type**: Type of the Patcher. The concrete types can be looked up in the list of patchers.
* **resources**: Specifies the Kubernetes resource to be patched.
* **Patcher Arguments**: (Optional) Patcher specific additional arguments.
* **properties**: *Patcher Arguments*: (Optional) Patcher specific additional arguments as Map<String, String>.
* **kafkaConfig**: Contains the Kafka configuration.
* **bootstrapServers**: The bootstrap servers connection string.
* **topics**: List of topics to be created for each [experiment](#Experiment). Alternative theodolite offers the possibility to remove certain topics after each experiment.
......@@ -105,7 +107,8 @@ configurationOverrides:
- patcher:
type: String
resource: String
<Patcher Arguments> ...
properties:
<Patcher Arguments> ...
...
```
......@@ -136,7 +139,7 @@ The properties have the following definitions:
* **patcher**: Patcher used to patch a resource. Each patcher has the following structure:
* **type**: Type of the Patcher. The concrete types can be looked up in the list of patchers.
* **resources**: Specifies the Kubernetes resource to be patched.
* **Patcher Arguments**: (Optional) Patcher specific additional arguments.
* **properties**: *Patcher Arguments*: (Optional) Patcher specific additional arguments.
## Patchers
......@@ -159,19 +162,22 @@ The properties have the following definitions:
* **EnvVarPatcher**: Allows to modify the value of an environment variable for a container in a kubernetes deployment.
* **type**: "EnvVarPatcher"
* **resource**: "uc1-load-generator-deployment.yaml"
* **container**: "workload-generator"
* **variableName**: "NUM_SENSORS"
* **properties**:
* container: "workload-generator"
* variableName: "NUM_SENSORS"
* **NodeSelectorPatcher**: Changes the node selection field in kubernetes resources.
* **type**: "NodeSelectorPatcher"
* **resource**: "uc1-load-generator-deployment.yaml"
* **variableName**: "env"
* **properties**:
* variableName: "env"
* **value**: "prod"
* **ResourceLimitPatcher**: Changes the resource limit for a kubernetes resource.
* **resource**: "uc1-kstreams-deployment.yaml"
* **container**: "uc-application"
* **variableName**: "cpu" or "memory"
* **properties**:
* container: "uc-application"
* variableName: "cpu" or "memory"
* **value**:"1000m" or "2Gi"
* **SchedulerNamePatcher**: Changes the sheduler for kubernetes resources.
......@@ -182,7 +188,8 @@ The properties have the following definitions:
* **ImagePatcher**: Changes the image of a kubernetes resource. Currently not fully implemented.
* **type**: "ImagePatcher"
* **resource**: "uc1-kstreams-deployment.yaml"
* **container**: "uc-application"
* **properties**:
* container: "uc-application"
* **value**: "dockerhubrepo/imagename"
......
......@@ -17,10 +17,13 @@ loadTypes:
patchers:
- type: "EnvVarPatcher"
resource: "uc1-load-generator-deployment.yaml"
container: "workload-generator"
variableName: "NUM_SENSORS"
properties:
variableName: "NUM_SENSORS"
container: "workload-generator"
- type: "NumSensorsLoadGeneratorReplicaPatcher"
resource: "uc1-load-generator-deployment.yaml"
properties:
loadGenMaxRecords: "15000"
kafkaConfig:
bootstrapServer: "localhost:31290"
topics:
......
......@@ -20,29 +20,33 @@ execution:
loadGenerationDelay: 30 # in seconds, optional field, default is 0 seconds
restrictions:
- "LowerBound"
configOverrides: []
# - patcher:
# type: "NodeSelectorPatcher"
# resource: "uc1-load-generator-deployment.yaml"
# variableName: "env"
# value: "prod"
# - patcher:
# type: "NodeSelectorPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# variableName: "env"
# value: "prod"
# - patcher:
# type: "ResourceLimitPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# container: "uc-application"
# variableName: "cpu"
# value: "1000m"
# - patcher:
# type: "ResourceLimitPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# container: "uc-application"
# variableName: "memory"
# value: "2Gi"
configOverrides:
- patcher:
type: "NodeSelectorPatcher"
resource: "uc1-load-generator-deployment.yaml"
properties:
variableName: "env"
value: "prod"
- patcher:
type: "NodeSelectorPatcher"
resource: "uc1-kstreams-deployment.yaml"
properties:
variableName: "env"
value: "prod"
- patcher:
type: "ResourceLimitPatcher"
resource: "uc1-kstreams-deployment.yaml"
properties:
container: "uc-application"
limitedResource: "cpu"
value: "1000m"
- patcher:
type: "ResourceLimitPatcher"
resource: "uc1-kstreams-deployment.yaml"
properties:
container: "uc-application"
limitedResource: "memory"
value: "2Gi"
# - patcher:
# type: "SchedulerNamePatcher"
# resource: "uc1-kstreams-deployment.yaml"
......
apiVersion: theodolite.com/v1alpha1
apiVersion: theodolite.com/v1
kind: benchmark
metadata:
name: uc1-kstreams
#name: "uc1-kstreams"
appResource:
- "uc1-kstreams-deployment.yaml"
- "aggregation-service.yaml"
- "jmx-configmap.yaml"
- "uc1-service-monitor.yaml"
loadGenResource:
- "uc1-load-generator-deployment.yaml"
- "uc1-load-generator-service.yaml"
resourceTypes:
- typeName: "Instances"
patchers:
- type: "ReplicaPatcher"
resource: "uc1-kstreams-deployment.yaml"
loadTypes:
- typeName: "NumSensors"
patchers:
- type: "EnvVarPatcher"
resource: "uc1-load-generator-deployment.yaml"
container: "workload-generator"
variableName: "NUM_SENSORS"
- type: "NumSensorsLoadGeneratorReplicaPatcher"
resource: "uc1-load-generator-deployment.yaml"
kafkaConfig:
bootstrapServer: "theodolite-cp-kafka:9092"
topics:
- name: "input"
numPartitions: 40
replicationFactor: 1
- name: "theodolite-.*"
removeOnly: True
\ No newline at end of file
spec:
appResource:
- "uc1-kstreams-deployment.yaml"
- "aggregation-service.yaml"
- "jmx-configmap.yaml"
- "uc1-service-monitor.yaml"
loadGenResource:
- "uc1-load-generator-deployment.yaml"
- "uc1-load-generator-service.yaml"
resourceTypes:
- typeName: "Instances"
patchers:
- type: "ReplicaPatcher"
resource: "uc1-kstreams-deployment.yaml"
loadTypes:
- typeName: "NumSensors"
patchers:
- type: "EnvVarPatcher"
resource: "uc1-load-generator-deployment.yaml"
properties:
variableName: "NUM_SENSORS"
container: "workload-generator"
- type: "NumSensorsLoadGeneratorReplicaPatcher"
resource: "uc1-load-generator-deployment.yaml"
properties:
loadGenMaxRecords: "15000"
kafkaConfig:
bootstrapServer: "theodolite-cp-kafka:9092"
topics:
- name: "input"
numPartitions: 40
replicationFactor: 1
- name: "theodolite-.*"
removeOnly: True
\ No newline at end of file
apiVersion: theodolite.com/v1alpha1
apiVersion: theodolite.com/v1
kind: execution
metadata:
name: example-execution
#name: example-execution
benchmark: "uc1-kstreams"
load:
loadType: "NumSensors"
loadValues: [25000, 50000, 75000, 100000, 125000, 150000]
resources:
resourceType: "Instances"
resourceValues: [1, 2, 3, 4, 5]
slos:
- sloType: "lag trend"
threshold: 2000
prometheusUrl: "http://prometheus-operated:9090"
externalSloUrl: "http://localhost:80/evaluate-slope"
offset: 0
warmup: 60 # in seconds
execution:
strategy: "LinearSearch"
duration: 300 # in seconds
repetitions: 1
delay: 30 # in seconds
restrictions:
- "LowerBound"
configOverrides: []
# - patcher:
# type: "NodeSelectorPatcher"
# resource: "uc1-load-generator-deployment.yaml"
# variableName: "env"
# value: "prod"
# - patcher:
# type: "NodeSelectorPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# variableName: "env"
# value: "prod"
# - patcher:
# type: "ResourceLimitPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# container: "uc-application"
# variableName: "cpu"
# value: "1000m"
# - patcher:
# type: "ResourceLimitPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# container: "uc-application"
# variableName: "memory"
# value: "2Gi"
# - patcher:
# type: "SchedulerNamePatcher"
# resource: "uc1-kstreams-deployment.yaml"
# value: "random-scheduler"
spec:
benchmark: "uc1-kstreams"
load:
loadType: "NumSensors"
loadValues: [25000, 50000, 75000, 100000, 125000, 150000]
resources:
resourceType: "Instances"
resourceValues: [1, 2, 3, 4, 5]
slos:
- sloType: "lag trend"
threshold: 2000
prometheusUrl: "http://prometheus-operated:9090"
externalSloUrl: "http://localhost:80/evaluate-slope"
offset: 0
warmup: 60 # in seconds
execution:
strategy: "LinearSearch"
duration: 300 # in seconds
repetitions: 1
loadGenerationDelay: 30 # in seconds
restrictions:
- "LowerBound"
configOverrides:
# - patcher:
# type: "NodeSelectorPatcher"
# resource: "uc1-load-generator-deployment.yaml"
# properties:
# variableName: "env"
# value: "prod"
# - patcher:
# type: "NodeSelectorPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# properties:
# variableName: "env"
# value: "prod"
# - patcher:
# type: "ResourceLimitPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# properties:
# container: "uc-application"
# limitedResource: "cpu"
# value: "1000m"
# - patcher:
# type: "ResourceLimitPatcher"
# resource: "uc1-kstreams-deployment.yaml"
# properties:
# container: "uc-application"
# limitedResource: "memory"
# value: "2Gi"
# - patcher:
# type: "SchedulerNamePatcher"
# resource: "uc1-kstreams-deployment.yaml"
# value: "random-scheduler"