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
+7 -3
View File
@@ -1,9 +1,13 @@
This group document records the SSW 590 coursework and its supporting
commands, designs, and evidence. Assignment 8 prepares secure delivery with
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
job passed; reviewed v1/v2 publication, DNS/TLS, promotion, rollback and staging
recovery remain pending. This draft is not ready for submission.
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.
This draft is not ready for submission.
Assignment 7 introduced site reliability
engineering: Prometheus, Grafana OSS, Node Exporter, and Blackbox Exporter
run as four pinned containers beside Gitea and Jenkins on the originally 1\,GiB
+36
View File
@@ -935,3 +935,39 @@ 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.
\section{Delivery Gates and SSH Correction}
Date: November 15, 2026; Tool: OpenAI Codex; Human: Vincent Sun.
Vincent reported the merge complete and asked Codex to continue and finish the
assignment, then requested continuation after his usage limit reset. Codex read
the repository requirements and guide, verified PR~\#24's latest Billy review
and merged main \texttt{09731ac}, and synchronized a clean local branch
\texttt{codex/assignment8-release-evidence}. Vincent retains commits/pushes;
no additional commit or push was authorized or performed.
After the merge-triggered Actions manual build finished, Codex enabled the
reviewed pricing job and initialized a MODE choice parameter for its first
negative demonstration. The Jenkinsfile then installed its normal parameters.
Pricing builds 1 and 2 actually stopped the wrong-price and synthetic-secret
fixtures before publication/deployment. Build 3 passed normal tests and all
security gates and published/pulled a real v1 digest, but Ansible's default
PTY request conflicted with the deploy key's intentional no-PTY restriction.
Gathering Facts was unreachable with zero changes; no app or production
approval was reached. Earlier plain-SSH prerequisites had not exercised
Ansible's default terminal behavior, so they had missed this integration gap.
Codex checked the official Ansible 2.21 SSH option documentation, set the
inventory's \texttt{ansible\_ssh\_use\_tty=false}, and extended the administrator
preflight to bind the existing credentials and run \texttt{id -u} through
Ansible/become without a terminal. Preflight build 3 passed and returned 0.
The job's read-only command reports CHANGED by module default; this is not an
application deployment/idempotence result. No key restriction, host pin,
credential scope, review gate or human approval was weakened.
Codex preserved exact reports and metadata over pinned SSH, wrote dated
non-secret evidence and a focused PR description, updated this chapter/history
and the incomplete draft status, and rebuilt/reviewed the local PDF. The
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.
+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.0}
\newcommand{\DocumentVersion}{6.1}
\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.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}\\
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}\\
+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.
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB