Verify user experience #5
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: Verify user experience | |
# Only runs after releasecharts.yaml or releaseassets.yaml has completed or during workflow dispatch | |
# Tests released charts on released image | |
on: | |
workflow_run: | |
workflows: ['Release charts', 'Release binaries and Docker image'] | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
http-experiment: | |
name: HTTP load test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Create httpbin application | |
run: | | |
kubectl create deployment httpbin --image=kennethreitz/httpbin | |
kubectl expose deployment httpbin --type=ClusterIP --port=80 | |
kubectl wait --for=condition=available --timeout=60s deploy/httpbin | |
- name: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: iter8 k launch | |
run: | | |
iter8 k launch \ | |
--set "tasks={http}" \ | |
--set http.url="http://httpbin.default/get" \ | |
--set logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all | |
- name: Try other iter8 k commands | |
run: | | |
iter8 k log | |
iter8 k delete | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /httpDashboard | |
run: | | |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f | |
http-payload-experiment: | |
name: HTTP load test with payload | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Create httpbin application | |
run: | | |
kubectl create deployment httpbin --image=kennethreitz/httpbin | |
kubectl expose deployment httpbin --type=ClusterIP --port=80 | |
kubectl wait --for=condition=available --timeout=60s deploy/httpbin | |
- name: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: iter8 k launch | |
run: | | |
iter8 k launch \ | |
--set "tasks={http}" \ | |
--set http.url="http://httpbin.default/post" \ | |
--set http.payloadStr=hello \ | |
--set logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all | |
- name: Try other iter8 k commands | |
run: | | |
iter8 k log | |
iter8 k delete | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /httpDashboard | |
run: | | |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f | |
http-multiple-experiment: | |
name: HTTP load test with multiple endpoints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Create httpbin application | |
run: | | |
kubectl create deployment httpbin --image=kennethreitz/httpbin | |
kubectl expose deployment httpbin --type=ClusterIP --port=80 | |
kubectl wait --for=condition=available --timeout=60s deploy/httpbin | |
- name: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: iter8 k launch | |
run: | | |
iter8 k launch \ | |
--set "tasks={http}" \ | |
--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 logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all | |
- name: Try other iter8 k commands | |
run: | | |
iter8 k log | |
iter8 k delete | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /httpDashboard | |
run: | | |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f | |
grpc-experiment: | |
name: gRPC load test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Create routeguide application | |
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: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: iter8 k launch | |
run: | | |
iter8 k launch \ | |
--set "tasks={ready,grpc}" \ | |
--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 logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all | |
- name: Try other iter8 k commands | |
run: | | |
iter8 k log | |
iter8 k delete | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /grpcDashboard | |
run: | | |
curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f | |
grpc-multiple-experiment: | |
name: gRPC load test with multiple endpoints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Create routeguide application | |
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: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: iter8 k launch | |
run: | | |
iter8 k launch \ | |
--set "tasks={ready,grpc}" \ | |
--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 logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all | |
- name: Try other iter8 k commands | |
run: | | |
iter8 k log | |
iter8 k delete | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /grpcDashboard | |
run: | | |
curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f | |
grpc-experiment2: | |
name: gRPC load test 2 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
- name: Create hello application | |
run: | | |
kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051 | |
kubectl expose deploy hello --port=50051 | |
kubectl wait --for=condition=available --timeout=60s deploy/hello | |
- name: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: iter8 k launch | |
run: | | |
iter8 k launch \ | |
--set "tasks={grpc}" \ | |
--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 logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all | |
- name: Try other iter8 k commands | |
run: | | |
iter8 k log | |
iter8 k delete | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /grpcDashboard | |
run: | | |
curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f | |
readiness: | |
name: Readiness test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
# Install controller before httpbin so that the rollout of controller does not give time for httpbin to start | |
# allowing ready task to be tested | |
- name: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: Create httpbin application | |
run: | | |
kubectl create deploy httpbin --image=kennethreitz/httpbin --port=80 | |
kubectl expose deploy httpbin --port=80 | |
# No kubectl wait so ready task can check | |
- name: k launch with readiness checks | |
run: | | |
iter8 k launch \ | |
--set "tasks={ready,http}" \ | |
--set ready.deploy="httpbin" \ | |
--set ready.service="httpbin" \ | |
--set ready.timeout=60s \ | |
--set http.url=http://httpbin.default/get \ | |
--set logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all | |
- name: Try other iter8 k commands | |
run: | | |
iter8 k log | |
iter8 k delete | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /httpDashboard | |
run: | | |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f | |
readiness-with-namespace: | |
name: Readiness test with namespace | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Iter8 | |
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.16 | |
- name: Start kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
wait: 300s | |
# Install controller before httpbin so that the rollout of controller does not give time for httpbin to start | |
# allowing ready task to be tested | |
- name: Install controller | |
run: | | |
helm install --repo https://iter8-tools.github.io/iter8 iter8 controller --set logLevel=trace | |
kubectl rollout status --watch --timeout=60s statefulset/iter8 | |
- name: Create httpbin application | |
run: | | |
kubectl create deploy httpbin --image=kennethreitz/httpbin --port=80 | |
kubectl expose deploy httpbin --port=80 | |
# No kubectl wait so ready task can check | |
- name: Create experiments namespace | |
run: | | |
kubectl create namespace experiments | |
- name: k launch with readiness checks and namespace | |
run: | | |
iter8 k launch -n experiments \ | |
--set "tasks={ready,http}" \ | |
--set ready.deploy="httpbin" \ | |
--set ready.service="httpbin" \ | |
--set ready.timeout=60s \ | |
--set ready.namespace=default \ | |
--set http.url=http://httpbin.default/get \ | |
--set logLevel=trace | |
kubectl wait --for=condition=complete --timeout=180s -n experiments job/default-1-job | |
- name: Get Kubernetes status | |
run: | | |
kubectl get all --all-namespaces | |
- name: Try other iter8 k commands with namespace | |
run: | | |
iter8 k log -n experiments | |
iter8 k delete -n experiments | |
- name: Expose metrics service | |
run: | | |
kubectl port-forward service/iter8 8080:8080 & | |
- name: Check GET /httpDashboard | |
run: | | |
curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f |