Image Hub is a sample application for exploring WebAssembly modules used as Envoy filters.
If you’re using the Image Hub or if you like other Layer5 projects, please ★ star this repository to show your support! 🤩
Image Hub is a sample application written to run on Consul for exploring WebAssembly modules used as Envoy filters. This demo application has been enabled by experimental works of Nic Jackson of HashiCorp, and Kanishkar J, Lee Calcote, and other contributors of Layer5.
Image Hub supports Envoy-based data planes. Deployment instructions for each supported service mesh are below.
Use Meshery to deploy istio and the Image Hub sample application (Management > Istio > Manage Sample Application Lifecycle > Image-Hub ) onto the Istio service mesh.
To map imagehub.meshery.io
to the appropriate IP, run the following command to add the appropriate entry in the "\etc\hosts"
file:
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
To get the environment port, run the following command:
echo $(kubectl get svc istio-ingressgateway -n istio-system -o jsonpath='{.spec.ports[1].nodePort}')
Access the web UI using:
http://imagehub.meshery.io:<environment port>
Deploy the latest Consul:
helm repo add hashicorp https://helm.releases.hashicorp.com # Adds helm hashicorp repo
helm install consul hashicorp/consul -f config/consul-values.yaml # Setup custom Consul with support for WASM
Use Meshery to deploy the Image Hub sample application onto the Consul service mesh.
Find the port assigned to the ingess
service:
kubectl get svc ingess
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingess NodePort 10.97.34.25 <none> 80:31118/TCP 27m
Open http://localhost:31118 (where 31118 is your environment’s port number).
kubectl get pods
to get a list of running pods. You should be able to see 2 pods, web
and api
. Now runkubectl delete pods <exact web pod name> <exact api pod name>
. This will cause kubernetes to respawn them with the updated configuration.Envoy Filter for Image Hub
option, and wait for a few seconds.api
). You would not be able to pull an image, and the response would say “unauthorized”.{ "authorization" : "<your user's token>" }
Our projects are community-built and welcome collaboration. 👍 Be sure to see the Layer5 Community Welcome Guide for a tour of resources available to you and jump into our Slack!
✔️ Join any or all of the weekly meetings on the community calendar.
✔️ Watch community meeting recordings.
✔️ Fill-in a community member form to gain access to community resources.
✔️ Discuss in the Community Forum.
Not sure where to start? Grab an open issue with the help-wanted label.
Layer5’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.
License
This repository and site are available as open source under the terms of the Apache 2.0 License.