diff --git a/.github/workflows/configurable-benchmark-test-self-hosted.yaml b/.github/workflows/configurable-benchmark-test-self-hosted.yaml index 2e505b4..555eb1b 100644 --- a/.github/workflows/configurable-benchmark-test-self-hosted.yaml +++ b/.github/workflows/configurable-benchmark-test-self-hosted.yaml @@ -16,6 +16,10 @@ on: - istio - linkerd - osm + - kuma + - appmesh + - cilium + - consul load_generator: type: choice required: false @@ -101,7 +105,7 @@ jobs: shell: bash - name: Run Benchmark Tests - uses: layer5io/meshery-smp-action@master + uses: gyohuangxin/meshery-smp-action@master with: provider_token: ${{ secrets.MESHERY_TOKEN }} platform: docker diff --git a/.github/workflows/configurable-benchmark-test.yaml b/.github/workflows/configurable-benchmark-test.yaml index aad26f8..fabd166 100644 --- a/.github/workflows/configurable-benchmark-test.yaml +++ b/.github/workflows/configurable-benchmark-test.yaml @@ -1,69 +1,73 @@ -# This workflow runs performance benchmarks with Meshery based on the configuration provided -# This workflow needs to be triggered manually by providing the test configuration - -name: Configurable Benchmark Test -on: - # for triggering the workflow, provide these inputs - workflow_dispatch: - inputs: - profile_name: - description: "performance profile to use" - required: false - profile_filename: - description: "test configuration file" - required: false - service_mesh: - type: choice - required: false - description: "service mesh being tested" - options: - - istio - - linkerd - - osm - load_generator: - type: choice - required: false - description: "load generator to run tests with" - options: - - fortio - - wrk2 - - nighthawk - -jobs: - manual-test: - name: Configurable Benchmark Test - runs-on: ubuntu-latest - if: ${{ github.event_name == 'workflow_dispatch' }} - steps: - - name: Setup Kubernetes - uses: manusa/actions-setup-minikube@v2.4.3 - with: - minikube version: v1.23.2 - kubernetes version: v1.23.2 - driver: docker - apus: 4 - memory: 5192 - - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Install Service Mesh and Deploy Application - run: | - chmod +x .github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh - .github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh - shell: bash - - - name: Initiate tmate session - uses: mxschmitt/action-tmate@v3 - - - name: Run Benchmark Tests - uses: layer5io/meshery-smp-action@master - with: - provider_token: ${{ secrets.MESHERY_TOKEN }} - platform: docker - profile_name: ${{ github.event.inputs.profile_name }} - profile_filename: ${{ github.event.inputs.profile_filename }} - endpoint_url: ${{env.ENDPOINT_URL}} - service_mesh: ${{env.SERVICE_MESH}} - load_generator: ${{ github.event.inputs.load_generator }} - test_name: '${{ github.event.inputs.service_mesh }}-${{ github.event.inputs.load_generator }}-${{ github.event.inputs.profile_filename }}${{ github.event.inputs.profile_name }}' +# This workflow runs performance benchmarks with Meshery based on the configuration provided +# This workflow needs to be triggered manually by providing the test configuration + +name: Configurable Benchmark Test +on: + # for triggering the workflow, provide these inputs + workflow_dispatch: + inputs: + profile_name: + description: "performance profile to use" + required: false + profile_filename: + description: "test configuration file" + required: false + service_mesh: + type: choice + required: false + description: "service mesh being tested" + options: + - istio + - linkerd + - osm + - kuma + - appmesh + - cilium + - consul + load_generator: + type: choice + required: false + description: "load generator to run tests with" + options: + - fortio + - wrk2 + - nighthawk + +jobs: + manual-test: + name: Configurable Benchmark Test + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' }} + steps: + - name: Setup Kubernetes + uses: manusa/actions-setup-minikube@v2.4.3 + with: + minikube version: v1.23.2 + kubernetes version: v1.23.2 + driver: docker + apus: 4 + memory: 5192 + + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Install Service Mesh and Deploy Application + run: | + chmod +x .github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh + .github/workflows/scripts/${{ github.event.inputs.service_mesh }}_deploy.sh + shell: bash + + - name: Initiate tmate session + uses: mxschmitt/action-tmate@v3 + + - name: Run Benchmark Tests + uses: layer5io/meshery-smp-action@master + with: + provider_token: ${{ secrets.MESHERY_TOKEN }} + platform: docker + profile_name: ${{ github.event.inputs.profile_name }} + profile_filename: ${{ github.event.inputs.profile_filename }} + endpoint_url: ${{env.ENDPOINT_URL}} + service_mesh: ${{env.SERVICE_MESH}} + load_generator: ${{ github.event.inputs.load_generator }} + test_name: '${{ github.event.inputs.service_mesh }}-${{ github.event.inputs.load_generator }}-${{ github.event.inputs.profile_filename }}${{ github.event.inputs.profile_name }}' diff --git a/.github/workflows/scheduled-benchmarks-self-hosted.yaml b/.github/workflows/scheduled-benchmarks-self-hosted.yaml index 07f12cc..974a16f 100644 --- a/.github/workflows/scheduled-benchmarks-self-hosted.yaml +++ b/.github/workflows/scheduled-benchmarks-self-hosted.yaml @@ -110,7 +110,7 @@ jobs: run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H.%M.%S')" - name: Run Benchmark Tests - uses: layer5io/meshery-smp-action@master + uses: gyohuangxin/meshery-smp-action@master with: provider_token: ${{ secrets.MESHERY_TOKEN }} platform: docker diff --git a/.github/workflows/scheduled-benchmarks.yml b/.github/workflows/scheduled-benchmarks.yml index 2e442a5..205fb49 100644 --- a/.github/workflows/scheduled-benchmarks.yml +++ b/.github/workflows/scheduled-benchmarks.yml @@ -24,8 +24,8 @@ jobs: strategy: fail-fast: false matrix: - service-mesh: ['istio', 'linkerd'] - load-generator: ['fortio', 'wrk2'] + service-mesh: ['istio', 'linkerd', 'consul', 'kuma', 'appmesh', 'cilium'] + load-generator: ['fortio', 'wrk2', 'nighthawk'] steps: - name: Setup Kubernetes uses: manusa/actions-setup-minikube@v2.4.3 @@ -66,8 +66,8 @@ jobs: strategy: fail-fast: false matrix: - service-mesh: ['istio', 'linkerd', 'osm'] - load-generator: ['fortio', 'wrk2'] + service-mesh: ['istio', 'linkerd', 'osm', 'consul', 'kuma', 'appmesh', 'cilium'] + load-generator: ['fortio', 'wrk2', 'nighthawk'] test-configuration: ['load-test.yaml','soak-test.yaml'] steps: - name: Setup Kubernetes diff --git a/.github/workflows/scripts/appmesh_deploy.sh b/.github/workflows/scripts/appmesh_deploy.sh new file mode 100644 index 0000000..1f73c60 --- /dev/null +++ b/.github/workflows/scripts/appmesh_deploy.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# This script is used to deploy Istio on Kubernetes +# +# Also deploys the bookinfo application on Istio and passes the gateway URL to Meshery +# See: https://github.com/service-mesh-performance/service-mesh-performance/blob/master/protos/service_mesh.proto + +export MESH_NAME='App Mesh' +export SERVICE_MESH='APP_MESH' + +# Check if mesheryctl is present, else install it and deploy Kuma adapter +if ! [ -x "$(command -v mesheryctl)" ]; then + echo 'mesheryctl is not installed. Installing mesheryctl client... Standby... (Starting Meshery as well...)' >&2 + curl -L https://meshery.io/install | ADAPTERS=app-mesh PLATFORM=kubernetes bash - +fi + +sleep 10 + +echo 'E' | mesheryctl mesh deploy adapter meshery-app-mesh:10000 --token "./.github/workflows/auth.json" +sleep 50 +echo "Onboarding application... Standby for few minutes..." +mesheryctl pattern apply -f "https://raw.githubusercontent.com/service-mesh-patterns/service-mesh-patterns/master/samples/bookInfoPattern.yaml" --token "./.github/workflows/auth.json" + +echo "Service Mesh: $MESH_NAME - $SERVICE_MESH" +echo "Endpoint URL: http://localhost:5000" + +# Pass the endpoint to be used by Meshery +echo "ENDPOINT_URL=http://localhost:5000" >> $GITHUB_ENV +echo "SERVICE_MESH=$SERVICE_MESH" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/scripts/cilium_deploy.sh b/.github/workflows/scripts/cilium_deploy.sh new file mode 100644 index 0000000..53f2d54 --- /dev/null +++ b/.github/workflows/scripts/cilium_deploy.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# This script is used to deploy Istio on Kubernetes +# +# Also deploys the bookinfo application on Istio and passes the gateway URL to Meshery +# See: https://github.com/service-mesh-performance/service-mesh-performance/blob/master/protos/service_mesh.proto + +export MESH_NAME='Cilium' +export SERVICE_MESH='CILIUM' + +# Check if mesheryctl is present, else install it and deploy Kuma adapter +if ! [ -x "$(command -v mesheryctl)" ]; then + echo 'mesheryctl is not installed. Installing mesheryctl client... Standby... (Starting Meshery as well...)' >&2 + curl -L https://meshery.io/install | ADAPTERS=cilium PLATFORM=kubernetes bash - +fi + +sleep 10 + +#mesheryctl system login --provider None +echo 'E' | mesheryctl mesh deploy adapter meshery-cilium:10000 --token "./.github/workflows/auth.json" +sleep 50 +echo "Onboarding application... Standby for few minutes..." +mesheryctl pattern apply -f "https://raw.githubusercontent.com/service-mesh-patterns/service-mesh-patterns/master/samples/bookInfoPattern.yaml" --token "./.github/workflows/auth.json" + +echo "Service Mesh: $MESH_NAME - $SERVICE_MESH" +echo "Endpoint URL: http://localhost:5000" + +# Pass the endpoint to be used by Meshery +echo "ENDPOINT_URL=http://localhost:5000" >> $GITHUB_ENV +echo "SERVICE_MESH=$SERVICE_MESH" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/scripts/consul_deploy.sh b/.github/workflows/scripts/consul_deploy.sh new file mode 100644 index 0000000..5d73f03 --- /dev/null +++ b/.github/workflows/scripts/consul_deploy.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# This script is used to deploy Istio on Kubernetes +# +# Also deploys the bookinfo application on Istio and passes the gateway URL to Meshery +# See: https://github.com/service-mesh-performance/service-mesh-performance/blob/master/protos/service_mesh.proto + +export MESH_NAME='Consul' +export SERVICE_MESH='CONSUL' + +# Check if mesheryctl is present, else install it and deploy Kuma adapter +if ! [ -x "$(command -v mesheryctl)" ]; then + echo 'mesheryctl is not installed. Installing mesheryctl client... Standby... (Starting Meshery as well...)' >&2 + curl -L https://meshery.io/install | ADAPTERS=consul PLATFORM=kubernetes bash - +fi + +sleep 10 + +echo 'E' | mesheryctl mesh deploy adapter meshery-consul:10000 --token "./.github/workflows/auth.json" +sleep 50 +echo "Onboarding application... Standby for few minutes..." +mesheryctl pattern apply -f "https://raw.githubusercontent.com/service-mesh-patterns/service-mesh-patterns/master/samples/bookInfoPattern.yaml" --token "./.github/workflows/auth.json" + +echo "Service Mesh: $MESH_NAME - $SERVICE_MESH" +echo "Endpoint URL: http://localhost:5000" + +# Pass the endpoint to be used by Meshery +echo "ENDPOINT_URL=http://localhost:5000" >> $GITHUB_ENV +echo "SERVICE_MESH=$SERVICE_MESH" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/scripts/kuma_deploy.sh b/.github/workflows/scripts/kuma_deploy.sh new file mode 100644 index 0000000..3b5d8a6 --- /dev/null +++ b/.github/workflows/scripts/kuma_deploy.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# This script is used to deploy Istio on Kubernetes +# +# Also deploys the bookinfo application on Istio and passes the gateway URL to Meshery +# See: https://github.com/service-mesh-performance/service-mesh-performance/blob/master/protos/service_mesh.proto + +export MESH_NAME='Kuma' +export SERVICE_MESH='Kuma' + +# Check if mesheryctl is present, else install it and deploy Kuma adapter +if ! [ -x "$(command -v mesheryctl)" ]; then + echo 'mesheryctl is not installed. Installing mesheryctl client... Standby... (Starting Meshery as well...)' >&2 + curl -L https://meshery.io/install | ADAPTERS=kuma PLATFORM=kubernetes bash - +fi + +sleep 10 + +echo 'E' | mesheryctl mesh deploy adapter meshery-kuma:10000 --token "./.github/workflows/auth.json" +sleep 50 +echo "Deploying demo application on Kuma..." +# Refer to https://kuma.io/docs/1.6.x/quickstart/kubernetes/#set-up-and-run +git clone https://github.com/kumahq/kuma-counter-demo.git && cd kuma-counter-demo +kubectl apply -f demo.yaml +echo "Waiting for the application to be ready..." +sleep 50 +kubectl port-forward svc/demo-app -n kuma-demo 5000:5000 & + +echo "Service Mesh: $MESH_NAME - $SERVICE_MESH" +echo "Endpoint URL: http://localhost:5000" + +# Pass the endpoint to be used by Meshery +echo "ENDPOINT_URL=http://localhost:5000" >> $GITHUB_ENV +echo "SERVICE_MESH=$SERVICE_MESH" >> $GITHUB_ENV \ No newline at end of file