| 1 | # Service dependencies and rollout |
| 2 | |
| 3 | Declare providers and requirements in Pkl. Provisioning allocates private |
| 4 | inputs, and Nomad templates discover provider endpoints. Watched endpoint |
| 5 | changes restart consumers; applications that persist internal endpoints must |
| 6 | receive repeatable setup updates. [configure-arr.py](configure-arr.py), for |
| 7 | example, derives Jackett/qBittorrent endpoints and remote path mappings from |
| 8 | the service declarations. |
| 9 | |
| 10 | A successful non-sidecar prestart task is not rerun on every application |
| 11 | restart. Dependent jobs therefore also need runtime retry and health recovery. |
| 12 | The schema and renderer own retry delays, health-restart grace, and deployment |
| 13 | deadlines. Verify the actual client connection after provider reallocation; |
| 14 | a healthy application HTTP route alone does not prove database connectivity. |
| 15 | |
| 16 | The default single-allocation rollout stops the old writer before starting the |
| 17 | new one. Writable SQLite stores cannot safely overlap writers. Stateless jobs |
| 18 | can declare canary rollout when their ports and mounts allow it. Generated |
| 19 | Caddy proxies retry connection failures while service discovery catches up; |
| 20 | this does not guarantee uninterrupted long-running requests or WebSockets. |
| 21 | |
| 22 | A new cloned preview snapshots its service dataset, writable external ZFS |
| 23 | mounts, and PostgreSQL dataset in one operation. An isolated PostgreSQL clone |
| 24 | supplies the preview database. The temporary database clone is removed after |
| 25 | copying. Repeating staging retains existing preview data; fresh isolation |
| 26 | starts empty and rejects writable external mounts. Review outbound side |
| 27 | effects independently of filesystem isolation. |
| 28 | |
| 29 | ZFS clones retain their source encryption root, even below the independently |
| 30 | encrypted staging parent. Keep source keys available while clones exist. |
| 31 | Fresh previews inherit staging encryption. Verify actual mount bindings before |
| 32 | allowing disposable writes, especially read-only personal mounts. |
| 33 | |
| 34 | Inspect generated-job changes before expecting a restart. A provider script |
| 35 | change can alter setup without changing a running job. Prepared startup files |
| 36 | are included in task change detection; unrelated files are not. A Nomad plan |
| 37 | reporting an in-place update alone does not establish that tasks will restart. |