diff --git a/delivery/EVIDENCE.md b/delivery/EVIDENCE.md index 40f3190..3e0c802 100644 --- a/delivery/EVIDENCE.md +++ b/delivery/EVIDENCE.md @@ -1,4 +1,15 @@ -# Preparation evidence — not completed release evidence +# Assignment 8 evidence + +## Reviewed Jenkins execution, 15 November 2026 + +PR 24 is merged. The actual [test/secret gate demonstrations](evidence/gates-20261115.md) +blocked as intended. [Release attempt 3](evidence/release-attempt-3-20261115.md) +passed scans and published v1, then stopped before any app change at the +Ansible PTY request. The noninteractive SSH correction was verified in +agent-preflight build 3 but awaits source review/merge. No successful promotion, +production approval or recovery has occurred. + +## Preparation evidence — historical baseline All timestamps below are UTC on 14 November 2026. No assessed application release, image publication, production approval or rollback has occurred yet. diff --git a/delivery/PR.md b/delivery/PR.md index 1b17346..5be5262 100644 --- a/delivery/PR.md +++ b/delivery/PR.md @@ -1,27 +1,15 @@ -# Prepare secure delivery and rollback for Assignment 8 +# Fix noninteractive Ansible deployment over the restricted SSH key -The existing CI checks code but does not publish or promote an application. -Add the instructor's pricing service with locked inputs and a trusted-agent -pipeline for security gates, digest-based staging/production deployment, -unchanged Ansible reruns, recorded human approval and recovery operations. -Keep the earlier PR job separate from folder-scoped deployment credentials. +The first reviewed v1 release passed its tests and security gates and published +an image, but stopped during Ansible Gathering Facts: Ansible forced a PTY +that the dedicated deploy key forbids. Set `ansible_ssh_use_tty=false` in the +delivery inventory and extend the administrator preflight to exercise Ansible's +actual SSH/sudo path. Keep the key restriction and pinned host verification. -Include the reproducible agent/bootstrap, scan policy, runbooks, actual -prerequisite evidence and a clearly marked preparation chapter. Billy's DNS -records and Caddy HTTPS routes are now verified; app requests return 502 until -the backends are deployed. Monitoring additions await healthy production. -The release job is configured but disabled until reviewed source -reaches main. Assessed v1/v2 promotions and both recovery exercises remain -pending and will require separate reviewed changes and execution evidence. +Record the actual Jenkins test/secret blocks, passing image scans and publication, +zero-change staging connection failure, and successful connection preflight. +No app deployment or production approval is claimed. Retry v1 after merge; +v2 promotion, both recoveries and monitoring evidence still remain. -Validation: two existing tests, three Flask tests, twelve control tests; -controlled test/secret blocks; passing source/dependency and runtime-image -gates; Ansible syntax, agent Compose and installed Jenkins parser checks; -successful prerequisite builds 1 (laptop) and 2 (Droplet), including pinned -deployment SSH and noninteractive sudo. The agent now runs on the existing -2 GiB Droplet to avoid campus SSH restrictions, with separate agent/builder -resource caps and a passing bounded build/scan/smoke trial. Shared-host Docker -administration is documented. The original Gitea Actions runner also moved to -the Droplet with its existing identity, separate daemon/job caps and a passing -reviewed-main run 12 rerun (attempt 3); the initial low-memory attempt is retained. -No production approval or completed release is claimed. +Validation: credential-bound Jenkins agent-preflight build 3 passed and returned +root UID 0 through Ansible without a PTY; twelve release-control tests passed. diff --git a/delivery/README.md b/delivery/README.md index b38f0f3..2270736 100644 --- a/delivery/README.md +++ b/delivery/README.md @@ -8,8 +8,16 @@ Chapter 6 of instructor manual version 1.43. `app/` contains the Flask/Gunicorn service, nine exact direct/transitive dependencies, and a pinned Python 3.13 Alpine base digest for Linux/amd64. The inventory selects The-Ocean's dedicated deploy account. The example -release record remains explicitly an example; real registry digests will be -generated by Jenkins after the source has been reviewed and merged. +release record remains explicitly an example; real registry digests are +generated by Jenkins from reviewed source. + +Current execution status, 15 November: PR 24 is merged and the delivery job +is enabled. Real Jenkins test/secret demonstrations blocked as intended. The +first v1 image was scanned and published, but staging stopped before any app +change because Ansible requested a PTY forbidden by the deploy key. The +noninteractive inventory correction and expanded, passing Ansible preflight +await review/merge. See [gate evidence](evidence/gates-20261115.md) and +[release attempt 3](evidence/release-attempt-3-20261115.md). Run the tests from `app/` after installing its requirements into the selected Linux test environment. The expected v1 result for three units is USD 30. @@ -60,7 +68,7 @@ No campus SSH connection is needed to run a delivery job from the browser. passed using the dedicated deploy key, pinned host key and root sudo. Its non-secret tool inventory is versioned in `evidence/agent-preflight-1.txt`. The `secure-delivery/pricing` job loads `delivery/Jenkinsfile` from protected -main and is disabled pending reviewed source. Release credentials are scoped +main and was enabled after PR 24 merged. Release credentials are scoped to that Jenkins folder; the PR job does not bind them or the Docker socket. The original inventory above is historical. [Remote prerequisite build 2](https://ci.yebilly.me/job/secure-delivery/job/agent-preflight/2/) @@ -94,19 +102,19 @@ See `RUNBOOKS.md`. Ansible syntax, agent Compose configuration, and the installed Jenkins controller's declarative parser checks passed. These are preparation checks; -**v1/v2 registry releases, promotion and recovery are not yet demonstrated**. +**successful v1/v2 deployment, promotion and recovery are not yet demonstrated**. ## Remaining checkpoints -Vincent pushed preparation commit `bf28adc` and opened PR #24. The later -migration changes are uncommitted and need the same review path. Create the -issue and obtain Billy's PR review. Keep main protection. Billy added the A +Vincent merged PR #24, including runner migration and HTTPS, after Billy's +latest review. Review/merge the noninteractive Ansible correction before +retrying v1. Create the assignment issue if still absent. Keep main protection. +Billy added the A records; Google and Cloudflare now resolve both names to `147.182.178.136`. On 15 November Caddy's prepared routes were validated and gracefully reloaded; both names have trusted HTTPS and HTTP redirects. They currently return 502 because the app containers are not deployed. See `evidence/https-20261115.md`. -Enable the -release job after the reviewed source reaches main, then follow `RUNBOOKS.md`. +The release job is enabled; follow `RUNBOOKS.md` after the corrected source reaches main. Keep Jenkins and the remote delivery node available. Production approval requires an authorized human; an agent must not approve unattended. diff --git a/delivery/RUNBOOKS.md b/delivery/RUNBOOKS.md index db3cf3f..4807f78 100644 --- a/delivery/RUNBOOKS.md +++ b/delivery/RUNBOOKS.md @@ -6,7 +6,12 @@ Current status, 15 November 2026: Billy's DNS records resolve correctly and the two Caddy routes are active with trusted certificates and HTTP-to-HTTPS redirects. 502 is expected while the app backends are absent. The one-time HTTPS helper has already run; use the normal validate/reload procedure for later changes. -Monitoring additions and assessed releases remain pending. +The reviewed preparation is merged, the release job is enabled, and real +Jenkins test/secret blocks are recorded. Release build 3 published v1 but +stopped at Ansible's PTY request before any app change. Review/merge the +noninteractive inventory correction and retry from the corrected main SHA. +The expanded Ansible/sudo preflight passed; full deployment remains unverified. +Monitoring additions and successful releases remain pending. ## Authority and preparation diff --git a/delivery/ansible/inventory.ini b/delivery/ansible/inventory.ini index 184c7b8..58d6cbf 100644 --- a/delivery/ansible/inventory.ini +++ b/delivery/ansible/inventory.ini @@ -1,3 +1,7 @@ [delivery] # The SSH host key must be verified and supplied by the trusted delivery job. startup ansible_host=147.182.178.136 ansible_user=deploy ansible_python_interpreter=/usr/bin/python3 + +[delivery:vars] +# The dedicated deploy key forbids PTY allocation; sudo is noninteractive. +ansible_ssh_use_tty=false diff --git a/delivery/bootstrap/preflight.Jenkinsfile b/delivery/bootstrap/preflight.Jenkinsfile index 34ef202..d9a865b 100644 --- a/delivery/bootstrap/preflight.Jenkinsfile +++ b/delivery/bootstrap/preflight.Jenkinsfile @@ -23,6 +23,14 @@ docker compose version trivy --version pip-audit --version ssh -i "$DEPLOY_KEY" -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o "UserKnownHostsFile=$DEPLOY_KNOWN_HOSTS" deploy@147.182.178.136 'id; sudo -n true; python3 --version; sudo -n docker --version; sudo -n docker compose version; free -m; nproc; df -h /' +# Exercise Ansible's own SSH/become path as well as plain SSH. Its default +# PTY request is incompatible with the intentionally restricted deploy key. +export ANSIBLE_HOST_KEY_CHECKING=True +export ANSIBLE_PRIVATE_KEY_FILE="$DEPLOY_KEY" +export ANSIBLE_SSH_ARGS="-o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$DEPLOY_KNOWN_HOSTS" +ansible all -i '147.182.178.136,' -u deploy --become \ + -e '{"ansible_ssh_use_tty":false,"ansible_python_interpreter":"/usr/bin/python3"}' \ + -m ansible.builtin.command -a 'id -u' } > build/preflight/tools-and-target.txt cat build/preflight/tools-and-target.txt ''' diff --git a/delivery/evidence/agent-preflight-3.txt b/delivery/evidence/agent-preflight-3.txt new file mode 100644 index 0000000..0de70b0 --- /dev/null +++ b/delivery/evidence/agent-preflight-3.txt @@ -0,0 +1,35 @@ +Sun Nov 15 22:50:10 UTC 2026 +uid=1000(jenkins) gid=1000(jenkins) groups=1000(jenkins),987 +Python 3.13.5 +ansible [core 2.21.6] + config file = None + configured module search path = ['/home/jenkins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] + ansible python module location = /opt/delivery-tools/lib/python3.13/site-packages/ansible + ansible collection location = /opt/ansible-collections + executable location = /opt/delivery-tools/bin/ansible + python version = 3.13.5 (main, Aug 10 2026, 12:06:59) [GCC 14.2.0] (/opt/delivery-tools/bin/python3) + jinja version = 3.1.6 + pyyaml version = 6.0.3 (with libyaml v0.2.5) + +# /opt/ansible-collections/ansible_collections +Collection Version +---------------------------------------- ------- +community.docker 5.4.0 +community.library_inventory_filtering_v1 1.1.5 +Docker version 29.9.3, build 5457199 +Docker Compose version v5.7.1 +Version: 0.76.2 +pip-audit 2.10.1 +uid=1000(deploy) gid=1000(deploy) groups=1000(deploy) +Python 3.12.3 +Docker version 29.9.3, build 5457199 +Docker Compose version v5.7.1 + total used free shared buff/cache available +Mem: 1967 1239 86 3 817 728 +Swap: 2047 413 1634 +1 +Filesystem Size Used Avail Use% Mounted on +/dev/vda1 24G 15G 9.2G 61% / +147.182.178.136 | CHANGED | rc=0 >> +0 + diff --git a/delivery/evidence/gates-20261115.md b/delivery/evidence/gates-20261115.md new file mode 100644 index 0000000..f744856 --- /dev/null +++ b/delivery/evidence/gates-20261115.md @@ -0,0 +1,31 @@ +# Assessed Jenkins gate demonstrations — 15 November 2026 + +Reviewed source: `09731acb0370566471dd4e401e59bafe55e927dc`, the merge of +[PR 24](https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/pulls/24). +Billy (`bill`) approved the latest preparation head `ed0a862` at 21:06 UTC; +Vincent merged it at 21:59 UTC. The merge-triggered manual workflow +[run 13](https://git.yebilly.me/ssw590-group1/vpn-dns-gateway/actions/runs/13) +passed in 2m25s before the delivery demonstrations began. + +| Jenkins pricing run | Mode | Actual result | +|---|---|---| +| [1](https://ci.yebilly.me/job/secure-delivery/job/pricing/1/) | `blocked-test` | FAILURE as intended, 54.202 seconds. Twelve control tests and three normal Flask tests passed; the additional expected-total=-1 assertion failed against the real v1 total 30. All later security, publication, deployment and approval stages were skipped. | +| [2](https://ci.yebilly.me/job/secure-delivery/job/pricing/2/) | `blocked-secret` | FAILURE as intended, 31.375 seconds. Twelve control tests and three Flask tests passed. Clean-source scanning and all nine locked dependency audits passed; the generated synthetic-secret fixture was detected, blocking publication, deployment and approval. | + +Run 1 began at 22:11:34.732 UTC. Run 2 began at 22:12:51.073 UTC; +its source gate ran from 22:13:14.233 to 22:13:20.115 UTC. The scanner itself +returned zero after writing a valid report; the gate wrapper returned one +because that report contained a finding. This is expected policy enforcement, +not a scanner execution error. The synthetic fixture is nonfunctional and +generated only in a temporary directory; captured match/code fields are redacted. + +Jenkins archives the test and gate reports for each run. Exact local copies, +selected build metadata and console logs are retained in ignored +`build/evidence/assignment8-execution/jenkins-{1,2}/`. These two negative +demonstrations do not establish a successful release or production approval. + +The job was enabled only after the merge. A bootstrap MODE choice parameter +allowed the first run to select `blocked-test`; the reviewed Jenkinsfile then +installed its normal four parameter definitions and retained its approval, +timeout, concurrency and ancestry checks. Existing credentials and access +permissions were unchanged. diff --git a/delivery/evidence/release-attempt-3-20261115.md b/delivery/evidence/release-attempt-3-20261115.md new file mode 100644 index 0000000..ca553eb --- /dev/null +++ b/delivery/evidence/release-attempt-3-20261115.md @@ -0,0 +1,55 @@ +# v1 publication and blocked deployment — 15 November 2026 + +[Pricing build 3](https://ci.yebilly.me/job/secure-delivery/job/pricing/3/) +ran in `release` mode from reviewed source/configuration commit +`09731acb0370566471dd4e401e59bafe55e927dc`. It began at 22:25:23.584 UTC, +took 77.799 seconds, and finished FAILURE. This was a published image followed +by a connection failure, **not a successful staging or production release**. + +Tests, clean-source scanning and all nine locked dependency audits passed. +Both pre-push and registry-digest Trivy image reports analyzed two targets and +contained zero HIGH/CRITICAL findings. The agent built the image once, pushed +the source-SHA tag, pulled it back and verified this registry reference: + +```text +git.yebilly.me/ssw590-group1/pricing@sha256:cccd47f112f839f3443c88c4d16fd7a1ed0fec2100a26464156526d53ccc2695 +``` + +The generated staging/production records were timestamped 22:26:29.144 UTC. +Staging deployment began 22:26:33.530 and stopped at 22:26:39.422 UTC +(5.892 seconds), before any application configuration or container was created: + +```text +TASK [Gathering Facts] +Failed to connect to the host via ssh: PTY allocation request failed on channel 0 +startup : ok=0 changed=0 unreachable=1 failed=0 +Ansible exit code: 4 +``` + +Jenkins skipped the unchanged rerun and production approval/deployment. +The generated records and scans are archived in that build and copied to ignored +`build/evidence/assignment8-execution/jenkins-3/`. They are deliberately absent +from `delivery/releases/`: neither environment has been verified healthy. + +## Correction and verification + +Ansible's SSH connection plugin defaults to forcing a terminal. The deploy +key intentionally forbids PTY allocation. The inventory now selects +`ansible_ssh_use_tty=false` for the delivery group, matching that restriction. +See the official [Ansible 2.21 SSH connection options](https://docs.ansible.com/projects/ansible-core/2.21/collections/ansible/builtin/ssh_connection.html#parameter-use_tty). +Pinned host verification, key restrictions, credentials and sudo policy are unchanged. + +The administrator-only preflight was extended to exercise Ansible's actual +SSH/become path using the same bound credentials, rather than plain SSH alone. +[Agent preflight build 3](https://ci.yebilly.me/job/secure-delivery/job/agent-preflight/3/) +passed in 17 seconds at 22:50 UTC. Its `ansible.builtin.command` invocation +of `id -u` returned `0`, proving the noninteractive module and sudo path. +The module reports CHANGED by default for a command; this is not a pricing +deployment or an unchanged-rerun result. Exact non-secret output is retained in +[`agent-preflight-3.txt`](agent-preflight-3.txt). + +The source correction awaits Vincent's commit/push and Billy's review/merge. +Retry `release` from the corrected full main SHA; let the pipeline generate +fresh records for that reviewed source/configuration. Do not manually change +the failed attempt's record to imply a successful deployment or reuse it for +rollback. Retain its published image and reports as evidence. diff --git a/manual/latex/abstract.tex b/manual/latex/abstract.tex index 4a843a5..f5e75f2 100644 --- a/manual/latex/abstract.tex +++ b/manual/latex/abstract.tex @@ -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 diff --git a/manual/latex/devopsAIPromptLog.tex b/manual/latex/devopsAIPromptLog.tex index 5f20fbc..245b18d 100644 --- a/manual/latex/devopsAIPromptLog.tex +++ b/manual/latex/devopsAIPromptLog.tex @@ -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. diff --git a/manual/latex/devopsAssignment.tex b/manual/latex/devopsAssignment.tex index c8b9a66..7e96f56 100644 --- a/manual/latex/devopsAssignment.tex +++ b/manual/latex/devopsAssignment.tex @@ -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} diff --git a/manual/latex/devopsDocumentHistory.tex b/manual/latex/devopsDocumentHistory.tex index 3b7d077..5deeefc 100644 --- a/manual/latex/devopsDocumentHistory.tex +++ b/manual/latex/devopsDocumentHistory.tex @@ -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}\\ diff --git a/manual/latex/devopsSecureDelivery.tex b/manual/latex/devopsSecureDelivery.tex index f9a144f..be7e265 100644 --- a/manual/latex/devopsSecureDelivery.tex +++ b/manual/latex/devopsSecureDelivery.tex @@ -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. diff --git a/manual/latex/images/assignment8-ansible-preflight-3-20261115.jpg b/manual/latex/images/assignment8-ansible-preflight-3-20261115.jpg new file mode 100644 index 0000000..9192953 Binary files /dev/null and b/manual/latex/images/assignment8-ansible-preflight-3-20261115.jpg differ