Record verified releases and prepare recovery exercises
This commit is contained in:
@@ -8,20 +8,20 @@ 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 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.
|
||||
job is enabled, and reviewed Jenkins builds 5 and 6 successfully promoted v1
|
||||
and v2 through staging and production using exact digests. Both unchanged
|
||||
staging reruns passed with zero changes, and Vincent approved each production
|
||||
operation in Jenkins. Production monitoring is live. The actual successful
|
||||
records are prepared for review before the two recovery exercises.
|
||||
\textbf{It is not ready for submission.} Healthy production rollback, deliberate
|
||||
staging failure/recovery and their measured timelines remain pending.
|
||||
|
||||
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 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,
|
||||
For three units v1 returns USD 30; the separate reviewed v2 release returns
|
||||
USD 36. Both were verified in staging and production. The image embeds its actual source commit during the build. Health,
|
||||
identity and pricing are verified separately.
|
||||
|
||||
\section{Deployment and Trust Boundaries}
|
||||
@@ -43,8 +43,8 @@ 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[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[box] (stage) at (9.6,-2.8) {Staging v2\\\texttt{staging.yebilly.me}\\{\scriptsize\texttt{pricing-staging:8000}}};
|
||||
\node[box] (prod) at (9.6,-5.2) {Production v2\\\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]
|
||||
\begin{tabular}{@{}ll@{}}
|
||||
@@ -56,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)\\
|
||||
Staging app config & \texttt{/opt/startup/pricing-staging}; production pending; no app data volume
|
||||
App configuration & \texttt{/opt/startup/pricing-\{staging,production\}}; 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}] {};
|
||||
@@ -67,13 +67,13 @@ Staging app config & \texttt{/opt/startup/pricing-staging}; production pending;
|
||||
\draw[flow] (agent.south east)--node[note,above,sloped]{SSH}(host.north west);
|
||||
\draw[flow] (git)--node[note,above]{hook}(jenkins);
|
||||
\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] (host.east)--++(0.35,0)|-(prod.east);
|
||||
\draw[flow] (monitor)--node[note,above]{probe}(proxy);
|
||||
\draw[flow] (proxy)--node[note,above]{HTTP}(stage);
|
||||
\draw[flow,dashed] (proxy.south east)--node[note,above,sloped]{HTTP}(prod.north west);
|
||||
\draw[flow] (proxy.south east)--node[note,above,sloped]{HTTP}(prod.north west);
|
||||
\end{tikzpicture}}
|
||||
\caption{Current architecture. Solid boxes are installed, including staging;
|
||||
production and its monitoring connection remain planned. Gray boxes identify durable state
|
||||
\caption{Current architecture after both releases: staging and production v2
|
||||
are installed, and the production health probe is live. 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
|
||||
@@ -219,10 +219,10 @@ 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 \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\\
|
||||
Source / config commits & Reviewed \texttt{34f26e6} & Reviewed \texttt{6bddbfb}\\
|
||||
Registry digest / Jenkins release build & Exact digest; build 5 SUCCESS & Exact digest; build 6 SUCCESS\\
|
||||
Staging + unchanged rerun & Passed; changed=0 on rerun & Passed; changed=0 on rerun\\
|
||||
Production approval / result & \texttt{vsun1}; total 30 verified & \texttt{vsun1}; total 36 verified\\
|
||||
Recovery evidence & Healthy rollback pending & Staging failure/recovery pending\\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
@@ -346,24 +346,123 @@ 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.
|
||||
3.1.9. At that preparation point neither candidate had been released; the
|
||||
following section records their subsequent assessed Jenkins runs.
|
||||
|
||||
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.
|
||||
Vincent kept the v1 health fix and v2 app/tests in separate commits within
|
||||
PR~\#26. Billy reviewed both; the merge preserved their SHAs for explicit
|
||||
Jenkins selection. Each then passed the full release path and its own real
|
||||
human approval. The actual successful selectors now await review before recovery.
|
||||
|
||||
\section{Successful v1 and v2 Releases}
|
||||
Billy approved PR~\#26 at 02:56:00 UTC on November 16 (November 15 Eastern).
|
||||
Vincent merged it at 02:57:42 as \texttt{231d115}, preserving both source commits.
|
||||
Actions manual workflow 15 passed in 2m7s before delivery began. The dedicated
|
||||
job first loads the reviewed main pipeline, then checks out the selected
|
||||
reviewed source ancestor; its selected source can therefore differ from the
|
||||
initial SCM-head metadata shown by Jenkins.
|
||||
|
||||
\small
|
||||
\begin{tabularx}{\linewidth}{L{3.3cm}Y Y}
|
||||
\toprule Actual result (UTC) & v1 & v2\\\midrule
|
||||
Jenkins release & \href{https://ci.yebilly.me/job/secure-delivery/job/pricing/5/}{Build 5 SUCCESS} & \href{https://ci.yebilly.me/job/secure-delivery/job/pricing/6/}{Build 6 SUCCESS}\\
|
||||
Full run including approval wait & 03:00:10--03:05:08; 297.214 s & 03:05:33--03:12:29; 415.707 s\\
|
||||
Initial staging & 59.160 s; ok=10, changed=3, failed=0 & 60.106 s; ok=10, changed=3, failed=0\\
|
||||
Unchanged staging rerun & 41.499 s; changed=0, failed=0 & 45.487 s; changed=0, failed=0\\
|
||||
Actual approver / UTC & \texttt{vsun1}, 03:04:01 & \texttt{vsun1}, 03:11:18\\
|
||||
Production deployment & 03:04:05--03:05:05; 60.403 s & 03:11:21--03:12:28; 66.234 s\\
|
||||
Quantity 3 in each environment & USD 30 & USD 36\\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
\normalsize
|
||||
|
||||
Each run passed twelve control tests and three Flask tests. Source-secret
|
||||
reports had zero findings, all nine locked dependency audits had zero
|
||||
advisories, and both pre-push and registry-digest image gates analyzed two
|
||||
targets with zero HIGH/CRITICAL findings. No exception was added. Each
|
||||
source-SHA image was built once, pushed/pulled and promoted by the same digest
|
||||
through both environments. HTTPS health, version, exact baked source and price
|
||||
assertions passed in production as well as staging.
|
||||
|
||||
The common image repository is \path{git.yebilly.me/ssw590-group1/pricing}.
|
||||
These are the exact selected source/configuration commits and registry digests:
|
||||
\par\noindent\begin{minipage}{\linewidth}
|
||||
\begin{Verbatim}[fontsize=\footnotesize,frame=single]
|
||||
v1 source/configuration:
|
||||
34f26e6948b7001ede8ca19f23b67a02082e6a9a
|
||||
v1 registry digest:
|
||||
sha256:59c880b2704f91668618d9a2ff0bc8fbab0af4239ceb916de261863890ef88d8
|
||||
\end{Verbatim}
|
||||
\end{minipage}\par\smallskip
|
||||
\noindent\begin{minipage}{\linewidth}
|
||||
\begin{Verbatim}[fontsize=\footnotesize,frame=single]
|
||||
v2 source/configuration:
|
||||
6bddbfba5a36e0e397537678ffb197e101fb0670
|
||||
v2 registry digest:
|
||||
sha256:efe8658a0adf0854038d58199652030cbd0ef70047a1c6ebc7b09906cf1ec88b
|
||||
\end{Verbatim}
|
||||
\end{minipage}\par\smallskip
|
||||
|
||||
The four JSON files under \path{delivery/releases/} are copied unchanged from
|
||||
these successful builds and pass the strict selector validation. They still
|
||||
need review/commit before recovery; earlier failed-attempt records were not
|
||||
substituted. Jenkins archives the full tests, scans, recaps and actual approval
|
||||
records. Dated human-readable and machine-readable evidence under
|
||||
\path{delivery/evidence/} preserves their timestamps, results and scan-report
|
||||
hashes. Full local archives remain in the ignored execution evidence directory.
|
||||
|
||||
\section{Live Production Monitoring and Observed Interruption}
|
||||
Only after healthy v1 production, at 03:08:11 UTC, the previously reviewed
|
||||
production health target and panel 8 were applied. The guarded helper checked
|
||||
public production health and the earlier configurations, validated with the
|
||||
installed promtool, saved protected backups, preserved bind-mounted inodes and
|
||||
reloaded Prometheus with SIGHUP. Grafana provisioned the dashboard change.
|
||||
Earlier probes/panels, volumes, retention, credentials and alert rules were
|
||||
preserved. The backup and applied hashes are recorded in the versioned evidence.
|
||||
\href{https://prometheus.io/docs/prometheus/latest/configuration/configuration/}{Prometheus documents runtime SIGHUP reload};
|
||||
\href{https://grafana.com/docs/grafana/latest/administration/provisioning/}{Grafana documents file provisioning}.
|
||||
Runtime verification was performed separately from syntax validation.
|
||||
|
||||
At 03:14:11 UTC all six scrape targets were up, all three HTTPS probes
|
||||
(Gitea, Jenkins and production) had value 1, and the reload-success metric was
|
||||
1. The actual Grafana UI displayed the new panel and production series while
|
||||
retaining its previous seven panels. At 03:28:08 both app containers were
|
||||
healthy v2 with the exact selected source; identity, health and total 36
|
||||
returned HTTP 200, and quantity 0 returned HTTP 400. Neither app had an OOM
|
||||
or memory-limit event in that captured container state.
|
||||
|
||||
The production history contained 40 samples and one HTTP 502 / \texttt{probe\_success=0}
|
||||
at \textbf{03:11:54.602 UTC}, inside v2's 03:11:21.802--03:12:28.037
|
||||
production deployment window. Its adjacent successful samples were
|
||||
03:11:24.602 and 03:12:24.602. This is evidence of an interruption during
|
||||
single-host Compose replacement, not a zero-downtime release. One failed
|
||||
30-second-cadence sample does not establish an exact 30-second outage; the
|
||||
two bounding successes were 60 seconds apart. The observed interval is shorter
|
||||
than the existing one-minute alert duration. No alert firing or notification
|
||||
is claimed without separate evidence. A blue/green cutover after replacement
|
||||
health would reduce this risk but is not implemented here.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\renewcommand{\theHfigure}{delivery.monitor.\arabic{figure}}
|
||||
\includegraphics[width=\linewidth,trim=320bp 0bp 0bp 0bp,clip]{images/assignment8-production-monitoring-20261115.jpg}
|
||||
\caption{Actual Grafana production panel after activation. The visible dip
|
||||
correlates with v2 replacement; exact UTC samples and HTTP 502 are retained
|
||||
in the dated runtime JSON. The display uses Eastern time.}
|
||||
\label{Figure:DeliveryProductionMonitoring}
|
||||
\end{figure}
|
||||
|
||||
\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. 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.
|
||||
demonstrations and both reviewed releases have run. The four successful release
|
||||
records must now be reviewed/committed before recovery. The patch in
|
||||
\path{delivery/exercises/} defines a staging-only port mismatch. Preserve a
|
||||
reviewed intermediate bad-configuration commit followed by its immediate revert;
|
||||
the final main template remains correct. Billy must review all three commits
|
||||
(records, fault, restoration), and a merge commit must preserve the bad SHA.
|
||||
Only the explicit staging-failure job selects that historical configuration.
|
||||
|
||||
For healthy production rollback, record detection/decision time, start the
|
||||
HTTPS observer, select the committed v1 production record and approve the
|
||||
@@ -381,10 +480,10 @@ before production. Restore/review the correct template and rerun
|
||||
total 36 and changed=0. Do not alter shared infrastructure or data to create
|
||||
the failure.
|
||||
|
||||
The production \texttt{/health} probe and Grafana availability panel are prepared
|
||||
in Git but not deployed while production is absent. Apply them after health is
|
||||
verified, keeping existing Gitea/Jenkins probes and host metrics. Correlate real
|
||||
Prometheus/Grafana samples with release/rollback times; 30-second scrapes and
|
||||
The production \texttt{/health} probe and Grafana availability panel are now
|
||||
live, as verified above. Future changes must preserve the existing Gitea/Jenkins
|
||||
probes and host metrics. Correlate actual Prometheus/Grafana samples with the
|
||||
remaining rollback and recovery times; 30-second scrapes and
|
||||
alert durations can miss a brief interruption. Uptime probes do not verify
|
||||
pricing. The observer in \path{delivery/ci/observe.py} records finer HTTPS
|
||||
samples without treating an intended failure as an observer-script failure.
|
||||
@@ -403,18 +502,20 @@ 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. 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
|
||||
staging v1, whose first HTTPS checks passed before the health rerun blocked.
|
||||
The later reviewed builds 5 and 6 completed promotion, and both environments
|
||||
were verified as healthy v2. 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; completed application promotion remains outstanding.
|
||||
the routing boundary; rollback and staging recovery remain outstanding.
|
||||
|
||||
PR~\#24 now includes the runner migration and HTTPS changes and is merged.
|
||||
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.
|
||||
The health correction, v2, both promotions and their human approvals are
|
||||
complete. Issue creation if still absent, review/merge of the successful records
|
||||
and preserved staging-only fault, both recovery demonstrations and their
|
||||
measured monitoring correlation, and final submission review remain outstanding.
|
||||
The diagnostic trials are not substitutes for the two remaining executions.
|
||||
|
||||
After grading, only when instructed, retain required evidence and remove only
|
||||
the two pricing projects, their routes, monitoring additions and test DNS.
|
||||
|
||||
Reference in New Issue
Block a user