Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/scripts-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Run update-nixpkgs-inputs contract tests (#603)
run: python3 -m unittest discover -s scripts/tests -p 'test_update_nixpkgs_inputs.py' -v
- name: Run fleet per-seat bootstrap contract tests (#12236)
run: |
test -f scripts/tests/test_fleet_bootstrap.py
python3 -m unittest discover -s scripts/tests -p 'test_fleet_bootstrap.py' -v
- name: Run worker preflight contract tests (#4862)
run: python3 -m unittest discover -s scripts/tests -p 'test_worker_preflight.py' -v
- name: Run failure classifier contract tests (#2176)
Expand Down
17 changes: 17 additions & 0 deletions doc/agents/onboarding-an-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ fleet agent next # each time you want work
done. Exit `5` means no rung had work this run.
- `fleet agent doctor` repeats the reachability check at any time.

## One-command bootstrap per seat kind

When starting on a bare seat that has no `fleet` binary yet, pick the
bootstrap script for the seat kind (#12236):

| Seat kind | Script | Defaults |
| --------------- | ------------------------------------------- | ------------------------------ |
| Muse sandbox | `scripts/muse/bootstrap.sh` | `--kind muse`, restores home |
| Codespace | `scripts/fleet/bootstrap-codespace.sh` | `--kind generic --name codespace` |
| Laptop service | `scripts/fleet/bootstrap-laptop-service.sh` | `--kind laptop --name laptop` |
| Plain Linux box | `scripts/fleet/bootstrap-linux.sh` | `--kind generic` |

All four also accept `scripts/fleet/bootstrap.sh --seat <kind>`. Each
non-Muse script installs the sha256-verified `fleet` binary, runs
`fleet agent enroll` and `fleet agent doctor`, and enters the three-line
`fleet agent next` loop.

## An agent that can only make HTTPS requests

Enrol it from any seat that has the binary, then give the agent its name:
Expand Down
14 changes: 14 additions & 0 deletions scripts/fleet/bootstrap-codespace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# bootstrap-codespace.sh — bootstrap a 'codespace' fleet seat (developing-today/code, #12236).
# Delegates to scripts/fleet/bootstrap.sh --seat codespace; rejects --seat overrides (#3352).
set -euo pipefail
SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
for arg in "$@"; do
case "$arg" in
--seat|--seat=*)
echo "fleet-bootstrap: usage error: ${0##*/} pins --seat codespace; do not pass $arg" >&2
exit 2
;;
esac
done
exec bash "$SELF_DIR/bootstrap.sh" --seat codespace "$@"
14 changes: 14 additions & 0 deletions scripts/fleet/bootstrap-laptop-service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# bootstrap-laptop-service.sh — bootstrap a 'laptop-service' fleet seat (developing-today/code, #12236).
# Delegates to scripts/fleet/bootstrap.sh --seat laptop-service; rejects --seat overrides (#3352).
set -euo pipefail
SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
for arg in "$@"; do
case "$arg" in
--seat|--seat=*)
echo "fleet-bootstrap: usage error: ${0##*/} pins --seat laptop-service; do not pass $arg" >&2
exit 2
;;
esac
done
exec bash "$SELF_DIR/bootstrap.sh" --seat laptop-service "$@"
14 changes: 14 additions & 0 deletions scripts/fleet/bootstrap-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# bootstrap-linux.sh — bootstrap a 'linux' fleet seat (developing-today/code, #12236).
# Delegates to scripts/fleet/bootstrap.sh --seat linux; rejects --seat overrides (#3352).
set -euo pipefail
SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
for arg in "$@"; do
case "$arg" in
--seat|--seat=*)
echo "fleet-bootstrap: usage error: ${0##*/} pins --seat linux; do not pass $arg" >&2
exit 2
;;
esac
done
exec bash "$SELF_DIR/bootstrap.sh" --seat linux "$@"
Loading