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 (65)
Showing
with 353 additions and 49 deletions
......@@ -51,7 +51,7 @@ build-benchmarks:
- "theodolite-benchmarks/build/libs/*.jar"
- "theodolite-benchmarks/*/build/libs/*.jar"
- "theodolite-benchmarks/*/build/distributions/*.tar"
expire_in: 1 day
expire_in: 6 hours
test-benchmarks:
stage: test
......@@ -234,7 +234,7 @@ build-theodolite-jvm:
paths:
- "theodolite-quarkus/build/lib/*"
- "theodolite-quarkus/build/*-runner.jar"
expire_in: 1 day
expire_in: 6 hours
build-theodolite-native:
stage: build
......@@ -245,7 +245,7 @@ build-theodolite-native:
artifacts:
paths:
- "theodolite-quarkus/build/*-runner"
expire_in: 1 day
expire_in: 6 hours
test-theodolite:
stage: test
......
......@@ -6,11 +6,9 @@ Install the chart via:
```sh
helm dependencies update .
helm install my-confluent .
helm install theodolite .
```
**Please note: Theodolite currently uses hard-coded URLs, to connect to Kafka and Zookeeper. For that reason, the name of this chart must be `my-confluent`.** We will change this behavior soon.
This chart installs requirements to execute benchmarks with Theodolite.
Dependencies and subcharts:
......@@ -27,7 +25,7 @@ Dependencies and subcharts:
Test the installation:
```sh
helm test <release-name>
helm test theodolite
```
Our test files are located [here](templates/../../theodolite-chart/templates/tests). Many subcharts have their own tests, these are also executed and are placed in the respective /templates folders.
......@@ -44,6 +42,31 @@ In development environments Kubernetes resources are often low. To reduce resour
helm install theodolite . -f preconfigs/one-broker-values.yaml
```
## Uninstall this Chart
To uninstall/delete the `theodolite` deployment:
```sh
helm delete theodolite
```
This command does not remove the CRDs which are created by this chart. Remove them manually with:
```sh
# CRDs from Theodolite
kubectl delete crd executions.theodolite.com
kubectl delete crd benchmarks.theodolite.com
# CRDs from Prometheus operator (see https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#uninstall-chart)
kubectl delete crd alertmanagerconfigs.monitoring.coreos.com
kubectl delete crd alertmanagers.monitoring.coreos.com
kubectl delete crd podmonitors.monitoring.coreos.com
kubectl delete crd probes.monitoring.coreos.com
kubectl delete crd prometheuses.monitoring.coreos.com
kubectl delete crd prometheusrules.monitoring.coreos.com
kubectl delete crd servicemonitors.monitoring.coreos.com
kubectl delete crd thanosrulers.monitoring.coreos.com
```
## Development
**Hints**:
......
......@@ -9,7 +9,7 @@ cp-helm-charts:
## Kafka
## ------------------------------------------------------
cp-kafka:
brokers: 1 # deauflt: 10
brokers: 1 # default: 10
configurationOverrides:
offsets.topic.replication.factor: "1"
\ No newline at end of file
{{- if .Values.benchmarkCRD.create -}}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: benchmarks.theodolite.com
spec:
group: theodolite.com
version: v1alpha1
names:
kind: benchmark
plural: benchmarks
scope: Namespaced
subresources:
status: {}
{{- end }}
\ No newline at end of file
{{- if .Values.executionCRD.create -}}
apiVersion: apiextensions.k8s.io/v1beta1
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
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: {{ include "theodolite.fullname" . }}
labels:
app: {{ include "theodolite.name" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "theodolite.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "theodolite.serviceAccountName" . }}
{{- end }}
\ No newline at end of file
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "theodolite.fullname" . }}
rules:
- apiGroups:
- apps
resources:
- deployments
verbs:
- delete
- list
- get
- create
- update
- apiGroups:
- ""
resources:
- services
- pods
- configmaps
verbs:
- update
- delete
- list
- get
- create
- apiGroups:
- ""
resources:
- pods/exec
verbs:
- create
- get
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- update
- delete
- list
- create
{{- if .Values.operator.enabled }}
- apiGroups:
- theodolite.com
resources:
- executions
- benchmarks
verbs:
- delete
- list
- get
- create
- watch
- update
- patch
{{- end }}
{{- end }}
\ No newline at end of file
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "theodolite.serviceAccountName" . }}
labels:
{{- include "theodolite.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
\ No newline at end of file
{{- if .Values.operator.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "theodolite.fullname" . }}-operator
spec:
selector:
matchLabels:
app: {{ include "theodolite.fullname" . }}
replicas: 1
template:
metadata:
labels:
app: {{ include "theodolite.fullname" . }}
spec:
terminationGracePeriodSeconds: 0
serviceAccountName: {{ include "theodolite.serviceAccountName" . }}
containers:
- name: theodolite
image: ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
env:
- name: NAMESPACE
value: {{ .Release.Namespace }}
- name: MODE
value: operator
- name: THEODOLITE_APP_RESOURCES
value: "./benchmark-resources"
volumeMounts:
- name: benchmark-resources
mountPath: /work/benchmark-resources
- name: lag-analysis
image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
ports:
- containerPort: 80
name: analysis
volumes:
- name: benchmark-resources
configMap:
name: benchmark-resources
optional: true
{{- end }}
......@@ -24,6 +24,9 @@ grafana:
# Administrator credentials when not using an existing secret (see below)
adminUser: admin
adminPassword: admin
grafana.ini:
users:
default_theme: light
## 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:
......@@ -145,8 +148,8 @@ kafka-lag-exporter:
enabled: true
nodeSelector: {}
clusters:
- name: "my-confluent-cp-kafka"
bootstrapBrokers: "my-confluent-cp-kafka:9092"
- name: "theodolite-cp-kafka"
bootstrapBrokers: "theodolite-cp-kafka:9092"
## The interval between refreshing metrics
pollIntervalSeconds: 15
......@@ -226,4 +229,22 @@ prometheus:
clusterRole:
enabled: true
clusterRoleBinding:
enabled: true
\ No newline at end of file
enabled: true
###
# Theodolite Operator
###
operator:
enabled: true
executionCRD:
create: true
benchmarkCRD:
create: true
serviceAccount:
create: true
rbac:
create: true
......@@ -38,4 +38,18 @@ rules:
verbs:
- delete
- list
- create
\ No newline at end of file
- create
- apiGroups:
- theodolite.com
resources:
- executions
- benchmarks
verbs:
- delete
- list
- get
- create
- watch
- update
- patch
......@@ -21,9 +21,9 @@ spec:
name: jmx
env:
- name: KAFKA_BOOTSTRAP_SERVERS
value: "my-confluent-cp-kafka:9092"
value: "theodolite-cp-kafka:9092"
- name: SCHEMA_REGISTRY_URL
value: "http://my-confluent-cp-schema-registry:8081"
value: "http://theodolite-cp-schema-registry:8081"
- name: JAVA_OPTS
value: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555"
- name: COMMIT_INTERVAL_MS # Set as default for the applications
......
......@@ -32,6 +32,6 @@ spec:
- name: KUBERNETES_DNS_NAME
value: "titan-ccp-load-generator.$(KUBERNETES_NAMESPACE).svc.cluster.local"
- name: KAFKA_BOOTSTRAP_SERVERS
value: "my-confluent-cp-kafka:9092"
value: "theodolite-cp-kafka:9092"
- name: SCHEMA_REGISTRY_URL
value: "http://my-confluent-cp-schema-registry:8081"
value: "http://theodolite-cp-schema-registry:8081"
......@@ -6,6 +6,23 @@ plugins {
applicationDefaultJvmArgs = ["-Dlog4j.configuration=log4j.properties"]
run.classpath = sourceSets.main.runtimeClasspath
jar {
manifest {
attributes 'Built-By': System.getProperty('user.name'),
'Build-Jdk': System.getProperty('java.version')
}
}
shadowJar {
configurations = [project.configurations.compile]
zip64 true
}
tasks.distZip.enabled = false
ext {
flinkVersion = '1.12.2'
scalaBinaryVersion = '2.12'
......@@ -48,17 +65,3 @@ dependencies {
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
run.classpath = sourceSets.main.runtimeClasspath
jar {
manifest {
attributes 'Built-By': System.getProperty('user.name'),
'Build-Jdk': System.getProperty('java.version')
}
}
shadowJar {
configurations = [project.configurations.compile]
zip64 true
}
......@@ -6,6 +6,8 @@ plugins {
id 'application'
}
tasks.distZip.enabled = false
repositories {
jcenter()
maven {
......
......@@ -6,6 +6,8 @@ plugins {
id 'application'
}
tasks.distZip.enabled = false
repositories {
jcenter()
maven {
......
......@@ -14,4 +14,4 @@ spec:
targetPort: 80
protocol: TCP
- name: metrics
port: 9980
port: 5556
......@@ -2,36 +2,34 @@ name: example-execution
benchmark: "uc1-kstreams"
load:
loadType: "NumSensors"
loadValues:
- 50000
loadValues: [25000, 50000, 75000, 100000, 125000, 150000]
resources:
resourceType: "Instances"
resourceValues:
- 1
resourceValues: [1, 2, 3, 4, 5]
slos:
- sloType: "lag trend"
threshold: 1000
threshold: 2000
prometheusUrl: "http://prometheus-operated:9090"
externalSloUrl: "http://localhost:80/evaluate-slope"
offset: 0
warmup: 0
warmup: 60 # in seconds
execution:
strategy: "LinearSearch"
duration: 60
duration: 300 # in seconds
repetitions: 1
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"
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"
......
apiVersion: theodolite.com/v1alpha1
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"
kafkaConfig:
bootstrapServer: "theodolite-cp-kafka:9092"
topics:
- name: "input"
numPartitions: 40
replicationFactor: 1
\ No newline at end of file
apiVersion: theodolite.com/v1alpha1
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
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"