CreaRack-SL

¿Cómo se actualizan las librerías del Local Agent (requirements-agent.lock), cómo se recompila con build_agent.bat y cómo se publica un instalador nuevo (firma, Hetzner, auto-update)? ¿Qué trampas hay

Conceptodraftcreado Mon Oct 12#archived-from-query

Pregunta

¿Cómo se actualizan las librerías del Local Agent (requirements-agent.lock), cómo se recompila con build_agent.bat y cómo se publica un instalador nuevo (firma, Hetzner, auto-update)? ¿Qué trampas hay?

Respuesta

Libraries: edit requirements-agent.in, regenerate requirements-agent.lock with uv (it has 44 dependencies with hashes), then install with pip install —require-hashes. build_agent.bat creates a clean virtual environment on every build and aborts if Python is not 3.14.x. pip-audit scans the full lock.

Release build: first bump AGENT_VERSION in terminal/agent/version.py, because that is the only source of the version. Then run build_agent.bat. It builds the signed app-X.Y.Z.zip with the Ed25519 key, compiles the .exe with PyInstaller, runs the self-test gate (nothing is published if it fails), builds the installer with Inno Setup, and publishes to Hetzner. Set CREARACK_BUILD_NO_PUBLISH=1 for a test build without publishing.

Publishing: the script copies the files to the web container’s app_media volume in this order: zip and meta.json first, then the .exe, then the .version file. The container name changes on redeploys, so the script resolves it dynamically. If SSH fails, the build warns but still succeeds.

Auto-update: the SaaS announces the new version through the manifest and WebSocket. Agents download the .exe, check its SHA-256, and swap files only when no SSH sessions are active.

Pitfalls: forgetting to bump the version; wrong copy order; a missing .version file causes download-swap-crash loops; agents keep their old libraries until reinstalled; old agents lack new endpoints; the signing key must exist on the build machine; updates wait while SSH sessions are open.

Notas del archivador

Esta página fue archivada automáticamente por el Bibliotecario tras una consulta bib_ask. Estado draft hasta revisión humana. El Curator diario la revisará; usa /wiki-promote para pasarla a active o /wiki-delete para descartarla.