Simple frontend and backend to allow my Voice Over Actress wife (here) to turn on a USB LED in my office to tell me to be quiet so she can record 😂😂
I'm leveraging a blink(1) LED light to turn on/off when my wife needs to tell me to be quiet when she needs to record. The frontend is written in Svelte and is quite simple, and the backend is Python which utilizes Flask and the blink(1) Python Library to turn the light on and off via JSON POSTs with a simple REST API. The node selection works in conjunction with node-feature-discovery, which is a fantastic way to map physically connected devices to nodes.
The few big pushes for this project have been:
From the root directory, you'll want to build both containers:
podman build -t localhost/ibr-frontend:dev frontend
podman build -t localhost/ibr-backend:dev backend
Using podman, we can then deploy things easily enough:
podman play kube manifests/deployment-dev.yaml
If you want to shut it down or re-deploy, run:
podman play kube manifests/deployment-dev.yaml --down
# Set the Git Tag
export docker_tag="v0.1.1"
# Create the Frontend Manifest
buildah manifest create isbonrecording-frontend
# Build Frontend Images
buildah bud --tag "ghcr.io/danmanners/isbonrecording-frontend:${docker_tag}" \
--manifest isbonrecording-frontend \
--arch amd64 frontend
buildah bud --tag "ghcr.io/danmanners/isbonrecording-frontend:${docker_tag}" \
--manifest isbonrecording-frontend \
--arch arm64 frontend
# Push Frontend Images
buildah manifest push --all \
isbonrecording-frontend "docker://ghcr.io/danmanners/isbonrecording-frontend:${docker_tag}"
# Create the Backend Manifest
buildah manifest create isbonrecording-backend
# Build Backend Images
buildah bud --tag "ghcr.io/danmanners/isbonrecording-backend:${docker_tag}" \
--manifest isbonrecording-backend \
--arch amd64 backend
buildah bud --tag "ghcr.io/danmanners/isbonrecording-backend:${docker_tag}" \
--manifest isbonrecording-backend \
--arch arm64 backend
# Push Backend Images
buildah manifest push --all \
isbonrecording-backend "docker://ghcr.io/danmanners/isbonrecording-backend:${docker_tag}"
kubectl apply -k manifests
???
Profit!