Skip to content

Commit 5d7be4a

Browse files
feat(updates): bootstrap host updater installs
1 parent dc29d6e commit 5d7be4a

4 files changed

Lines changed: 339 additions & 19 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ bash <(curl -fsSL https://fleet.proto.xyz/install.sh)
5050
bash <(curl -fsSL https://fleet.proto.xyz/install.sh) v0.1.0
5151
```
5252

53+
On Linux/systemd hosts with rootful Docker, this install also bootstraps the
54+
host updater. Future eligible releases can then be confirmed and installed
55+
from ProtoFleet's update prompt; unsupported hosts keep the copy-paste command
56+
fallback. See [deployment-files/README.md](deployment-files/README.md#one-click-upgrades)
57+
for supported hosts, validation behavior, logs, and recovery.
58+
5359
#### Uninstall
5460

5561
```bash

deployment-files/README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,62 @@ bash <(curl -fsSL "https://github.com/block/proto-fleet/releases/download/$VERSI
4949
The script will:
5050

5151
- Check system compatibility (page size)
52-
- Download and extract the specified version
53-
- Preserve existing configuration files if present
52+
- Download the specified version and verify its published SHA-256 checksum
53+
- Extract the release and preserve existing configuration files
54+
- On Linux/systemd with rootful Docker, install the host updater used for
55+
in-product one-click upgrades
5456
- Run the deployment script automatically
5557

58+
## One-click upgrades
59+
60+
After one manual install of a release that includes the host updater,
61+
permission-holding operators can upgrade an eligible stable or release
62+
candidate from the ProtoFleet update prompt. The confirmation explains the
63+
restart window and adds a no-downgrade warning for release candidates.
64+
65+
The updater runs as `proto-fleet-updater.service`, outside the Docker Compose
66+
stack it restarts. Fleet API talks to it over
67+
`/run/proto-fleet-updater/updater.sock`; the application container is never
68+
given the host Docker socket. Before stopping Fleet, the updater:
69+
70+
1. downloads the target bundle and its checksum over HTTPS;
71+
2. verifies the SHA-256 digest and safely extracts the archive;
72+
3. preserves `.env`, `ssl/`, and `server/influx_config/.env`;
73+
4. builds and validates the staged deployment with Fleet still running.
74+
75+
Only then does it swap the staged deployment into place and restart the stack.
76+
The previous deployment remains at `<install-root>/deployment.previous` for
77+
operator inspection. Automatic rollback is deliberately disabled because
78+
database migrations are forward-only.
79+
80+
One-click upgrades are enabled on Linux hosts with systemd and rootful Docker,
81+
including WSL distributions configured with systemd. macOS, rootless Docker,
82+
and Linux hosts without systemd continue to show the exact manual upgrade
83+
command.
84+
85+
### Failure recovery
86+
87+
The client shows the terminal error, host log path, and a recovery command
88+
when Fleet is reachable. The same durable details remain on the host:
89+
90+
```text
91+
/var/lib/proto-fleet-updater/state.json
92+
/var/lib/proto-fleet-updater/logs/<operation-id>.log
93+
```
94+
95+
Inspect the service and latest operation with:
96+
97+
```bash
98+
sudo systemctl status proto-fleet-updater.service
99+
sudo journalctl -u proto-fleet-updater.service
100+
sudo cat /var/lib/proto-fleet-updater/state.json
101+
```
102+
103+
If activation failed, run the `recovery_command` from `state.json` as root.
104+
Do not replace the active deployment with `deployment.previous` after
105+
migrations may have started; an older binary may be incompatible with the
106+
newer schema.
107+
56108
## Optional Virtual Miners
57109

58110
Deployment bundles include the virtual miner plugin for stress testing, but it

0 commit comments

Comments
 (0)