1.9 KiB
Local Installer Agent
FastAPI service that runs on each Linux client and listens on 127.0.0.1:5010.
It accepts install, update, remove, task, log, installed-app, and service-control requests from robot.installer. It stores state in local SQLite and installs trusted .deb components downloaded from robot.package.
Development
cd agent
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --host 127.0.0.1 --port 5010
Install script URL
Client machines should keep using the stable installer command:
curl -fsSL https://robot.package/install-agent.sh | sudo bash
The web server resolves https://robot.package/packages/agent/latest.deb?arch=<dpkg-arch>
to the newest uploaded local-installer-agent_<version>_<arch>.deb, so updating the Agent does not require editing the install command.
Agent packages are uploaded from the web server Admin page at /agent. The default storage folder is
web-server/uploads/packages/agent, and it can be changed with AGENT_PACKAGE_DIR.
Important API
GET /health
GET /system-info
GET /apps/installed
POST /apps/install
POST /apps/update
POST /apps/remove
GET /tasks/{taskId}
GET /tasks/{taskId}/logs
GET /tasks/{taskId}/components
POST /services/start
POST /services/stop
POST /services/restart
GET /services/{serviceName}/status
POST /apps/install supports both:
{
"appId": "robot-suite",
"version": "1.0.0"
}
and a direct single .deb payload:
{
"appId": "robot-web-app",
"appName": "Robot Web App",
"packageName": "robot-web-app",
"serviceName": "robot-web-app.service",
"version": "1.0.0",
"downloadUrl": "https://robot.package/packages/robot-web-app_1.0.0_amd64.deb",
"checksum": "sha256_hash_here"
}
For manifest mode, the Agent fetches:
{ROBOT_PACKAGE_BASE_URL}/api/apps/{appId}/versions/{version}/manifest