39 lines
1.6 KiB
Markdown
39 lines
1.6 KiB
Markdown
# CM4 Provisioning Dashboard
|
||
|
||
Flask web UI to monitor the eMMC deployment process and show device connection steps.
|
||
|
||
- **Connection steps**: Numbered instructions for putting the reTerminal in boot mode and connecting it.
|
||
- **Live status**: Idle / Connecting (rpiboot) / Flashing / Backup / Done / Error, with optional progress.
|
||
- **Backup / Restore**: Toggle between **Flash** (deploy golden image) and **Backup** (save eMMC to a timestamped file when device is connected in boot mode). List and download saved backups.
|
||
- **Recent log**: Tail of the flash log (from the host, via the shared bind mount).
|
||
|
||
The dashboard reads `/var/lib/cm4-provisioning/status.json` and `flash.log`, which the flash script (running on the Proxmox host) updates. When the dashboard runs inside the LXC, that directory is bind-mounted from the host, so it sees the same files.
|
||
|
||
## Run locally (development)
|
||
|
||
```bash
|
||
cd dashboard
|
||
pip install flask # or use venv
|
||
python3 app.py
|
||
# Open http://localhost:5000
|
||
```
|
||
|
||
## Run in LXC (Proxmox)
|
||
|
||
1. Copy the dashboard into the container (e.g. to `/opt/cm4-provisioning/dashboard`).
|
||
2. Install Flask if needed: `apt install -y python3-flask` or `pip install flask`.
|
||
3. Install the systemd unit and enable it:
|
||
|
||
```bash
|
||
cp /opt/cm4-provisioning/dashboard/cm4-dashboard.service /etc/systemd/system/
|
||
systemctl daemon-reload
|
||
systemctl enable --now cm4-dashboard
|
||
```
|
||
|
||
4. Open `http://<LXC-IP>:5000` (or port-forward from the Proxmox host).
|
||
|
||
## Environment (optional)
|
||
|
||
- `CM4_STATUS_FILE` – path to status JSON (default: `/var/lib/cm4-provisioning/status.json`).
|
||
- `CM4_LOG_FILE` – path to flash log (default: `/var/lib/cm4-provisioning/flash.log`).
|