@crvouga/homelab 0.23.14 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mise/locks/npm-vercel/{68.0.0 → 68.2.0}/aube-lock.yaml +73 -297
- package/.mise/locks/npm-vercel/{68.0.0 → 68.2.0}/package.json +1 -1
- package/.mise/locks/npm-wrangler/{4.169.0 → 4.170.0}/aube-lock.yaml +42 -42
- package/.mise/locks/npm-wrangler/{4.169.0 → 4.170.0}/package.json +1 -1
- package/README.md +54 -76
- package/ansible/ubuntu/agent-tool.py +106 -1
- package/ansible/ubuntu/heavy.py +142 -0
- package/ansible/ubuntu/idle-reboot.py +125 -0
- package/ansible/ubuntu/policy.json +51 -3
- package/ansible/ubuntu/t3-desktop.yml +7 -0
- package/ansible/ubuntu/t3-hang-snapshot.sh +75 -0
- package/ansible/ubuntu/t3-headless.yml +7 -0
- package/ansible/ubuntu/t3-health.sh +71 -3
- package/ansible/ubuntu/t3-policy.yml +14 -5
- package/ansible/ubuntu/tasks/packages.yml +2 -0
- package/ansible/ubuntu/tasks/recovery.yml +5 -1
- package/ansible/ubuntu/tasks/resources.yml +25 -2
- package/ansible/ubuntu/tasks/unattended-upgrades.yml +24 -6
- package/ansible/ubuntu/tasks/updates.yml +59 -0
- package/bootstrap/doctor.ts +0 -4
- package/bootstrap/project-action.sh +4 -5
- package/bootstrap/shell-path.ts +17 -19
- package/cliproxy/README.md +5 -6
- package/cliproxy/config.template.yaml +1 -15
- package/cliproxy/docs/health-workflow.example.yml +6 -6
- package/cliproxy/docs/model-health.md +8 -8
- package/cliproxy/scripts/accounts.py +3 -4
- package/cliproxy/scripts/fleet_sync.py +2 -13
- package/cliproxy/scripts/ops +3 -21
- package/docs/authentication.md +21 -26
- package/docs/convergence.md +28 -32
- package/docs/declared.md +30 -31
- package/docs/github.md +0 -9
- package/docs/machine-setup.md +16 -17
- package/docs/manager-recovery.md +0 -2
- package/docs/operations.md +12 -11
- package/docs/releasing.md +18 -21
- package/docs/runbooks.md +22 -78
- package/docs/support-matrix.md +1 -1
- package/docs/ubuntu-sync.md +71 -65
- package/docs/worker-contract.md +112 -15
- package/examples/fleet.json +0 -1
- package/llms.txt +0 -2
- package/mise.lock +206 -780
- package/mise.toml +12 -27
- package/package.json +5 -6
- package/schema/check-ids.json +41 -482
- package/schema/fleet.schema.json +6 -57
- package/schema/roster.schema.json +0 -2
- package/src/agent-session-limit.ts +2 -7
- package/src/auth-checks.ts +1 -3
- package/src/check-owners.ts +0 -13
- package/src/check-registry.ts +13 -72
- package/src/cli/agent-guide.ts +3 -16
- package/src/cli/command-index.ts +0 -12
- package/src/cli/fleet-sync-manager.ts +4 -146
- package/src/cli/fleet-sync-output.ts +1 -4
- package/src/cli/fleet-sync-plan.ts +1 -24
- package/src/cli/fleet-sync-remote.ts +2 -1
- package/src/cli/fleet-sync-vault.ts +1 -2
- package/src/cli/fleet-sync.ts +8 -44
- package/src/cli/fleet.ts +1 -2
- package/src/cli/program.ts +3 -14
- package/src/cli/register-fleet.ts +1 -55
- package/src/cli/registry.ts +1 -43
- package/src/config.ts +0 -2
- package/src/definition.ts +8 -83
- package/src/fleet-config.ts +1 -1
- package/src/ide/definition.ts +2 -29
- package/src/ide/super.ts +4 -35
- package/src/ide/t3.ts +9 -38
- package/src/manager-sync.ts +1 -1
- package/src/node-converge-linux.ts +4 -47
- package/src/node-converge-shared.ts +1 -22
- package/src/{agents/toolchain.ts → pinned-path.ts} +0 -17
- package/src/platform/agent-oom-check.ts +104 -0
- package/src/platform/t3-policy.ts +23 -36
- package/src/platform/t3-service.ts +117 -0
- package/src/platform/wip-guard-check.ts +65 -0
- package/src/remote-entry.ts +2 -41
- package/src/repair-catalog.ts +0 -30
- package/src/schedule-check.ts +17 -4
- package/src/service-auth.ts +0 -50
- package/src/state/litestream.ts +1 -1
- package/src/t3/retire-providers.ts +79 -0
- package/src/t3/version.ts +1 -1
- package/src/transport.ts +2 -6
- package/src/types.ts +0 -2
- package/src/version-parity.ts +0 -8
- package/src/worker-access-checks.ts +0 -75
- package/src/worker-host-checks.ts +78 -1
- package/src/worker-policy.ts +0 -2
- package/src/worker-readiness.ts +2 -0
- package/src/worker-sizing.ts +25 -0
- package/.mise/locks/azure-cli/2.93.0~a837e014/pyproject.toml +0 -5
- package/.mise/locks/azure-cli/2.93.0~a837e014/uv.lock +0 -2841
- package/.mise/locks/gemini/0.71.1~84aac8e6/aube-lock.yaml +0 -124
- package/.mise/locks/gemini/0.71.1~84aac8e6/package.json +0 -12
- package/agents/antigravity-proxy.ts +0 -3
- package/agents/audit.md +0 -88
- package/agents/bin/agy +0 -10
- package/agents/bin/antigravity +0 -10
- package/agents/bin/claude +0 -10
- package/agents/bin/codex +0 -10
- package/agents/bin/grok +0 -10
- package/agents/bin/opencode +0 -10
- package/agents/claude-proxy +0 -5
- package/agents/claude-proxy.ts +0 -3
- package/agents/codex-proxy.ts +0 -3
- package/agents/grok-proxy.ts +0 -3
- package/agents/managed-proxy.ts +0 -109
- package/agents/opencode-proxy.ts +0 -3
- package/agents/registry.json +0 -209
- package/agents/registry.schema.json +0 -149
- package/agents/setup.md +0 -158
- package/agents/t3.json +0 -40
- package/ansible/agents/agents.yml +0 -135
- package/ansible/agents/commands.yml +0 -32
- package/ansible/agents/receipts.yml +0 -19
- package/ansible/agents/templates/antigravity.settings.json.j2 +0 -3
- package/ansible/agents/templates/claude.settings.json.j2 +0 -3
- package/ansible/agents/templates/codex.config.toml.j2 +0 -11
- package/ansible/agents/templates/gemini.settings.json.j2 +0 -14
- package/ansible/agents/templates/grok.config.toml.j2 +0 -25
- package/ansible/agents/templates/opencode.json.j2 +0 -24
- package/ansible/agents/templates/receipt.json.j2 +0 -10
- package/ansible/t3/provider-keys.yml +0 -24
- package/docs/accounts.md +0 -256
- package/src/accounts/checks.ts +0 -226
- package/src/accounts/context.ts +0 -77
- package/src/accounts/propagate.ts +0 -62
- package/src/accounts/roster.ts +0 -112
- package/src/accounts/selection.ts +0 -67
- package/src/accounts/sessions.ts +0 -354
- package/src/agents/account-relay.ts +0 -279
- package/src/agents/accounts.ts +0 -94
- package/src/agents/admission.ts +0 -65
- package/src/agents/audit.ts +0 -77
- package/src/agents/cli.ts +0 -13
- package/src/agents/command.ts +0 -257
- package/src/agents/commands.ts +0 -127
- package/src/agents/converge.ts +0 -339
- package/src/agents/doctor.ts +0 -107
- package/src/agents/errors.ts +0 -2
- package/src/agents/files.ts +0 -43
- package/src/agents/fleet-verify.ts +0 -195
- package/src/agents/launch.ts +0 -361
- package/src/agents/native-verify.ts +0 -738
- package/src/agents/provider-errors.ts +0 -57
- package/src/agents/registry.ts +0 -61
- package/src/agents/render.ts +0 -121
- package/src/agents/round-trip.ts +0 -192
- package/src/agents/secrets.ts +0 -48
- package/src/agents/verify-cache.ts +0 -164
- package/src/agents/verify.ts +0 -129
- package/src/cli/fleet-accounts.ts +0 -294
- package/src/cli/fleet-sync-accounts.ts +0 -62
- package/src/cli/node-deployment.ts +0 -34
- package/src/cli/node-sync.ts +0 -121
- package/src/cli/node-t3.ts +0 -35
- package/src/cli/t3/command.ts +0 -91
- package/src/cli/t3/register.ts +0 -56
- package/src/configure.ts +0 -271
- package/src/github/copilot.ts +0 -54
- package/src/t3/accounts.ts +0 -90
- package/src/t3/antigravity.ts +0 -93
- package/src/t3/desired.ts +0 -174
- package/src/t3/diagnostics.ts +0 -42
- package/src/t3/models.ts +0 -354
- package/src/t3/names-check.ts +0 -53
- package/src/t3/names.ts +0 -155
- package/src/t3/plan.ts +0 -106
- package/src/t3/provider-keys.ts +0 -49
- package/src/t3/providers.ts +0 -102
- package/src/t3/reconcile.ts +0 -133
|
@@ -168,9 +168,14 @@
|
|
|
168
168
|
# Managed by personal converge. Applies to every t3code-*.scope T3 starts for an agent.
|
|
169
169
|
# OOMPolicy=continue permits surviving processes to continue; it cannot protect the provider itself.
|
|
170
170
|
# IOAccounting=yes: the pressure guard needs each agent's io.stat to tell a writer from a reader it blocks.
|
|
171
|
+
# MemoryHigh sits below MemoryMax: a heavy build is slowed by reclaim
|
|
172
|
+
# before the kernel kills one of its processes. CPUQuota keeps one
|
|
173
|
+
# session from taking every core (agentCpu, sized from the core count).
|
|
171
174
|
[Scope]
|
|
175
|
+
MemoryHigh={{ resourceSafety.agentMemoryHigh }}
|
|
172
176
|
MemoryMax={{ resourceSafety.agentMemoryMax }}
|
|
173
177
|
MemorySwapMax={{ resourceSafety.agentSwapMax }}
|
|
178
|
+
CPUQuota={{ [worker_size.cpus | int * resourceSafety.agentCpu.scopePercentOfCores, resourceSafety.agentCpu.minScopeCpus * 100] | max }}%
|
|
174
179
|
OOMPolicy=continue
|
|
175
180
|
IOAccounting=yes
|
|
176
181
|
register: agent_policy
|
|
@@ -208,14 +213,25 @@
|
|
|
208
213
|
owner: root
|
|
209
214
|
group: root
|
|
210
215
|
mode: '0644'
|
|
211
|
-
loop: [agent-tool.py, agent-tool.bash]
|
|
216
|
+
loop: [agent-tool.py, agent-tool.bash, heavy.py]
|
|
217
|
+
- name: Install the heavy tool queue where agents find it on PATH
|
|
218
|
+
ansible.builtin.copy:
|
|
219
|
+
dest: /usr/local/bin/homelab-heavy
|
|
220
|
+
owner: root
|
|
221
|
+
group: root
|
|
222
|
+
mode: '0755'
|
|
223
|
+
content: |
|
|
224
|
+
#!/bin/sh
|
|
225
|
+
# Managed by personal converge. Queues one heavy tool behind a worker-wide
|
|
226
|
+
# number of slots, instead of letting every agent start one at once.
|
|
227
|
+
exec /usr/bin/python3 -I -B /usr/local/lib/personal-fleet-agent-tool/heavy.py "$@"
|
|
212
228
|
- name: Declare shell tool admission budgets
|
|
213
229
|
ansible.builtin.copy:
|
|
214
230
|
dest: /usr/local/lib/personal-fleet-agent-tool/agent-tool-policy.json
|
|
215
231
|
owner: root
|
|
216
232
|
group: root
|
|
217
233
|
mode: '0644'
|
|
218
|
-
content:
|
|
234
|
+
content: "{{ resourceSafety.agentTool | combine({'agentCpu': resourceSafety.agentCpu, 'heavy': resourceSafety.heavyTools}) | to_nice_json }}"
|
|
219
235
|
- name: Charge automatically named systemd-run jobs to the shared agent budget
|
|
220
236
|
ansible.builtin.copy:
|
|
221
237
|
dest: '/etc/systemd/user/run-.{{ item | lower }}.d/60-personal-fleet.conf'
|
|
@@ -226,8 +242,10 @@
|
|
|
226
242
|
# Managed by personal converge. Detached builds share the agent budget.
|
|
227
243
|
[{{ item }}]
|
|
228
244
|
Slice=app-t3code-agents.slice
|
|
245
|
+
MemoryHigh={{ resourceSafety.agentMemoryHigh }}
|
|
229
246
|
MemoryMax={{ resourceSafety.agentMemoryMax }}
|
|
230
247
|
MemorySwapMax={{ resourceSafety.agentSwapMax }}
|
|
248
|
+
CPUQuota={{ [worker_size.cpus | int * resourceSafety.agentCpu.scopePercentOfCores, resourceSafety.agentCpu.minScopeCpus * 100] | max }}%
|
|
231
249
|
IOAccounting=yes
|
|
232
250
|
loop: [Service, Scope]
|
|
233
251
|
register: transient_limits
|
|
@@ -244,6 +262,9 @@
|
|
|
244
262
|
MemoryMax={{ worker_size.memoryMiB | int * item.max | int // 100 }}M
|
|
245
263
|
MemorySwapMax={{ resourceSafety.agentSlice.swapMiB }}M
|
|
246
264
|
TasksMax={{ resourceSafety.agentSlice.tasks }}
|
|
265
|
+
# All agents together leave the reserved cores to T3 and the system
|
|
266
|
+
# (the thread slices are bounded by it; an empty quota is no quota).
|
|
267
|
+
CPUQuota={{ item.cpuQuota }}
|
|
247
268
|
CPUWeight={{ resourceSafety.agentSlice.weight }}
|
|
248
269
|
IOWeight={{ resourceSafety.agentSlice.weight }}
|
|
249
270
|
# Reclaim at MemoryHigh must not terminate whole sessions. Host-level
|
|
@@ -253,9 +274,11 @@
|
|
|
253
274
|
- unit: app-t3code-agents
|
|
254
275
|
high: '{{ resourceSafety.agentSlice.highPercent }}'
|
|
255
276
|
max: '{{ resourceSafety.agentSlice.maxPercent }}'
|
|
277
|
+
cpuQuota: '{{ [(worker_size.cpus | int - resourceSafety.agentCpu.reservedCpus) * 100, 100] | max }}%'
|
|
256
278
|
- unit: app-t3code-agents-
|
|
257
279
|
high: '{{ resourceSafety.agentSlice.threadHighPercent }}'
|
|
258
280
|
max: '{{ resourceSafety.agentSlice.threadMaxPercent }}'
|
|
281
|
+
cpuQuota: ''
|
|
259
282
|
register: agent_slices
|
|
260
283
|
- name: Find property overrides for agent slices
|
|
261
284
|
become: true
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
# Ubuntu
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
2
|
+
# A worker is cattle: Ubuntu keeps it up to date by itself, and a pin is a
|
|
3
|
+
# minimum, never a hold. What runs unattended is declared here so it is known:
|
|
4
|
+
# every update of Ubuntu's own archive (security and regular updates, and the
|
|
5
|
+
# ESM security archives), never a reboot from here (tasks/updates.yml reboots
|
|
6
|
+
# an idle worker), never a removal. Third-party archives (Docker, Tailscale)
|
|
7
|
+
# are not listed: those stay at the pins in policy.json. The fleet's own file
|
|
8
|
+
# sorts after the package's 50unattended-upgrades and replaces its origins.
|
|
7
9
|
- name: Declare which updates Ubuntu installs unattended
|
|
8
10
|
ansible.builtin.copy:
|
|
9
11
|
dest: /etc/apt/apt.conf.d/52personal-fleet-unattended-upgrades
|
|
@@ -17,8 +19,24 @@
|
|
|
17
19
|
#clear Unattended-Upgrade::Allowed-Origins;
|
|
18
20
|
#clear Unattended-Upgrade::Origins-Pattern;
|
|
19
21
|
Unattended-Upgrade::Allowed-Origins {
|
|
20
|
-
|
|
22
|
+
{% for origin in updates.origins %}
|
|
23
|
+
"${distro_id}:${distro_codename}-{{ origin }}";
|
|
24
|
+
{% endfor %}
|
|
25
|
+
{% if updates.esm %}
|
|
26
|
+
"${distro_id}ESMApps:${distro_codename}-apps-security";
|
|
27
|
+
"${distro_id}ESM:${distro_codename}-infra-security";
|
|
28
|
+
{% endif %}
|
|
21
29
|
};
|
|
30
|
+
Unattended-Upgrade::MinimalSteps "true";
|
|
22
31
|
Unattended-Upgrade::Automatic-Reboot "false";
|
|
23
32
|
Unattended-Upgrade::Remove-Unused-Dependencies "false";
|
|
24
33
|
Unattended-Upgrade::Remove-New-Unused-Dependencies "false";
|
|
34
|
+
- name: Run the timers that refresh and install updates
|
|
35
|
+
ansible.builtin.systemd_service:
|
|
36
|
+
name: '{{ item }}'
|
|
37
|
+
masked: false
|
|
38
|
+
enabled: true
|
|
39
|
+
state: started
|
|
40
|
+
loop:
|
|
41
|
+
- apt-daily.timer
|
|
42
|
+
- apt-daily-upgrade.timer
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Kernel and library updates apply only after a reboot. An idle worker reboots
|
|
3
|
+
# itself (ansible/ubuntu/idle-reboot.py), so nobody has to: it waits while an
|
|
4
|
+
# agent turn runs or ran recently, and an upgrade is never cut off. The script
|
|
5
|
+
# and the idle probe it asks run from a copy outside every revision, because a
|
|
6
|
+
# synced revision is pruned and the unit must not name a file that is gone.
|
|
7
|
+
- name: Create the directory of the installed worker scripts
|
|
8
|
+
ansible.builtin.file:
|
|
9
|
+
path: /usr/local/lib/personal-fleet
|
|
10
|
+
state: directory
|
|
11
|
+
owner: root
|
|
12
|
+
group: root
|
|
13
|
+
mode: '0755'
|
|
14
|
+
- name: Install the idle reboot and the probe it asks outside the revision
|
|
15
|
+
ansible.builtin.copy:
|
|
16
|
+
src: '{{ playbook_dir }}/{{ item }}'
|
|
17
|
+
dest: '/usr/local/lib/personal-fleet/{{ item }}'
|
|
18
|
+
owner: root
|
|
19
|
+
group: root
|
|
20
|
+
mode: '0755'
|
|
21
|
+
loop:
|
|
22
|
+
- idle-reboot.py
|
|
23
|
+
- t3-idle.py
|
|
24
|
+
- name: Declare the idle reboot service and its timer
|
|
25
|
+
ansible.builtin.copy:
|
|
26
|
+
dest: '{{ item.dest }}'
|
|
27
|
+
owner: root
|
|
28
|
+
group: root
|
|
29
|
+
mode: '0644'
|
|
30
|
+
content: '{{ item.content }}'
|
|
31
|
+
loop:
|
|
32
|
+
- dest: /etc/systemd/system/personal-fleet-idle-reboot.service
|
|
33
|
+
content: |
|
|
34
|
+
# Managed by personal converge: ansible/ubuntu/idle-reboot.py
|
|
35
|
+
[Unit]
|
|
36
|
+
Description=Reboot the worker to finish updates while it runs no agent turn
|
|
37
|
+
[Service]
|
|
38
|
+
Type=oneshot
|
|
39
|
+
ExecStart=/usr/bin/python3 -I -B /usr/local/lib/personal-fleet/idle-reboot.py --t3-idle /usr/local/lib/personal-fleet/t3-idle.py --state {{ development_home }}/.t3/userdata/statev2.sqlite --idle-minutes {{ updates.idleReboot.idleMinutes }} --min-uptime-minutes {{ updates.idleReboot.minUptimeMinutes }}
|
|
40
|
+
TimeoutStartSec=5min
|
|
41
|
+
- dest: /etc/systemd/system/personal-fleet-idle-reboot.timer
|
|
42
|
+
content: |
|
|
43
|
+
# Managed by personal converge: ansible/ubuntu/idle-reboot.py
|
|
44
|
+
[Unit]
|
|
45
|
+
Description=Look every {{ updates.idleReboot.intervalMinutes }} minutes for an idle worker that needs a reboot
|
|
46
|
+
[Timer]
|
|
47
|
+
OnBootSec={{ updates.idleReboot.minUptimeMinutes }}min
|
|
48
|
+
OnUnitActiveSec={{ updates.idleReboot.intervalMinutes }}min
|
|
49
|
+
[Install]
|
|
50
|
+
WantedBy=timers.target
|
|
51
|
+
loop_control:
|
|
52
|
+
label: '{{ item.dest }}'
|
|
53
|
+
register: idle_reboot_units
|
|
54
|
+
- name: Schedule the idle reboot
|
|
55
|
+
ansible.builtin.systemd_service:
|
|
56
|
+
name: personal-fleet-idle-reboot.timer
|
|
57
|
+
daemon_reload: '{{ idle_reboot_units.changed }}'
|
|
58
|
+
enabled: true
|
|
59
|
+
state: started
|
package/bootstrap/doctor.ts
CHANGED
|
@@ -33,15 +33,11 @@ const COMMANDS: Record<string, string> = {
|
|
|
33
33
|
'npm:@yarnpkg/cli-dist': 'yarn',
|
|
34
34
|
'npm:vercel': 'vercel',
|
|
35
35
|
'npm:wrangler': 'wrangler',
|
|
36
|
-
'aqua:anomalyco/opencode': 'opencode',
|
|
37
36
|
'docker-cli': 'docker',
|
|
38
37
|
opentofu: 'tofu',
|
|
39
38
|
ripgrep: 'rg',
|
|
40
39
|
rust: 'rustc',
|
|
41
40
|
'npm:@devcontainers/cli': 'devcontainer',
|
|
42
|
-
'http:grok': 'grok',
|
|
43
|
-
'http:antigravity': 'antigravity',
|
|
44
|
-
'http:cursor-agent': 'cursor-agent',
|
|
45
41
|
};
|
|
46
42
|
const VERSION_ARGS: Record<string, string[]> = {
|
|
47
43
|
tmux: ['-V'],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# A T3 project script in a homelab checkout calls this. It warms the pinned
|
|
3
|
-
# toolchain, then runs one homelab command. converge
|
|
3
|
+
# toolchain, then runs one homelab command. converge takes
|
|
4
4
|
# this checkout's HEAD unless the caller already named a revision, asked to
|
|
5
5
|
# roll back, or limited the run to accounts or the schedule.
|
|
6
6
|
set -euo pipefail
|
|
@@ -9,7 +9,7 @@ cd "$root"
|
|
|
9
9
|
|
|
10
10
|
if [[ $# -lt 1 ]]; then
|
|
11
11
|
echo 'Usage: bootstrap/project-action.sh ACTION [args...]' >&2
|
|
12
|
-
echo 'ACTION is a homelab command: converge,
|
|
12
|
+
echo 'ACTION is a homelab command: converge, check, tailnet, state, repair, workers, proxy, warm.' >&2
|
|
13
13
|
echo 'sync is converge. status is check --workers. infra-cliproxy is proxy.' >&2
|
|
14
14
|
exit 2
|
|
15
15
|
fi
|
|
@@ -20,7 +20,6 @@ shift
|
|
|
20
20
|
command=()
|
|
21
21
|
case "$action" in
|
|
22
22
|
converge|sync) command=(converge) ;;
|
|
23
|
-
converge-local) command=(converge-local) ;;
|
|
24
23
|
check) command=(check) ;;
|
|
25
24
|
status)
|
|
26
25
|
command=(check)
|
|
@@ -39,7 +38,7 @@ case "$action" in
|
|
|
39
38
|
proxy|infra-cliproxy) command=(proxy) ;;
|
|
40
39
|
warm) ;;
|
|
41
40
|
*)
|
|
42
|
-
echo "Unknown project action '$action'. The homelab commands are converge,
|
|
41
|
+
echo "Unknown project action '$action'. The homelab commands are converge, check, tailnet, state, repair, workers, proxy and warm." >&2
|
|
43
42
|
exit 2
|
|
44
43
|
;;
|
|
45
44
|
esac
|
|
@@ -50,7 +49,7 @@ if [[ "$action" == warm ]]; then
|
|
|
50
49
|
exit 0
|
|
51
50
|
fi
|
|
52
51
|
|
|
53
|
-
if [[ "${command[0]}" == converge
|
|
52
|
+
if [[ "${command[0]}" == converge ]]; then
|
|
54
53
|
pin=true
|
|
55
54
|
for arg in "$@"; do
|
|
56
55
|
case "$arg" in
|
package/bootstrap/shell-path.ts
CHANGED
|
@@ -44,21 +44,22 @@ function persistWindowsPath(bin: string, shims: string): void {
|
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
/** Where a worker's agent commands are, when it has them: a link to
|
|
48
|
-
* `agents/bin` of the applied revision, made by the worker's own converge
|
|
49
|
-
* (src/agents/commands.ts). A machine without the link (the manager, a
|
|
50
|
-
* development machine) has no such directory and its shells skip it.
|
|
51
|
-
*/
|
|
52
|
-
export const agentCommands = (home = homedir()): string =>
|
|
53
|
-
join(home, '.local', 'share', 'personal', 'fleet', 'agent-commands');
|
|
54
|
-
|
|
55
47
|
export function configurePosixShellPath(
|
|
56
48
|
bin: string,
|
|
57
49
|
shims: string,
|
|
58
50
|
home = homedir(),
|
|
59
51
|
zdotdir = process.env['ZDOTDIR'] || home
|
|
60
52
|
): void {
|
|
61
|
-
|
|
53
|
+
// Earlier releases put a worker's agent launchers before the shims; what
|
|
54
|
+
// they wrote is removed wherever it stands.
|
|
55
|
+
const agents = join(
|
|
56
|
+
home,
|
|
57
|
+
'.local',
|
|
58
|
+
'share',
|
|
59
|
+
'personal',
|
|
60
|
+
'fleet',
|
|
61
|
+
'agent-commands'
|
|
62
|
+
);
|
|
62
63
|
const quote = (value: string) => `'${value.replaceAll("'", "'\\''")}'`;
|
|
63
64
|
const paths = quote(`${shims}:${bin}`);
|
|
64
65
|
const legacy = `# homelab toolchain\nexport PATH=${paths}:"$PATH"`;
|
|
@@ -78,28 +79,25 @@ export function configurePosixShellPath(
|
|
|
78
79
|
// apps that inherit its PATH (T3) run the locked tool versions.
|
|
79
80
|
// Guarded like the block above so nested shells do not grow PATH.
|
|
80
81
|
const unguarded = `${TAIL_MARKER}\nexport PATH=${quote(shims)}:"$PATH"\n`;
|
|
81
|
-
// On a worker the agent commands come before the shims: `claude` is then
|
|
82
|
-
// the fleet's launcher, through the CLI proxy, and the pinned CLI behind
|
|
83
|
-
// it. Like the shims they are set twice: at the top, which a shell that is
|
|
84
|
-
// not interactive reaches before a startup file returns early, and last.
|
|
85
82
|
const agentsFirst = (marker: string) =>
|
|
86
83
|
`${marker}\nif [ -d ${quote(agents)} ]; then\n case "$PATH" in\n ${quote(agents)}:*) ;;\n *) export PATH=${quote(agents)}:"$PATH" ;;\n esac\nfi\n`;
|
|
87
|
-
const
|
|
84
|
+
const earlierHead = `${block}\n${agentsFirst(AGENTS_MARKER)}`;
|
|
88
85
|
const shimsOnly = `${TAIL_MARKER}\ncase "$PATH" in\n ${quote(shims)}:*) ;;\n *) export PATH=${quote(shims)}:"$PATH" ;;\nesac\n`;
|
|
89
|
-
|
|
90
|
-
const
|
|
86
|
+
const earlierTail = `${TAIL_MARKER}\ncase "$PATH" in\n ${quote(shims)}:*|${quote(agents)}:${quote(shims)}:*) ;;\n *) export PATH=${quote(shims)}:"$PATH" ;;\nesac\n${agentsFirst(AGENTS_TAIL_MARKER)}`;
|
|
87
|
+
const head = block;
|
|
88
|
+
const tail = shimsOnly;
|
|
91
89
|
for (const path of targets) {
|
|
92
90
|
const current = existsSync(path) ? readFileSync(path, 'utf8') : '';
|
|
93
91
|
// What this and every earlier release wrote, wherever it stands.
|
|
94
92
|
const body = [
|
|
95
|
-
|
|
93
|
+
earlierHead,
|
|
94
|
+
earlierTail,
|
|
96
95
|
`${block}\n`,
|
|
97
96
|
legacy,
|
|
98
|
-
tail,
|
|
99
97
|
shimsOnly,
|
|
100
98
|
unguarded,
|
|
101
99
|
].reduce((text, earlier) => text.split(earlier).join(''), current);
|
|
102
|
-
const next = `${head}${body.replace(/\n*$/, '\n')}${tail}`;
|
|
100
|
+
const next = `${head}\n${body.replace(/\n*$/, '\n')}${tail}`;
|
|
103
101
|
if (next === current) continue;
|
|
104
102
|
mkdirSync(dirname(path), { recursive: true });
|
|
105
103
|
writeFileSync(path, next);
|
package/cliproxy/README.md
CHANGED
|
@@ -148,9 +148,9 @@ homelab proxy inference messages EXACT_CLAUDE_MODEL_ID
|
|
|
148
148
|
|
|
149
149
|
`homelab accounts --add|--relogin|--remove` wraps these and propagates the result to every node; a login writes into a staging directory and only a complete credential is moved in. Codex uses the upstream device-code flow. Remote callback flows may require the documented dashboard callback flow or temporary SSH loopback forwarding; callback ports are not exposed by default. This pinned version has no generic Gemini CLI login flag; use its supported dashboard/API-key integration. Provider rules still govern permissible account use.
|
|
150
150
|
|
|
151
|
-
**Account routing.** Credential files are the only list of accounts. `ops declared` (run by every converge) gives each Claude
|
|
151
|
+
**Account routing.** Credential files are the only list of accounts. `ops declared` (run by every converge) gives each Claude and Codex credential the model prefix `<type>-<email>` through the proxy's management API (`scripts/accounts.py`; a credential file is never edited directly). A request for `<type>-<email>/<model>` is served only by that account, and `/v1/models` lists those ids, which is how every fleet node discovers the accounts to offer in T3. Nothing in Git names an account.
|
|
152
152
|
|
|
153
|
-
Unprefixed routing is **fill-first** (`routing.strategy: fill-first`): one account serves until its quota is exhausted and it cools down, then the next account, with session affinity keeping a session on its account while available and bounded retries across eligible accounts for the requested model. `cliproxy apply` requires this policy and the host monitor reports drift; see [Multi-account routing](docs/model-health.md#multi-account-routing-fill-first) for applying it to a running proxy. Automatic preview-model switching is disabled. The
|
|
153
|
+
Unprefixed routing is **fill-first** (`routing.strategy: fill-first`): one account serves until its quota is exhausted and it cools down, then the next account, with session affinity keeping a session on its account while available and bounded retries across eligible accounts for the requested model. `cliproxy apply` requires this policy and the host monitor reports drift; see [Multi-account routing](docs/model-health.md#multi-account-routing-fill-first) for applying it to a running proxy. Automatic preview-model switching is disabled. The fleet declares no model aliases: every other model id is the upstream id exactly as `/v1/models` lists it. [`models.json`](models.json) declares the model ids that are health-checked (`claude-opus-5-5`, `claude-sonnet-5-5`, `gpt-6-astra`, `gpt-6.1-sol`), and the checks fail loudly when one is not served. Usage statistics are enabled but are not a durable billing ledger. Available quota details depend on the provider.
|
|
154
154
|
|
|
155
155
|
## Fleet clients: macOS, Ubuntu and Windows/WSL
|
|
156
156
|
|
|
@@ -201,7 +201,7 @@ On the manager (or a replacement manager), prepare the tracked installation, log
|
|
|
201
201
|
|
|
202
202
|
The `CLI proxy health` GitHub Actions workflow is the reusable workflow `.github/workflows/cliproxy-health.yml`. The repository that holds your `fleet.json` enables it with one `uses:` line: copy [`docs/health-workflow.example.yml`](docs/health-workflow.example.yml) into its `.github/workflows/` and name the homelab release tag your `package.json` pins. It needs no stored secret: the Vault address and the endpoint come from your `fleet.json`, and the checks from that exact release. The example runs it at minutes 7, 22, 37 and 52 of each hour and supports manual dispatch. It uses the existing read-only GitHub OIDC Vault role (`vault-role`, `github-actions` by default), with a short-lived token rather than a stored workstation/admin credential. From a GitHub-hosted runner it checks public endpoint authentication, available models, dashboard availability, a cloud checkpoint no more than 45 minutes old, and the last successful GC no more than nine days old. GC status is included in subsequent encrypted checkpoints. A failed workflow is visible independently of this workstation and uses GitHub's existing notification settings; it is not a guaranteed paging service, and schedules can be delayed by GitHub.
|
|
203
203
|
|
|
204
|
-
The `CLI proxy health` workflow also runs the declarative model checks described in [Model validation and health checks](docs/model-health.md): a free readiness check every 15 minutes, a light two-request-per-model inference check
|
|
204
|
+
The `CLI proxy health` workflow also runs the declarative model checks described in [Model validation and health checks](docs/model-health.md): a free readiness check every 15 minutes, a light two-request-per-model inference check daily, a comprehensive weekly suite and an offline pull-request contract job, with per-model status, capability coverage, JSON/Markdown reports, an agent brief and a tracking issue. The local five-minute monitor does not run inference, attempt management logins, access provider credential files, prune storage, change cloud infrastructure, or restart the workstation. Management authorization remains covered by explicit verification; repeated failed management logins can trigger upstream IP bans, so they are excluded from scheduled monitoring. Its Restic client permits only read operations and uses no remote locks, so a killed runner cannot leave a lock blocking backups. Concurrent pruning can cause a transient read failure; subsequent scheduled runs retry. HTTPS redirects are rejected to prevent forwarding credentials to another origin.
|
|
205
205
|
|
|
206
206
|
With an existing private Vault token, one command prepares a complete offline replacement cache:
|
|
207
207
|
|
|
@@ -247,9 +247,8 @@ proxy owner is `manager.id`. Flags: `--definition`, `--node`, `--revision`,
|
|
|
247
247
|
`image.lock.json` changed; then it is recreated, which briefly interrupts
|
|
248
248
|
in-flight inference. `PROXY_UPDATE_PENDING` remains only when that install
|
|
249
249
|
failed. Settings the fleet owns in the live
|
|
250
|
-
config (`
|
|
251
|
-
|
|
252
|
-
`claude` pin in `mise.toml`, so it follows the harness every node runs) are compared
|
|
250
|
+
config (`upstream.claude`, from `config.template.yaml`, which carries the
|
|
251
|
+
Claude Code version the proxy presents to Anthropic) are compared
|
|
253
252
|
by `ops declared` (exit 3 when they differ) and reported as
|
|
254
253
|
`PROXY_CONFIG_PENDING`; `ops declared --apply` (run by every converge)
|
|
255
254
|
validates and stages the candidate, replaces only those keys and relies on
|
|
@@ -17,19 +17,6 @@ access:
|
|
|
17
17
|
- REPLACE_CLIENT_KEY
|
|
18
18
|
oauth:
|
|
19
19
|
auth-dir: /state/auths
|
|
20
|
-
# Fleet-owned (applied by `ops declared`): the Antigravity CLI sends its
|
|
21
|
-
# catalog ids; serve them from the Antigravity account's matching models.
|
|
22
|
-
model-alias:
|
|
23
|
-
antigravity:
|
|
24
|
-
- name: gemini-4-neon-xhigh
|
|
25
|
-
alias: gemini-4-neon
|
|
26
|
-
fork: true
|
|
27
|
-
- name: gemini-3.8-flash-high
|
|
28
|
-
alias: gemini-3.8-flash
|
|
29
|
-
fork: true
|
|
30
|
-
- name: gemini-3.1-flash-lite
|
|
31
|
-
alias: gemini-3.1-flash-lite-preview
|
|
32
|
-
fork: true
|
|
33
20
|
routing:
|
|
34
21
|
# Fill first: use one account until its quota is exhausted (it then cools down), then the next.
|
|
35
22
|
# Sessions stay bound to their account while it is available; new sessions start on the first
|
|
@@ -48,8 +35,7 @@ upstream:
|
|
|
48
35
|
claude:
|
|
49
36
|
# Fleet-owned (applied by `ops declared`): the proxy presents itself to
|
|
50
37
|
# Anthropic as this Claude Code version, and Anthropic refuses newer models
|
|
51
|
-
# to an older one.
|
|
52
|
-
# mise.toml on every run, so it follows the harness every node runs.
|
|
38
|
+
# to an older one. Raise it here, in review, when Anthropic requires it.
|
|
53
39
|
header-defaults:
|
|
54
40
|
user-agent: 'claude-cli/2.1.314 (external, cli)'
|
|
55
41
|
# T3 runs Claude Code under its own entrypoint label.
|
|
@@ -6,20 +6,20 @@ name: CLI proxy health
|
|
|
6
6
|
# when they run. One workflow, five entry points, deliberately cheap by
|
|
7
7
|
# default:
|
|
8
8
|
# every 15 min readiness: free (no inference) + cloud checkpoint freshness
|
|
9
|
-
#
|
|
10
|
-
# 03:41
|
|
9
|
+
# daily 03:17 light: 2 tiny requests per model (about 8 requests a day)
|
|
10
|
+
# Sundays 03:41 comprehensive suite (bounded by models.json budgets)
|
|
11
11
|
# manual any profile, one model or one check, optional force-probe
|
|
12
12
|
# The offline contract (no credentials, no inference) runs in homelab's own
|
|
13
13
|
# CI, not here.
|
|
14
14
|
on:
|
|
15
15
|
schedule:
|
|
16
16
|
- cron: '7,22,37,52 * * * *'
|
|
17
|
-
- cron: '17
|
|
18
|
-
- cron: '41 3 * *
|
|
17
|
+
- cron: '17 3 * * *'
|
|
18
|
+
- cron: '41 3 * * 0'
|
|
19
19
|
workflow_dispatch:
|
|
20
20
|
inputs:
|
|
21
21
|
profile:
|
|
22
|
-
description: readiness is free; light is the
|
|
22
|
+
description: readiness is free; light is the daily check; nightly is the weekly comprehensive suite; manual adds wrong-key probes and fault simulations.
|
|
23
23
|
type: choice
|
|
24
24
|
default: light
|
|
25
25
|
options: [liveness, readiness, light, nightly, manual]
|
|
@@ -54,7 +54,7 @@ jobs:
|
|
|
54
54
|
uses: crvouga/homelab/.github/workflows/cliproxy-health.yml@RELEASE_TAG
|
|
55
55
|
with:
|
|
56
56
|
# Inference only on the hourly schedule; the 15-minute one is free.
|
|
57
|
-
profile: ${{ github.event_name == 'workflow_dispatch' && inputs.profile || github.event.schedule == '41 3 * *
|
|
57
|
+
profile: ${{ github.event_name == 'workflow_dispatch' && inputs.profile || github.event.schedule == '41 3 * * 0' && 'nightly' || github.event.schedule == '17 3 * * *' && 'light' || 'readiness' }}
|
|
58
58
|
suite: ${{ inputs.suite || 'all' }}
|
|
59
59
|
model: ${{ inputs.model || '' }}
|
|
60
60
|
check: ${{ inputs.check || '' }}
|
|
@@ -68,7 +68,7 @@ models.json ──► config.py (validate, resolve capability states)
|
|
|
68
68
|
| ----------- | ------------------- | ------------------ | ---------------------------------------------------------------------------------------------- |
|
|
69
69
|
| `liveness` | liveness | none | "Is it reachable and does it reject anonymous callers?" No credentials. |
|
|
70
70
|
| `readiness` | liveness, readiness | none | Key works, `/v1/models` valid, **every configured model served**. |
|
|
71
|
-
| `light` | + cheapest e2e | 2 requests/model |
|
|
71
|
+
| `light` | + cheapest e2e | 2 requests/model | Daily. Chat non-stream + Responses stream. |
|
|
72
72
|
| `nightly` | + all `full` checks | ~53 requests/model | Comprehensive protocol, tools, agent workflow, errors, concurrency; also runs the simulations. |
|
|
73
73
|
| `manual` | + `manual` checks | + wrong-key probe | Full diagnostics, plus the fault-injection scenarios. |
|
|
74
74
|
|
|
@@ -286,13 +286,13 @@ budgets, fault detection, last-success persistence, and secret hygiene.
|
|
|
286
286
|
|
|
287
287
|
[`cliproxy-health.yml`](../../../.github/workflows/cliproxy-health.yml) has five entry points:
|
|
288
288
|
|
|
289
|
-
| Trigger
|
|
290
|
-
|
|
|
291
|
-
| Every 15 minutes
|
|
292
|
-
|
|
|
293
|
-
| 03:41 UTC
|
|
294
|
-
| Pull request
|
|
295
|
-
| Manual dispatch
|
|
289
|
+
| Trigger | Profile | Inference | Notes |
|
|
290
|
+
| ----------------- | ----------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
291
|
+
| Every 15 minutes | `readiness` | none | Key, `/v1/models`, every configured model served, plus cloud checkpoint freshness. Free. |
|
|
292
|
+
| Daily (03:17 UTC) | `light` | 2 requests per model (about 8/run) | About 8 requests and well under 1,000 output tokens a day across four models. |
|
|
293
|
+
| Sundays 03:41 UTC | `nightly` | about 53 requests per model | Capped at 240 requests and 24,000 output tokens per run, once a week. |
|
|
294
|
+
| Pull request | (offline) | none | `contract` job: `models.json` lint, the offline tests and the whole suite against the emulator. No credentials. |
|
|
295
|
+
| Manual dispatch | any | your choice | `model`, `check`, `max_requests` and `force_probe` inputs. |
|
|
296
296
|
|
|
297
297
|
Controls that keep usage bounded, all in `models.json`:
|
|
298
298
|
|
|
@@ -11,7 +11,7 @@ import pathlib
|
|
|
11
11
|
import re
|
|
12
12
|
|
|
13
13
|
# Provider credential types that T3 offers once per account.
|
|
14
|
-
ROUTED = ('claude', 'codex'
|
|
14
|
+
ROUTED = ('claude', 'codex')
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def prefix(kind, email):
|
|
@@ -132,9 +132,8 @@ def classify(credential, entry, now):
|
|
|
132
132
|
def credentials(auths):
|
|
133
133
|
"""[(file name, credential)] for every readable credential, in a stable
|
|
134
134
|
order: by provider, then sign-in email, then file name. Each provider's
|
|
135
|
-
accounts are numbered in this order, the same order
|
|
136
|
-
|
|
137
|
-
everywhere."""
|
|
135
|
+
accounts are numbered in this order, the same order `homelab proxy accounts` lists them in, so an
|
|
136
|
+
index means one account."""
|
|
138
137
|
found = []
|
|
139
138
|
for path in pathlib.Path(auths).glob('*.json'):
|
|
140
139
|
try:
|
|
@@ -132,23 +132,12 @@ def inspect(root, node, owner, revision, run=execute, audit_fn=audit, compatible
|
|
|
132
132
|
return checks
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
def claude_pin(repository=SCRIPTS.parents[1]):
|
|
136
|
-
"""The Claude Code version every node runs (the shared toolchain pin)."""
|
|
137
|
-
try:
|
|
138
|
-
match = re.search(r'^claude = "(\d+\.\d+\.\d+)"$', (repository / 'mise.toml').read_text(), re.M)
|
|
139
|
-
return match.group(1) if match else None
|
|
140
|
-
except OSError:
|
|
141
|
-
return None
|
|
142
|
-
|
|
143
|
-
|
|
144
135
|
def declared(root, apply):
|
|
145
136
|
"""Checks (exit 0 when unchanged) or applies the template-owned settings.
|
|
146
|
-
Runs under the install's pinned interpreter: only it carries PyYAML.
|
|
147
|
-
proxy must claim the Claude Code version the fleet actually runs."""
|
|
137
|
+
Runs under the install's pinned interpreter: only it carries PyYAML."""
|
|
148
138
|
python = root / 'tools/bin/python3'
|
|
149
|
-
version = claude_pin()
|
|
150
139
|
return [str(python) if python.exists() else sys.executable, '-B', str(root / 'scripts/ops'),
|
|
151
|
-
'declared', *(['--
|
|
140
|
+
'declared', *(['--apply'] if apply else [])]
|
|
152
141
|
|
|
153
142
|
|
|
154
143
|
def endpoint_health(root):
|
package/cliproxy/scripts/ops
CHANGED
|
@@ -98,28 +98,11 @@ def wait():
|
|
|
98
98
|
DECLARED = [("oauth", "model-alias"), ("upstream", "claude")]
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
def claude_version():
|
|
102
|
-
"""`--claude-version X.Y.Z`: the Claude Code version every node runs."""
|
|
103
|
-
import re
|
|
104
|
-
|
|
105
|
-
for index, argument in enumerate(sys.argv):
|
|
106
|
-
if argument == "--claude-version":
|
|
107
|
-
version = sys.argv[index + 1] if index + 1 < len(sys.argv) else ""
|
|
108
|
-
if not re.fullmatch(r"\d+\.\d+\.\d+", version):
|
|
109
|
-
raise ValueError("Invalid Claude Code version")
|
|
110
|
-
return version
|
|
111
|
-
return None
|
|
112
|
-
|
|
113
|
-
|
|
114
101
|
def declared_template():
|
|
115
|
-
"""The tracked template
|
|
116
|
-
import
|
|
102
|
+
"""The tracked template."""
|
|
103
|
+
import yaml
|
|
117
104
|
|
|
118
|
-
|
|
119
|
-
version = claude_version()
|
|
120
|
-
if version:
|
|
121
|
-
text = re.sub(r"claude-cli/\d+\.\d+\.\d+", "claude-cli/" + version, text)
|
|
122
|
-
return yaml.safe_load(text)
|
|
105
|
+
return yaml.safe_load((root / "config.template.yaml").read_text())
|
|
123
106
|
|
|
124
107
|
|
|
125
108
|
def declared_candidate():
|
|
@@ -209,7 +192,6 @@ def apply_prefixes(prefixes):
|
|
|
209
192
|
LOGIN_FLAGS = {
|
|
210
193
|
"codex": "-codex-device-login",
|
|
211
194
|
"claude": "-claude-login",
|
|
212
|
-
"antigravity": "-antigravity-login",
|
|
213
195
|
"kimi": "-kimi-login",
|
|
214
196
|
"xai": "-xai-login",
|
|
215
197
|
"meta": "-meta-login",
|
package/docs/authentication.md
CHANGED
|
@@ -14,7 +14,7 @@ rewrites them).
|
|
|
14
14
|
| The bucket's two keys | The environment of the `homelab` command; `~/.config/homelab/bucket.json` (0600) on the manager after `state --init` | The manager only |
|
|
15
15
|
| A node's Vault token | That node's own Vault session (`~/.vault-token`) | That node only; never copied |
|
|
16
16
|
| A node's GitHub login | `gh`'s own store on that node | `gh`, and git through its credential helper |
|
|
17
|
-
| Provider accounts (Claude, Codex …) |
|
|
17
|
+
| Provider accounts (Claude, Codex …) | Each machine, signed in by T3 Code; the CLI proxy on the manager holds accounts only to gather usage | T3 Code, on that machine |
|
|
18
18
|
| Tailscale and T3 pairing | Each machine, signed in by a person; a replaced worker's T3 is paired by the manager with a one-time code it never writes down | That machine |
|
|
19
19
|
|
|
20
20
|
## How they reach each node
|
|
@@ -29,11 +29,6 @@ rewrites them).
|
|
|
29
29
|
(`bootstrap/worker-github.ts`, on standard input, never argv). `sync`
|
|
30
30
|
makes `gh` git's credential helper and writes the declared identity
|
|
31
31
|
(`git` in `fleet.json`, `ansible/github/git.yml`) on every node.
|
|
32
|
-
- **The proxy client key** is read by each node from its own secrets provider
|
|
33
|
-
whenever a launcher starts an agent. The node keeps the last key it read in
|
|
34
|
-
`~/.cache/homelab/proxy-client-key` (0600) and uses it only while the
|
|
35
|
-
provider cannot answer, so an unreachable Vault or an expired session leaves
|
|
36
|
-
that node's agents working until the Vault checks below are fixed.
|
|
37
32
|
- **The monitoring hub's backup storage keys** are read on the manager by
|
|
38
33
|
`sync` and handed to the hub's playbook in a private variables file.
|
|
39
34
|
|
|
@@ -120,19 +115,18 @@ Every failure code is in [the runbooks](runbooks.md).
|
|
|
120
115
|
|
|
121
116
|
<!-- generated: checks -->
|
|
122
117
|
|
|
123
|
-
| Check
|
|
124
|
-
|
|
|
125
|
-
| `auth:github`
|
|
126
|
-
| `auth:vault`
|
|
127
|
-
| `auth:vault-isolation`
|
|
128
|
-
| `worker:credential-renewal`
|
|
129
|
-
| `worker:git-identity`
|
|
130
|
-
| `worker:git-push-auth`
|
|
131
|
-
| `worker:git-signing`
|
|
132
|
-
| `worker:github-sync`
|
|
133
|
-
| `worker:
|
|
134
|
-
| `worker:
|
|
135
|
-
| `worker:vault-renewal` | `src/worker-access-checks.ts` |
|
|
118
|
+
| Check | Measured in |
|
|
119
|
+
| --------------------------- | --------------------------------------------------- |
|
|
120
|
+
| `auth:github` | `src/github/checks.ts` |
|
|
121
|
+
| `auth:vault` | `src/auth-checks.ts`, `src/cli/fleet-sync-vault.ts` |
|
|
122
|
+
| `auth:vault-isolation` | `src/cli/fleet-sync-vault.ts` |
|
|
123
|
+
| `worker:credential-renewal` | `src/worker-host-checks.ts` |
|
|
124
|
+
| `worker:git-identity` | `src/git-identity.ts` |
|
|
125
|
+
| `worker:git-push-auth` | `src/definition.ts`, `src/git-identity.ts` |
|
|
126
|
+
| `worker:git-signing` | `src/definition.ts`, `src/git-identity.ts` |
|
|
127
|
+
| `worker:github-sync` | `src/worker-access-checks.ts` |
|
|
128
|
+
| `worker:rdp-credential` | `src/screen-sharing.ts` |
|
|
129
|
+
| `worker:vault-renewal` | `src/worker-access-checks.ts` |
|
|
136
130
|
|
|
137
131
|
<!-- end: checks -->
|
|
138
132
|
|
|
@@ -140,13 +134,14 @@ Every failure code is in [the runbooks](runbooks.md).
|
|
|
140
134
|
|
|
141
135
|
<!-- generated: timers -->
|
|
142
136
|
|
|
143
|
-
| Timer
|
|
144
|
-
|
|
|
145
|
-
| `personal-fleet-disk-gc.timer`
|
|
146
|
-
| `personal-
|
|
147
|
-
| `personal-worker-
|
|
148
|
-
| `personal-worker-
|
|
149
|
-
| `personal-worker-recovery.timer`
|
|
137
|
+
| Timer | Declared in | Schedule |
|
|
138
|
+
| ---------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
139
|
+
| `personal-fleet-disk-gc.timer` | `ansible/ubuntu/tasks/resources.yml` | OnBootSec=10min, OnCalendar={{ gc_calendar }} |
|
|
140
|
+
| `personal-fleet-idle-reboot.timer` | `ansible/ubuntu/tasks/updates.yml` | OnBootSec={{ updates.idleReboot.minUptimeMinutes }}min, OnUnitActiveSec={{ updates.idleReboot.intervalMinutes }}min |
|
|
141
|
+
| `personal-worker-auth.timer` | `ansible/ubuntu/tasks/credentials.yml` | OnBootSec=2min, OnUnitActiveSec=10min |
|
|
142
|
+
| `personal-worker-github.timer` | `ansible/ubuntu/tasks/github.yml` | OnBootSec=2min, OnUnitActiveSec=10min |
|
|
143
|
+
| `personal-worker-recovery.timer` | `ansible/ubuntu/tasks/recovery.yml` | OnBootSec=1min, OnUnitActiveSec=1min |
|
|
144
|
+
| `personal-worker-recovery.timer` | `ansible/ubuntu/tasks/recovery.yml` | OnBootSec=5min, OnUnitActiveSec=15min |
|
|
150
145
|
|
|
151
146
|
<!-- end: timers -->
|
|
152
147
|
|