diff --git a/.github/workflows/releaseassets.yaml b/.github/workflows/releaseassets.yaml index c0aadbe9d..66c221f51 100644 --- a/.github/workflows/releaseassets.yaml +++ b/.github/workflows/releaseassets.yaml @@ -1,9 +1,11 @@ -name: Publish binaries and Docker image +name: Release binaries and Docker image # Runs when a release is published # Build and publish binaries and release Docker image -# Test Docker image +# +# NOTE: completion of this task will trigger verifyuserexperience.yaml +# which will test the released image (with released charts) on: release: @@ -89,214 +91,4 @@ jobs: tags: ${{ env.OWNER }}/iter8:${{ env.VERSION }},${{ env.OWNER }}/iter8:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/iter8:latest push: true build-args: | - TAG=v${{ env.VERSION }} - - kubernetes-http-experiment: - name: Kubernetes HTTP load test - needs: build-and-push - 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=60s 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: Check GET /httpDashboard - run: | - curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f - - kubernetes-grpc-experiment: - name: Kubernetes gRPC load test - needs: build-and-push - 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: 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: 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: iter8 k launch - run: | - iter8 k launch \ - --set tasks={grpc} \ - --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=60s 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: Check GET /grpcDashboard - run: | - curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f - - kubernetes-grpc-experiment2: - name: Kubernetes gRPC load test 2 - needs: build-and-push - 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=60s 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: Check GET /grpcDashboard - run: | - curl "http://localhost:8080/grpcDashboard?namespace=default&experiment=default" -f - - readiness: - name: Kubernetes readiness test - needs: build-and-push - 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 deploy httpbin --image=kennethreitz/httpbin --port=80 - kubectl expose deploy httpbin --port=80 - - 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: 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=60s job/default-1-job - - - name: Get Kubernetes status - run: | - kubectl get all - - - name: Check GET /httpDashboard - run: | - curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f - - readiness-with-namespace: - name: Kubernetes readiness test with namespace - needs: build-and-push - 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 deploy httpbin --image=kennethreitz/httpbin --port=80 - kubectl expose deploy httpbin --port=80 - kubectl create namespace experiments - - 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: k launch with readiness checks - 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=60s job/default-1-job - - - name: Get Kubernetes status - run: | - kubectl get all - - - name: Check GET /httpDashboard - run: | - curl "http://localhost:8080/httpDashboard?namespace=default&experiment=default" -f \ No newline at end of file + TAG=v${{ env.VERSION }} \ No newline at end of file diff --git a/.github/workflows/releasecharts.yaml b/.github/workflows/releasecharts.yaml index 1b5c55a19..d34d88809 100644 --- a/.github/workflows/releasecharts.yaml +++ b/.github/workflows/releasecharts.yaml @@ -1,8 +1,11 @@ -name: Publish charts +name: Release charts # Only runs when charts are pushed -# Release charts and tests them +# Release charts +# +# NOTE: completion of this task will trigger verifyuserexperience.yaml +# which will test the released charts (with released image) on: push: @@ -37,394 +40,4 @@ jobs: with: config: config.yaml env: - CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - http-experiment: - name: HTTP load test - needs: release-charts - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Get modified files in the charts/iter8 folder - id: modified-files - uses: tj-actions/changed-files@v35 - with: - files: charts/iter8 - - - 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=60s 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 - needs: release-charts - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Get modified files in the charts/iter8 folder - id: modified-files - uses: tj-actions/changed-files@v35 - with: - files: charts/iter8 - - - name: Install Iter8 - run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14 - - - 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=60s 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 - needs: release-charts - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Get modified files in the charts/iter8 folder - id: modified-files - uses: tj-actions/changed-files@v35 - with: - files: charts/iter8 - - - name: Install Iter8 - run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14 - - - 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=60s 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 - needs: release-charts - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Get modified files in the charts/iter8 folder - id: modified-files - uses: tj-actions/changed-files@v35 - with: - files: charts/iter8 - - - 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=60s 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 - needs: release-charts - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Get modified files in the charts/iter8 folder - id: modified-files - uses: tj-actions/changed-files@v35 - with: - files: charts/iter8 - - - name: Install Iter8 - run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14 - - - 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=60s 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 - needs: release-charts - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Get modified files in the charts/iter8 folder - id: modified-files - uses: tj-actions/changed-files@v35 - with: - files: charts/iter8 - - - name: Install Iter8 - run: GOBIN=/usr/local/bin go install github.com/iter8-tools/iter8@v0.14 - - - 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=60s 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 \ No newline at end of file + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/testcharts.yaml b/.github/workflows/testcharts.yaml index 20d1aab1e..2e8fa6cdb 100644 --- a/.github/workflows/testcharts.yaml +++ b/.github/workflows/testcharts.yaml @@ -94,7 +94,7 @@ jobs: --set "tasks={http}" \ --set http.url="http://httpbin.default/get" \ --set logLevel=trace - kubectl wait --for=condition=complete --timeout=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | @@ -165,7 +165,7 @@ jobs: --set http.url="http://httpbin.default/post" \ --set http.payloadStr=hello \ --set logLevel=trace - kubectl wait --for=condition=complete --timeout=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | @@ -238,7 +238,7 @@ jobs: --set http.endpoints.post.url=http://httpbin.default/post \ --set http.endpoints.post.payloadStr=hello \ --set logLevel=trace - kubectl wait --for=condition=complete --timeout=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | @@ -323,7 +323,7 @@ jobs: --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=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | @@ -410,7 +410,7 @@ jobs: --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=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | @@ -482,7 +482,7 @@ jobs: --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=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | diff --git a/.github/workflows/testcode.yaml b/.github/workflows/testcode.yaml index cc3e026f3..2ed8dbb5f 100644 --- a/.github/workflows/testcode.yaml +++ b/.github/workflows/testcode.yaml @@ -70,7 +70,7 @@ jobs: --set http.url=http://httpbin.default/get \ --set http.duration="3s" \ --set logLevel=trace - kubectl wait --for=condition=complete --timeout=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | @@ -127,7 +127,7 @@ jobs: --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=60s job/default-1-job + kubectl wait --for=condition=complete --timeout=180s job/default-1-job - name: Get Kubernetes status run: | diff --git a/.github/workflows/verifyuserexperience.yaml b/.github/workflows/verifyuserexperience.yaml new file mode 100644 index 000000000..36de73082 --- /dev/null +++ b/.github/workflows/verifyuserexperience.yaml @@ -0,0 +1,450 @@ +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.14 + + - 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.14 + + - 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.14 + + - 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.14 + + - 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 + + - 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 + kubectl create namespace experiments + + - name: k launch with readiness checks + 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 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 diff --git a/charts/iter8/Chart.yaml b/charts/iter8/Chart.yaml index 497ff0186..8ac4c8e60 100644 --- a/charts/iter8/Chart.yaml +++ b/charts/iter8/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: iter8 -version: 0.15.2 +version: 0.16.0 description: Iter8 experiment chart type: application home: https://iter8.tools