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
+101
View File
@@ -834,3 +834,104 @@ approvals, idempotence, both recovery exercises, timing/monitoring correlation
and final submission review remain pending. Proxy/monitoring additions are not
deployed before DNS and healthy production. No commit, push, peer review,
production approval or submission was performed by Codex.
Later on November 14, Vincent explicitly authorized Codex to make the local
preparation commit \texttt{bf28adc}; Vincent pushed it, and Codex verified the
remote branch and passing Jenkins head check. At Vincent's further request,
Codex prepared \path{delivery/BILLY-CLAUDE-DNS-HANDOFF.md} for Billy/Claude,
including the two selected A records, Namecheap instructions checked against
official documentation, current public DNS observations, verification commands
and a DNS-only boundary. The provider's default nameservers and existing
Gitea/Jenkins/Grafana A records were observed; the two new names still returned
NXDOMAIN. No DNS setting was changed, and the handoff itself grants no account
authorization. Billy must authorize DNS work in his own session.
Later that evening, Vincent directed moving the delivery agent onto the now
2\,GiB droplet because campus Wi-Fi had blocked SSH and the final presentation
must demonstrate the workflow. Codex checked repository state and host capacity,
transferred the existing tool image with matching archive SHA-256 and image ID,
stopped the laptop copy, and reused the protected node identity on The-Ocean.
It added a private WebSocket route, host-gateway SSH mapping with the existing
pinned key alias, 512/768 MiB agent and 256/384 MiB BuildKit RAM/RAM+swap caps,
half a CPU each, a guarded laptop fallback and versioned verification helpers.
The first builder setup exposed a socket-group mismatch (laptop 0, host 987);
the helper was corrected to detect the host group, and Docker access succeeded.
The first browser build request used stale session state; reloading allowed the
existing preflight job to run. Build 2 passed with real credential binding,
strict SSH verification and sudo. A separate 87-second preparation trial passed
control/app tests, source/dependency checks, capped build, full image gate and
temporary HTTP smoke. Swap increased and agent memory-limit events occurred;
no OOM kill was recorded. Existing services passed private HTTP checks, and
agent restart/reconnect passed. This does not establish full release performance.
An initial CLI artifact download returned HTTP 403; evidence was retrieved over
authorized SSH instead. A complex shell diagnostic had a quoting error and was
replaced by a versioned read-only Python check. No credential values were output.
Codex updated the diagram, current host/credential hints, runbooks, DNS handoff,
preparation evidence, history and this log, and rebuilt/reviewed the local manual.
The older PDF runner remains on the laptop; campus browser access still needs
rehearsal. Shared-host Docker administration is an explicit lab trade-off.
No firewall rule, credential scope, review requirement or production approval
was relaxed. DNS, assessed releases and recovery exercises remain pending.
No additional commit or push was authorized or performed for this migration.
\section{Actions Runner Migration for the Presentation}
Date requested: November 14, 2026; Tool: OpenAI Codex; Human: Vincent Sun.
Vincent then explicitly requested moving the first (Gitea Actions) runner to
the droplet too. Codex read the runner/workflow sources and repository rules,
checked headroom, and transferred the tested compiler image with matching
archive checksum and image ID. It stopped the idle laptop daemon before
streaming the existing registration over pinned SSH into protected Docker
storage. No registration value was printed, staged in the repository, or
replaced; the legacy name/label and repository scope were preserved.
Codex added versioned remote Compose, admission, reconnect/import and read-only
verification helpers plus a guarded laptop fallback. The first 96 MiB daemon
cap was too low: a real OOM event and restart occurred during action setup.
Codex canceled that attempt, retained its log and runtime evidence, raised
the daemon to 192/256 MiB RAM/RAM+swap with 0.25 CPU, and retried. Separate
compiler job limits remained 512/768 MiB and 0.5 CPU. Run 12 attempt 3, job 14,
passed checkout, compilation and both uploads in 4m32s. It used reviewed main
\texttt{8beefde}, not the uncommitted Assignment 8 source. After a browser
download-wait timeout and debugger detachment, Vincent supplied diagnostics
in run-12. Codex retrieved the exact PDF through read-only artifact metadata
and storage over SSH, verified its checksum against those diagnostics, and
visually checked \texttt{5.1+build.12.8beefde}. This does not demonstrate the
pending application releases or recovery exercises.
The corrected daemon had no restart during the successful run; idle restart
and declaration succeeded at 04:55:52 UTC on November 15. Codex identified
the canceled job's orphaned resources for cleanup, preserved registration and
shared services, and updated operations, migration evidence, host/credential
hints, history and this record. Both active runners are on The-Ocean; no new
cloud instance or resize was made. Resource admission does not coordinate
Jenkins, so manual builds and delivery releases must run sequentially. Shared
Docker authority remains a documented trust trade-off. Campus browser rehearsal,
DNS and assessed delivery remain pending. No further commit or push was requested.
\section{DNS, HTTPS and Team Account Check}
Date: November 15, 2026; Tool: OpenAI Codex; Human: Vincent Sun; DNS: Billy Ye.
Vincent reported that Billy had added the records but HTTPS was unavailable,
and asked for server-side correction. Codex checked repository instructions,
status, official Caddy HTTPS documentation, live DNS, proxy configuration and
container state. It verified that the prepared routes were absent and app
backends undeployed. A guarded helper first stopped on CRLF/LF comparison;
normalizing only line endings confirmed the earlier routes matched. Codex
validated the candidate, saved a protected backup and gracefully reloaded Caddy
while preserving the bind inode, prior routes, allowlists and certificate state.
Google/Cloudflare answers and normal curl/Python checks verified DNS, trusted
hostname-matching TLS and HTTP 308 redirects. HTTPS 502 was correctly recorded
as missing backend deployment, not a certificate failure or healthy release.
Existing service checks passed. No DNS account, firewall or application release
was changed; production monitoring remains pending.
Vincent also requested a team-account check for access recovery. Codex queried
only account IDs/status/role flags and Jenkins profile-header IDs, never password
hashes, tokens or email fields. The expected Billy accounts were present, and
the existing vsun1 Gitea site-admin role was confirmed and corrected in the
hints table. Grafana's vsun1 remains Viewer. No password was recovered or reset,
and no permission was changed. Codex explained the distinction between checking
an account, recovering a password-manager copy and resetting an existing login.
It updated current readiness records, the preserved DNS handoff, history and
this log, then rebuilt and visually checked the local manual. Source changes
remain uncommitted; peer review, app releases, approvals and recoveries remain pending.
+1 -1
View File
@@ -42,7 +42,7 @@
\newcommand{\CourseName}{DevOps}
\newcommand{\Authors}{Vincent Sun and Billy Ye}
\newcommand{\Organization}{Stevens Institute of Technology}
\newcommand{\DocumentDate}{11/14/2026}
\newcommand{\DocumentDate}{11/15/2026}
\newcommand{\DueDate}{November 13, 2026 (team reports an extension)}
% CI writes this ignored file in its checkout; ordinary local builds stay unchanged.
\providecommand{\CIBuildSuffix}{}
@@ -42,6 +42,9 @@ The runner requests work from the same HTTPS service and has no public
submission listener.
\section{Runner Setup}
This section preserves the October 7 setup. The November migration recorded
at the end of this chapter supersedes its laptop placement and start procedure.
The repository-scoped \gls{build-runner} \texttt{ssw590-vince-local}, version 2.3.0,
runs as Docker container \texttt{ssw590-local-runner} on Vincent's Windows
laptop using Docker Desktop's Linux engine. Its \texttt{latex-local} label
@@ -353,4 +356,38 @@ was merged and issue \#12 is closed (re-checked in Gitea on October 22), and
the merged-\texttt{main} workflow run~6 passed (verified by Vincent on
October 21). The paragraph above is kept as the version 3.4 record.
\section{November 2026 Runner Migration}
On November 14 Vincent requested moving this runner to the existing 2\,GiB
The-Ocean droplet for the final demonstration. Codex stopped the laptop daemon,
transferred the same compiler image with archive checksum and image-ID checks,
and streamed the existing registration over pinned SSH directly into a protected
Docker volume. No registration value entered the repository or output. The
historical name \texttt{ssw590-vince-local} and label \texttt{latex-local} remain;
the active container is \texttt{ssw590-manual-runner}. Repository scope is unchanged.
The first 96 MiB daemon trial exceeded its memory cap during action setup and
restarted. Its attempt was canceled and retained as failure evidence. With the
daemon raised to 192 MiB RAM / 256 MiB RAM+swap and 0.25 CPU, the
\href{https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions/runs/12/jobs/14}{run 12 attempt 3 job}
passed checkout, compilation and both uploads in 4m32s (compilation 1m42s).
It rebuilt reviewed main commit \texttt{8beefde}, not Assignment 8's uncommitted
preparation. Diagnostics and the retrieved PDF checksum match; the opened title
shows \texttt{5.1+build.12.8beefde}. This is migration evidence, not an Assignment 8 release.
Compiler jobs have separate 512/768 MiB RAM/RAM+swap, 0.5 CPU and 256 PID
caps. No host port or job Docker socket mount is added. TLS checks remain
enabled. New-job admission pauses below 600 MiB available host RAM or 3 GiB
free disk; it does not reserve resources or coordinate Jenkins. Run manual
builds and delivery releases sequentially. The runner still has administrative
Docker authority over the shared host, so workflow editors remain trusted.
The daemon uses \texttt{unless-stopped}; idle restart/reconnect passed at
04:55:52 UTC on November 15 (the request was November 14 Eastern).
\path{gitea/droplet-runner/README.md} records operations and fallback;
\path{gitea/droplet-runner/EVIDENCE.md} links the dated evidence. The original
laptop identity/image are retained but inactive. Its helper requires
\texttt{-AllowLaptopFallback} after stopping the remote copy. VS maintains the
runner and BY the host; no new cloud instance or resize was made. Hosts and
hints-only Passwords tables reflect current placement.
\endgroup
+3
View File
@@ -12,6 +12,9 @@ link each entry to the changed chapter, table, figure, or controlled artifact.
\multicolumn{4}{l}{\small\itshape Document Update History (continued)}\\
\toprule \textbf{Date / Version} & \textbf{Author Initials} & \textbf{Change} & \textbf{Changed At}\\ \midrule
\endhead \bottomrule \endlastfoot
November 15, 2026 / 6.0 DNS and TLS readiness & BY, VS, CDX & Billy added staging/app DNS. Codex validated and gracefully applied the prepared Caddy routes, preserving prior services and storage; verified public DNS, trusted TLS and HTTP redirects. Recorded expected 502 responses while app backends remain undeployed. Updated current DNS/HTTPS inventory and the verified vsun1 Gitea administrator role. No passwords, permissions or releases changed. & \ChapterRef{SecureDelivery}, \ChapterRef{HostsPasswords}, \ChapterRef{AIPromptLog}\\
November 14, 2026 / 6.0 Actions runner migration & VS, CDX & Moved the existing manual runner and compiler image to The-Ocean without re-registration. Corrected an initial low-memory failure, verified reviewed-main run 12 attempt 3, artifact checksum/title and idle restart. Added daemon/job caps, admission checks and fallback guards; updated current host/credential hints and retained October evidence. Both active runners now use the droplet. & \ChapterRef{AutomatedManualBuild}, \ChapterRef{HostsPasswords}, \ChapterRef{AIPromptLog}\\
November 14, 2026 / 6.0 agent migration & VS, CDX & At Vincent's direction, moved the trusted delivery agent to the existing 2\,GiB droplet to remove campus SSH dependence. Added agent and builder resource caps, private deployment routing with pinned host verification, restart/fallback procedures, preflight build 2 and a passing bounded build/scan/smoke trial. Documented shared-host Docker authority, swap use and the unchanged laptop PDF runner. Updated the architecture, Hosts and hints-only Passwords tables, handoff and AI log; assessed releases and campus browser rehearsal remain pending. & \ChapterRef{SecureDelivery}, \ChapterRef{HostsPasswords}, \ChapterRef{AIPromptLog}\\
November 14, 2026 / 6.0 preparation & VS, CDX & Prepared Assignment 8 with instructor v1 source, exact dependencies/base digest, trusted laptop Jenkins agent, security gates, Ansible, restricted production approval and recovery automation. Recorded actual local checks and passing agent prerequisite build 1. Vincent resized the droplet to 2\,GiB and updated packages; Codex configured deployment access, folder-scoped credentials and a disabled release job after backups. Added planned proxy/monitoring changes, architecture and runbooks. Updated Hosts and hints-only Passwords tables. Reviewed release commits, DNS/TLS, v1/v2 promotion, both recoveries and final evidence remain pending; this is a preparation draft. & \ChapterRef{SecureDelivery}, \ChapterRef{HostsPasswords}, \ChapterRef{AIPromptLog}\\
October 28, 2026 / 5.1 & VS, CDX & Reviewed run-11 against instructor Chapter 5; added Vincent's external IPv4/IPv6 TCP retest (18 expected outcomes), pinned deployment links to the reviewed merge, recorded final PR approval and CI/build results, and qualified timing, sampling, and memory-pressure conclusions. Documented local TinyTeX builds to one ignored PDF. Hosts and Passwords tables are unchanged because no deployed service, account, or credential changed. & \ChapterRef{SREMonitoring}, \ChapterRef{AIPromptLog}\\
October 28, 2026 / 5.0 & BY, CD & Assignment 7: added \ChapterRef{SREMonitoring}. Deployed Prometheus, Grafana OSS, Node Exporter, and Blackbox Exporter on The-Ocean (pinned by digest, memory-capped, no host ports) after a capacity trial on the 1\,GiB plan; disabled four unused host services and added a second swap file; added \texttt{metrics.yebilly.me} behind the Jenkins allowlist and a private probe network. Recorded the dashboard, normal-build comparison, SLI/SLO worked example and measured window, contact-point, capacity-alert, collection-health, and Jenkins-outage tests with Discord notifications, restart persistence, blameless review, and improvement issues \#20 and \#21. After an independent review of the draft: added the collection-health rule and its test, replaced the initial Grafana administrator password, ran Blackbox Exporter as non-root, and added runbooks, network and storage detail in the diagram, host CPU checks, a targets table, citations with a Bibliography, and four corrected figures. \textbf{Updated the Hosts table} (monitoring containers, ports, volumes, \texttt{metrics} DNS, swap, monitoring and backup status) and \textbf{the Passwords table} (Grafana accounts, monitoring secrets file, Discord webhook). Set the Assignment 7 title page and abstract; added glossary terms. & Title and abstract, \ChapterRef{SREMonitoring}, \ChapterRef{HostsPasswords}, \ChapterRef{AIPromptLog}\\
+45 -21
View File
@@ -21,7 +21,12 @@ file, and real monitoring status; the Passwords table gained the Grafana
accounts, the monitoring secrets file, and the Discord webhook.
On November 14, 2026 (\ChapterRef{SecureDelivery}), Vincent resized the droplet
to 2\,GiB and updated host packages. The tables gained deployment access and a
trusted laptop Jenkins agent. Pricing DNS and deployments remain pending.
trusted Jenkins agent. Later that evening the agent moved from the laptop to
The-Ocean to avoid campus SSH restrictions. Vincent then requested migrating
the original Actions runner too; both laptop daemons are now stopped, with
their protected fallback state retained. On November 15 Billy added the pricing
DNS records and Codex enabled Caddy HTTPS; certificates and redirects passed,
while the undeployed application backends return 502.
\section{Hosts}
\small
@@ -37,6 +42,16 @@ Role & Gitea work hub (Gitea 1.27.3 behind Caddy 2.11.4 TLS proxy); since
since 28 Oct 2026 also the monitoring stack (Prometheus 3.15.1, Grafana OSS
13.2.5, Node Exporter 1.12.1, Blackbox Exporter 0.29.1). The Assignment 3 Color Buttons app (29 Sep 2026) is retired: container
stopped with restart policy \texttt{no}; its Caddy route remains\\
Delivery agent & Legacy node \texttt{ssw590-vince-delivery}, label
\texttt{delivery-trusted}, one exclusive executor; image
\texttt{ssw590-delivery-agent:20261114}. RAM / RAM+swap: 512 / 768 MiB,
0.5 CPU; separate pinned BuildKit: 256 / 384 MiB, 0.5 CPU.
Private WebSocket to Jenkins and SSH through Docker host gateway with pinned
public-IP host-key alias. Docker socket control grants host administration.
Named identity/workspace and BuildKit cache volumes stay outside Git;
configuration under \path{/opt/ssw590-delivery-agent/}; restart unless stopped.
Prerequisite build 2 and bounded build/scan/smoke trial passed; campus browser
rehearsal and assessed delivery remain pending.\\
Environment & Course production (team use)\\
Provider & DigitalOcean, NYC1; Ubuntu 24.04 LTS; 1 vCPU; resized from
512\,MB to 1\,GiB in October, then to 2\,GiB on November 14, 2026
@@ -44,7 +59,8 @@ Provider & DigitalOcean, NYC1; Ubuntu 24.04 LTS; 1 vCPU; resized from
each (second added 28 Oct 2026); \texttt{multipathd}, \texttt{fwupd},
\texttt{udisks2}, and \texttt{ModemManager} disabled and masked\\
Public address / DNS & IPv4 \texttt{147.182.178.136}; \texttt{A} records
\texttt{git}, \texttt{ci}, \texttt{metrics}, and \texttt{colors} \texttt{.yebilly.me}; public
\texttt{git}, \texttt{ci}, \texttt{metrics}, \texttt{colors}, \texttt{staging}
and \texttt{app} \texttt{.yebilly.me}; public
IPv6 \texttt{2604:a880:400:d1:0:5:22d:6001} assigned but not published in DNS\\
Private services & Gitea \texttt{:3000} and Jenkins \texttt{:8080} (512\,MiB
RAM, 0.75 CPU cap; agent port disabled) on Docker network \texttt{gitea\_web},
@@ -64,7 +80,9 @@ addresses (Caddy allowlist; \texttt{ci} also the probe address), 403
otherwise; monitoring ports 9090, 9100, 9115 not reachable\\
Owner & BY (server administration); VS (review)\\
HTTPS URLs & \url{https://git.yebilly.me}, \url{https://ci.yebilly.me/login},
\url{https://metrics.yebilly.me/login}\\
\url{https://metrics.yebilly.me/login}; \url{https://staging.yebilly.me} and
\url{https://app.yebilly.me} have trusted certificates but return 502 until
application deployment\\
Backup status & No scheduled backup job; manual Gitea SQLite and Jenkins-home
backups saved in a protected root directory before the November 14 delivery
bootstrap. Container-replacement persistence verified for
@@ -81,25 +99,29 @@ Shares the droplet's failure domain; no external check yet (issue~\#20)\\
\small
\begin{tabularx}{\linewidth}{@{}L{3.3cm}Y@{}}
\caption{Local build runner host, added October 7, 2026\label{Table:HostsRunner}}\\
\toprule \textbf{Field} & \textbf{Vincent's laptop (\texttt{ssw590-vince-local})}\\ \midrule
\caption{Actions runner, added October 7 and migrated November 14, 2026\label{Table:HostsRunner}}\\
\toprule \textbf{Field} & \textbf{Actions runner on The-Ocean}\\ \midrule
\endfirsthead
\toprule \textbf{Field} & \textbf{Vincent's laptop (\texttt{ssw590-vince-local})}\\ \midrule
\toprule \textbf{Field} & \textbf{Actions runner on The-Ocean}\\ \midrule
\endhead
\bottomrule \endlastfoot
Role & Repository-scoped Gitea Actions runner; manual compilation in temporary Docker job containers\\
Environment & Windows laptop, Docker Desktop Linux engine; runner 2.3.0; capacity one job\\
Provider / owner & Local device; VS maintains Docker Desktop, runner availability, and job image\\
Role & Repository-scoped Gitea Actions runner; temporary manual compiler containers;
historical registration name \texttt{ssw590-vince-local} retained\\
Environment & Docker on The-Ocean's Ubuntu 24.04 host; runner 2.3.0;
capacity one job; current container \texttt{ssw590-manual-runner}\\
Provider / owner & Existing DigitalOcean host; VS maintains runner and image;
BY retains server administration; no new instance or resize\\
Network path & Outbound HTTPS to \texttt{git.yebilly.me:443} and GitHub Actions sources; Caddy forwards to private Gitea \texttt{:3000}; no public runner or Docker daemon port\\
Execution label & \texttt{latex-local}; local image \texttt{ssw590-manual-ci:20261007}\\
Persistent state & Runner registration in named Docker volume \texttt{ssw590-local-runner-data}; compiler image retained in Docker Desktop\\
Availability & Start Docker Desktop and the versioned runner helper after reboot; laptop must remain awake for jobs\\
Assignment 8 agent & Separate Jenkins node \texttt{ssw590-vince-delivery},
label \texttt{delivery-trusted}, one exclusive executor; Docker/Python/Ansible/
scanners in image \texttt{ssw590-delivery-agent:20261114}; 2\,GiB / 2 CPU cap;
outbound HTTPS/WebSocket to Jenkins. Docker socket access is administrative.
Identity in \texttt{ssw590-delivery-identity}, workspace/cache in
\texttt{ssw590-delivery-workspace}; prerequisite build 1 passed on November 14.\\
Persistent state & Registration in Droplet volume \texttt{ssw590-local-runner-data},
mode 0600; same tested compiler image on the host. Stopped laptop copy retains
its original image and volume outside Git\\
Availability / limits & Restart unless stopped; daemon 192/256 MiB RAM/RAM+swap,
0.25 CPU; compiler job 512/768 MiB, 0.5 CPU. New jobs pause below 600 MiB
available host RAM or 3 GiB free disk. Run manual and delivery work sequentially\\
Laptop fallback & Both original daemons are stopped. Their helpers require
\texttt{-AllowLaptopFallback} after stopping the corresponding remote copy;
never run two copies of either identity. No active runner requires Docker Desktop\\
Monitoring / backup & Runner logs and Gitea Actions checked manually; no automatic backup of runner registration configured\\
\end{tabularx}
\normalsize
@@ -114,9 +136,11 @@ Monitoring / backup & Runner logs and Gitea Actions checked manually; no automat
\toprule \textbf{Service / account} & \textbf{Owner} & \textbf{Where it is kept (hint)} & \textbf{Privilege}\\ \midrule
\endhead
\bottomrule \endlastfoot
Gitea local runner identity & VS & Docker volume \texttt{ssw590-local-runner-data}, file \texttt{/data/.runner}; generated identity, no values in Git; registration token supplied privately from repository settings & Repository runner; Docker control on VS laptop\\
Jenkins delivery agent identity & VS & Protected Jenkins-generated identity and local Docker volume
\texttt{ssw590-delivery-identity}; outside Git & Trusted laptop agent; Docker control\\
Gitea Actions runner identity & VS & Droplet Docker volume \texttt{ssw590-local-runner-data},
file \texttt{/data/.runner}, mode 0600; transferred over pinned SSH, no values in Git;
stopped laptop fallback retains its copy & Repository runner; Droplet Docker control\\
Jenkins delivery agent identity & VS & Protected Jenkins-generated identity and Droplet Docker volume
\texttt{ssw590-delivery-identity}; stopped laptop fallback retains its copy; outside Git & Trusted Droplet agent; host Docker control\\
Deployment SSH key & VS & Jenkins folder \texttt{secure-delivery}, credential
\texttt{delivery-deploy-ssh}; encrypted in Jenkins home & \texttt{deploy} SSH;
passwordless root sudo for Ansible\\
@@ -128,7 +152,7 @@ distinct named token under Gitea \texttt{vsun1}; no value in report & Package wr
Package-read token & VS & Root Docker login configuration on The-Ocean;
distinct named token under Gitea \texttt{vsun1}; bootstrap metadata retains name & Package read only\\
Gitea \texttt{bill} & BY & BY's password manager & Site administrator\\
Gitea \texttt{vsun1} & VS & VS's password manager & Repository administrator\\
Gitea \texttt{vsun1} & VS & VS's password manager & Site administrator (verified November 15)\\
Gitea \texttt{jenkins-bot} (added 22 Oct 2026) & BY & BY's password manager; used only to create its token & Write collaborator on \texttt{vpn-dns-gateway}\\
\texttt{jenkins-bot} token \texttt{jenkins-ci} & BY & Jenkins credential ID \texttt{gitea-jenkins-bot} (System, Global), encrypted in volume \texttt{gitea\_jenkins-home}; revoke under the bot's Gitea Applications settings & Repository read/write; organization and user read\\
Jenkins \texttt{billy} & BY & BY's password manager & Administer (all)\\
+66 -23
View File
@@ -6,8 +6,9 @@
Assignment 8 implements Chapter 6 of instructor manual version 1.43, using its
Startup Pricing Service and the existing Gitea, Jenkins, Caddy and monitoring
foundation. The Canvas page lists November 13, 2026 at 11:59pm; Vincent reports
an extension. This version records preparation on November 14, not a completed
release exercise. \textbf{It is not ready for submission.} Reviewed v1/v2
an extension. This version records preparation begun November 14 and DNS/TLS
readiness verified November 15, not a completed release exercise.
\textbf{It is not ready for submission.} Reviewed v1/v2
publication, promotion, production rollback, staging failure/recovery and
monitoring correlation remain pending. No approval, release digest or successful
deployment is inferred from a tool installation or local smoke test.
@@ -31,8 +32,9 @@ identity and pricing are verified separately.
data/.style={box,draw=devopsGray,fill=gray!12,font=\scriptsize},
planned/.style={box,dashed,fill=devopsLightBlue},
flow/.style={-{Latex},thick}, note/.style={font=\scriptsize,align=center,fill=white,inner sep=1pt}]
\node[box] (agent) at (4.8,2.7) {Vincent's laptop\\Trusted delivery agent\\Docker, scans and Ansible};
\node[data,text width=3.8cm] (local) at (0,2.7) {Local Docker volumes\\\texttt{ssw590-delivery-identity}\\\texttt{ssw590-delivery-workspace}};
\node[box] (agent) at (4.8,2.7) {Droplet delivery agent\\512 MiB / 0.5 CPU\\Docker, scans and Ansible};
\node[data,text width=3.8cm] (local) at (0,2.7) {Agent volumes on droplet\\\texttt{ssw590-delivery-identity}\\\texttt{ssw590-delivery-workspace}};
\node[box] (builder) at (9.6,2.7) {Pinned BuildKit builder\\256 MiB / 0.5 CPU\\Private Docker control};
\node[box] (git) at (0,0) {Gitea + OCI registry\\\texttt{git.yebilly.me}\\SQLite retained};
\node[box] (jenkins) at (4.8,0) {Jenkins controller\\\texttt{ci.yebilly.me}\\Schedules trusted job};
\node[box] (host) at (9.6,0) {The-Ocean host\\\texttt{deploy} SSH account\\Python, Docker/Compose};
@@ -53,10 +55,11 @@ Proxy bind mount & \texttt{/root/gitea/Caddyfile} $\rightarrow$ \texttt{/etc/cad
Monitoring mounts & \texttt{/root/monitoring/}: configuration (ro); host \texttt{/} $\rightarrow$ \texttt{/host} (ro)\\
Planned app config & \texttt{/opt/startup/pricing-\{staging,production\}}; no app data volume
\end{tabular}};
\node[draw,dashed,rounded corners,fit=(git)(host)(monitor)(prod)(storage),
\node[draw,dashed,rounded corners,fit=(agent)(local)(builder)(git)(host)(monitor)(prod)(storage),
inner sep=0.55cm,label={[font=\small]below:Existing droplet: 1 vCPU, 2 GiB RAM, 25 GB plan disk}] {};
\draw[flow,dotted] (local)--(agent);
\draw[flow] (agent)--node[note,right,pos=0.25]{HTTPS}(jenkins);
\draw[flow] (agent)--node[note,right,pos=0.25]{private WS}(jenkins);
\draw[flow] (agent)--node[note,above]{build}(builder);
\draw[flow] (agent.south west)--node[note,above,sloped]{Git / OCI}(git.north east);
\draw[flow] (agent.south east)--node[note,above,sloped]{SSH}(host.north west);
\draw[flow] (git)--node[note,above]{hook}(jenkins);
@@ -69,20 +72,42 @@ Planned app config & \texttt{/opt/startup/pricing-\{staging,production\}}; no ap
\caption{Preparation architecture. Solid boxes are installed; dashed blue boxes
and connections are planned application work. Gray boxes identify durable state
or read-only mounts. Pricing is stateless; each environment retains only its
Compose and release files on the host. The agent and its Docker socket are on
the laptop, outside the droplet.}
Compose and release files on the host. The agent and builder now share the
droplet; deployment SSH uses Docker's host gateway with the original pinned
host-key alias. Browser access remains through Caddy HTTPS.}
\label{Figure:SecureDeliveryArchitecture}
\end{figure}
The exclusive node \texttt{ssw590-vince-delivery} has one executor and label
\texttt{delivery-trusted}. It connects to Jenkins over HTTPS/WebSocket, with no
published agent or Docker API port. Docker socket membership (group 0 in the
Linux VM) grants administrative Docker control. The \texttt{deploy} account's
\texttt{delivery-trusted}. Originally installed on Vincent's laptop, it now runs
on The-Ocean because campus networking blocks SSH from the laptop. Its legacy
node name is retained and its description records the new location. It connects
to \texttt{jenkins:8080} over private HTTP/WebSocket, with no published agent
or Docker API port. Docker socket membership (group 987 on this host) grants
administrative control over the same host as Jenkins, Gitea and monitoring;
containerization is not isolation from malicious Docker-authorized jobs.
The \texttt{deploy} account's
\texttt{NOPASSWD} sudo permits root commands for Ansible; a separate account
does not remove that administrative authority. Its authorized key disables SSH
forwarding and PTY allocation. The host's ED25519 key was read through the
existing strictly pinned administrator SSH connection and stored as a Jenkins
file credential; verification is not disabled.
file credential; verification is not disabled. A mounted SSH configuration
maps the existing inventory address to \texttt{host.docker.internal}, retaining
\texttt{HostKeyAlias 147.182.178.136}. Thus neither the Jenkins-agent connection
nor deployment SSH crosses campus Wi-Fi. Campus browser HTTPS access still
needs rehearsal. The Gitea Actions PDF runner subsequently moved to The-Ocean
too; \ChapterRef{AutomatedManualBuild} records its separate migration and real
workflow verification. Neither active runner now requires Docker Desktop.
Keep manual compilation and delivery releases sequential on the shared host.
The agent is capped at 512 MiB RAM / 768 MiB RAM+swap and 0.5 CPU, with a
96 MiB Java heap. Its separate pinned BuildKit container is capped at 256 MiB /
384 MiB and 0.5 CPU; builds explicitly select that builder because a Docker
socket does not make child containers inherit agent limits. Both use
\texttt{unless-stopped}. Agent restart/reconnect was verified at 03:57:57 UTC.
The laptop copy is stopped and its helper now requires an explicit fallback
switch; two copies must never connect as the same node. VS maintains the agent;
BY retains host administration. No extra instance or plan resize was made.
Deployment credentials belong to the \texttt{secure-delivery} Jenkins folder,
not the root multibranch PR job. That job retains its earlier ordinary tests,
@@ -117,11 +142,23 @@ Werkzeug 3.1.9. No claim is made that a pinned version remains vulnerability-fre
Runtime constraints & UID 10001; one Gunicorn worker; 64 MiB RAM / 96 MiB
RAM+swap; 0.25 CPU; 64 PIDs; read-only root; 16 MiB temporary filesystem;
all capabilities dropped and no host application port.\\
Jenkins prerequisite run &
Initial Jenkins prerequisite run &
\href{https://ci.yebilly.me/job/secure-delivery/job/agent-preflight/1/}{Agent preflight build 1}
passed on November 14 at 20:46 UTC, including strict-key SSH as deploy and
noninteractive sudo. \path{delivery/evidence/agent-preflight-1.txt} preserves
its non-secret inventory. This run did not deploy an application.\\
Remote agent migration &
At 03:47 UTC on November 15 (November 14 Eastern),
\href{https://ci.yebilly.me/job/secure-delivery/job/agent-preflight/2/}{preflight build 2}
passed on The-Ocean with real credentials, pinned host verification and sudo.
\path{delivery/evidence/agent-preflight-2.txt} preserves the inventory.\\
Remote capacity trial & At 03:50--03:51 UTC, a preparation snapshot passed
12 control tests, 3 app tests, source/dependency gates, a limited image build,
the full image gate and a temporary 64 MiB HTTP smoke test. Its source identity
was \texttt{uncommitted-remote-preflight}; nothing was published or promoted.
Observed available RAM exceeded 700 MiB; swap used rose from 263 to 372 MiB.
Agent memory-limit events occurred, but no OOM kill was recorded. This short
trial does not establish full release or presentation performance.\\
Local tests & Three Flask tests passed; a generated wrong-price assertion
failed as intended; twelve release/security-control tests passed. Gunicorn
health/identity/price/invalid-input smoke checks passed under the stated cap.
@@ -228,16 +265,22 @@ during migration and delays destructive changes until rollback is no longer
needed. This assignment does not add a database.
\section{Outstanding Work and Cleanup Boundary}
The domain owner must create two A records: \texttt{staging} and \texttt{app}.
Both must point to \texttt{147.182.178.136}. Neither resolved during
preparation. Distinct DNS hostnames are an explicit instructor requirement, so
an existing-host path substitute is not described as equivalent. The prepared
Caddy additions must be validated and reloaded after DNS is correct, without
removing earlier routes or certificate storage. The public application port is
HTTPS 443, with internal port 8000 remaining private.
Billy added A records for \texttt{staging} and \texttt{app}. On November 15,
Google and Cloudflare both returned \texttt{147.182.178.136} for each name,
with no AAAA answer. Codex validated the prepared Caddy additions, saved the
previous configuration and gracefully reloaded it while preserving the earlier
routes, allowlists, volumes and bind-mounted inode. Normal curl and Python TLS
checks confirmed trusted hostname-matching certificates, TLS 1.3 and HTTP 308
redirects. HTTPS currently returns 502 because the pricing backends have not
been deployed; this is not evidence of application health. Certificate and DNS
details are recorded in \path{delivery/evidence/https-20261115.md}. Existing
Gitea/Jenkins/Grafana checks still passed. The public application port is HTTPS
443, with internal port 8000 remaining private. Distinct DNS hostnames satisfy
the planned routing boundary; reviewed application releases remain outstanding.
The issue draft, feature branch and code are prepared locally. Issue creation,
commit/push, peer review/merge, both assessed releases, production approvals,
Vincent pushed preparation commit \texttt{bf28adc}; PR~\#24 exists. The later
agent migration and documentation changes remain local and uncommitted.
Issue creation, peer review/merge, both assessed releases, production approvals,
both recovery demonstrations, final traceability and monitoring evidence, and
the final submission review remain outstanding. Local checks are not a
replacement for those executions.
@@ -247,5 +290,5 @@ the two pricing projects, their routes, monitoring additions and test DNS.
Revoke their package tokens; retire deploy access and the delivery node/folder
after preserving job history. Do not prune Docker or use \texttt{down -v}.
Preserve earlier Gitea/Jenkins/proxy/monitoring services and all shared volumes.
The local agent, cache/identity volumes and protected remote backup are retained
The stopped laptop fallback, active remote agent, cache/identity volumes and protected remote backup are retained
while work and assessment remain in progress.