diff --git a/devopsAssignment.tex b/devopsAssignment.tex index 5f4990e..43c26e3 100644 --- a/devopsAssignment.tex +++ b/devopsAssignment.tex @@ -38,15 +38,15 @@ \definecolor{devopsLightBlue}{RGB}{232,240,247} % Replace these values for each assignment. -\newcommand{\AssignmentTitle}{Digital Ocean Docker + Project Proposal -- Group} -\newcommand{\AssignmentNumber}{3} +\newcommand{\AssignmentTitle}{Automated LaTeX Manual Build -- Group} +\newcommand{\AssignmentNumber}{5} \newcommand{\DocumentVersion}{1.9} \newcommand{\DocumentStatus}{Group Report} \newcommand{\CourseNumber}{SSW 590} \newcommand{\CourseName}{DevOps} \newcommand{\Instructor}{Darian Muresan} \newcommand{\Organization}{Stevens Institute of Technology} -\newcommand{\DocumentDate}{September 28, 2026} +\newcommand{\DocumentDate}{October 10, 2026} \newcommand{\DueDate}{[Due Date and Time]} \newcommand{\VERSION}{Version \DocumentVersion+build.\buildRun.\buildCommit} @@ -110,6 +110,7 @@ \include{devopsIntroduction} \include{devopsGitea} +\include{devopsAutomatedManualBuild} \include{devopsExampleAssignment} \include{devopsKanbanSetup} \include{devopsPasswords} diff --git a/devopsAutomatedManualBuild.tex b/devopsAutomatedManualBuild.tex new file mode 100644 index 0000000..652f5b9 --- /dev/null +++ b/devopsAutomatedManualBuild.tex @@ -0,0 +1,33 @@ +\chapter{Automated Manual Build} +\ChapterLabel{AutomatedManualBuild} +\index{Gitea Actions}\index{runner}\index{build artifact}\index{traceability} +\section{Source and Trigger} +The source of record is \url{https://git.590hcm.dev/SSW590Team/devOpsManual}. The main document is \texttt{devopsAssignment.tex}; tracked chapter files, bibliography, figures in \texttt{prism-uploads}, and \texttt{.latexmkrc} form the build input. The workflow is \texttt{.gitea/workflows/build-manual.yaml}. Pushes to \texttt{main} and the isolated \texttt{chapter3-validation} branch trigger a build. Generated metadata and PDFs are ignored, so the build never commits its own output. +\begin{center}\fbox{HTTPS push :443 $\rightarrow$ Caddy $\rightarrow$ Gitea :3000}\par\smallskip +\fbox{Runner polls Gitea $\rightarrow$ TeX container $\rightarrow$ PDF artifact}\end{center} +The public HTTPS route retains certificate verification. Gitea port 3000 stays on the Docker network. The runner polls outward; no new public runner port is needed. +\section{Runner Installation and Execution} +Observed October 10, 2026: the existing \texttt{lightsail-actions-runner} runs act runner 0.6.1 in Docker on Gitea-Project, Ubuntu 24.04.4 LTS, at 184.193.0.32. Its deployment is in \texttt{/home/ubuntu/gitea-deploy}; registration persists in its runner-data volume. The server has 2 GB RAM, two vCPUs, and 60 GB disk. The runner uses the \texttt{texlive} label. Its generated default configuration has capacity one. Each workflow job uses a temporary container with one CPU and 1 GB memory, leaving capacity for Gitea and Caddy. The runner was already registered; the missing repository workflow, rather than absent registration, prevented builds. +Registration scope is recorded in the final verification notes. The runner requires outbound HTTPS to Gitea, GitHub action repositories, the container registry, and Alpine package repositories. No deployment service was moved or replaced. +\section{Reproducible Compilation} +The workflow pins the TeX image to the digest below, records Node.js 24.18.1-r0, and uses checkout v3.6.0 and upload-artifact v3.1.3 from their GitHub action repositories. The existing runner image uses a latest tag; its observed executable version is recorded above. Action tags and Alpine package availability remain external dependencies; the TeX filesystem is digest-pinned. +\begin{quote}\small\url{ghcr.io/xu-cheng/texlive-full@sha256:c06416ebbc69c8e90e07d1f1a6f7a3f9b334e773daa3543ce879ea533317c3a7}\end{quote} +The container has the TeX packages required by this manual. Node is installed before JavaScript actions execute. Checkout selects the triggering revision and does not persist Git credentials. From the repository root, compilation uses: +\begin{verbatim} +latexmk -pdf -interaction=nonstopmode \ + -halt-on-error -file-line-error devopsAssignment.tex +test -s devopsAssignment.pdf +\end{verbatim} +Latexmk repeats the necessary LaTeX and bibliography passes. The repository's custom dependencies invoke makeglossaries; the index is generated during the build. Missing inputs, invalid TeX, and an absent or empty PDF fail the job. An isolated preflight with networking disabled succeeded, and Actions run 1 compiled in 21 seconds. No host TeX installation is required. +\section{PDF Version and Traceability} +The human document version is combined with \texttt{+build.RUN.SHORTSHA}. Gitea supplies the run number and triggering SHA to a generated \texttt{build\_meta.tex}; only its seven-character commit abbreviation and numeric run are written. The main document imports this file and displays the version in the page footer. Local compilation falls back to build 0/local. Metadata is untracked and no write-back step exists. The artifact name retains the full SHA so a downloaded PDF can be correlated with the exact source revision. +\section{Artifact Publication and Retrieval} +Only a successful compilation reaches upload. The named artifact is \texttt{devops-manual-build-RUN-FULLSHA}; it contains \texttt{devopsAssignment.pdf}, uses a 30-day retention request, and treats a missing file as an error. Open the repository Actions tab, choose a successful run, and select its artifact link. Extract the downloaded archive and inspect the PDF version before submission. Keep a local copy before retention expires. A failed run must not be used as a source of a new PDF. +\section{Successive Changes and Failure Recovery} +\input{devopsBuildEvidence} +\section{Runner and Secret Boundaries} +Repository writers who can edit workflows can execute commands on this runner. The runner mounts the host Docker socket, which grants powerful host-level control; a temporary job container is not a security boundary against a malicious workflow author. Only trusted project contributors should have write access. No new membership or permission was granted. This workflow uses no custom repository secret, disables checkout credential persistence, and does not print registration credentials. The runner registration file and deployment credentials remain outside the repository. Hosts and Passwords chapters add runner-specific, hint-only records. Never place passwords, tokens, or private keys in source, screenshots, logs, or artifacts. +\section{Operations, Evidence, and Troubleshooting} +Evidence was collected on October 10, 2026 from Safari, the Lightsail SSH session, and Gitea Actions. Run 1 (\texttt{fb97d71}) succeeded in 56 seconds including checkout, metadata, compilation, and artifact upload: \url{https://git.590hcm.dev/SSW590Team/devOpsManual/actions/runs/1}. +For a queued job, check the runner is online, its registration scope includes this repository, and its label matches \texttt{texlive}. For checkout failures, check HTTPS reachability and source permissions. For a TeX error, open the compilation step and fix the reported file and line, then push a new commit. For missing artifacts, inspect the upload step and PDF existence check. For memory pressure, keep capacity one and the job limits; do not run parallel full TeX builds on this host. The original draft workflow was under the deployment directory, so Gitea could not discover it until it was committed under the repository's workflow path. +References (accessed October 10, 2026): \url{https://docs.gitea.com/1.22/usage/actions/comparison/}. Gitea 1.22 does not enforce all GitHub workflow keys, including concurrency and permissions; this workflow does not rely on those keys for isolation or scheduling. diff --git a/devopsBuildEvidence.tex b/devopsBuildEvidence.tex new file mode 100644 index 0000000..9fdab38 --- /dev/null +++ b/devopsBuildEvidence.tex @@ -0,0 +1 @@ +Run 1 establishes the first successful source revision. Further validation is pending at this intermediate revision.