diff --git a/.gitignore b/.gitignore index 66fd13c..5f10583 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ # Dependency directories (remove the comment below to include it) # vendor/ + +.vscode/* diff --git a/README.md b/README.md index 7f2bc2a..0bd80ba 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,61 @@ -# Meshery SMP Action -This repository is used for storing a GitHub action for performing SMP tests using Meshery +# Meshery - SMP GitHub Action -## Inputs -```yaml - # token to connect with the remote provider - provider_token: - description: "Provider token to use. NOTE: value of the 'token' key in auth.json" - required: true +GitHub Action to run SMP Performance Benchmarks on CI/CD pipelines. + +[Meshery](https://meshery.io/) is the canonical implementation of the [Service Mesh Performance specification](https://smp-spec.io/). + +## Learn More + +- [Performance Management in Meshery](https://docs.meshery.io/functionality/performance-management) +- [Guide: Running Performance Tests in Meshery](https://docs.meshery.io/guides/performance-management) +- [Supported Service Meshes](https://docs.meshery.io/service-meshes) + +## Usage + +See [action.yml](action.yml) - # platform to deploy meshery - platform: - description: "Platform to deploy meshery on. Possible values: docker, kubernetes" - default: docker +You can use this action by defining your test configuration in a performance profile in Meshery or write your test configurations in SMP compatible format ([see example](#smp-compatible-test-configuration-file)). - # SUPPLY EITHER "profile_filename" or profile_name +You can then pass in either of these to the action to run a performance test. - # name of the file storing the performance profile (keep in .github) - profile_filename: - description: "Name of the file containing SMP profile" +The results of the tests are updated on the Performance Management dashboard in Meshery. - # name of the prformance profile to use - profile_name: - description: "Name of the performance profile" +See [Performance Management with Meshery](https://docs.meshery.io/guides/performance-management) for detailed instructions on setting up Meshery and authenticating the GitHub Action. + +## SMP Compatible Test Configuration File + +```yaml +smp_version: v0.0.1 +id: +name: Istio Performance Test +labels: {} +clients: +- internal: false + load_generator: fortio + protocol: 1 + connections: 2 + rps: 10 + headers: {} + cookies: {} + body: "" + content_type: "" + endpoint_urls: + - http://localhost:2323/productpage +duration: "30m" ``` ## Sample configuration + ```yaml -name: Testing SMP action +name: Meshery SMP Action on: push: branches: - 'perf' + 'master' jobs: - job1: - name: Run Performance Test + performance-test: + name: Performance Test runs-on: ubuntu-latest steps: - name: checkout @@ -42,23 +63,21 @@ jobs: with: ref: 'perf' - - name: Deploy k8s + - name: Deploy k8s-minikube uses: manusa/actions-setup-minikube@v2.4.1 with: minikube version: 'v1.21.0' kubernetes version: 'v1.20.7' driver: docker - - name: Performance test + - name: Run Performance Test uses: layer5io/meshery-smp-action@master with: provider_token: ${{ secrets.PROVIDER_TOKEN }} platform: docker - profile_name: demo + profile_name: istio-soak-test ``` -
 
- ## Join the service mesh community! diff --git a/action.yml b/action.yml index fc1d3f1..2504d83 100644 --- a/action.yml +++ b/action.yml @@ -1,25 +1,29 @@ -name: "Service Mesh Performance Testing with Meshery" -description: "Validate SMP specification using Meshery" +name: "Performance Testing with Meshery" +description: "Run performance tests in SMP format with Meshery" author: "Layer5" inputs: - # token to connect with the remote provider + # token to authenticate with Meshery + # see: https://docs.meshery.io/guides/performance-management#running-performance-benchmarks-in-your-pipelines provider_token: description: "Provider token to use. NOTE: value of the 'token' key in auth.json" required: true - # platform to deploy meshery + # platform to deploy Meshery to platform: - description: "Platform to deploy meshery on. Possible values: docker, kubernetes" + description: "Platform to deploy Meshery to. Allowed values: docker, kubernetes" default: docker - # SUPPLY EITHER "profile_filename" or profile_name + # provide either a test configuration file or a performance profile name - # name of the file storing the performance profile (keep in .github) + # name of the test configuration file written in SMP compatible format + # see: https://docs.meshery.io/guides/performance-management#running-performance-benchmarks-through-mesheryctl + # store this file in the .github folder in your repository profile_filename: - description: "Name of the file containing SMP profile" + description: "Name of the test configuration file" - # name of the prformance profile to use + # name of the performance profile to use to run tests + # see: https://docs.meshery.io/functionality/performance-management#performance-profiles profile_name: description: "Name of the performance profile"