This repository contains demos and examples for Cosmonic Control, an enterprise control plane for managing WebAssembly (Wasm) workloads in cloud native environments.
Cosmonic Control is built on wasmCloud, an Incubating project at the Cloud Native Computing Foundation (CNCF).
In order to try these demos and examples, you will need a Kubernetes cluster and an installation of Cosmonic Control.
For local Kubernetes development, we recommend kind with host ports 80 and 443 forwarded to Traefik's NodePorts (the Cosmonic Control chart deploys Traefik as the edge proxy by default):
# kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30080
hostPort: 80
protocol: TCP
- containerPort: 30443
hostPort: 443
protocol: TCPThe following command downloads the kind-config.yaml from this repository and creates a cluster from it:
curl -fLO https://raw.githubusercontent.com/cosmonic-labs/control-demos/refs/heads/main/kind-config.yaml && kind create cluster --config=kind-config.yaml && rm kind-config.yamlFor other local Kubernetes environments (k3d, k3s) and cloud clusters, see the Cosmonic Control documentation.
Cosmonic Control is free to get started. Deploy with Helm:
helm install cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control \
--version 0.4.3 \
--namespace cosmonic-system \
--create-namespaceDeploy a HostGroup:
helm install hostgroup oci://ghcr.io/cosmonic/cosmonic-control-hostgroup \
--version 0.4.3 \
--namespace cosmonic-systemWhen installing a demo below, pass the demo's host to the cosmonic-control install via --set 'ingress.hosts[N].host=<demo>.localhost.cosmonic.sh' so Traefik routes external traffic for that host to Envoy. *.localhost.cosmonic.sh resolves to 127.0.0.1, so no /etc/hosts edits are required.
This repository includes...
blobby: A blob storage ("blobby") fileserver backed by NATS, implemented as a Wasm componentblobstore-nats: A demonstration of blob storage operations that exposes the results via HTTP, implemented as a Wasm componenthello-world: "Hello world" Wasm component, built with Rusthono-swagger-ui: Wasm component for documenting and testing RESTful APIs, built with TypeScript, Hono, and Swagger UIhttp-server: Wasm component for an HTTP server with multiple endpoints, built with Gopetstore-mcp: An example of a TypeScript-based MCP server for the Swagger PetStore API, implemented as a Wasm componentwelcome-tour: Wasm component introducing users to the core features of Cosmonic Control, built with TypeScript and Hono
integrations/argo-cd: Demo for using GitOps patterns with Argo CD, Cosmonic Control, and Wasm components
kind-config.yaml: Configuration file for local Kubernetes clusters withkind
This repository includes a Makefile enabling simplified usage of Helm commands from a local download of this repository using make:
make helm-render-<demo name>: Render chart templates locally and display the output for a given demo (Ex.make helm-render-blobby)make helm-install-<demo name>: Deploy a given demo in a dedicated namespace with an HTTPTrigger. (Ex.make helm-install-blobby)make helm-delete-<demo name>: Delete a given demo installed withmake helm-install. (Ex.make helm-delete-blobby)
For more information on Cosmonic Control, visit cosmonic.com and the Cosmonic Control documentation.
For more on building components, see the Developer Guide in the Cosmonic Control documentation.
