{"id":18960793,"url":"https://github.com/layer5io/learn-layer5","last_synced_at":"2025-08-14T08:34:13.673Z","repository":{"id":45167831,"uuid":"269522628","full_name":"layer5io/learn-layer5","owner":"layer5io","description":"A sample application for learning how to service mesh and for validating SMI conformance","archived":false,"fork":false,"pushed_at":"2024-10-17T15:53:44.000Z","size":27836,"stargazers_count":64,"open_issues_count":9,"forks_count":30,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-26T09:42:38.913Z","etag":null,"topics":["conformance","consul","hacktoberfest","istio","kuma","learn-service-mesh","linkerd","maesh","meshery","service-mesh","service-mesh-interface","service-mesh-workshop","smi","smi-conformance","smi-specifications"],"latest_commit_sha":null,"homepage":"https://layer5.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/layer5io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-05T03:32:04.000Z","updated_at":"2024-11-27T17:18:10.000Z","dependencies_parsed_at":"2024-06-18T14:05:06.191Z","dependency_job_id":"b4a09c6a-7909-4b33-9cf1-35c5feb42d7e","html_url":"https://github.com/layer5io/learn-layer5","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/layer5io/learn-layer5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Flearn-layer5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Flearn-layer5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Flearn-layer5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Flearn-layer5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/layer5io","download_url":"https://codeload.github.com/layer5io/learn-layer5/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Flearn-layer5/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270387108,"owners_count":24574939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conformance","consul","hacktoberfest","istio","kuma","learn-service-mesh","linkerd","maesh","meshery","service-mesh","service-mesh-interface","service-mesh-workshop","smi","smi-conformance","smi-specifications"],"created_at":"2024-11-08T14:09:24.208Z","updated_at":"2025-08-14T08:34:13.579Z","avatar_url":"https://github.com/layer5io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp style=\"text-align:center;\" align=\"center\"\u003e\n      \u003cpicture align=\"center\"\u003e\n         \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"img\\readme\\layer5-light-no-trim.svg\"\u003e\n         \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"img\\readme\\layer5-no-trim.svg\"\u003e\n         \u003cimg align=\"center\" src=\"img\\readme\\layer5-light-no-trim.svg\" alt=\"Shows a dark layer5 logo in light mode and a white logo in dark mode\" width=\"45%\"/\u003e\n      \u003c/picture\u003e\n\u003c/p\u003e\n\n![GitHub contributors](https://img.shields.io/github/contributors/layer5io/layer5.svg)\n![GitHub](https://img.shields.io/github/license/layer5io/layer5.svg)\n[![Docker Pulls](https://img.shields.io/docker/pulls/layer5/learn-layer5.svg)](https://hub.docker.com/r/layer5/learn-layer5)\n[![Go Report Card](https://goreportcard.com/badge/github.com/layer5io/learn-layer5)](https://goreportcard.com/report/github.com/layer5io/learn-layer5)\n[![GitHub issues by-label](https://img.shields.io/github/issues/layer5io/learn-layer5/help%20wanted.svg)](https://github.com/issues?utf8=✓\u0026q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+label%3A%22help+wanted%22+\")\n[![Website](https://img.shields.io/website/https/layer5.io/meshery.svg)](https://layer5.io)\n[![Twitter Follow](https://img.shields.io/twitter/follow/layer5.svg?label=Follow\u0026style=social)](https://twitter.com/intent/follow?screen_name=mesheryio)\n[![Slack](https://img.shields.io/badge/Slack-@layer5.svg?logo=slack)](http://slack.layer5.io)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3564/badge)](https://bestpractices.coreinfrastructure.org/projects/3564)\n\n\u003cp style=\"clear:both;\"\u003e\n\n# Learn to service mesh\n\nThe \"Learn Layer5\" sample application is to be available for use across all service meshes that Meshery supports and is to used as:\n\n- a learning device (for [service mesh workshops](https://layer5.io/workshops))\n- for [Service Mesh Interface conformance](https://docs.google.com/document/d/1HL8Sk7NSLLj-9PRqoHYVIGyU6fZxUQFotrxbmfFtjwc/edit#)\n\n## Application Architecture\nThe Learn Layer5 application includes three services: `app-a`, `app-b`, and `app-c`. Though they are different services, they are defined using the same app (source code in ./service). Each service is listening on port `9091/tcp`.\n\n### Service\n\nThe following are the routes defined by the `service` app and their functionality.\n\n#### POST /call\n\nThis route makes the service make requests to another service. Metrics are collected for this route. sample usage given below:\n\n\n```shell\n# Command\ncurl --location --request POST 'http://service-a:9091/call' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"url\": \"http://service-b:9091/call\",\n\"body\": \"{\\r\\n\\\"url\\\": \\\"http:\\/\\/service-c:9091\\/echo\\\",\\r\\n\\\"body\\\": \\\"\\\",\\r\\n\\\"method\\\": \\\"GET\\\"\\r\\n}\",\n\"method\": \"POST\",\n\"headers\": {\n    \"h1\":\"v1\"\n}\n}'\n\n# No Output\nGET /echo HTTP/1.1\nHost: service-c:9091\nUser-Agent: Go-http-client/1.1\nAccept-Encoding: gzip\nServicename: Service-B\n```\n\nIn the above example, we are making a post request to `service-a` with the body:\n```json\n{\n  \"url\": \"http://service-b:9091/call\",\n  \"body\": \"{\\r\\n\\\"url\\\": \\\"http:\\/\\/service-c:9091\\/echo\\\",\\r\\n\\\"body\\\": \\\"\\\",\\r\\n\\\"method\\\": \\\"GET\\\"\\r\\n}\",\n  \"method\": \"POST\",\n  \"headers\": {\n      \"h1\":\"v1\"\n  }\n}\n```\nThis will make `service-a` to make a `POST` request to `http://service-b:9091/call` with the headers specified above, and the body:\n```json\n{\n  \"url\": \"http://service-c:9091/echo\",\n  \"body\":\"\",\n  \"method\": \"GET\"\n}\n```\nThis inturn will make `service-b` to make a `GET` request to `http://service-c:9091/echo`.\n\n#### GET /metrics\n\nGets the metrics from `service-a`\n```shell\n# Command\ncurl --location --request GET 'http://service-b:9091/metrics'\n# Output\n{\n    \"ReqReceived\": [\n        \"Service-A\"\n    ],\n    \"RespSucceeded\": [\n        {\n            \"URL\": \"http://service-c:9091/echo\",\n            \"Method\": \"GET\",\n            \"Headers\": null\n        }\n    ],\n    \"RespFailed\": []\n}\n```\n* In ReqReceived we see list of requests `service-b` received and from whom it received. Here we see `service-A`. Actually each of the service sets a header `ServiceName` which is read  by the service to determine the sender.\n* As `service-b` made a request to `service-c` and the request succeeded, we can see the details in the list of successful responses (RespSucceeded).\n\n#### DELETE /metrics\n\nClears the counters in `service`\n```shell\n# Command\ncurl --location --request DELETE 'http://34.68.35.174:9091/metrics'\n# No Output\n```\n\n\u003e Note: metrics are collected only for `/call` and `/echo`.\n\n# Service Mesh Interface (SMI) Conformance\nThe `learn-layer5` application serves as a sample application to validate the conformance of any service mesh with the SMI specifications. To verify SMI conformance, run Meshery and the Meshery adapter for the specific service mesh you wish to test. Invoke the suite of SMI conformance tests on the specific service mesh you would like to validate.\n\n## Invoking conformance tests\n\n**As a Service Mesh user**\nMeshery allows you to schedule tests and invoke them programmatically. Meshery will store these test results and allow you to retrieve them later.\n\n**As a Service Mesh maker**\nMeshery guarantees provenance of these tests and facilitates the public publicing of this suite of tests results into a versioned, public matrix of conformance status (consisting of both supported capabilities and test compliance).\n\u003c!--\n## Testing Manually\n\nTo manually invoke SMI Conformance test for a deployed service mesh, you can apply tests from the `smi-test` directory of this repository. Execute the following command to run the smi-conformace tests:\n\n# To check for smi conformance of a deployed service mesh\nMeshery, the service mesh management plane, facililtates the execution and results gathering of these conformance tests. All the tests are written in `smi-test` directory of this repository.\nBuild and run with the below commands to create a container for running the smi-conformace tests:-\n\n```shell\ndocker build . -t meshery-smi-conformance:latest\ndocker run -p 10008:10008 meshery-smi-conformance:latest\n```\n\n\n```shell\nkubectl kuttl test  --skip-cluster-delete=true --start-kind=false ./smi-test\n```\n--\u003e\n\n\u003cbr /\u003e\u003cbr /\u003e\u003cp align=\"center\"\u003e\u003ci\u003eIf you’re using Learn Layer5 or if you like the project, please \u003ca href=\"https://github.com/layer5io/meshery/stargazers\"\u003e★\u003c/a\u003e star this repository to show your support! 🤩\u003c/i\u003e\u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp style=\"clear:both;\"\u003e\n\u003ch2\u003e\u003ca name=\"contributing\"\u003e\u003c/a\u003e\u003ca name=\"community\"\u003e\u003c/a\u003e \u003ca href=\"http://slack.layer5.io\"\u003eCommunity\u003c/a\u003e and \u003ca href=\"https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md\"\u003eContributing\u003c/a\u003e\u003c/h2\u003e\nOur projects are community-built and welcome collaboration. 👍 Be sure to see the \u003ca href=\"https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit\"\u003eLayer5 Community Welcome Guide\u003c/a\u003e for a tour of resources available to you and jump into our \u003ca href=\"http://slack.layer5.io\"\u003eSlack\u003c/a\u003e! Contributors are expected to adhere to the \u003ca href=\"https://github.com/cncf/foundation/blob/master/code-of-conduct.md\"\u003eCNCF Code of Conduct\u003c/a\u003e.\n\n\u003ca href=\"https://slack.meshery.io\"\u003e\n\n\u003cpicture align=\"right\"\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"img\\readme\\slack-dark-128.png\"  width=\"110px\" align=\"right\" style=\"margin-left:10px;margin-top:10px;\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"img\\readme\\slack-128.png\" width=\"110px\" align=\"right\" style=\"margin-left:10px;padding-top:5px;\"\u003e\n  \u003cimg alt=\"Shows an illustrated light mode meshery logo in light color mode and a dark mode meshery logo dark color mode.\" src=\"img\\readme\\slack-128.png\" width=\"110px\" align=\"right\" style=\"margin-left:10px;padding-top:13px;\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://meshery.io/community\"\u003e\u003cimg alt=\"Layer5 Service Mesh Community\" src=\"img/readme/community.svg\" style=\"margin-right:8px;padding-top:5px;\" width=\"140px\" align=\"left\" /\u003e\u003c/a\u003e\n\n\u003cp\u003e\n✔️ \u003cem\u003e\u003cstrong\u003eJoin\u003c/strong\u003e\u003c/em\u003e any or all of the weekly meetings on the \u003ca href=\"https://calendar.google.com/calendar/b/1?cid=bGF5ZXI1LmlvX2VoMmFhOWRwZjFnNDBlbHZvYzc2MmpucGhzQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20\"\u003ecommunity calendar\u003c/a\u003e.\u003cbr /\u003e\n✔️ \u003cem\u003e\u003cstrong\u003eWatch\u003c/strong\u003e\u003c/em\u003e community \u003ca href=\"https://www.youtube.com/channel/UCFL1af7_wdnhHXL1InzaMvA?sub_confirmation=1\"\u003emeeting recordings\u003c/a\u003e.\u003cbr /\u003e\n✔️ \u003cem\u003e\u003cstrong\u003eAccess\u003c/strong\u003e\u003c/em\u003e the \u003ca href=\"https://drive.google.com/drive/u/4/folders/0ABH8aabN4WAKUk9PVA\"\u003ecommunity drive\u003c/a\u003e.\u003cbr /\u003e\n✔️ \u003cem\u003e\u003cstrong\u003eDiscuss\u003c/strong\u003e\u003c/em\u003e in the \u003ca href=\"https://discuss.layer5.io\"\u003eCommunity Forum\u003c/a\u003e.\u003cbr /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ci\u003eNot sure where to start?\u003c/i\u003e Grab an open issue with the \u003ca href=\"https://github.com/issues?q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+org%3Ameshery+org%3Aservice-mesh-performance+org%3Aservice-mesh-patterns+label%3A%22help+wanted%22+\"\u003ehelp-wanted label\u003c/a\u003e.\n\u003c/p\u003e\n\n## About Layer5\n\n [Layer5](https://layer5.io)'s cloud native application and infrastructure management software enables organizations to expect more from their infrastructure. We embrace developer-defined infrastructure. We empower engineer to change how they write applications, support operators in rethinking how they run modern infrastructure and enable product owners to regain full control over their product portfolio.\n\n**License**\n\nThis repository and site are available as open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayer5io%2Flearn-layer5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flayer5io%2Flearn-layer5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayer5io%2Flearn-layer5/lists"}