Project: Meshery (Provisioning / Automation & Configuration)
File: smi-conformance.md

<!-- layout: default title: Running SMI Conformance Tests abstract: This guide is to help users get a better understanding of sample apps permalink: guides/smi-conformance type: guides language: en This guide will help you run SMI Conformance Tests with Meshery through the , CLI and a GitHub action for your CI/CD pipelines. To learn more about Meshery and SMI Conformance, see Install and login to Meshery to start running SMI conformance tests. See documentation for detailed steps on how to install Meshery. Meshery dashboard <a href="{{ site.baseurl }}/assets/img/smi/dashboard.png"><img alt="Meshery Dashboard" src="{{ site.baseurl }}/assets/img/smi/dashboard.png" /></a> Next, install the service mesh from Meshery. See for a list of supported service meshes and guides on how to install them. Installing Istio <a href="{{ site.baseurl }}/assets/img/smi/istio-dashboard.png"><img alt="Istio Dashboard" src="{{ site.baseurl }}/assets/img/smi/istio-dashboard.png" /></a> Alternatively, you can use mesheryctl, Meshery's CLI to deploy a service mesh. See documentation for details. Now that we have deployed the service mesh to validate (see ), we can run an SMI conformance test through the UI. In the "Validate Service Mesh Configuration" click on the "+" button and select "SMI Conformance". Running SMI Conformance Test on Istio <a href="{{ site.baseurl }}/assets/img/smi/smi-conformance-run.png"><img alt="Running SMI Conformance Tests on Istio" src="{{ site.baseurl }}/assets/img/smi/smi-conformance-run.png" /></a> This will start running the SMI Conformance tests. Once the tests are done, you can navigate to SMI Conformance results page by clicking the conformance tab on the menu. SMI Conformance Test Results <a href="{{ site.baseurl }}/assets/img/smi/smi-conformance-page.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl }}/assets/img/smi/smi-conformance-page.png" /></a> Click the dropdown button to view the results of a specific test. Viewing the Results <a href="{{ site.baseurl }}/assets/img/smi/smi-conformance-result.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl }}/assets/img/smi/smi-conformance-result.png" /></a> Once we have deployed the service mesh to validate (see ), we can run an SMI conformance test through the CLI (mesheryctl). You can also use mesheryctl, Meshery's CLI to deploy a service mesh. See documentation for details. Download the token from the Meshery Dashboard by clicking on the profile icon on the top-right corner. Downloading the token <a href="{{ site.baseurl }}/assets/img/smi/download-token.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl

/></a> Open a terminal and run the following command. <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs"> mesheryctl mesh validate -a [name of the adapter] -t [path to token for authentication] -s smi </div></div> </pre> For example to run an SMI Conformance test on Open Service Mesh, we can run: <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs"> mesheryctl mesh validate -a meshery-osm:10009 -t ~/Downloads/auth.json -s smi </div></div> </pre> To view the results of the test, you can open up Meshery in the browser and navigate to the "Conformance" tab. SMI Conformance Test Results <a href="{{ site.baseurl }}/assets/img/smi/smi-conformance-page.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl }}/assets/img/smi/smi-conformance-page.png" /></a> Click the dropdown button to view the results of a specific test. Viewing the Results <a href="{{ site.baseurl }}/assets/img/smi/smi-conformance-result.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl }}/assets/img/smi/smi-conformance-result.png" /></a> You can use to run SMI Conformance tests in your CI/CD pipelines. The conformance test would be run in your pipeline and the results will be published on your Meshery Dashboard (see ). Download the token from the Meshery Dashboard by clicking on the profile icon on the top-right corner. Downloading the token <a href="{{ site.baseurl }}/assets/img/smi/download-token.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl }}/assets/img/smi/download-token.png" /></a> You can use this token to authenticate the instance of Meshery running in your CI/CD workflow. {% include alert.html type="info" title="Using the token in GitHub workflows" content="You can use the <a href='https://docs.github.com/en/actions/reference/encrypted-secrets'>secrets feature in GitHub</a> to store the token." %} A sample workflow that could be added to your `.github/workflows` folder is given below. This example uses Open Service Mesh. <pre class="codeblock-pre"><div class="codeblock"> <div class="clipboardjs"> name: SMI Conformance with Meshery on: push: tags: 'v*' jobs: smi-conformance: name: SMI Conformance runs-on: ubuntu-latest steps: name: Validate SMI Conformance uses: layer5io/mesheryctl-smi-conformance-action@master with: servicemesh: openservice_mesh providertoken: ${{ secrets.MESHERYPROVIDER_TOKEN }} mesh_deployed: false </div></div> </pre> Once the tests are run, you can log into Meshery to view the results in the "Conformance" tab. SMI Conformance Test Results <a href="{{ site.baseurl }}/assets/img/smi/smi-conformance-page.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl }}/assets/img/smi/smi-conformance-page.png" /></a> Click the dropdown button to view the results of a specific test. Viewing the Results <a href="{{ site.baseurl }}/assets/img/smi/smi-conformance-result.png"><img alt="SMI Conformance Test Results" src="{{ site.baseurl }}/assets/img/smi/smi-conformance-result.png" /></a> Functionality: -->