Infrastructure scripts for Retina Node fleet management.
Automatically accepts pending Mender devices. Runs on your central server (not on devices).
# 1. Clone to server
git clone https://github.com/offworldlabs/node-infra.git ~/retina/node-infra
cd ~/retina/node-infra/mender-auto-accept
# 2. Install Python dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# 3. Configure
cp .env.example .env
nano .env # Add your MENDER_PAT
# 4. Install systemd timer (runs every 30s)
sudo cp systemd/*.service systemd/*.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now mender-auto-accept.timer
# 5. Verify
systemctl status mender-auto-accept.timer
journalctl -u mender-auto-accept -fcd ~/retina/node-infra/mender-auto-accept
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export MENDER_PAT=your-token
export NODE_ID_PREFIX=ret
python auto_accept.pyEdit .env:
| Variable | Required | Description |
|---|---|---|
MENDER_PAT |
Yes | Personal Access Token from Mender UI |
MENDER_SERVER |
No | Default: https://hosted.mender.io |
NODE_ID_PREFIX |
No | Only accept nodes with this prefix (e.g., ret) |
- Timer triggers every 30 seconds
- Script fetches pending devices from Mender API
- Filters by
node_idprefix (if configured) - Accepts matching devices