Add Grafana dashboards #105
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Performance tests to assess the functionality of the latest version of Iter8 (master branch) | |
on: | |
pull_request: | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Test and compute coverage | |
run: make coverage # includes vet and lint | |
- name: Enforce coverage | |
run: | | |
export COVERAGE=$(go tool cover -func coverage.out | grep total | awk '{print substr($3, 1, length($3)-1)}') | |
echo "code coverage is at ${COVERAGE}" | |
if [ 1 -eq "$(echo "${COVERAGE} > 76.0" | bc)" ]; then \ | |
echo "all good... coverage is above 76.0%"; | |
else \ | |
echo "not good... coverage is not above 76.0%"; | |
exit 1 | |
fi | |
kubernetes-load-test-http: | |
name: HTTP load test (with readiness) at the edge of Kubernetes | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Build and install Iter8 | |
run: make install | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: run httpbin | |
run: | | |
set -e | |
kubectl create deploy httpbin --image=kennethreitz/httpbin --port=80 | |
kubectl expose deploy httpbin --port=80 | |
- name: load-test-http in Kubernetes | |
run: | | |
iter8 k launch --localChart --chartName charts/iter8 \ | |
--set "tasks={ready,http,assess}" \ | |
--set ready.deploy=httpbin \ | |
--set ready.service=httpbin \ | |
--set ready.timeout=60s \ | |
--set http.url=http://httpbin.default/get \ | |
--set http.duration="3s" \ | |
--set assess.SLOs.upper.http/latency-p50=5 \ | |
--set assess.SLOs.upper.http/latency-p90=10 \ | |
--set assess.SLOs.upper.http/error-count=0 \ | |
--set runner=job | |
iter8 k assert -c completed -c nofailure -c slos --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
- name: load-test-http with payload in Kubernetes | |
run: | | |
iter8 k launch --localChart --chartName charts/iter8 \ | |
--set "tasks={ready,http,assess}" \ | |
--set ready.deploy=httpbin \ | |
--set ready.service=httpbin \ | |
--set ready.timeout=60s \ | |
--set http.url=http://httpbin.default/post \ | |
--set http.payloadStr=hello \ | |
--set http.duration="3s" \ | |
--set assess.SLOs.upper.http/latency-p50=5 \ | |
--set assess.SLOs.upper.http/latency-p90=10 \ | |
--set assess.SLOs.upper.http/error-count=0 \ | |
--set runner=job | |
iter8 k assert -c completed -c nofailure -c slos --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
- name: load-test-http with multiple endpoints in Kubernetes | |
run: | | |
iter8 k launch --localChart --chartName charts/iter8 \ | |
--set "tasks={ready,http,assess}" \ | |
--set ready.deploy=httpbin \ | |
--set ready.service=httpbin \ | |
--set ready.timeout=60s \ | |
--set http.endpoints.get.url=http://httpbin.default/get \ | |
--set http.endpoints.getAnything.url=http://httpbin.default/anything \ | |
--set http.endpoints.post.url=http://httpbin.default/post \ | |
--set http.endpoints.post.payloadStr=hello \ | |
--set http.duration="3s" \ | |
--set assess.SLOs.upper.http-get/error-count=0 \ | |
--set assess.SLOs.upper.http-get/latency-mean=50 \ | |
--set assess.SLOs.upper.http-getAnything/error-count=0 \ | |
--set assess.SLOs.upper.http-getAnything/latency-mean=100 \ | |
--set assess.SLOs.upper.http-post/error-count=0 \ | |
--set assess.SLOs.upper.http-post/latency-mean=150 \ | |
--set runner=job | |
iter8 k assert -c completed -c nofailure -c slos --timeout 300s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
kubernetes-load-test-grpc: | |
name: gRPC load test with various URLs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Build and install Iter8 | |
run: make install | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Deploy gRPC service in the Kubernetes cluster | |
run: | | |
kubectl create deployment routeguide --image=golang --port=50051 \ | |
-- bash -c "git clone -b v1.52.0 --depth 1 https://github.com/grpc/grpc-go; cd grpc-go/examples/route_guide; sed -i "''" "'"s/localhost//"'" server/server.go; go run server/server.go" | |
kubectl expose deployment routeguide --port=50051 | |
kubectl wait --for=condition=available --timeout=60s deployment/routeguide | |
- name: Test gRPC service with grpcurl | |
run: | | |
curl -sO https://gist.githubusercontent.com/kalantar/510737f0fd58c0432a08e5b6e45ec97f/raw/524d6660284bf653ce0f29f3a25ed0e913c3df80/grpcurl-routeguide.yaml | |
kubectl apply -f grpcurl-routeguide.yaml | |
sleep 180 | |
kubectl logs deploy/sleep | |
- name: load test grpc service | |
run: | | |
iter8 k launch --localChart --chartName charts/iter8 \ | |
--set "tasks={ready,grpc,assess}" \ | |
--set ready.deploy=routeguide \ | |
--set ready.service=routeguide \ | |
--set ready.timeout=60s \ | |
--set grpc.host=routeguide.default:50051 \ | |
--set grpc.protoURL=https://raw.githubusercontent.com/grpc/grpc-go/v1.52.0/examples/route_guide/routeguide/route_guide.proto \ | |
--set grpc.call=routeguide.RouteGuide.GetFeature \ | |
--set grpc.dataURL=https://raw.githubusercontent.com/iter8-tools/docs/v0.13.13/samples/grpc-payload/unary.json \ | |
--set assess.SLOs.upper.grpc/error-rate=0 \ | |
--set assess.SLOs.upper.grpc/latency/mean=200 \ | |
--set assess.SLOs.upper.grpc/latency/p'97\.5'=800 \ | |
--set runner=job | |
iter8 k assert -c completed -c nofailure -c slos --timeout 300s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
- name: load test grpc service with multiple endpoints | |
run: | | |
iter8 k launch --localChart --chartName charts/iter8 \ | |
--set "tasks={ready,grpc,assess}" \ | |
--set ready.deploy=routeguide \ | |
--set ready.service=routeguide \ | |
--set ready.timeout=60s \ | |
--set grpc.host=routeguide.default:50051 \ | |
--set grpc.protoURL=https://raw.githubusercontent.com/grpc/grpc-go/v1.52.0/examples/route_guide/routeguide/route_guide.proto \ | |
--set grpc.endpoints.getFeature.call=routeguide.RouteGuide.GetFeature \ | |
--set grpc.endpoints.getFeature.dataURL=https://raw.githubusercontent.com/iter8-tools/docs/v0.13.13/samples/grpc-payload/unary.json \ | |
--set grpc.endpoints.listFeatures.call=routeguide.RouteGuide.ListFeatures \ | |
--set grpc.endpoints.listFeatures.dataURL=https://raw.githubusercontent.com/iter8-tools/docs/v0.13.13/samples/grpc-payload/server.json \ | |
--set assess.SLOs.upper.grpc-getFeature/error-rate=0 \ | |
--set assess.SLOs.upper.grpc-getFeature/latency/mean=50 \ | |
--set assess.SLOs.upper.grpc-listFeatures/error-rate=0 \ | |
--set assess.SLOs.upper.grpc-listFeatures/latency/mean=100 \ | |
--set runner=job | |
iter8 k assert -c completed -c nofailure -c slos --timeout 300s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
kubernetes-load-test-grpc2: | |
name: gRPC load test 2 with various URLs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Build and install Iter8 | |
run: make install | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Deploy gRPC service in the Kubernetes cluster | |
run: | | |
kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051 | |
kubectl expose deploy hello --port=50051 | |
- name: load test grpc service with protoURL | |
run: | | |
iter8 k launch --localChart --chartName charts/iter8 \ | |
--set "tasks={ready,grpc,assess}" \ | |
--set ready.deploy=hello \ | |
--set ready.service=hello \ | |
--set ready.timeout=60s \ | |
--set grpc.host="hello.default:50051" \ | |
--set grpc.call="helloworld.Greeter.SayHello" \ | |
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \ | |
--set grpc.data.name="frodo" \ | |
--set assess.SLOs.upper.grpc/error-rate=0 \ | |
--set assess.SLOs.upper.grpc/latency/mean=200 \ | |
--set assess.SLOs.upper.grpc/latency/p90=500 \ | |
--set assess.SLOs.upper.grpc/latency/p'97\.5'=600 \ | |
--set runner=job | |
iter8 k assert -c completed -c nofailure -c slos --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete | |
- name: load test grpc service with proto/data/metadata URLs | |
run: | | |
iter8 k launch --localChart -l trace \ | |
--chartName charts/iter8 \ | |
--set "tasks={ready,grpc,assess}" \ | |
--set ready.deploy=hello \ | |
--set ready.service=hello \ | |
--set ready.timeout=60s \ | |
--set grpc.host="hello.default:50051" \ | |
--set grpc.call="helloworld.Greeter.SayHello" \ | |
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \ | |
--set grpc.dataURL="https://gist.githubusercontent.com/sriumcp/3f3178f4b698af6696c925832e51b0ba/raw/d02aa698d34aa2067f7a2f6afb4ceb616b0db822/name.json" \ | |
--set grpc.metadataURL="https://gist.githubusercontent.com/sriumcp/3f3178f4b698af6696c925832e51b0ba/raw/d02aa698d34aa2067f7a2f6afb4ceb616b0db822/name.json" \ | |
--set assess.SLOs.upper.grpc/error-rate=0 \ | |
--set assess.SLOs.upper.grpc/latency/mean=200 \ | |
--set assess.SLOs.upper.grpc/latency/p90=500 \ | |
--set assess.SLOs.upper.grpc/latency/p'97\.5'=600 \ | |
--set runner=job | |
iter8 k assert -c completed -c nofailure -c slos --timeout 60s | |
iter8 k report | |
iter8 k log | |
iter8 k delete |