Skip to content
Snippets Groups Projects
Commit 36f1786d authored by Sören Henning's avatar Sören Henning
Browse files

Add basic support for distributed load generation in UC1

parent 7bfa849b
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,9 @@ kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-z
# Start workload generator
NUM_SENSORS=$DIM_VALUE
sed "s/{{NUM_SENSORS}}/$NUM_SENSORS/g" uc1-workload-generator/deployment.yaml | kubectl apply -f -
WL_MAX_RECORDS=150000
WL_INSTANCES=$(((NUM_SENSORS + (WL_MAX_RECORDS -1 ))/ WL_MAX_RECORDS))
sed "s/{{NUM_SENSORS}}/$NUM_SENSORS/g; s/{{INSTANCES}}/$WL_INSTANCES/g" uc1-workload-generator/deployment.yaml | kubectl apply -f -
# Start application
REPLICAS=$INSTANCES
......
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: titan-ccp-load-generator
spec:
selector:
matchLabels:
app: titan-ccp-load-generator
replicas: 1
serviceName: titan-ccp-load-generator
replicas: {{INSTANCES}}
template:
metadata:
labels:
......@@ -15,10 +16,16 @@ spec:
terminationGracePeriodSeconds: 0
containers:
- name: workload-generator
image: benediktwetzel/uc1-wg:latest
image: soerenhenning/uc1-wg:latest
env:
- name: KAFKA_BOOTSTRAP_SERVERS
value: "my-confluent-cp-kafka:9092"
- name: NUM_SENSORS
value: "{{NUM_SENSORS}}"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: INSTANCES
value: "{{INSTANCES}}"
\ 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