Network provisioning client
When a reTerminal (or any Pi) has network boot enabled and boots over the network, it can register with the provisioning dashboard and then perform Deploy (pull golden image and write to eMMC) or Backup (read eMMC and upload to the server) when you choose the action in the dashboard.
Flow
- Device boots (e.g. from NFS or a minimal netboot root).
- Run provisioning-client.sh with
PROVISIONING_SERVERset to the dashboard URL (e.g.http://<LXC-IP>:5000). - The script registers (MAC + IP) and polls
GET /api/device-action-poll?mac=.... - In the dashboard, the device appears under "Device detected (Network)". You click Backup or Deploy.
- The device gets the action from the next poll: Deploy → it downloads
GET /api/golden-imageand runsdd of=/dev/mmcblk0. Backup → it runsdd if=/dev/mmcblk0and POSTs toPOST /api/backup-upload?mac=....
Usage on the device
export PROVISIONING_SERVER=http://192.168.1.10:5000 # dashboard URL
./provisioning-client.sh
- EMMC_DEV: override eMMC block device (default
/dev/mmcblk0).
The device must have network access to the dashboard and (for deploy) the dashboard must have golden.img in its provisioning directory.
Integrating into a netboot environment
- Add this script to your netboot root (e.g. NFS-mounted filesystem or initramfs).
- Run it from a first-boot or default login script so that when the device boots from the network it registers and waits for an action. Optionally run it as a systemd service that starts after network is up.