Skip to content

ettenauer/raspi-blazor-temperature-app

Repository files navigation

raspi-blazor-temperature-app

The project is part of proof of concept system to verify following technologies:

  • Edge to Cloud/K8s (with Raspi)
  • Services hosted in K8s using Helm
  • Services hosted in AKS using Helm
  • Istio with K8s
  • Blazor WebAssembly
  • Azure Identity
  • Inner Dev Loop with Docker-Compose

System Design

Prerequisites

  • Azure account to configure Azure Identity (Scope and AppRole)
  • K8s cluster setup

Inner Dev Loop with Docker-Compose

  • open powershell/cmd
  • navigate to docker-compose folder in repo
  • docker-compose up

Run on Docker Desktop K8s with Helm

Cluster Setup

Run Application

  • helm install local ./k8s
  • app should accessible via ingress -> https://raspi.local/
  • helm uninstall local

Run Application with service mesh ISTIO

  • download istio https://istio.io/downloadIstio
  • update PATH and include istioctl.exe location
  • istioctl install --set profile=demo -y
  • kubectl label namespace default istio-injection=enabled -> required otherwise sidecars are not injected automatically
  • kubectl apply -f ./istio-k8s/addons -> start addon like kiali or jaeger
  • kubectl create -n istio-system secret tls local-tls --key=tls_self.key --cert=tls_self.crt -> create cert for raspi.local with openssl
  • helm install local .\istio-k8s
  • kubectl get pods -> check if pods have two container
  • istioctl dashboard kiali -> load dashboard to view system
  • browse https://raspi.local

Run Application in AKS

setup AKS cluster

setup Application Gateway Ingress Controller Addon (AGIC)

setup cert-manager

setup Azure Key Vault for secrets

run application

  • helm install local .\aks

Run Edge Application on Raspberry Pi

Steps

  1. set up raspberry with ansible, please check out instruction here https://github.com/ettenauer/raspi-ansible
  2. deploy playbook https://github.com/ettenauer/raspi-ansible/blob/main/DHT22.yaml on you raspberry pi
  3. connect via ssh to your raspberry pi
  4. use docker or docker compose to run image ghcr.io/ettenauer/raspi-blazor-temperature-app-edge:master

docker-compose