{"id":15031689,"url":"https://github.com/layer5io/image-hub","last_synced_at":"2025-04-09T22:51:48.463Z","repository":{"id":40829089,"uuid":"265992736","full_name":"layer5io/image-hub","owner":"layer5io","description":"Image Hub is a sample application for exploring WebAssembly modules used as Envoy filters.","archived":false,"fork":false,"pushed_at":"2023-08-22T09:15:54.000Z","size":34866,"stargazers_count":67,"open_issues_count":16,"forks_count":23,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T22:51:38.447Z","etag":null,"topics":["consul","envoy-filter","envoy-filters","envoy-proxy","envoyproxy","hacktoberfest","image-hub","meshery","rust","rustlang","service-mesh","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://layer5.io","language":"Vue","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":null,"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-05-22T01:45:15.000Z","updated_at":"2024-05-31T14:37:15.000Z","dependencies_parsed_at":"2025-02-16T00:42:16.887Z","dependency_job_id":null,"html_url":"https://github.com/layer5io/image-hub","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Fimage-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Fimage-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Fimage-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layer5io%2Fimage-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/layer5io","download_url":"https://codeload.github.com/layer5io/image-hub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125643,"owners_count":21051766,"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","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":["consul","envoy-filter","envoy-filters","envoy-proxy","envoyproxy","hacktoberfest","image-hub","meshery","rust","rustlang","service-mesh","wasm","webassembly"],"created_at":"2024-09-24T20:16:20.280Z","updated_at":"2025-04-09T22:51:48.440Z","avatar_url":"https://github.com/layer5io.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp style=\"text-align:center;\"\u003e\u003ca href=\"https://layer5.io/meshery\"\u003e\u003cimg align=\"left\" style=\"margin-bottom:20px;\" src=\"img/readme/layer5-image-hub.svg\"  height=\"125px\" /\u003e\u003c/a\u003e\u003ch1\u003eLayer5 Image Hub\u003c/h1\u003e\u003c/p\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/layer5io/image-hub)](https://goreportcard.com/report/github.com/layer5io/image-hub)\n[![GitHub](https://img.shields.io/github/license/layer5io/image-hub.svg)](LICENSE)\n[![GitHub issues by-label](https://img.shields.io/github/issues/layer5io/meshery/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=layer5)\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 align=\"center\"\u003e\u003ci\u003eIf you’re using the Image Hub or if you like other Layer5 projects, please \u003ca href=\"https://github.com/layer5io/image-hub/stargazers\"\u003e★\u003c/a\u003e star this repository to show your support! 🤩\u003c/i\u003e\u003c/p\u003e\n\n## Image Hub\nImage Hub is a sample application written to run on [Consul](https://meshery.layer5.io/docs/service-meshes/adapters/consul) for exploring WebAssembly modules used as Envoy filters. This demo application has been enabled by experimental works of [Nic Jackson](https://twitter.com/sheriffjackson) of HashiCorp, and [Kanishkar J](https://twitter.com/_kanishkarj_), [Lee Calcote](https://twitter.com/lcalcote), and other contributors of Layer5.\n\n\n## Deployment Instructions\n\nImage Hub supports Envoy-based data planes. Deployment instructions for each supported service mesh are below.\n\n### Using Istio (pending [PR #196](https://github.com/layer5io/meshery-istio/pull/196)+release; clone and do make run for now):\n1) Use [Meshery](https://github.com/layer5io/meshery) to deploy [istio](https://github.com/layer5io/advanced-istio-service-mesh-workshop/blob/master/lab-1/README.md) and the Image Hub sample application (Management \u003e Istio \u003e Manage Sample Application Lifecycle \u003e Image-Hub ) onto the Istio service mesh.\n2) To map `imagehub.meshery.io` to the appropriate IP, run the following command to add the appropriate entry in the `\"\\etc\\hosts\"` file: \n\n    ```\n    echo $(kubectl get nodes --selector=kubernetes.io/role!=master -o jsonpath={.items[0].status.addresses[?\\(@.type==\\\"InternalIP\\\"\\)].address})'    'imagehub.meshery.io | sudo tee -a /etc/hosts\n    ```\n3) To get the environment port, run the following command:\n    ```\n    echo $(kubectl get svc istio-ingressgateway -n istio-system -o jsonpath='{.spec.ports[1].nodePort}')\n    ```\n4) Access the web UI using:\n    ```\n    http://imagehub.meshery.io:\u003cenvironment port\u003e\n    ```\n\n\n### Using Consul:\n\n1) Deploy the latest Consul:\n\n    ```bash\n    helm repo add hashicorp https://helm.releases.hashicorp.com # Adds helm hashicorp repo\n    helm install consul hashicorp/consul -f config/consul-values.yaml # Setup custom Consul with support for WASM\n    ```\n\n2) Use [Meshery](https://github.com/layer5io/meshery) to deploy the Image Hub sample application onto the Consul service mesh.\n\n3) Find the port assigned to the `ingess` service:\n\n    ```\n    kubectl get svc ingess\n    NAME     TYPE       CLUSTER-IP    EXTERNAL-IP   PORT(S)        AGE\n    ingess   NodePort   10.97.34.25   \u003cnone\u003e        80:31118/TCP   27m\n    ```\n\n4) Open http://localhost:31118 (where 31118 is your environment's port number).\n\n## Use Image Hub\n\n1. Upon visiting the image-hub homepage, we would need to signup for an account! Go ahead and click the \"Sign Up\" button in the top right.\n1. Enter the login details, and select a plan; Personal gives you 10 pulls per minute, Team gives you 100 pulls per minute, and Enterprise will give you 1000 pulls per minute.\n1. After signing up, you should be redirected to the login page, where you can log in and start using the sample app.\n1. On the main page, open up the network tab, and reload the page. This will allow you to see the request-response of the app.\n1. Go ahead and click the download button a couple of times. You'll notice that there is nothing actually limiting you from crossing the number of pulls according to the plan you chose!\n1. Alternatively, you could test the above by navigating to http://imagehub.meshery.io:\u003cenvironment port\u003e/pull and then looking at the request-responses.\n\n## Deploying the Rate Limiter WASM Filter for Envoy\n\n1. Go back to Management \u003e Istio and under \"Apply Service Mesh Configuration\" make sure to apply \"Automatic Sidecar Injection\"\n1. Open up a terminal, and run `kubectl get pods` to get a list of running pods. You should be able to see 2 pods, `web` and `api`. Now run \nthe command `kubectl delete pods \u003cexact web pod name\u003e \u003cexact api pod name\u003e`. This will cause kubernetes to respawn them with the updated configuration.\n1. Go back to Management \u003e Istio and under \"Apply Service Mesh Configuration\", select the `Envoy Filter for Image Hub` option, and wait for a few seconds.\n\n## Use Image hub with a WASM filter\n\n1. Test your ability to \"pull\" an image (images are not in fact pulled, but an HTTP request is sent to the backend `api`). You would not be able to pull an image, and the response would say \"unauthorized\".\n1. Sign up a new user and select a subscription plan.\n1. Log in as that user.\n1. Test your ability to \"pull\" an image. You should be able to pull an image.\n1. Open Meshery's performance management page (http://localhost:9081/performance)\n1. Configure a performance test against http://x.x.x.x:31118/api/pull (where x.x.x.x is your machine's host IP address, not \"localhost\")\n1. Enter `{ \"authorization\" : \"\u003cyour user's token\u003e\" }`\n1. Run the performance test. See that your subscription plan limit is enforced accordingly.\n1. Change your subscription plan and retest.\n\n## Architecture\n\n### Consul Service Mesh Architecture w/WebAssembly\n![Service Mesh Architecture - Consul](img/readme/service-mesh-architecture-consul.png)\n\n### Image Hub deployed on Consul\n![Meshery and WASM](img/readme/image-hub-on-consul-with-wasm-and-meshery.png)\n\n## Presentations\n\n\u003ca href=\"https://www.youtube.com/watch?v=5BrbbKZOctw\u0026list=PL3A-A6hPO2IN_HSU0pSfijBboiHggs5mC\u0026index=4\u0026t=0s\"\u003e\u003cimg alt=\"DockerCon'2020\" src=\"docs/assets/img/readme/docker-con-2020.png\"  style=\"margin: 10px auto;\"/\u003e\u003c/a\u003e\n\n- [DockerCon 2020](https://docker.events.cube365.net/docker/dockercon/content/Videos/63TCCNpzDC7Xxnm8b) | [deck](https://calcotestudios.com/talks/decks/slides-dockercon-2020-service-meshing-with-docker-desktop-and-webassembly.html) | ([video](https://www.youtube.com/watch?v=5BrbbKZOctw\u0026list=PL3A-A6hPO2IN_HSU0pSfijBboiHggs5mC\u0026index=4\u0026t=0s)\n\n\u003cdiv\u003e\u0026nbsp;\u003c/div\u003e\n\n## Join the Community!\n\n\u003ca name=\"contributing\"\u003e\u003c/a\u003e\u003ca name=\"community\"\u003e\u003c/a\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!\n\n\u003ca href=\"https://meshery.io/community\"\u003e\u003cimg alt=\"Layer5 Cloud Native Community\" src=\"img/readme/community.svg\" style=\"margin-right:8px;padding-top:5px;\" width=\"140px\" align=\"left\" /\u003e\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\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\u003eFill-in\u003c/em\u003e a \u003ca href=\"https://layer5.io/newcomers\"\u003ecommunity member form\u003c/a\u003e to gain access to community resources.\u003c/li\u003e\n\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\u003cdiv\u003e\u0026nbsp;\u003c/div\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%2Fimage-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flayer5io%2Fimage-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayer5io%2Fimage-hub/lists"}