Skip to content

Latest commit

 

History

History
92 lines (65 loc) · 2.61 KB

dev.md

File metadata and controls

92 lines (65 loc) · 2.61 KB

How to start with Mako

This document describes how to start running writing benchmarks with mako on GKE.

Preconditions

  • Assume cluster exists with istio lean and serving installed.
  • ko is installed
  • gcloud is installed

Steps

Take dataplane-probe benchmark for example:

  1. Edit mako config to attach your desired tags, see the _example stanza for how. Then apply it:

    kubectl apply -f test/performance/config/config-mako.yaml
  2. Create an IAM service account:

    gcloud iam service-accounts create mako-upload
  3. Add the IAM service account here (A current owner must apply this before things will work and the SA must be allowed) then run:

    mako update_benchmark test/performance/benchmarks/dataplane-probe/dev.config
  4. Create a JSON key for it.

    gcloud iam service-accounts keys create robot.json \
      --iam-account=mako-upload@${PROJECT_ID}.iam.gserviceaccount.com
  5. Create a secret with it:

    kubectl create secret generic mako-secrets --from-file=./robot.json
  6. Patch Istio:

    # This command will fail if no HPA for istio-ingressgateway exists.
    # If that is the case, the error can be ignored.
    kubectl patch hpa -n istio-system istio-ingressgateway \
      --patch '{"spec": {"minReplicas": 10, "maxReplicas": 10}}'
    
    kubectl patch deploy -n istio-system istio-ingressgateway \
      --patch '{"spec": {"replicas": 10}}'
    
    # This command will fail if no HPA for cluster-local-gateway exists.
    # If that is the case, the error can be ignored.
    kubectl patch hpa -n istio-system cluster-local-gateway \
      --patch '{"spec": {"minReplicas": 10, "maxReplicas": 10}}'
    
    kubectl patch deploy -n istio-system cluster-local-gateway \
      --patch '{"spec": {"replicas": 10}}'
  7. Patch Knative:

    kubectl patch hpa -n knative-serving activator --patch '{"spec": {"minReplicas": 10}}'
  8. Apply setup for benchmark if there's any. Take dataplane-probe benchmark for example:

    ko apply -f test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe-setup.yaml
  9. Wait for above to stabilize

  10. Apply the benchmark cron. Take dataplane-probe benchmark for example:

    ko apply -f test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe.yaml