Move CI runners to Droplet and enable application HTTPS
vpn-dns-gateway/pipeline/pr-main This commit looks good

This commit is contained in:
2026-11-15 12:49:06 -05:00
parent bf28adc7fb
commit ed0a862657
36 changed files with 1266 additions and 72 deletions
+40 -11
View File
@@ -49,8 +49,13 @@ The droplet now has 2 GiB RAM and its original 25 GB plan disk. Vincent resized
it and installed package updates. The existing seven service containers and
their HTTPS routes were verified after maintenance.
The trusted laptop node `ssw590-vince-delivery` is online over outbound
HTTPS/WebSocket, with one exclusive executor and label `delivery-trusted`.
The trusted node `ssw590-vince-delivery` now runs on The-Ocean, with one
exclusive executor and label `delivery-trusted`. Its name is retained from
the initial laptop installation. The laptop copy is stopped. The remote
agent uses private HTTP/WebSocket to `jenkins:8080`; its SSH configuration
routes the existing deployment inventory address through Docker's host gateway,
retaining `HostKeyAlias 147.182.178.136` and the pinned Jenkins known-hosts file.
No campus SSH connection is needed to run a delivery job from the browser.
[Agent prerequisite build 1](https://ci.yebilly.me/job/secure-delivery/job/agent-preflight/1/)
passed using the dedicated deploy key, pinned host key and root sudo. Its
non-secret tool inventory is versioned in `evidence/agent-preflight-1.txt`.
@@ -58,14 +63,34 @@ The `secure-delivery/pricing` job loads `delivery/Jenkinsfile` from protected
main and is disabled pending reviewed source. Release credentials are scoped
to that Jenkins folder; the PR job does not bind them or the Docker socket.
The original inventory above is historical. [Remote prerequisite build 2](https://ci.yebilly.me/job/secure-delivery/job/agent-preflight/2/)
passed after migration; `evidence/agent-preflight-2.txt` records the tools and
target. A separate bounded capacity trial passed control/app tests, source and
dependency checks, a limited image build, image scan and temporary HTTP smoke.
It used a preparation snapshot, not a reviewed release, and published nothing.
The deployment account has root-only passwordless sudo: effective host
administration privileges, restricted to reviewed delivery code. Distinct
package-write and package-read tokens under `vsun1` are stored in Jenkins and
root's target Docker configuration respectively. No values are in Git.
Local agent identity and workspace live in named Docker volumes outside Git.
Run `./delivery/bootstrap/start-agent.ps1` with Docker Desktop and the SSH key
loaded in Windows ssh-agent to reconnect. Stop with
`docker compose -f delivery/agent/compose.yaml stop` when unused.
Remote agent identity and workspace live in named Docker volumes outside Git.
The agent has administrative access to the same Docker host as Jenkins and
Gitea; a container is not a security boundary against malicious trusted jobs.
Use only reviewed delivery code. `agent/compose.droplet.yaml` caps the agent
at 512 MiB RAM / 768 MiB RAM+swap and 0.5 CPU; a dedicated pinned BuildKit
builder has 256 MiB / 384 MiB and 0.5 CPU. Builds select that builder explicitly.
Agent and builder restart unless stopped. `bootstrap/start-droplet-agent.sh`
is the root-operated installation/reconnect helper in
`/opt/ssw590-delivery-agent`; it detects the Docker socket group (987 on this host).
No public agent, Docker API or app port is added.
`bootstrap/start-agent.ps1` refuses to start the laptop copy by default.
For an intentional fallback, first stop the remote agent and builder, then use
`-AllowLaptopFallback`. Never connect both copies of the same node. Preserve
their volumes. The Gitea Actions manual-build runner subsequently moved to
The-Ocean too; see `../gitea/droplet-runner/README.md`. Neither active runner
now depends on Docker Desktop. Run manual builds and delivery releases sequentially.
See `RUNBOOKS.md`.
Ansible syntax, agent Compose configuration, and the installed Jenkins
controller's declarative parser checks passed. These are preparation checks;
@@ -73,12 +98,16 @@ controller's declarative parser checks passed. These are preparation checks;
## Remaining checkpoints
Vincent creates the issue, commits/pushes this branch, and obtains Billy's PR
review. Keep main protection. Billy/domain owner must add A records `staging`
and `app`, both pointing to `147.182.178.136`; distinct DNS names are required.
The prepared Caddy additions are not yet applied to the server. Enable the
Vincent pushed preparation commit `bf28adc` and opened PR #24. The later
migration changes are uncommitted and need the same review path. Create the
issue and obtain Billy's PR review. Keep main protection. Billy added the A
records; Google and Cloudflare now resolve both names to `147.182.178.136`.
On 15 November Caddy's prepared routes were validated and gracefully reloaded;
both names have trusted HTTPS and HTTP redirects. They currently return 502
because the app containers are not deployed. See `evidence/https-20261115.md`.
Enable the
release job after the reviewed source reaches main, then follow `RUNBOOKS.md`.
Keep the laptop awake during runs. Production approval requires an authorized
Keep Jenkins and the remote delivery node available. Production approval requires an authorized
human; an agent must not approve unattended.
`SECURITY.md` defines the gate policy. `bootstrap/` makes administrator setup