Fix noninteractive Ansible deployment and record delivery gates
vpn-dns-gateway/pipeline/head This commit looks good
vpn-dns-gateway/pipeline/pr-main This commit looks good

This commit is contained in:
2026-11-15 18:07:48 -05:00
parent 09731acb03
commit 5b703edc79
15 changed files with 313 additions and 57 deletions
+88 -18
View File
@@ -6,12 +6,13 @@
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 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.
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,
production rollback, staging failure/recovery and monitoring correlation remain
pending. Published image metadata is not evidence of a successful deployment.
The instructor's v1 source and tests were copied from
\path{Examples/dosSecureDelivery/v1/} to \path{delivery/app/}. Flask validates
@@ -113,7 +114,7 @@ Deployment credentials belong to the \texttt{secure-delivery} Jenkins folder,
not the root multibranch PR job. That job retains its earlier ordinary tests,
plus Python syntax and release-control tests; it does not bind delivery
credentials or a Docker socket. The new release job loads
\path{delivery/Jenkinsfile} from protected main and is currently disabled.
\path{delivery/Jenkinsfile} from protected main and was enabled after PR~\#24 merged.
Only trusted reviewed code may use the privileged node. Exclusive scheduling
is not a defense against an administrator or an author permitted to select that
node; the two-member repository and Jenkins administration remain trust boundaries.
@@ -166,7 +167,7 @@ Its baked identity was explicitly \texttt{uncommitted-preflight}, not a release
Local scans & Source/dependency gates passed; a generated synthetic secret
blocked the gate. At 20:32 UTC the complete runtime-image gate passed with no
HIGH/CRITICAL findings. Reports and exit codes remain in ignored local evidence.
Assessed Jenkins gate runs and published-image scans remain pending.\\
Later assessed Jenkins runs and published-image scans are recorded below.\\
\bottomrule
\end{longtable}
\normalsize
@@ -216,20 +217,90 @@ 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 & Pending review and merge & Separate change pending\\
Registry digest / Jenkins release build & Not published / not run & Not published / not run\\
Staging + unchanged rerun & Pending & Pending\\
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\\
Production approval / result & No approval or promotion yet & No approval or promotion yet\\
Recovery evidence & Healthy rollback pending & Staging failure/recovery pending\\
\bottomrule
\end{tabularx}
\normalsize
\section{Reviewed Gate Runs and Deployment Correction}
Billy approved the updated PR~\#24 head \texttt{ed0a862} at 21:06 UTC on
November 15; Vincent merged it as \texttt{09731ac} at 21:59 UTC. The resulting
Actions manual build 13 passed in 2m25s. It finished before the delivery runs.
All times in this section are UTC.
\begin{itemize}
\item \href{https://ci.yebilly.me/job/secure-delivery/job/pricing/1/}{Pricing build 1},
\texttt{blocked-test}, took 54.202 seconds. Twelve control tests and the three
normal Flask tests passed. The deliberate expected-total=$-1$ assertion failed
against the actual total 30. Publication, deployment and approval were skipped.
\item \href{https://ci.yebilly.me/job/secure-delivery/job/pricing/2/}{Pricing build 2},
\texttt{blocked-secret}, took 31.375 seconds. Tests, clean-source scanning and
all nine locked dependency audits passed. The generated synthetic-secret finding
blocked the gate and all publication/deployment stages. Match/code fields in
the archived secret report are redacted; no real secret was introduced.
\item \href{https://ci.yebilly.me/job/secure-delivery/job/pricing/3/}{Pricing build 3},
\texttt{release}, took 77.799 seconds. Tests and source/dependency gates passed.
Both pre-push and registry-digest image scans analyzed two targets and found zero
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:
\begin{Verbatim}[fontsize=\footnotesize,frame=single]
Source/configuration:
09731acb0370566471dd4e401e59bafe55e927dc
Image repository: git.yebilly.me/ssw590-group1/pricing
Registry digest:
sha256:cccd47f112f839f3443c88c4d16fd7a1ed0fec2100a26464156526d53ccc2695
\end{Verbatim}
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
configuration or container was created, and production approval was not reached.
Its generated records are retained as attempt evidence, not known-good recovery
selections in \path{delivery/releases/}.
Ansible defaults to forcing a terminal, but the dedicated deploy key intentionally
forbids PTY allocation. The inventory correction sets
\texttt{ansible\_ssh\_use\_tty=false}; it preserves the restricted key, pinned
host verification and noninteractive sudo. The expanded administrator preflight
exercises Ansible's actual connection/become path as well as plain SSH.
\href{https://ci.yebilly.me/job/secure-delivery/job/agent-preflight/3/}{Preflight build 3}
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.
\begin{figure}[htbp]
\centering
\renewcommand{\theHfigure}{delivery.preflight.\arabic{figure}}
\includegraphics[width=\linewidth,trim=330bp 880bp 900bp 0bp,clip]{images/assignment8-ansible-preflight-3-20261115.jpg}
\caption{Actual successful Jenkins prerequisite build 3 after adding the
noninteractive Ansible connection check. No pricing environment was deployed.}
\label{Figure:DeliveryAnsiblePreflight}
\end{figure}
Dated records under \path{delivery/evidence/} preserve the results:
\begin{itemize}
\item \path{gates-20261115.md}: deliberate blocking demonstrations.
\item \path{release-attempt-3-20261115.md}: publication and SSH failure.
\item \path{agent-preflight-3.txt}: successful noninteractive connection.
\end{itemize}
Jenkins archives the complete reports. The ignored local evidence directory is:
\begin{quote}\small
\path{build/evidence/assignment8-execution/}
\end{quote}
\section{Release, Recovery and Monitoring Runbooks}
The versioned \path{delivery/RUNBOOKS.md} gives the executable sequence.
Vincent handles commits/pushes; Billy reviews repository changes. Once reviewed
v1 is on main and DNS/TLS are ready, enable the delivery job, demonstrate
\texttt{blocked-test} and \texttt{blocked-secret}, then run \texttt{release}.
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.
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.
@@ -276,11 +347,10 @@ 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 planned routing boundary; successful application deployment remains outstanding.
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,
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,
both recovery demonstrations, final traceability and monitoring evidence, and
the final submission review remain outstanding. Local checks are not a
replacement for those executions.