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 the best local Kubernetes development experience, we recommend installing kind and starting a cluster with the following kind-config.yaml configuration, enabling simple local ingress with Envoy:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
# One control plane node and three "workers."
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30950
hostPort: 80
protocol: TCPThe following command downloads the kind-config.yaml from this repository, starts a cluster, and deletes the config upon completion:
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.yamlYou'll need a trial license key to follow these instructions. Sign up for Cosmonic Control's free trial to get a key.
Deploy Cosmonic Control to Kubernetes with Helm:
helm install cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control\
--version 0.3.0\
--namespace cosmonic-system\
--create-namespace\
--set envoy.service.type=NodePort\
--set envoy.service.httpNodePort=30950\
--set cosmonicLicenseKey="<insert license here>"Deploy a HostGroup:
helm install hostgroup oci://ghcr.io/cosmonic/cosmonic-control-hostgroup --version 0.3.0 --namespace cosmonic-systemThis 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
http-ingress-nginx: Demo for NGINX as an Ingress Controller for Wasm workloadsintegrations/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
trial: YAML documents used to configure trial deployments of Cosmonic Control
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.