Recommandé par @jejedurden
update-fleet
Push code, skills, or config updates to running agent servers via update-agent.yml / deploy-skills.yml, with all pre-flight and restart gotchas
v1, validée le 30 août 2026 · 1 fichier
- name
- update-fleet
- description
- Push code, skills, or config updates to running agent servers via update-agent.yml / deploy-skills.yml, with all pre-flight and restart gotchas
- disable-model-invocation
- true
Update the Agent Fleet
Push updates to existing agents. Playbooks live in infra/ansible/playbooks/, inventory in infra/ansible/inventory/hosts.ini (gitignored — IPs never versioned).
Pre-flight (skipping these ships stale code silently)
- Rebuild livia-cli dist —
infra/livia-cli/dist/is gitignored but it is what Ansible rsyncs (excludessrc/) and Docker bind-mounts:pnpm --dir infra/livia-cli build - Rebuild shared if registry/instructions changed:
pnpm --filter @livia/shared build, andpnpm gen:agents-varsif the connector catalogue moved. - Check client-vars.yml completeness (read-only SSH):
/etc/livia/client-vars.ymlmust haveclient_name,openclaw_gateway_token,reporter_secret. Missing → runplaybooks/migrate-client-vars.ymlfirst (idempotent).
Commands
# Full agent update (livia-cli + livia-mail binaries, templates, image rebuild, gateway restart)
ansible-playbook -i infra/ansible/inventory/hosts.ini \
infra/ansible/playbooks/update-agent.yml \
--vault-password-file infra/ansible/.vault_pass \
--limit <server-name>
# Skills only
ansible-playbook -i infra/ansible/inventory/hosts.ini \
infra/ansible/playbooks/deploy-skills.yml \
--vault-password-file infra/ansible/.vault_pass \
--limit <server-name>
Hard rules
- Never
delete: truein deploy-skills — clients create custom skills on their agents. - Never re-render
openclaw.json— onlysetup.ymlwrites it (channels, credentials, allowlist, crons mutated at runtime).update-agent.ymlalready respects this. connectors/connector_env_varsextra-vars = full desired state. Passing an empty list wipes all connectors. Omit them entirely for a plain update.- Reconfiguring connectors on a prod agent needs explicit user authorization (classified as production deploy).
Gateway restart
Always docker compose stop → docker compose up -d --force-recreate, never restart or bare up -d (port-rebind race + rm-of-running-container, Sentry LIVIA-PROVISIONER-1/2). Health checks: retries: 15, delay: 5 minimum — prod cold start is 32–47s.
Orphan recovery: a botched recreate leaves <hex>_openclaw-openclaw-gateway-1 containers that compose no longer tracks (docker compose ps empty while the container serves). Only fix: docker stop <hex>_… + docker rm <hex>_… by exact name, then docker compose up -d openclaw-gateway, then poll /health until {"ok":true,"status":"live"}.
Post-deploy verification (SSH per agent)
ssh -i ~/.ssh/livia_deployer root@<IP>
- Skills landed: grep the new content in
~/.openclaw/skills/<skill>/SKILL.md(NOTworkspace/skills/) - CLI updated: grep the new subcommand in
~/livia-cli/dist/index.js - AGENTS.md re-rendered with the expected block
- Container is the canonical
openclaw-openclaw-gateway-1(no hex prefix); port varies per agent (docker ps --format '{{.Ports}}') - Warmup chat request: 401 is acceptable post-restart (health check allows it); the first real message pays the prep tax
Memory sqlite (~/.openclaw/memory/main.sqlite) and sessions persist through updates via the ~/.openclaw bind-mount — nothing to back up.
- Décompressez le ZIP dans .claude/skills/ d’un projet, ou dans ~/.claude/skills/. Claude Code le charge au prochain lancement.
- Sur claude.ai, ouvrez Customize, puis Skills, et importez le ZIP.