2026-04-06 01:54:45 +00:00
|
|
|
---
|
|
|
|
|
title: "Bastille on FreeBSD 15"
|
|
|
|
|
---
|
|
|
|
|
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Clawdie uses Bastille as the host-side jail manager for its Warden runtime on
|
|
|
|
|
FreeBSD.
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Host Assumptions
|
2026-03-08 09:18:35 +01:00
|
|
|
|
|
|
|
|
- FreeBSD 15 host
|
2026-03-14 20:11:34 +01:00
|
|
|
- ZFS root pool
|
2026-03-08 09:18:35 +01:00
|
|
|
- Bastille installed from packages
|
2026-05-06 09:43:08 +02:00
|
|
|
- `warden0` bridge on `10.0.1.1/24` in the repo registry example
|
2026-03-14 20:11:34 +01:00
|
|
|
- host-side orchestration, not an operator jail
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Recommendation
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Keep Bastille boring and explicit:
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
- bootstrap `15.0-RELEASE`
|
|
|
|
|
- keep the stock Bastille layout
|
|
|
|
|
- use `warden0` as the canonical bridge name
|
2026-05-06 09:43:08 +02:00
|
|
|
- use `10.0.1.0/24` as the default internal jail subnet example
|
|
|
|
|
- keep jails thin by default
|
|
|
|
|
- keep only the optional `db` jail thick
|
2026-03-08 09:18:35 +01:00
|
|
|
|
|
|
|
|
## Bootstrap
|
|
|
|
|
|
|
|
|
|
```sh
|
2026-03-14 20:11:34 +01:00
|
|
|
pkg install -y bastille
|
2026-03-08 09:18:35 +01:00
|
|
|
bastille bootstrap -p 15.0-RELEASE
|
|
|
|
|
```
|
|
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Canonical Service Jails
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Default fixed service slots:
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-05-06 09:43:08 +02:00
|
|
|
- `git` on `<subnet>.2`
|
|
|
|
|
- `cms` on `<subnet>.3`
|
|
|
|
|
- `llama-cpp` on `<subnet>.4` (llama-server, embeddings)
|
|
|
|
|
- `db` on `<subnet>.5`
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-04-27 21:26:40 +02:00
|
|
|
The operator controlplane is not a jail in the current model. It runs on the
|
|
|
|
|
FreeBSD host and is published at `ai.<internal_base>`.
|
|
|
|
|
|
|
|
|
|
Example bring-up for the default install:
|
2026-03-08 14:20:35 +01:00
|
|
|
|
|
|
|
|
```sh
|
2026-05-06 09:43:08 +02:00
|
|
|
bastille create -B -g <subnet>.1 git 15.0-RELEASE <subnet>.2/24 warden0
|
|
|
|
|
bastille create -B -g <subnet>.1 cms 15.0-RELEASE <subnet>.3/24 warden0
|
|
|
|
|
bastille create -T -B -g <subnet>.1 db 15.0-RELEASE <subnet>.5/24 warden0
|
2026-03-08 14:20:35 +01:00
|
|
|
```
|
|
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Apply internal hostnames after creation:
|
2026-03-08 09:18:35 +01:00
|
|
|
|
|
|
|
|
```sh
|
2026-04-27 21:26:40 +02:00
|
|
|
bastille config cms set host.hostname cms.home.arpa
|
|
|
|
|
bastille config git set host.hostname git.home.arpa
|
2026-03-08 09:18:35 +01:00
|
|
|
```
|
|
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Worker Bring-Up
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-05-07 12:20:01 +02:00
|
|
|
Workers are service-owned execution environments and start in the high range:
|
2026-03-09 14:03:25 +01:00
|
|
|
|
2026-05-06 09:43:08 +02:00
|
|
|
- default worker: `10.0.1.101`
|
2026-03-14 20:11:34 +01:00
|
|
|
- future networked workers continue upward from there
|
2026-03-09 14:03:25 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Use the setup path rather than hand-writing worker create commands:
|
2026-03-08 09:18:35 +01:00
|
|
|
|
|
|
|
|
```sh
|
2026-04-12 16:38:52 +00:00
|
|
|
just setup -- --step jails --create
|
2026-03-08 09:18:35 +01:00
|
|
|
```
|
|
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Networking
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
The intended host-side network is:
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
- bridge: `warden0`
|
2026-05-06 09:43:08 +02:00
|
|
|
- gateway: `10.0.1.1`
|
|
|
|
|
- jailed subnet: `10.0.1.0/24`
|
2026-03-09 14:03:25 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
If a VNET jail comes up without a `default` route, treat that as a provisioning
|
|
|
|
|
defect and fix the create command rather than applying ad hoc routes later.
|
2026-03-09 14:03:25 +01:00
|
|
|
|
2026-05-06 09:43:08 +02:00
|
|
|
## Thick vs thin
|
|
|
|
|
|
|
|
|
|
Clawdie keeps jails thin by default.
|
|
|
|
|
|
|
|
|
|
- thin jails share the Bastille release tree and save disk space
|
|
|
|
|
- the optional `db` jail stays thick because the database is long-lived state
|
|
|
|
|
and we want its base lifecycle to stay explicit
|
|
|
|
|
|
|
|
|
|
Thin jails do **not** automatically follow host patchlevels. They follow the
|
|
|
|
|
Bastille release tree they are mounted from. Updating the FreeBSD host alone
|
|
|
|
|
does not refresh that release tree.
|
|
|
|
|
|
|
|
|
|
In practice, coordinated updates need two steps:
|
|
|
|
|
|
|
|
|
|
1. update the host
|
|
|
|
|
2. update the Bastille release tree and then refresh or rebuild the affected
|
|
|
|
|
jails
|
|
|
|
|
|
|
|
|
|
Repo helper:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
sudo just system-update
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This runs the current-release patch path for the host, refreshes the Bastille
|
|
|
|
|
release tree, updates thin jails, and updates the optional `db` jail when
|
|
|
|
|
`DB_RUNTIME=jail`.
|
|
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Packages and Roles
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Current setup steps own the jail bootstrap contract:
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
- `db` installs PostgreSQL + pgvector
|
|
|
|
|
- `git` installs plain git storage
|
2026-04-27 21:26:40 +02:00
|
|
|
- `cms` installs nginx and the Astro/Starlight web baseline; optional Strapi
|
|
|
|
|
content/bootstrap remains internal and deployment-specific
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Do not bootstrap a separate operator jail. The FreeBSD host is the operator
|
|
|
|
|
surface.
|
2026-03-08 09:18:35 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## ZFS Layout
|
2026-03-08 18:51:48 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
With the default Bastille + Clawdie settings, datasets should live under a
|
|
|
|
|
project prefix such as:
|
2026-03-08 18:51:48 +01:00
|
|
|
|
|
|
|
|
```text
|
2026-03-14 20:11:34 +01:00
|
|
|
zroot/clawdie-runtime/jails
|
|
|
|
|
zroot/clawdie-runtime/releases
|
|
|
|
|
zroot/clawdie-runtime/templates
|
2026-03-08 18:51:48 +01:00
|
|
|
```
|
|
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Snapshots
|
2026-03-08 18:51:48 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Snapshot persistent service jails before risky changes, for example:
|
2026-03-08 18:51:48 +01:00
|
|
|
|
|
|
|
|
```sh
|
2026-03-14 20:11:34 +01:00
|
|
|
zfs snapshot zroot/clawdie-runtime/jails/clawdie-db@pre-schema-14.mar.2026-1200
|
|
|
|
|
zfs snapshot zroot/clawdie-runtime/jails/clawdie-cms@pre-strapi-14.mar.2026-1230
|
2026-03-08 09:18:35 +01:00
|
|
|
```
|
|
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
Use user-facing snapshot names in `DD.mmm.YYYY-HHMM` format.
|
2026-03-08 11:00:52 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
## Current Direction
|
2026-03-08 11:00:52 +01:00
|
|
|
|
2026-03-14 20:11:34 +01:00
|
|
|
- host orchestrator on FreeBSD
|
|
|
|
|
- Bastille-managed service and worker jails
|
|
|
|
|
- no dedicated operator jail in the active model
|
2026-04-27 21:26:40 +02:00
|
|
|
- shared internal surfaces named by role: `ai`, `cms`, `git`
|
2026-03-14 20:11:34 +01:00
|
|
|
- public web serving delegated to the `cms` jail instead of host nginx ownership
|