init: SNEK on Kubernetes
- Dockerfile: Ubuntu 20.04 + all SNEK dependencies (libgtk2-perl, libffi6, etc.) - entrypoint.sh: flash firmware via foxctl, start main_sigfox - deploy/snek.yaml: K8s manifest (namespace, PVC, deployment, LoadBalancer) - README: full documentation covering hardware, software, decoding, callbacks
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "==> Sigfox Network Emulator container starting"
|
||||
echo "==> Detecting Sigfox dongle..."
|
||||
|
||||
if lsusb | grep -iE "2cc1"; then
|
||||
echo "==> Dongle detected"
|
||||
else
|
||||
echo "!!! WARNING: no Sigfox dongle detected on /dev/bus/usb"
|
||||
echo "!!! Make sure the container has: privileged: true AND /dev/bus/usb mounted"
|
||||
fi
|
||||
|
||||
echo "==> Flashing firmware (foxctl)..."
|
||||
cd /opt/snek
|
||||
./foxctl || echo "foxctl RC=$? (may be normal if firmware already loaded)"
|
||||
sleep 2
|
||||
|
||||
echo "==> Starting SNEK main_sigfox on port 8085..."
|
||||
exec ./main_sigfox
|
||||
Reference in New Issue
Block a user