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

add example configmap and update standalone benchmark example in order to use the new resource sets

parent 9979aa6a
No related branches found
No related tags found
1 merge request!171Introduce ResourceSets to make loading of resource files more flexible
apiVersion: v1
data:
aggregation-service.yaml: "apiVersion: v1\nkind: Service\nmetadata: \n name: titan-ccp-aggregation\n
\ labels:\n app: titan-ccp-aggregation\nspec:\n #type: NodePort\n selector:
\ \n app: titan-ccp-aggregation\n ports: \n - name: http\n port: 80\n
\ targetPort: 80\n protocol: TCP\n - name: metrics\n port: 5556\n"
jmx-configmap.yaml: |
apiVersion: v1
kind: ConfigMap
metadata:
name: aggregation-jmx-configmap
data:
jmx-kafka-prometheus.yml: |+
jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:5555/jmxrmi
lowercaseOutputName: true
lowercaseOutputLabelNames: true
ssl: false
service-monitor.yaml: |
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: titan-ccp-aggregation
appScope: titan-ccp
name: titan-ccp-aggregation
spec:
selector:
matchLabels:
app: titan-ccp-aggregation
endpoints:
- port: metrics
interval: 10s
uc1-kstreams-deployment.yaml: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: titan-ccp-aggregation
spec:
selector:
matchLabels:
app: titan-ccp-aggregation
replicas: 1
template:
metadata:
labels:
app: titan-ccp-aggregation
spec:
terminationGracePeriodSeconds: 0
containers:
- name: uc-application
image: ghcr.io/cau-se/theodolite-uc1-kstreams-app:latest
ports:
- containerPort: 5555
name: jmx
env:
- name: KAFKA_BOOTSTRAP_SERVERS
value: "theodolite-cp-kafka:9092"
- name: SCHEMA_REGISTRY_URL
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
value: "100"
resources:
limits:
memory: 4Gi
cpu: 1000m
- name: prometheus-jmx-exporter
image: "solsson/kafka-prometheus-jmx-exporter@sha256:6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143"
command:
- java
- -XX:+UnlockExperimentalVMOptions
- -XX:+UseCGroupMemoryLimitForHeap
- -XX:MaxRAMFraction=1
- -XshowSettings:vm
- -jar
- jmx_prometheus_httpserver.jar
- "5556"
- /etc/jmx-aggregation/jmx-kafka-prometheus.yml
ports:
- containerPort: 5556
volumeMounts:
- name: jmx-config
mountPath: /etc/jmx-aggregation
volumes:
- name: jmx-config
configMap:
name: aggregation-jmx-configmap
uc1-load-generator-deployment.yaml: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: titan-ccp-load-generator
spec:
selector:
matchLabels:
app: titan-ccp-load-generator
replicas: 1
template:
metadata:
labels:
app: titan-ccp-load-generator
spec:
terminationGracePeriodSeconds: 0
containers:
- name: workload-generator
image: ghcr.io/cau-se/theodolite-uc1-workload-generator:latest
ports:
- containerPort: 5701
name: coordination
env:
- name: NUM_SENSORS
value: "25000"
- name: NUM_NESTED_GROUPS
value: "5"
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: KUBERNETES_DNS_NAME
value: "titan-ccp-load-generator.$(KUBERNETES_NAMESPACE).svc.cluster.local"
- name: KAFKA_BOOTSTRAP_SERVERS
value: "theodolite-cp-kafka:9092"
- name: SCHEMA_REGISTRY_URL
value: "http://theodolite-cp-schema-registry:8081"
uc1-load-generator-service.yaml: |
apiVersion: v1
kind: Service
metadata:
name: titan-ccp-load-generator
labels:
app: titan-ccp-load-generator
spec:
type: ClusterIP
clusterIP: None
selector:
app: titan-ccp-load-generator
ports:
- name: coordination
port: 5701
targetPort: 5701
protocol: TCP
uc1-service-monitor.yaml: |
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: titan-ccp-aggregation
appScope: titan-ccp
name: titan-ccp-aggregation
spec:
selector:
matchLabels:
app: titan-ccp-aggregation
endpoints:
- port: metrics
interval: 10s
kind: ConfigMap
metadata:
name: example-configmap
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: resourceTypes:
- typeName: "Instances" - typeName: "Instances"
patchers: patchers:
...@@ -32,3 +24,29 @@ kafkaConfig: ...@@ -32,3 +24,29 @@ kafkaConfig:
replicationFactor: 1 replicationFactor: 1
- name: "theodolite-.*" - name: "theodolite-.*"
removeOnly: True removeOnly: True
appResourceSets:
# - fileSystem:
# path: ./../../../../../../config
# files:
# - "uc1-kstreams-deployment.yaml"
# - "aggregation-service.yaml"
# - "jmx-configmap.yaml"
# - "uc1-service-monitor.yaml"
- configMap:
name: "example-configmap"
files:
- "uc1-kstreams-deployment.yaml"
- "aggregation-service.yaml"
- "jmx-configmap.yaml"
- "uc1-service-monitor.yaml"
loadGenResourceSets:
# - fileSystem:
# path: ./../../../../../../config
# files:
# - uc1-load-generator-service.yaml
# - uc1-load-generator-deployment.yaml
- configMap:
name: "example-configmap"
files:
- uc1-load-generator-service.yaml
- uc1-load-generator-deployment.yaml
\ 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