# AWP I1 dogfood deployment

The I1 dogfood instance runs persistently on `debian3` while AgentRun workspaces are created on demand in the existing three-node K3s cluster.

## Owner URL

From the Tailscale-connected workstation, open:

```text
http://100.101.104.41:4173
```

## Persistent services

User-systemd services on `debian3`:

```text
awp-dogfood-postgres.service
awp-dogfood-control-plane.service
awp-dogfood-web.service
```

User lingering is enabled so the services survive logout and start with the user service manager after reboot.

PostgreSQL data is retained in the rootless Podman volume `awp-dogfood-postgres`.

## Execution plane

`infra/k8s/execution-base.yaml` provisions `awp-system` and `awp-workspaces` plus the restricted `awp-workspace-controller` RBAC boundary. AgentRun pods/PVCs/NetworkPolicies are created only when the owner starts Factory work; the deployment script does not start a FactoryRun.

## Deploy/update

From a clean checkout of the intended AWP revision on `debian3`:

```bash
bash infra/dogfood/deploy-debian3.sh
```

The script builds the workspace, installs the runtime under `/home/user/services/awp-i1`, refreshes the trusted AWP checkout, writes private runtime configuration under `~/.config/awp-dogfood`, and enables/restarts the persistent services.

## Verify

```bash
systemctl --user is-active \
  awp-dogfood-postgres.service \
  awp-dogfood-control-plane.service \
  awp-dogfood-web.service

curl -fsS http://127.0.0.1:8787/health
curl -fsS http://127.0.0.1:4173/ >/dev/null
```

Expected control-plane health includes PostgreSQL status `ok`, zero pending migrations, and no migration drift.
