Allow constrained pricing health checks to complete

This commit is contained in:
2026-11-15 21:54:21 -05:00
parent a19fab34e3
commit 34f26e6948
15 changed files with 460 additions and 67 deletions
+6 -4
View File
@@ -3,10 +3,12 @@ commands, designs, and evidence. Assignment 8 implements secure delivery with
a trusted Jenkins agent, locked Flask/Gunicorn service, security gates,
Ansible, scoped deployment credentials and recovery runbooks. The prerequisite
jobs, DNS/TLS and deliberate Jenkins test/secret blocks passed. The reviewed v1
image was published with passing scans, but staging stopped at a terminal
request incompatible with the restricted deploy key. A noninteractive Ansible
preflight passed; its inventory correction awaits review/merge. Successful
v1/v2 deployment, approvals, rollback and staging recovery remain pending.
image was published with passing scans. After the noninteractive SSH correction
merged, staging passed health, identity and price checks, but its unchanged
rerun was blocked by a three-second Docker health deadline. Eight constrained
diagnostic probes passed with a ten-second deadline. That correction and the
required v2 source/test change await review as separate commits. Complete
v1/v2 promotions, approvals, rollback and staging recovery remain pending.
This draft is not ready for submission.
Assignment 7 introduced site reliability
engineering: Prometheus, Grafana OSS, Node Exporter, and Blackbox Exporter
+36
View File
@@ -971,3 +971,39 @@ source correction must be committed, reviewed and merged before a new v1 run.
Published-but-undeployed attempt records are not presented as known-good
rollback records. Successful promotions, human approvals, both recoveries and
monitoring correlation remain unexecuted.
\section{Pricing Health Deadline and v2 Preparation}
Date: November 15, 2026 Eastern (November 16 UTC); Tool: OpenAI Codex;
Human: Vincent Sun. After Vincent reported the fix merged, Codex checked the
repository requirements/status, verified Billy's PR~\#25 approval and merge
\texttt{a19fab3}, synchronized a clean branch and ran pricing build 4. Tests,
scans, publication and initial staging verification passed. The unchanged
rerun stopped because Docker reported the container unhealthy; no production
approval or deployment occurred. The noninteractive SSH correction worked.
Codex inspected only the staging container's health/state, logs, resource
counters and public health endpoint. Probes near three seconds sometimes hit
the three-second deadline; the app later recovered without restart and no OOM
kill was recorded. Codex tested a ten-second overall deadline in an isolated
temporary container using the same reviewed image and constraints, with no
network, published port or proxy alias. Eight checks passed in 2.817--5.660
seconds; CPU throttling occurred, but no diagnostic memory-limit/OOM event.
The diagnostic container was removed by its exact created ID. Its code/raw
JSON and actual build-4 reports were preserved. Existing staging was unchanged.
Codex changed only the image's overall health deadline, retaining the two-second
HTTP request timeout and other health/security/resource settings. It prepared
the required v2 source/test change locally; three functional and twelve control
tests passed. Docker Desktop was unavailable, so the functional tests used the
existing Windows Flask installation (Werkzeug 3.1.8 rather than the deployment
lock's 3.1.9); this was not represented as a passed locked Jenkins release.
Both remote runners remain independent of the laptop Docker daemon.
To reduce review cycles, Codex prepared instructions for two commits in one PR:
v1 health correction first, then v2 app/tests. A merge commit must preserve
both reviewed source SHAs for explicit Jenkins selection. No commit, push,
review or production approval was performed by Codex. It updated current
staging inventory, architecture, evidence, runbooks, history and this log,
and rebuilt/visually reviewed the ignored local PDF. Successful releases,
unchanged reruns, human approvals, known-good records and both recovery
exercises remain pending.
+1 -1
View File
@@ -36,7 +36,7 @@
% Replace these values for each assignment.
\newcommand{\AssignmentTitle}{Secure Delivery and Rollback -- Group}
\newcommand{\AssignmentNumber}{8}
\newcommand{\DocumentVersion}{6.1}
\newcommand{\DocumentVersion}{6.2}
\newcommand{\DocumentStatus}{Draft}
\newcommand{\CourseNumber}{SSW 590}
\newcommand{\CourseName}{DevOps}
+1
View File
@@ -12,6 +12,7 @@ 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.2 & VS, CDX & Verified PR~\#25's review/merge and ran pricing build 4: scans/publication and initial staging checks passed; the unchanged rerun blocked at the three-second Docker health deadline. Tested ten seconds under identical limits in an isolated temporary container: eight checks passed, then the container was removed. Prepared the health correction and separate v2 source/test change for one review preserving both commits. Updated staging inventory, diagram and actual evidence; Passwords hints are unchanged. No production approval or completed release is claimed. & \ChapterRef{SecureDelivery}, \ChapterRef{HostsPasswords}, \ChapterRef{AIPromptLog}\\
November 15, 2026 / 6.1 & VS, CDX & Verified Billy's latest review and Vincent's merge of PR~\#24; enabled delivery and recorded real blocked-test/secret runs and the first scanned, published v1 image. Preserved the staging SSH failure before any app change. Set Ansible to avoid PTY allocation and verified its credential-bound connection/sudo path in preflight build 3; the correction awaits review/merge before a release retry. Updated current evidence and retained the incomplete-submission status. Hosts and Passwords tables are unchanged: no service, account, credential or permission was added. & \ChapterRef{SecureDelivery}, \ChapterRef{AIPromptLog}\\
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}\\
+13 -5
View File
@@ -26,7 +26,10 @@ 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.
while the undeployed application backends returned 502. Later that evening
(November 16 UTC), build 4 deployed staging v1 and verified its HTTPS identity
and price; its unchanged rerun stopped on a Docker health timeout. Production
is still absent. No credential or permission changed during these runs.
\section{Hosts}
\small
@@ -50,8 +53,8 @@ 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.\\
Prerequisite builds 2/3 and preparation trials passed; build 4 reached staging
but its health rerun blocked. Campus rehearsal and completed promotion 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
@@ -73,6 +76,11 @@ each; Blackbox runs as \texttt{nobody}) on network \texttt{monitoring\_monitorin
\texttt{gitea\_probe} (172.30.90.0/28); volumes
\texttt{monitoring\_prometheus\_data} (7\,d / 500\,MB) and
\texttt{monitoring\_grafana\_data}\\
Staging application & Compose project \texttt{pricing-staging}, v1 on private
port 8000 with alias \texttt{pricing-staging}; 64/96 MiB RAM/RAM+swap, 0.25 CPU,
64 PIDs, UID 10001, read-only root and no published port. Configuration and
release metadata in \path{/opt/startup/pricing-staging}; no app data volume.
Initial HTTPS assertions passed; unchanged-rerun health gate blocked.\\
Exposed ports & 443/TCP and 80/TCP to all; 22/TCP to approved team addresses only
(Cloud Firewall \texttt{gitea-fw}); \texttt{ci.yebilly.me} and
\texttt{metrics.yebilly.me} answer only Stevens 155.246.0.0/16 and team
@@ -81,8 +89,8 @@ 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://staging.yebilly.me} and
\url{https://app.yebilly.me} have trusted certificates but return 502 until
application deployment\\
\url{https://app.yebilly.me} have trusted certificates. Staging v1 passed
initial HTTPS checks; production still returns 502 before 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
+83 -22
View File
@@ -8,9 +8,11 @@ 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. Preparation began November 14; DNS/TLS and the first reviewed
Jenkins gate runs were verified November 15. PR~\#24 is merged, the delivery
job is enabled, and the first reviewed v1 image is published. Its staging
deployment stopped at SSH before creating an application container.
\textbf{It is not ready for submission.} Successful v1/v2 staging and production,
job is enabled, and reviewed v1 images are published. After the SSH correction
merged, staging passed its initial HTTPS, identity and price checks. Its
unchanged rerun stopped at Docker's health deadline. A bounded timeout
diagnostic passed; the correction and v2 source/test change await review.
\textbf{It is not ready for submission.} Complete v1/v2 promotion,
production rollback, staging failure/recovery and monitoring correlation remain
pending. Published image metadata is not evidence of a successful deployment.
@@ -18,8 +20,8 @@ The instructor's v1 source and tests were copied from
\path{Examples/dosSecureDelivery/v1/} to \path{delivery/app/}. Flask validates
requests and calculates the price; Gunicorn serves it with one worker on private
port 8000. There is no payment processing, customer data or application volume.
For three units v1 returns USD 30; the separate v2 source/test change must return
USD 36. The image embeds its actual source commit during the build. Health,
For three units v1 returns USD 30; the prepared separate v2 source/test change
returns USD 36 in local tests. It has not been released. The image embeds its actual source commit during the build. Health,
identity and pricing are verified separately.
\section{Deployment and Trust Boundaries}
@@ -41,7 +43,7 @@ identity and pricing are verified separately.
\node[box] (host) at (9.6,0) {The-Ocean host\\\texttt{deploy} SSH account\\Python, Docker/Compose};
\node[box] (monitor) at (0,-2.8) {Prometheus, Grafana,\\Blackbox and Node Exporter\\Private metrics ports};
\node[box] (proxy) at (4.8,-2.8) {Caddy TLS proxy\\Public 80/443\\Private \texttt{gitea\_web} network};
\node[planned] (stage) at (9.6,-2.8) {Planned staging app\\\texttt{staging.yebilly.me}\\{\scriptsize\texttt{pricing-staging:8000}}};
\node[box] (stage) at (9.6,-2.8) {Staging v1 (gate blocked)\\\texttt{staging.yebilly.me}\\{\scriptsize\texttt{pricing-staging:8000}}};
\node[planned] (prod) at (9.6,-5.2) {Production app (planned)\\\texttt{app.yebilly.me}\\{\scriptsize\texttt{pricing-production:8000}}};
\node[data,text width=12.9cm,align=left] (storage) at (4.8,-8.45) {
\textbf{Persistent state and read-only mounts on The-Ocean}\\[3pt]
@@ -54,7 +56,7 @@ Prometheus & \texttt{monitoring\_prometheus\_data} $\rightarrow$ \texttt{/promet
Grafana & \texttt{monitoring\_grafana\_data} $\rightarrow$ \texttt{/var/lib/grafana}\\
Proxy bind mount & \texttt{/root/gitea/Caddyfile} $\rightarrow$ \texttt{/etc/caddy/Caddyfile} (ro)\\
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
Staging app config & \texttt{/opt/startup/pricing-staging}; production pending; no app data volume
\end{tabular}};
\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}] {};
@@ -64,14 +66,14 @@ Planned app config & \texttt{/opt/startup/pricing-\{staging,production\}}; no ap
\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);
\draw[flow,dashed] (host)--node[note,right]{apply}(stage);
\draw[flow] (host)--node[note,right]{apply}(stage);
\draw[flow,dashed] (host.east)--++(0.35,0)|-(prod.east);
\draw[flow,dashed] (monitor)--node[note,above]{probe}(proxy);
\draw[flow,dashed] (proxy)--node[note,above]{HTTP}(stage);
\draw[flow] (proxy)--node[note,above]{HTTP}(stage);
\draw[flow,dashed] (proxy.south east)--node[note,above,sloped]{HTTP}(prod.north west);
\end{tikzpicture}}
\caption{Preparation architecture. Solid boxes are installed; dashed blue boxes
and connections are planned application work. Gray boxes identify durable state
\caption{Current architecture. Solid boxes are installed, including staging;
production and its monitoring connection remain planned. 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 builder now share the
droplet; deployment SSH uses Docker's host gateway with the original pinned
@@ -217,9 +219,9 @@ timing and makes a nonzero changed count on the unchanged rerun a blocking error
\small
\begin{tabularx}{\linewidth}{L{2.1cm}Y Y}
\toprule Traceability field & v1 & v2\\\midrule
Source / config commits & Reviewed merge \texttt{09731ac}; SSH fix awaits review & Separate change pending\\
Registry digest / Jenkins release build & Published in build 3; full digest below & Not published / not run\\
Staging + unchanged rerun & SSH blocked before deployment; rerun not reached & Pending\\
Source / config commits & Reviewed \texttt{a19fab3}; health fix awaits review & Separate source/test change prepared\\
Registry digest / Jenkins release build & Published in builds 3 and 4; identifiers below & Not published / not run\\
Staging + unchanged rerun & Build 4: initial deploy passed, rerun blocked & Pending\\
Production approval / result & No approval or promotion yet & No approval or promotion yet\\
Recovery evidence & Healthy rollback pending & Staging failure/recovery pending\\
\bottomrule
@@ -249,6 +251,7 @@ HIGH/CRITICAL findings. The image was published and pulled back by exact digest.
\end{itemize}
Build 3 recorded these exact source/configuration and image identifiers:
\par\noindent\begin{minipage}{\linewidth}
\begin{Verbatim}[fontsize=\footnotesize,frame=single]
Source/configuration:
09731acb0370566471dd4e401e59bafe55e927dc
@@ -256,6 +259,7 @@ Image repository: git.yebilly.me/ssw590-group1/pricing
Registry digest:
sha256:cccd47f112f839f3443c88c4d16fd7a1ed0fec2100a26464156526d53ccc2695
\end{Verbatim}
\end{minipage}\par\smallskip
Staging failed at 22:26:39 UTC during Gathering Facts:
\texttt{PTY allocation request failed on channel 0}. The recap was
\texttt{ok=0 changed=0 unreachable=1 failed=0}, Ansible exit code 4. No app
@@ -272,8 +276,8 @@ exercises Ansible's actual connection/become path as well as plain SSH.
passed in 17 seconds at 22:50 UTC: Ansible ran \texttt{id -u} as root and
returned 0 without a terminal. Its \texttt{CHANGED} label describes the command
module's default reporting, not a pricing deployment or idempotence test.
This validates connection prerequisites only; the corrected configuration must
be reviewed and merged before the assessed release is retried.
This validated connection prerequisites only. Billy subsequently approved
PR~\#25 and Vincent merged it before pricing build 4, recorded below.
\begin{figure}[htbp]
\centering
@@ -295,12 +299,68 @@ Jenkins archives the complete reports. The ignored local evidence directory is:
\path{build/evidence/assignment8-execution/}
\end{quote}
\section{Staging Rerun and Health Deadline}
On November 16 at 01:46:19 UTC (November 15 Eastern), Billy approved PR~\#25;
Vincent merged it at 01:51:04 as \texttt{a19fab3}.
\href{https://ci.yebilly.me/job/secure-delivery/job/pricing/4/}{Pricing build 4}
ran from that reviewed source/configuration and took 198.101 seconds. Tests,
source/dependency gates and both image gates passed. Its exact identifiers are:
\par\noindent\begin{minipage}{\linewidth}
\begin{Verbatim}[fontsize=\footnotesize,frame=single]
Source/configuration:
a19fab34e39420811e73f91fcfbb82ee598bd74a
Image repository: git.yebilly.me/ssw590-group1/pricing
Registry digest:
sha256:63e2e3d49a5119b1064868b0b15b39a1719a60a632ff0ecdc3f676fcdc55de3b
\end{Verbatim}
\end{minipage}\par\smallskip
Initial staging deployment ran 02:01:48.628--02:02:58.341 UTC (69.713 seconds).
All health, version, source-SHA and quantity=3 total=30 checks passed:
\texttt{ok=10 changed=4 unreachable=0 failed=0}. The unchanged rerun ran
02:03:01.314--02:03:25.201 UTC (23.887 seconds) and stopped at Compose health:
\texttt{ok=4 changed=0 unreachable=0 failed=1}. Zero changes with a failed task
is not a passed idempotence gate. Production approval/deployment were skipped.
Docker reported \texttt{Health check exceeded timeout (3s)}. Completed probes
were near the same deadline. Gunicorn remained running, no OOM kill was
recorded, and staging later became healthy without a restart. A sampled
48.56 MiB usage was below the 64 MiB cap; memory-limit events occurred without
OOM events. This supports a deadline problem under the 0.25 CPU constraint,
not a general explanation for every possible health failure.
At 02:06:37--02:08:24 UTC, an isolated diagnostic ran the same reviewed v1 image
with identical UID, resource and filesystem restrictions, no Docker network,
no published port or proxy alias, and a ten-second overall health timeout.
The HTTP request retained its two-second timeout. Eight consecutive checks
passed in 2.817--5.660 seconds; CPU throttling was observed, with no memory-limit
or OOM events in the diagnostic container. Its exact newly created container ID
was removed in a finally block. Existing staging and shared services were
unchanged. The script and raw JSON are versioned beside the dated build-4
evidence under \path{delivery/evidence/}. This is a prerequisite experiment,
not a production release or a substitute for the unchanged-rerun gate.
The Dockerfile correction changes only the overall health timeout from three
to ten seconds. Endpoint, HTTP timeout, cadence, retries, startup period and
all resource/security limits remain unchanged. The branch also prepares v2
(version v2, unit price 12, total 36); three local functional tests and twelve
control tests passed. The local Windows functional environment used Flask 3.1.3
and Werkzeug 3.1.8; assessed Jenkins deployment remains locked to Werkzeug
3.1.9. Neither the candidate image nor v2 has been released.
Keep the v1 health fix and v2 application/test change in separate reviewed
commits, which may share one PR. Merge with a merge commit, preserving both
SHAs. Select the first commit for v1 and the second for v2. Each must pass the
full release path and its own real human approval; save and review actual
successful release records before recovery. No commit SHA is invented here.
\section{Release, Recovery and Monitoring Runbooks}
The versioned \path{delivery/RUNBOOKS.md} gives the executable sequence.
Vincent handles commits/pushes; Billy reviews repository changes. The v1
preparation is now on main, DNS/TLS are ready, and the two deliberate gate
demonstrations have run. Review/merge the noninteractive SSH correction, then
retry \texttt{release} using the corrected full main commit.
demonstrations have run. The SSH correction is merged. Review/merge the v1
health-timeout fix and separate v2 source/test commit, then retry
\texttt{release} with the reviewed v1 commit first.
Verify staging and changed=0 before a real human approval promotes v1. Save and
review its generated staging/production records. Apply the supplied v2 source
and test changes in another reviewed commit and repeat, expecting 36.
@@ -342,15 +402,16 @@ 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
redirects. Initially both backends returned 502. Build 4 subsequently deployed
staging v1, whose first HTTPS checks passed before the health rerun blocked;
production remains undeployed. 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; successful application deployment remains outstanding.
the planned routing boundary; completed application promotion remains outstanding.
PR~\#24 now includes the runner migration and HTTPS changes and is merged.
Issue creation, review/merge of the SSH correction, successful v1/v2 releases, production approvals,
Issue creation, review/merge of the health fix and v2, complete v1/v2 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.
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB