Handbook
Examples — Remote update automation
Two halves:
Updated
| Mechanism | Notes |
|---|---|
scripts/update-fleet.sh |
Maintainer workstation semver bump → git push → optional --remote-git-self-update (Operate 301) |
POST /v1/admin/git-self-update |
API-triggered git pull against FLEET_GIT_ROOT (/opt caveat → HTTP API) |
Never paste bearer tokens into shell history on shared hosts—prefer ENV files sourced ephemerally.
Purpose
Contrast maintainer update-fleet.sh flows with in-process POST /v1/admin/git-self-update.
Prerequisites
FLEET_GIT_ROOT, git credentials on the Fleet host, and admin bearer token for the API path.
Copy-paste steps
Follow Upgrade / release / remote update and HTTP reference for postAdminGitSelfUpdate.
Expected output
200/400 JSON per policy; 400 with system_root_install_command is expected on /opt installs—run the printed sudo step.
Error handling
Capture JSON error / detail; see error-handling.md.
Security notes
Protect FLEET_BEARER_TOKEN and host git credentials; audit who can reach /v1/admin/*.
Related
Validation status
- OpenAPI operation
postAdminGitSelfUpdate(../schemas/openapi.json); optional JSON body is an open object. - Docs copy checked by
check-docs-examples.pywhere snippets embed Fleet URLs.