fermyon / spin-mqtt-booth-volume-app

Sample SpinKube application that uses MQTT and HTTP triggers. Ingests noise data from sensors, persists in SQLite DB, and displays over graphical frontend
0 stars 1 forks source link

Set up SpinApp instances on Gecko #4

Closed macolso closed 3 weeks ago

macolso commented 4 weeks ago

We will use k3s to manage two SpinApps running on a Gecko instance. The SpinApps will use selective deploys to only provision the frontend and API components. The API components should connect to a database running on AKS.

image

kate-goldenring commented 4 weeks ago

Here is a K3s + SpinKube install script folks can leverage https://gist.githubusercontent.com/kate-goldenring/a90bbe696d2cd48b44c093e1154047c0/raw/93f6ee1281123858290cb2a6ac61141e4671d38c/spin-kube-k3s.sh

macolso commented 3 weeks ago

I have an k3s cluster set up with spin operator v4.0 and shim v0.16. It's discoverable on the Akamai Control Center under the "kubecon-demo" label.

kate-goldenring commented 3 weeks ago

Heads up that component splitting is not available on v0.16.0 of the shim. You will need to use canary node installer until we cut a new release: ghcr.io/spinkube/containerd-shim-spin/node-installer:20241105-224120-g636a7f5 The node installer is configured during Kwasm set up

# Remove node annotations
kubectl annotate node --all kwasm.sh/kwasm-node-

# Update KWasm installation
helm upgrade --install \
  kwasm-operator kwasm/kwasm-operator \
  --namespace kwasm \
  --create-namespace \
  --set kwasmOperator.installerImage=ghcr.io/spinkube/containerd-shim-spin/node-installer:20241105-224120-g636a7f5

# Annotate
kubectl annotate node --all kwasm.sh/kwasm-node=true
# Verify shim version:
/opt/kwasm/bin/containerd-shim-spin-v2 -v
kate-goldenring commented 3 weeks ago

The gist can be invoked with env vars as follows:

NO_TRAEFIK=true OPERATOR_VERSION=0.4.0 SHIM_VERSION=20241105-224120-g636a7f5 bash <(curl -sL https://gist.githubusercontent.com/kate-goldenring/a90bbe696d2cd48b44c093e1154047c0/raw/2fe5f75896b3c8339fc6f95e32ff46eca0089dae/spin-kube-k3s.sh)
macolso commented 3 weeks ago

Akamai instance is now live at https://akamai.demo.fermyon.com/

kate-goldenring commented 3 weeks ago

Fermyon instance is also hosted on Gecko and is live at https://demo.fermyon.com/