Skip to content
Snippets Groups Projects
uc2-beam-samza-benchmark-operator.yaml 2.49 KiB
Newer Older
apiVersion: theodolite.com/v1
kind: benchmark
metadata:
  name: uc2-beam-samza
spec:
  sut:
    resources:
      - configMap:
          name: "benchmark-resources-uc2-beam-samza"
          files:
          - "uc2-beam-samza-deployment.yaml"
          - "beam-samza-service.yaml"
          - "service-monitor.yaml"
    # beforeActions:
    #   - selector: # delete zookeeper nodes to reset zookeeper
    #       pod:
    #         matchLabels:
    #           app: "cp-zookeeper"
    #       container: "cp-zookeeper-server"
    #     exec:
    #       command: ["/usr/bin/zookeeper-shell", "localhost:2181", "ls" , "/"]
    #       timeoutSeconds: 60
      # - selector: #Create input topic for samza with 10 partitions
      #     pod:
      #        matchLabels:
      #          app: "cp-zookeeper"
      #      container: "cp-zookeeper-server"
      #    exec:
      #      command: ["kafka-topics", "--zookeeper", "localhost:2181",
      #               "--topic", "input", "--partitions", "10", "--create"]
      #      timeoutSeconds: 90
    afterActions:
      - selector: # delete zookeeper nodes to reset zookeeper
          pod:
            matchLabels:
              app: "zookeeper-client"
          container: "zookeeper-client"
          command: ["bin/zkCli.sh", "-server", "$ZOOKEEPER_SERVER", "deleteall", "/app-theodolite-uc2-application-1"]
          timeoutSeconds: 60
  loadGenerator:
    resources:
      - configMap:
          name: "benchmark-resources-uc2-load-generator"
          files:
          - "uc2-load-generator-deployment.yaml"
          - "uc2-load-generator-service.yaml"
  resourceTypes:
    - typeName: "Instances"
      patchers:
        - type: "ReplicaPatcher"
          resource: "uc2-beam-samza-deployment.yaml"
  loadTypes:
    - typeName: "NumSensors"
      patchers:
        - type: "EnvVarPatcher"
          resource: "uc2-load-generator-deployment.yaml"
          properties:
            container: "workload-generator"
            variableName: "NUM_SENSORS"
        - type: NumSensorsLoadGeneratorReplicaPatcher
          resource: "uc2-load-generator-deployment.yaml"
          properties:
            loadGenMaxRecords: "150000"
  kafkaConfig:
Sören Henning's avatar
Sören Henning committed
    bootstrapServer: "theodolite-kafka-kafka-bootstrap:9092"
    topics:
      - name: "input"
        numPartitions: 40
        replicationFactor: 1
      - name: "output"
        numPartitions: 40
        replicationFactor: 1
      - name: ".*samza.*"
        removeOnly: true
      - name: ".*uc2-application.*"
        removeOnly: true