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
2 changes: 1 addition & 1 deletion docs/docs/reference/networking/address-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ by the `GilmanLab/fleet` `cluster/` project and mirrored in each node's seed.
| `agentcompute01` MCP service | `10.10.10.16` | Static `/32` on a routed Incus NIC through `lab01`'s `_vmgmt` interface; host gateway `169.254.0.1` |
| `media01` media stack | `10.10.50.20` | Static VM interface; macvlan on `nas01`'s IncusOS `fast50` interface |
| `win01` Windows desktop | `10.10.50.30` | Static guest-configured address; macvlan on `lab02`'s IncusOS `fast50` interface |
| `calagopus01` game server panel | `10.10.50.40` | Static VM interface; macvlan on `lab01`'s IncusOS `fast50` interface. Panel `8000`, SFTP `2022`, game allocations `25565`–`25600` |
| `calagopus01` game server panel | `10.10.50.40` | Static VM interface; macvlan on `lab01`'s IncusOS `fast50` interface. SSH `22`, panel `8000`, SFTP `2022`, game allocations `25565`–`25600` |

### Hosts

Expand Down
23 changes: 23 additions & 0 deletions docs/docs/runbooks/calagopus.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and image pins.
| Panel | `http://10.10.50.40:8000` |
| SFTP | `10.10.50.40:2022`, panel username and password |
| Game servers | `10.10.50.40:25565`–`25600` (panel allocations) |
| Agent SSH (key-only, passwordless `sudo`) | `ssh -i <key> agent@10.10.50.40`; public key in `incus/calagopus` `agent_ssh_authorized_key`, host key `SHA256:KCgI72gaW94nYPeI0a36P/xCPVbTu5AgctEjirxE1l4` |
| Administrator | `admin.username` / `admin.password` in `GilmanLab/secrets` `services/calagopus/panel.sops.yaml` |

## Preconditions
Expand Down Expand Up @@ -138,6 +139,28 @@ start failing.
- **Backups**: server backups land in `/var/lib/calagopus-wings/backups` on the
data volume. They do not leave `lab01`.

## Rotate the agent SSH key

The `agent` account is the only SSH login. It accepts only the key in
`agent_ssh_authorized_key` and has passwordless `sudo`, which includes Docker
and therefore every game server and the panel. The private key lives with the
operator and the Windows agents it was handed to; it is not escrowed.

1. Generate a replacement:
`ssh-keygen -t ed25519 -N "" -C "windows-agents->calagopus01" -f ~/.ssh/calagopus01-agents`.
2. Set `agent_ssh_authorized_key` to the new public key, then `just plan` and
`just apply`. Cloud-init applies it only to a newly created VM.
3. Replace it on the running VM:

```bash
incus file push --uid 0 --gid 0 --mode 0600 ~/.ssh/calagopus01-agents.pub \
nas01:calagopus01/home/agent/.ssh/authorized_keys
incus exec nas01:calagopus01 -- chown agent:agent /home/agent/.ssh/authorized_keys
```

4. Confirm `ssh -i ~/.ssh/calagopus01-agents -o IdentitiesOnly=yes agent@10.10.50.40 sudo -n true`
succeeds and the old key is refused, then hand the new private key over.

## Recovery

- **Rebuild the VM**: `tofu apply -replace=incus_instance.calagopus`, wait for
Expand Down
Loading