Compare commits
@@ -0,0 +1,34 @@
|
||||
name: Assignment 5 manual PDF
|
||||
on:
|
||||
push:
|
||||
branches: [main, manual-build-validation]
|
||||
jobs:
|
||||
manual:
|
||||
runs-on: manual-latex
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
- name: Compile the complete manual with visible build identity
|
||||
env:
|
||||
GITEA_SHA: ${{ github.sha }}
|
||||
GITEA_RUN_NUMBER: ${{ github.run_number }}
|
||||
GITEA_RUN_ID: ${{ github.run_id }}
|
||||
GITEA_RUN_ATTEMPT: ${{ github.run_attempt }}
|
||||
run: |
|
||||
python3 documentation/ci/build_manual.py
|
||||
test -s documentation/build/main.pdf
|
||||
test -s documentation/build/build-manifest.json
|
||||
- name: Publish verified PDF and traceability manifest
|
||||
uses: https://github.com/actions/upload-artifact@c6a366c94c3e0affe28c06c8df20a878f24da3cf
|
||||
with:
|
||||
name: assignment5-1.7.1-run-${{ github.run_number }}-${{ github.sha }}
|
||||
path: |
|
||||
documentation/build/main.pdf
|
||||
documentation/build/build-manifest.json
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Runner compatibility preflight
|
||||
on:
|
||||
push:
|
||||
branches: [manual-runner-preflight]
|
||||
jobs:
|
||||
preflight:
|
||||
runs-on: manual-latex
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
- name: Verify revision, tools, and job boundary
|
||||
env:
|
||||
EXPECTED_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
|
||||
test ! -e /var/run/docker.sock
|
||||
test ! -e /data/.runner
|
||||
mkdir -p preflight
|
||||
python3 - <<'PY' > preflight/result.txt
|
||||
import os, socket, urllib.request
|
||||
print('Trigger commit:', os.environ['EXPECTED_SHA'])
|
||||
print('HTTPS:', urllib.request.urlopen('https://myfileagent.tech/api/v1/version').read().decode())
|
||||
for host, port in [('172.20.0.2', 3000), ('172.20.0.1', 3000)]:
|
||||
s = socket.socket(); s.settimeout(2)
|
||||
result = s.connect_ex((host, port)); s.close()
|
||||
print('Private backend connection blocked:', result != 0)
|
||||
assert result != 0
|
||||
print('Docker socket and runner state absent from job')
|
||||
PY
|
||||
latexmk --version >> preflight/result.txt
|
||||
pdflatex --version >> preflight/result.txt
|
||||
pygmentize -V >> preflight/result.txt
|
||||
node --version >> preflight/result.txt
|
||||
python3 -c 'import pypdf; print(pypdf.__version__)' >> preflight/result.txt
|
||||
cat preflight/result.txt
|
||||
- name: Test artifact compatibility (not a manual PDF)
|
||||
uses: https://github.com/actions/upload-artifact@c6a366c94c3e0affe28c06c8df20a878f24da3cf
|
||||
with:
|
||||
name: runner-preflight-${{ github.run_number }}
|
||||
path: preflight/result.txt
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
@@ -19,4 +19,4 @@ The demonstration succeeds when FilePilot:
|
||||
4. shows the proposed change;
|
||||
5. replaces the line with `Status: Reviewed`;
|
||||
6. verifies the saved result; and
|
||||
7. records the outcome without exposing secrets.
|
||||
7. records the outcome without exposing secrets.
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Generated build files and local credentials are never source artifacts.
|
||||
build/
|
||||
build-metadata.tex
|
||||
_minted*/
|
||||
__pycache__/
|
||||
*.aux
|
||||
*.log
|
||||
*.out
|
||||
*.toc
|
||||
*.lof
|
||||
*.lot
|
||||
*.bbl
|
||||
*.blg
|
||||
*.idx
|
||||
*.ilg
|
||||
*.ind
|
||||
*.acn
|
||||
*.acr
|
||||
*.alg
|
||||
*.glo
|
||||
*.gls
|
||||
*.glg
|
||||
*.ist
|
||||
*.fls
|
||||
*.fdb_latexmk
|
||||
*.synctex.gz
|
||||
main.pdf
|
||||
devopsAssignment.pdf
|
||||
.env
|
||||
.runner
|
||||
*.key
|
||||
*.pem
|
||||
@@ -0,0 +1,11 @@
|
||||
OVERLEAF IMPORT INSTRUCTIONS
|
||||
|
||||
1. Upload the complete ZIP as a new Overleaf project.
|
||||
2. Open Menu -> Settings -> Main document.
|
||||
3. Select the top-level file main.tex.
|
||||
4. Select the pdfLaTeX compiler and click Recompile.
|
||||
|
||||
Do not select devopsLatexDocker.tex as the Main document. It is Chapter 7 and
|
||||
is included automatically by the complete report. The Docker demonstration
|
||||
source is latex-docker/sample-source.txt, so main.tex is the only .tex file
|
||||
that declares a document class and is the authoritative report entry point.
|
||||
@@ -0,0 +1,14 @@
|
||||
This group report documents the team's SSW 590 DevOps work in an Ubuntu
|
||||
environment hosted on DigitalOcean. It records the Linux command-line exercises
|
||||
and the creation of a DigitalOcean Droplet, installation of Docker Engine, and
|
||||
deployment workflow for two containerized Node.js websites. Commands, evidence,
|
||||
and deployment links are included. The report also presents a class-based
|
||||
JavaScript redesign with a UML class diagram and a separate TeX Live container
|
||||
that compiles a simple LaTeX document. It concludes with the MyFileAgent Pipeline
|
||||
proposal, which emphasizes a one-click DevSecOps workflow for installation,
|
||||
configuration, building, testing, deployment, security checks, and Grafana
|
||||
monitoring. A limited LLM file-replacement task serves only as the sample
|
||||
workload. Credentials, private keys, and other secrets are intentionally
|
||||
excluded. The report also records the completed MyFileAgent Gitea startup
|
||||
foundation: SQLite persistence, team workflow, the \texttt{myfileagent.tech}
|
||||
domain, Caddy-managed HTTPS, and verified firewall boundaries.
|
||||
@@ -0,0 +1,123 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build the manual in a fresh workspace; publish a PDF only after success.
|
||||
|
||||
Requires the recorded CI image to supply latexmk, TeX Live, minted support,
|
||||
BibTeX, makeindex, and pypdf. Run from a checked-out repository.
|
||||
"""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
|
||||
def build_metadata(sha, run_number, run_id, attempt):
|
||||
if not re.fullmatch(r"[0-9a-f]{40}|[0-9a-f]{64}", sha):
|
||||
raise ValueError("A full lowercase Git commit hash is required")
|
||||
for name, value in (("run number", run_number), ("run ID", run_id), ("attempt", attempt)):
|
||||
if not re.fullmatch(r"[1-9][0-9]*", value):
|
||||
raise ValueError(f"Invalid {name}: a positive integer is required")
|
||||
short = sha[:7]
|
||||
suffix = f"+build.{run_number}.{short}.attempt.{attempt}"
|
||||
url = f"https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/{run_id}"
|
||||
return {
|
||||
"commit": sha, "run_number": run_number, "run_id": run_id,
|
||||
"attempt": attempt, "suffix": suffix, "run_url": url,
|
||||
}
|
||||
|
||||
|
||||
def latex_metadata(metadata):
|
||||
# All interpolated fields were validated above or use a fixed trusted URL.
|
||||
fields = {
|
||||
"BuildSuffix": metadata["suffix"],
|
||||
"BuildCommit": metadata["commit"],
|
||||
"BuildRun": metadata["run_number"],
|
||||
"BuildRunURL": metadata["run_url"],
|
||||
}
|
||||
return "% Generated in the build workspace. Do not commit.\n" + "".join(
|
||||
f"\\renewcommand{{\\{key}}}{{{value}}}\n" for key, value in fields.items()
|
||||
)
|
||||
|
||||
|
||||
def copy_sources(source, destination):
|
||||
extensions = {".tex", ".cls", ".sty", ".bst", ".bib", ".png", ".jpg", ".jpeg", ".svg", ".txt"}
|
||||
excluded = {".git", "_minted", "build", "output", "outputs", "__pycache__", "node_modules"}
|
||||
for path in source.rglob("*"):
|
||||
relative = path.relative_to(source)
|
||||
if any(part in excluded or part.startswith("_minted-") for part in relative.parts):
|
||||
continue
|
||||
if path.is_symlink():
|
||||
raise ValueError(f"Unexpected source symlink: {relative}")
|
||||
if path.is_file() and path.suffix.lower() in extensions and path.name != "build-metadata.tex":
|
||||
target = destination / relative
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(path, target)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--sha", default=os.environ.get("GITEA_SHA", ""))
|
||||
parser.add_argument("--run-number", default=os.environ.get("GITEA_RUN_NUMBER", ""))
|
||||
parser.add_argument("--run-id", default=os.environ.get("GITEA_RUN_ID", ""))
|
||||
parser.add_argument("--attempt", default=os.environ.get("GITEA_RUN_ATTEMPT", "1"))
|
||||
args = parser.parse_args()
|
||||
metadata = build_metadata(args.sha, args.run_number, args.run_id, args.attempt)
|
||||
source = Path(__file__).resolve().parents[1]
|
||||
revision = subprocess.check_output(["git", "-C", str(source), "rev-parse", "HEAD"], text=True).strip()
|
||||
if revision != metadata["commit"]:
|
||||
raise ValueError("Checked-out HEAD differs from the triggering commit")
|
||||
version_match = re.search(r"\\newcommand\{\\DocumentVersion\}\{([^}]+)\}", (source / "main.tex").read_text())
|
||||
if not version_match:
|
||||
raise ValueError("Human-maintained document version is missing")
|
||||
metadata["document_version"] = version_match.group(1)
|
||||
output = source / "build"
|
||||
output.mkdir(exist_ok=True)
|
||||
# Remove only this build's known publish targets, so a failed rebuild cannot
|
||||
# leave an older PDF available for upload.
|
||||
for name in ("main.pdf", "build-manifest.json"):
|
||||
(output / name).unlink(missing_ok=True)
|
||||
with tempfile.TemporaryDirectory(prefix="manual-ci-") as temp:
|
||||
workspace = Path(temp)
|
||||
copy_sources(source, workspace)
|
||||
(workspace / "build-metadata.tex").write_text(latex_metadata(metadata), encoding="utf-8")
|
||||
# Shell escape is needed by the current minted source. Run only trusted
|
||||
# team source in the isolated job, with no host/Docker socket mounts.
|
||||
command = ["latexmk", "-pdf", "-shell-escape", "-interaction=nonstopmode", "-halt-on-error", "-file-line-error", "main.tex"]
|
||||
try:
|
||||
result = subprocess.run(command, cwd=workspace, check=False)
|
||||
log_path = workspace / "main.log"
|
||||
if log_path.exists():
|
||||
shutil.copy2(log_path, output / "main.log")
|
||||
if result.returncode:
|
||||
raise RuntimeError(f"LaTeX compilation failed (exit {result.returncode})")
|
||||
pdf = workspace / "main.pdf"
|
||||
if not pdf.is_file() or pdf.stat().st_size == 0:
|
||||
raise RuntimeError("Compilation did not create a nonempty main.pdf")
|
||||
from pypdf import PdfReader
|
||||
reader = PdfReader(pdf)
|
||||
if not reader.pages:
|
||||
raise RuntimeError("Generated PDF has no pages")
|
||||
text = "\n".join(page.extract_text() or "" for page in reader.pages[:5])
|
||||
for expected in (metadata["suffix"], metadata["commit"]):
|
||||
if expected not in text:
|
||||
raise RuntimeError(f"Visible PDF build identity is missing: {expected}")
|
||||
if log_path.exists():
|
||||
log = log_path.read_text(errors="replace")
|
||||
if re.search(r"There were undefined (references|citations)|There were multiply-defined labels", log):
|
||||
raise RuntimeError("Unresolved references/citations or duplicate labels in PDF")
|
||||
metadata["pdf_sha256"] = hashlib.sha256(pdf.read_bytes()).hexdigest()
|
||||
metadata["pages"] = len(reader.pages)
|
||||
shutil.copy2(pdf, output / "main.pdf")
|
||||
(output / "build-manifest.json").write_text(json.dumps(metadata, indent=2) + "\n", encoding="utf-8")
|
||||
finally:
|
||||
# A compiler failure must never be hidden by artifact publication.
|
||||
pass
|
||||
print(json.dumps(metadata, indent=2))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,12 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["npm", "start"]
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "color-buttons-app",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"start": "node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.18.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Color Buttons App</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
margin-top: 50px;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
button {
|
||||
padding: 12px 24px;
|
||||
font-size: 18px;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Click a Button to Change Background</h1>
|
||||
<button id="blueBtn">Blue</button>
|
||||
<button id="redBtn">Red</button>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
class ColorButtonController {
|
||||
constructor(buttonId, color) {
|
||||
this.button = document.getElementById(buttonId);
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
changeBackground() {
|
||||
document.body.style.backgroundColor = this.color;
|
||||
}
|
||||
|
||||
bind() {
|
||||
this.button.addEventListener("click", () => this.changeBackground());
|
||||
}
|
||||
}
|
||||
|
||||
const blueButton = new ColorButtonController("blueBtn", "blue");
|
||||
const redButton = new ColorButtonController("redBtn", "red");
|
||||
|
||||
blueButton.bind();
|
||||
redButton.bind();
|
||||
@@ -0,0 +1,14 @@
|
||||
import express from "express";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 3000;
|
||||
|
||||
app.use(express.static(path.join(__dirname, "public")));
|
||||
|
||||
app.listen(PORT, "0.0.0.0", () => {
|
||||
console.log(`Server running at http://0.0.0.0:${PORT}`);
|
||||
});
|
||||
@@ -0,0 +1,367 @@
|
||||
%%
|
||||
%% This is file `cornell.cls',
|
||||
%% generated with the docstrip utility.
|
||||
%%
|
||||
%% The original source files were:
|
||||
%%
|
||||
%% cornell.dtx (with options: `class')
|
||||
%%
|
||||
%% IMPORTANT NOTICE:
|
||||
%%
|
||||
%% For the copyright see the source file.
|
||||
%%
|
||||
%% Any modified versions of this file must be renamed
|
||||
%% with new filenames distinct from cornell.cls.
|
||||
%%
|
||||
%% For distribution of the original source see the terms
|
||||
%% for copying and modification in the file cornell.dtx.
|
||||
%%
|
||||
%% This generated file may be distributed as long as the
|
||||
%% original source files, as listed above, are part of the
|
||||
%% same distribution. (The sources need not necessarily be
|
||||
%% in the same archive or directory.)
|
||||
%% Document class `cornell' to use with LaTeX 2e.
|
||||
%% Based on `crnlphd' class. The following is from the file `crnlphd.dtx':
|
||||
%% Based loosely on old cuphdthesis style file.
|
||||
%% Found to give good results, according to the thesis secretary.
|
||||
%% File: crnlphd.dtx Copyright (C) 1994 Sergio Gelato
|
||||
%% Made available without any warranty, express or implied.
|
||||
%% Modifications
|
||||
%% 03/26/98 Mike Heisler
|
||||
%% Conform to Eric's final version. Margins are subject to
|
||||
%% The whim of the printer.
|
||||
%% 10/10/97 Mike Heisler and Eric Dahl
|
||||
%% Altered footnotesize and changed the Acknowledgement and
|
||||
%% Biographical titles per thesis secretary guideline that
|
||||
%% they must match the rest of the document, i.e. flush left
|
||||
%% and capitalized rather than all caps
|
||||
%% 05/21/97 Mike Heisler
|
||||
%% Added a 'papers' option to handle bibliographis as sections
|
||||
%% at the end of each chapter. Reduced top margin.
|
||||
%%
|
||||
%% $Id$
|
||||
%% \CharacterTable
|
||||
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
|
||||
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
|
||||
%% Digits \0\1\2\3\4\5\6\7\8\9
|
||||
%% Exclamation \! Double quote \" Hash (number) \#
|
||||
%% Dollar \$ Percent \% Ampersand \&
|
||||
%% Acute accent \' Left paren \( Right paren \)
|
||||
%% Asterisk \* Plus \+ Comma \,
|
||||
%% Minus \- Point \. Solidus \/
|
||||
%% Colon \: Semicolon \; Less than \<
|
||||
%% Equals \= Greater than \> Question mark \?
|
||||
%% Commercial at \@ Left bracket \[ Backslash \\
|
||||
%% Right bracket \] Circumflex \^ Underscore \_
|
||||
%% Grave accent \` Left brace \{ Vertical bar \|
|
||||
%% Right brace \} Tilde \~}
|
||||
%%
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesClass{cornell}
|
||||
[1998/03/26 v2.0
|
||||
Cornell University thesis class]
|
||||
\newif\ifphd
|
||||
\DeclareOption{phd}{\phdtrue}
|
||||
\DeclareOption{master}{\phdfalse}
|
||||
\ExecuteOptions{phd}
|
||||
\newif\ifpapers
|
||||
\DeclareOption{papers}{\paperstrue}
|
||||
\DeclareOption{10pt}{%
|
||||
\OptionNotUsed%
|
||||
\ClassWarningNoLine{cornell}{Font size 10pt not allowed; using 12pt}%
|
||||
}
|
||||
\DeclareOption{11pt}{%
|
||||
\OptionNotUsed%
|
||||
\ClassWarningNoLine{cornell}{Font size 11pt not allowed; using 12pt}%
|
||||
}
|
||||
\newcommand{\prelim@contents}[1]{}
|
||||
\DeclareOption{tocprelim}{%
|
||||
\renewcommand{\prelim@contents}[1]{\addcontentsline{toc}{section}{#1}}
|
||||
}
|
||||
\DeclareOption*{%
|
||||
\PassOptionsToClass{\CurrentOption}{report}%
|
||||
}
|
||||
\ProcessOptions
|
||||
|
||||
\LoadClass[12pt]{report}[1994/06/01]
|
||||
\renewcommand{\defaultscriptratio}{.75}
|
||||
\renewcommand{\defaultscriptscriptratio}{.6}
|
||||
\setlength\headsep{25\p@}
|
||||
\if@twocolumn
|
||||
\else
|
||||
\setlength\oddsidemargin{0in}
|
||||
\setlength\evensidemargin{0in}
|
||||
\setlength\textwidth{6.5in}
|
||||
\setlength\topmargin{-0.5in}
|
||||
\setlength\headheight{0.2in}
|
||||
\setlength\headsep{0.35in}
|
||||
\setlength\textheight{8.85in}
|
||||
\setlength\footskip{0.5in}
|
||||
\setlength\marginparwidth{0.85in}
|
||||
\setlength\marginparsep{0.125in}
|
||||
\fi
|
||||
\if@compatibility
|
||||
\setlength\topmargin{0\p@}
|
||||
\else
|
||||
\fi
|
||||
\newcommand{\ps@cornell}{%
|
||||
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
|
||||
\def\@oddfoot{}%
|
||||
\def\@evenhead{\thepage\hfil{\slshape\leftmark}}%
|
||||
\def\@evenfoot{}%
|
||||
\def\chaptermark##1{}%
|
||||
\def\sectionmark##1{}%
|
||||
}
|
||||
\newcommand{\ps@cornellc}{%
|
||||
\def\@oddhead{\hfil\thepage\hfil}%
|
||||
\def\@oddfoot{}%
|
||||
\def\@evenhead{\@oddhead}%
|
||||
\def\@evenfoot{}%
|
||||
\def\chaptermark##1{}%
|
||||
\def\sectionmark##1{}%
|
||||
}
|
||||
\raggedbottom
|
||||
\newcommand{\@prolformat}[1]{{\begin{flushleft} \Huge #1 \end{flushleft}} }
|
||||
\newcommand{\ackname}{\@prolformat{Acknowledgements}}
|
||||
\newcommand{\bioname}{\@prolformat{Biographical Sketch}}
|
||||
\renewcommand{\contentsname}{\@prolformat{Table of Contents}}
|
||||
\renewcommand{\listtablename}{\@prolformat{List of Tables}}
|
||||
\renewcommand{\listfigurename}{\@prolformat{List of Figures}}
|
||||
\renewcommand{\l@figure}{\@dottedtocline{1}{1.5em}{2.6em}}
|
||||
\let\l@table\l@figure
|
||||
|
||||
\renewenvironment{thebibliography}[1]
|
||||
{\ifpapers \clearpage \section*{\bibname%
|
||||
\@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}%
|
||||
\else%
|
||||
\chapter*{\bibname%
|
||||
\@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}%
|
||||
\fi%
|
||||
\list{\@biblabel{\arabic{enumiv}}}%
|
||||
{\settowidth\labelwidth{\@biblabel{#1}}%
|
||||
\leftmargin\labelwidth
|
||||
\advance\leftmargin\labelsep
|
||||
\@openbib@code
|
||||
\usecounter{enumiv}%
|
||||
\let\p@enumiv\@empty
|
||||
\renewcommand\theenumiv{\arabic{enumiv}}}%
|
||||
\sloppy\clubpenalty4000\widowpenalty4000%
|
||||
\sfcode`\.\@m\relax
|
||||
\ifpapers%
|
||||
\addcontentsline{toc}{section}{\bibname}%
|
||||
\else%
|
||||
\addcontentsline{toc}{chapter}{\bibname}%
|
||||
\fi
|
||||
\singlespacing}
|
||||
{\def\@noitemerr
|
||||
{\@latex@warning{Empty `thebibliography' environment}}%
|
||||
\normalspacing
|
||||
\endlist}
|
||||
|
||||
\newcommand{\@titlesize}{\Large}
|
||||
\newcommand{\@subtitlesize}{\large}
|
||||
\newcommand{\@authorsize}{\normalsize} % No Pharaoh he.
|
||||
\newcommand{\@conferralmonth}{January}
|
||||
\newcommand{\@conferralyear}{}
|
||||
|
||||
\newcommand{\titlesize}[1]{\renewcommand{\@titlesize}{#1}}
|
||||
\newcommand{\subtitlesize}[1]{\renewcommand{\@subtitlesize}{#1}}
|
||||
\newcommand{\authorsize}[1]{\renewcommand{\@authorsize}{#1}}
|
||||
\newcommand{\conferraldate}[2]{%
|
||||
\renewcommand{\@conferralmonth}{#1}
|
||||
\renewcommand{\@conferralyear}{#2}
|
||||
}
|
||||
\newcommand{\@degreefield}{Master of Science} %CHANGED
|
||||
\newcommand{\degreefield}[1]{\renewcommand{\@degreefield}{#1}} %CHANGED
|
||||
|
||||
\renewcommand{\maketitle}{%
|
||||
\begin{titlepage}%
|
||||
\vspace*{-0.24in}
|
||||
\begin{center}%
|
||||
\@titlesize \@title
|
||||
\end{center}
|
||||
\vfill
|
||||
%\begin{center}
|
||||
%\@subtitlesize
|
||||
%A \ifphd Dissertation \else Thesis \fi \\ %CHANGED
|
||||
%Presented to the Faculty of the Graduate School \\
|
||||
%of Cornell University \\
|
||||
%in Partial Fulfillment of the Requirements for the Degree of \\
|
||||
%\ifphd Doctor of Philosophy \else \@degreefield \fi %CHANGED
|
||||
%\end{center}
|
||||
\vfill
|
||||
\begin{center}
|
||||
\@authorsize
|
||||
by \\
|
||||
\@author \\
|
||||
\@conferralmonth\ \@conferralyear
|
||||
\end{center}
|
||||
\vspace*{0.26in}
|
||||
\end{titlepage}
|
||||
}
|
||||
|
||||
\renewenvironment{titlepage}{%
|
||||
\typeout{Title page}
|
||||
\pagestyle{empty}
|
||||
\doublespacing
|
||||
}{%
|
||||
\normalspacing\clearpage
|
||||
}
|
||||
|
||||
|
||||
\newenvironment{copyrightpage}{%
|
||||
\typeout{Copyleft page}
|
||||
\pagestyle{empty}
|
||||
\null\vfil
|
||||
\begin{center}
|
||||
}{%
|
||||
\end{center}
|
||||
\vfil\null
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\makecopyright}{%
|
||||
\begin{copyrightpage}
|
||||
\copyright\ \@copyrightholder\ \@copyrightyear \\
|
||||
ALL RIGHTS RESERVED \\[.5in]
|
||||
\end{copyrightpage}
|
||||
}
|
||||
\newcommand{\@copyrightholder}{\@author}
|
||||
\newcommand{\@copyrightyear}{\@conferralyear}
|
||||
|
||||
\newcommand{\copyrightholder}[1]{\renewcommand{\@copyrightholder}{#1}}
|
||||
\newcommand{\copyrightyear}[1]{\renewcommand{\@copyrightyear}{#1}}
|
||||
|
||||
|
||||
\newlength{\@abhdskip}
|
||||
\renewenvironment{abstract}{%
|
||||
\typeout{Abstract}
|
||||
\singlespacing
|
||||
\ifphd %CHANGED
|
||||
\setlength{\@abhdskip}{.25in}
|
||||
\addtolength{\@abhdskip}{-\topmargin}
|
||||
\vspace*{\@abhdskip}
|
||||
\begin{center}
|
||||
\@abstracttitle \\
|
||||
\ \\
|
||||
\@author \\
|
||||
\@conferralyear
|
||||
\end{center}
|
||||
\vspace{.25in}
|
||||
\else %CHANGED
|
||||
\chapter*{%
|
||||
\begin{center}
|
||||
\normalsize
|
||||
ABSTRACT
|
||||
\end{center}
|
||||
}
|
||||
\par
|
||||
\fi %CHANGED
|
||||
\pagestyle{empty}
|
||||
\thispagestyle{empty}
|
||||
}{%
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\@abstracttitle}{\@title}
|
||||
\newcommand{\abstracttitle}[1]{\renewcommand{\@abstracttitle}{#1}}
|
||||
|
||||
|
||||
\newenvironment{biosketch}{%
|
||||
\typeout{Vita}
|
||||
\pagestyle{plain}
|
||||
\pagenumbering{roman}
|
||||
\setcounter{page}{3}
|
||||
\prelim@contents{Biographical Sketch}
|
||||
\chapter*{%
|
||||
\bioname
|
||||
}
|
||||
\par
|
||||
}{%
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newenvironment{dedication}{%
|
||||
\prelim@contents{Dedication}
|
||||
\null\vfil
|
||||
\begin{center}
|
||||
}{
|
||||
\end{center}
|
||||
\vfil\null
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newenvironment{acknowledgements}{%
|
||||
\prelim@contents{Acknowledgments}
|
||||
\chapter*{%
|
||||
\ackname
|
||||
}
|
||||
\par
|
||||
}{%
|
||||
\cleardoublepage
|
||||
}
|
||||
|
||||
\newcommand{\contentspage}{%
|
||||
\singlespacing
|
||||
\label{toc}
|
||||
\prelim@contents{\contentsname}
|
||||
\tableofcontents
|
||||
\normalspacing
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\tablelistpage}{%
|
||||
\singlespacing
|
||||
\label{lot}
|
||||
\prelim@contents{\listtablename}
|
||||
\listoftables
|
||||
\normalspacing
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\figurelistpage}{%
|
||||
\singlespacing
|
||||
\label{lof}
|
||||
\prelim@contents{\listfigurename}
|
||||
\listoffigures
|
||||
\normalspacing
|
||||
\clearpage
|
||||
}
|
||||
\newcommand{\abbrlist}{%
|
||||
\singlespacing
|
||||
\prelim@contents{List of Abbreviations}
|
||||
\chapter*{List of Abbreviations}
|
||||
}
|
||||
|
||||
\newcommand{\symlist}{%
|
||||
\singlespacing
|
||||
\prelim@contents{List of Symbols}
|
||||
\chapter*{List of Symbols}
|
||||
}
|
||||
|
||||
\newcommand{\preface}{%
|
||||
\singlespacing
|
||||
\prelim@contents{Preface}
|
||||
\chapter*{Preface}
|
||||
}
|
||||
|
||||
\newcommand{\singlespacing}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{1.0}\tiny\CS}
|
||||
\newcommand{\singlespacingplus}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{1.25}\tiny\CS}
|
||||
\newcommand{\doublespacing}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{1.75}\tiny\CS}
|
||||
\newcommand{\realdoublespacing}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{2}\tiny\CS}
|
||||
\newcommand{\normalspacing}{\doublespacing}
|
||||
\newcommand{\footnotespacing}{\singlespacing}
|
||||
\newcommand{\changespacing}[2]{%
|
||||
\renewcommand{#1}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{#2}\tiny\CS}%
|
||||
}
|
||||
\newcommand{\changenormalspacing}[1]{\renewcommand{\normalspacing}{#1}}
|
||||
\normalspacing
|
||||
|
||||
\endinput
|
||||
%%
|
||||
%% End of file `cornell.cls'.
|
||||
@@ -0,0 +1,107 @@
|
||||
\chapter{AI Agent Usage Guide}
|
||||
\ChapterLabel{AIAgentGuide}
|
||||
\index{AI agent}
|
||||
\index{AI agent!DevOps workflow}
|
||||
\index{Appendix!AI Agent Usage Guide}
|
||||
|
||||
\section{How to Use This Appendix}
|
||||
An AI agent that creates, reviews, or maintains an assignment shall read this
|
||||
file first. It shall identify the task in the routing table, read the minimum
|
||||
authoritative sources, and expand context only for a discovered dependency or
|
||||
inconsistency. This guide is maintained in LaTeX so it is visible, versioned,
|
||||
and reviewable with the assignment.
|
||||
|
||||
\section{Governing Principles}
|
||||
The authored LaTeX files, versioned automation, and approved assignment
|
||||
materials are authoritative. The PDF is a review artifact and shall not be
|
||||
edited directly. AI may draft, explain, analyze, check consistency, and assist
|
||||
with builds. It shall not invent completion, evidence, access, costs, grades,
|
||||
approvals, command output, security posture, or operational results.
|
||||
|
||||
\section{Chapter File Convention}
|
||||
\index{AI agent!chapter file convention}
|
||||
Every assignment chapter shall be stored in exactly one file named with the
|
||||
\texttt{devops} prefix, a PascalCase chapter name, and the \texttt{.tex}
|
||||
suffix. For example, Chapter~2 is fully contained in
|
||||
\path{devopsExampleAssignment.tex}. A chapter file shall begin with its
|
||||
\texttt{\string\chapter\{...\}} command and contain all of that chapter's
|
||||
sections and subsections. Do not split one chapter across files, create
|
||||
section-only \texttt{.tex} files, or use \texttt{\string\input} or
|
||||
\texttt{\string\include} to assemble a chapter from smaller fragments.
|
||||
|
||||
Supporting non-chapter files may use a different name only when they are not
|
||||
chapter content: \texttt{prologue.tex}, \texttt{abstract.tex},
|
||||
\texttt{devopsGlossary.tex}, and \texttt{devopsReferences.bib} are examples.
|
||||
Appendix chapters follow the same chapter-file convention.
|
||||
|
||||
\section{AI Quick Start}
|
||||
\begin{enumerate}
|
||||
\item Read this guide and identify the requested outcome.
|
||||
\item Select the closest task below and load only its listed sources.
|
||||
\item Inspect supplied facts and report consequential gaps or assumptions.
|
||||
\item Make narrowly scoped changes; preserve stable IDs, glossary terms, and history.
|
||||
\item Never request, print, store, or commit credentials, tokens, personal data, or production data.
|
||||
\item Build the complete PDF, inspect the log, visually inspect affected pages, and record material AI use in \ChapterRef{AIPromptLog}.
|
||||
\end{enumerate}
|
||||
|
||||
\section{Task Routing}
|
||||
\small
|
||||
\begin{tabularx}{\linewidth}{L{4.0cm}Y}
|
||||
\caption{AI Task-Routing Table\label{Table:AITaskRouting}}\\
|
||||
\toprule \textbf{Task} & \textbf{Minimum authoritative sources}\\ \midrule
|
||||
Initialize an assignment & \texttt{devopsAssignment.tex}, \texttt{prologue.tex}, \texttt{devopsIntroduction.tex}, \texttt{devopsExampleAssignment.tex}, and the instructor's assignment facts.\\
|
||||
Develop a workflow & \texttt{devopsExampleAssignment.tex}, source repository materials, and authorized environment constraints.\\
|
||||
Define evidence & \texttt{devopsExampleAssignment.tex} and controlled execution outputs.\\
|
||||
Review a retrospective & \texttt{devopsExampleAssignment.tex} and the submitted workflow or runbook.\\
|
||||
Edit AI guidance & \texttt{devopsAIAgentGuide.tex}, \texttt{devopsAIPromptLog.tex}, \texttt{devopsDocumentGuide.tex}, and \texttt{devopsAssignment.tex}.\\
|
||||
Compile or troubleshoot & \texttt{devopsAssignment.tex}, \texttt{devopsDocumentGuide.tex}, the affected chapter, and the build log.\\ \bottomrule
|
||||
\end{tabularx}
|
||||
\normalsize
|
||||
|
||||
\section{DevOps-Specific Rules}
|
||||
\begin{enumerate}
|
||||
\item Prefer versioned, repeatable automation over undocumented manual steps.
|
||||
\item Treat deployment output, monitoring data, and screenshots as evidence only when they reflect an actual execution.
|
||||
\item Design failure exercises to be isolated, reversible, and authorized.
|
||||
\item Apply least privilege and never place secrets in LaTeX, source control, prompts, screenshots, or logs.
|
||||
\item State expected cloud cost, cleanup action, and resource ownership for each remote-environment activity.
|
||||
\item Identify whether a recommendation is a proposal, an instructor directive, or demonstrated evidence.
|
||||
\end{enumerate}
|
||||
|
||||
\section{Example AI Requests}
|
||||
\subsection{Create an Assignment Brief}
|
||||
\begin{verbatim}
|
||||
Read devopsAIAgentGuide.tex and use the Initialize an Assignment context.
|
||||
From the supplied SSW 590 objective and constraints, fill only supported
|
||||
placeholders in the introduction and activity brief. Propose clear, observable
|
||||
completion criteria, a safe cleanup action, and a rubric. Do not invent cloud
|
||||
access, due dates, policy, costs, or approved tools. Update history, compile,
|
||||
and report instructor decisions still needed.
|
||||
\end{verbatim}
|
||||
|
||||
\subsection{Review a Student Workflow}
|
||||
\begin{verbatim}
|
||||
Read devopsAIAgentGuide.tex and the workflow, evidence, and retrospective
|
||||
chapters. Review the supplied repository and sanitized evidence for
|
||||
reproducibility, least privilege, observability, rollback, and cleanup.
|
||||
Separate verified facts from gaps and recommendations. Do not claim that an
|
||||
unexecuted command passed, and do not request credentials or operate resources.
|
||||
\end{verbatim}
|
||||
|
||||
\section{Human Decisions and Information Boundaries}
|
||||
The instructor retains authority over assignment scope, grading, due dates,
|
||||
approved tooling, access, budgets, security posture, exceptions, and policy.
|
||||
An AI agent shall surface alternatives and evidence, not represent a decision
|
||||
as approved. Record material prompts, assumptions, corrections, and unresolved
|
||||
issues in \ChapterRef{AIPromptLog}.
|
||||
|
||||
\section{Completion Checklist}
|
||||
\begin{itemize}
|
||||
\item Scope, deliverables, environment, constraints, and cleanup are clear.
|
||||
\item Activity identifiers and evidence references are valid and unique.
|
||||
\item Examples contain no secrets, personal data, or unsafe production actions.
|
||||
\item New controlled terms are added to the glossary and indexed.
|
||||
\item The newest approved change is recorded in document history.
|
||||
\item The complete build succeeds with no unresolved references or missing files.
|
||||
\item A human reviews all decisions requiring instructional or operational authority.
|
||||
\end{itemize}
|
||||
@@ -0,0 +1,38 @@
|
||||
\chapter{AI Prompt Log}
|
||||
\ChapterLabel{AIPromptLog}
|
||||
\markboth{AI Prompt Log}{AI Prompt Log}
|
||||
\fancyhead[C]{\small AI Prompt Log}
|
||||
\index{AI prompt log}
|
||||
|
||||
\section{Recorded Assistance}
|
||||
\footnotesize
|
||||
\begin{longtable}{L{2.8cm}L{5.0cm}L{7.0cm}}
|
||||
\caption{AI assistance record}\label{Table:AIPromptLog}\\
|
||||
\toprule
|
||||
\textbf{Date / Version / Initials} & \textbf{Task} & \textbf{Human Review and Use} \\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\toprule
|
||||
\textbf{Date / Version / Initials} & \textbf{Task} & \textbf{Human Review and Use} \\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
October 6--7, 2026\\ 1.7.1\\ GDL, CDX, NK & Implement approved Chapter 3; update the manual, verify Actions artifacts, and apply the requested concise history/log and rubric review. & The user approved remote implementation, supplied the original source/images, and selected version 1.7.1. AI configured the runner/toolchain, corrected its memory limit, executed builds 3--4 and failure/repair 5--6, and verified downloaded PDFs by identity, checksum, links and rendered pages. The team reviews the final Actions PDF before submission. \\
|
||||
September 29, 2026\\ 1.6.1\\ NK, GDL, CDX & Complete and review the public-domain, HTTPS, evidence, recovery, and reference material for Assignment 4. & The team supplied the domain and renewal facts, verified DNS, HTTPS, certificate automation and external ports, and approved the backup/restore exercise. AI assisted with diagnostics, isolated recovery evidence, requirement auditing, live links, security explanations, concise credential and reference updates, figure-flow improvements, compilation, and visual review. \\
|
||||
September 26, 2026\\ 1.6.0\\ NK, GDL, CDX & Implement and document the MyFileAgent Gitea startup foundation while preserving the earlier grading services. & The team selected the accounts, approved changes, completed the repository workflow, ran verification commands, and supplied evidence. With permission, AI assisted with pinned Gitea/SQLite, persistent volumes, key-only SSH, and the Cloud Firewall while preserving ports 5050 and 8080 and documenting the instructor-cleared SSH exception. \\
|
||||
September 18, 2026\\ 1.5.1\\ NK, GDL, CDX & Develop and integrate Chapter 8, the Project Proposal, for the MyFileAgent one-click DevSecOps pipeline. & The team supplied the project direction and selected tools. AI assisted with organizing the proposal, defining a limited demonstration task, and presenting the planned installation, build, configuration, testing, deployment, security, and Grafana monitoring workflow. The team reviews and approves the final proposal. \\
|
||||
September 18, 2026\\ 1.5.0\\ NK, GDL, CDX & Document the DigitalOcean Droplet and Docker installation, website deployment, class-based JavaScript button design and UML diagram in Chapter 6, and the TeX Live Docker build, run, and verification workflow in Chapter 7. & The team supplied the requirements, deployment evidence, commands, and project files. AI assisted with LaTeX organization, code presentation, UML preparation, compilation, and layout review. The team reviews the material and verifies all commands and live deployment results. \\ \pagebreak
|
||||
September 12, 2026\\ 1.4.1\\ NK, GDL, CDX & Update Section 3.2 with the human-run command outputs, include Hosts and Passwords, reduce and link the glossary, and verify index links. & AI suggested Linux commands to run and assisted with document organization and LaTeX editing. The team verified the commands before running them, made changes as needed, ran the commands, and gathered the outputs. AI did not execute the commands or produce the recorded terminal outputs. \\
|
||||
September 11, 2026\\ 1.4.0\\ NK, GDL, CDX & Organize the Assignment 2 LaTeX report, integrate the supplied Linux-command chapter and problem-set chapter, and verify document layout and navigation. & The team supplied the assignment materials and terminal record, reviewed the generated text, and entered each problem set command into the terminal and manually verified the results. \\
|
||||
\end{longtable}
|
||||
\normalsize
|
||||
|
||||
\section{Evidence Boundary}
|
||||
AI assistance was used for document organization, LaTeX authoring, code and
|
||||
diagram presentation, proposal drafting, and layout review. Earlier Linux and website exercise outputs retain their original human-gathered
|
||||
attribution. Later infrastructure assistance is identified in the dated entries
|
||||
above. Assignment 5 remote execution is AI-assisted and recorded in the dated entries. The consolidated 1.7.1 entry summarizes the completed work and its user-authorized revisions.
|
||||
|
||||
\clearpage
|
||||
\fancyhead[C]{\small\nouppercase{\leftmark}}
|
||||
@@ -0,0 +1,18 @@
|
||||
% Acronyms occurring in the assignment document.
|
||||
\chapter*{Acronyms}
|
||||
\markboth{Acronyms}{Acronyms}
|
||||
\index{acronyms}
|
||||
|
||||
The following acronyms occur in the assignment document.
|
||||
|
||||
\begin{description}[style=nextline,leftmargin=2.2cm,labelindent=0pt]
|
||||
\item[\textbf{ACME}] Automated Certificate Management Environment. \hfill Reference: \hyperref[AcronymRef:ACME]{p.~\pageref*{AcronymRef:ACME}}
|
||||
\item[\textbf{AI}] Artificial Intelligence. \hfill Reference: \hyperref[AcronymRef:AI]{p.~\pageref*{AcronymRef:AI}}
|
||||
\item[\textbf{API}] Application Programming Interface. \hfill Reference: \hyperref[AcronymRef:API]{p.~\pageref*{AcronymRef:API}}
|
||||
\item[\textbf{DNS}] Domain Name System. \hfill Reference: \hyperref[AcronymRef:DNS]{p.~\pageref*{AcronymRef:DNS}}
|
||||
\item[\textbf{HTTP}] Hypertext Transfer Protocol. \hfill Reference: \hyperref[AcronymRef:HTTP]{p.~\pageref*{AcronymRef:HTTP}}
|
||||
\item[\textbf{HTTPS}] Hypertext Transfer Protocol Secure. \hfill Reference: \hyperref[AcronymRef:HTTPS]{p.~\pageref*{AcronymRef:HTTPS}}
|
||||
\item[\textbf{SSH}] Secure Shell. \hfill Reference: \hyperref[AcronymRef:SSH]{p.~\pageref*{AcronymRef:SSH}}
|
||||
\item[\textbf{TCP}] Transmission Control Protocol. \hfill Reference: \hyperref[AcronymRef:TCPAssignment4]{p.~\pageref*{AcronymRef:TCPAssignment4}}
|
||||
\item[\textbf{TLS}] Transport Layer Security. \hfill Reference: \hyperref[AcronymRef:TLS]{p.~\pageref*{AcronymRef:TLS}}
|
||||
\end{description}
|
||||
@@ -0,0 +1,3 @@
|
||||
% Compatibility entry point.
|
||||
% The authoritative Overleaf main document is the top-level main.tex file.
|
||||
\input{main.tex}
|
||||
@@ -0,0 +1,237 @@
|
||||
\chapter{Automated Manual Build}
|
||||
\ChapterLabel{AutomatedManualBuild}
|
||||
\index{Gitea Actions}\index{LaTeX!automated build}\index{build artifact}
|
||||
|
||||
\begin{devopsNote}[Assignment 5 implementation record]
|
||||
Human version \texttt{1.7.1}; document date October 7, 2026. The team authorized
|
||||
Chapter 3 implementation on its existing Droplet. Jenkins (instruction Chapter 4)
|
||||
is outside this activity. Infrastructure checks below are observed results;
|
||||
the manual build sequence below records the executed results.
|
||||
\end{devopsNote}
|
||||
|
||||
\section{Source and trigger}
|
||||
The source of truth is the existing
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline}{MyFileAgent repository}.
|
||||
The entry point is
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/documentation/main.tex}{\path{documentation/main.tex}};
|
||||
chapter sources, \texttt{cornell.cls}, bibliography, formatting files and all
|
||||
historical figures are included. The transferred source archive had SHA-256
|
||||
\path{ad93f9f2e71bc66a2b882b57510cbb7f51827637047073d6a6f78c0170e6205e}.
|
||||
Its 12 \path{hw4_images} files preserve earlier evidence. Generated PDFs,
|
||||
metadata, caches and secrets are excluded from source control.
|
||||
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/.gitea/workflows/manual-pdf.yml}{The manual workflow}
|
||||
accepts \texttt{push} events on \texttt{main} and
|
||||
\texttt{manual-build-validation}. It explicitly checks out the triggering SHA
|
||||
and disables persisted checkout credentials. Pushes use Git over HTTPS to
|
||||
\texttt{myfileagent.tech:443}. Caddy 2.11.4 terminates TLS and forwards to Gitea
|
||||
1.27.3 on private container port 3000. The host mapping remains
|
||||
\texttt{127.0.0.1:3000}. No Gitea SSH port, runner submission listener or
|
||||
compiler port was published. The runner needs no public submission port because
|
||||
source pushes terminate at Gitea, while the runner initiates outbound HTTPS
|
||||
requests to Gitea to poll for and receive jobs.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\begin{tikzpicture}[node distance=9mm and 7mm,
|
||||
every node/.style={draw,rounded corners,align=center,font=\small,text width=3.0cm,minimum height=15mm},>=Stealth]
|
||||
\node (team) {Team\\HTTPS source push};
|
||||
\node[right=of team] (gitea) {Caddy 443\\Gitea private 3000};
|
||||
\node[right=of gitea] (runner) {Runner\\HTTPS work requests};
|
||||
\node[below=of runner] (docker) {Docker daemon\\internal socket};
|
||||
\node[left=of docker] (job) {Temporary TeX job\\checkout and compile};
|
||||
\node[left=of job] (pdf) {Named PDF artifact\\team downloads};
|
||||
\draw[->] (team)--(gitea);
|
||||
\draw[->] (gitea)--(runner);
|
||||
\draw[->] (runner)--(docker);
|
||||
\draw[->] (docker)--(job);
|
||||
\draw[->] (job)--(pdf);
|
||||
\draw[<->,dashed] (gitea)--(job);
|
||||
\end{tikzpicture}
|
||||
\caption{Actual single-Droplet manual-build path. Only the runner mounts the
|
||||
Docker socket. The dashed HTTPS path carries source checkout and artifact upload; Gitea and the compiler do not share a source filesystem.}
|
||||
\label{Fig:ManualBuildArchitecture}
|
||||
\end{figure}
|
||||
|
||||
\section{Runner setup}
|
||||
\phantomsection\label{GlossaryRef:actionsrunner}\index{runner!registration}
|
||||
Runner ID 1, \texttt{assignment5-manual}, is registered only to
|
||||
\path{myfileagent/myfileagent-pipeline}. The self-managed
|
||||
\texttt{act\_runner} version is 0.6.1. Its image digest is
|
||||
\path{sha256:b5c35d6bdbb9bb25e531230bfc7cc663cb751406cbec90a2a891b85fea54de86}.
|
||||
The live files are under \path{/home/codex/myfileagent-gitea/runner};
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/ops/manual-build}{versioned non-secret configuration}
|
||||
records the deployment. \textbf{Execution mode: Docker container execution
|
||||
(\texttt{docker://}).} Each job runs in a temporary TeX container created by
|
||||
the host Docker daemon, rather than directly in the runner environment.
|
||||
The workflow's \texttt{runs-on: manual-latex} selects the runner label, which
|
||||
maps to the exact local compiler image ID recorded below. The runner polls
|
||||
Gitea over outbound HTTPS, and the job uses HTTPS for checkout and upload.
|
||||
Capacity is one job. The runner has a 192 MiB hard memory limit and 128 MiB Go
|
||||
memory target; jobs have a 256 MiB limit, no swap, 0.65 CPU and a 256-process
|
||||
limit. The initial 96 MiB runner limit caused an out-of-memory restart while
|
||||
cloning an action in run 1; its temporary container and volumes were removed.
|
||||
Increasing the bounded limit allowed run 2 to pass without another restart.
|
||||
|
||||
\EvidenceID{MAN-RUNNER-01}: October 6, 2026, America/New\_York
|
||||
(UTC log timestamps may be October 7). Expected: registered online worker,
|
||||
HTTPS reachability and an assigned job. Actual: the repository runner API
|
||||
reported ID 1 online; \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/2}{preflight run 2}
|
||||
was assigned to this worker and succeeded. Its downloaded text artifact
|
||||
verified HTTPS certificate validation and blocked direct connections from the
|
||||
job to private backend \texttt{172.20.0.2:3000} and gateway
|
||||
\texttt{172.20.0.1:3000}. The job had no Docker socket, runner-state mount or
|
||||
published ports. This is a measured bridge boundary, not a claim that every
|
||||
outbound destination is blocked. Runner registration and execution follow
|
||||
Gitea's documented model~\cite{GiteaActRunnerManual}.
|
||||
|
||||
\section{Reproducible compilation}
|
||||
TeX is installed in the temporary job image, not the Gitea application
|
||||
container. \path{ops/manual-build/Dockerfile} pins Debian by digest and its
|
||||
packages to the October 1, 2026 Debian snapshot. The built local image is
|
||||
\path{sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1}
|
||||
(1.32 GB); \texttt{force\_pull: false} selects this stored immutable image ID.
|
||||
A replacement host must rebuild from the recorded definition and update the
|
||||
recorded image ID after verification. Dependencies include TeX Live 2022,
|
||||
latexmk 4.79, BibTeX, makeindex/makeglossaries, Latin Modern and recommended
|
||||
fonts, Pygments 2.14.0 for minted, Node 18.20.4 and pypdf 3.4.1.
|
||||
|
||||
The job runs \texttt{python3} \path{documentation/ci/build_manual.py}. The helper copies
|
||||
sources into a fresh temporary directory and invokes:
|
||||
\begin{lstlisting}[language=bash]
|
||||
latexmk -pdf -shell-escape -interaction=nonstopmode \
|
||||
-halt-on-error -file-line-error main.tex
|
||||
\end{lstlisting}
|
||||
latexmk coordinates repeated PDF, bibliography and index passes. This report
|
||||
uses authored, linked glossary/acronym lists; their label references are
|
||||
resolved by repeated LaTeX passes rather than a generated glossary printout.
|
||||
Shell escape is required by minted and is restricted to trusted source in the
|
||||
job container. The helper verifies that checkout HEAD equals the triggering
|
||||
SHA, removes prior publish targets, propagates a compiler failure, rejects
|
||||
missing/empty/unreadable PDFs, verifies visible metadata, and rejects unresolved
|
||||
references/citations or duplicate labels. Only success copies
|
||||
\path{documentation/build/main.pdf} and \path{build-manifest.json} for upload.
|
||||
The original manual was precompiled in a separate temporary container before
|
||||
relying on Actions. The successful Actions records below are the authoritative
|
||||
publication evidence. The \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/9}{successful run 9}
|
||||
provides its compile-step log; the \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/9/jobs/9}{successful job log}
|
||||
records checkout, latexmk passes, PDF validation and upload. See also the
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/documentation/ci/build_manual.py}{build helper}.
|
||||
|
||||
\section{PDF version traceability}
|
||||
\phantomsection\label{GlossaryRef:buildidentity}\index{build identity}
|
||||
The human-maintained version stays \texttt{1.7.1}. The helper writes an
|
||||
uncommitted \path{build-metadata.tex} with a suffix
|
||||
\texttt{+build.RUN.SHORTSHA.attempt.ATTEMPT}, full Git commit, run number and
|
||||
clickable run URL. The title and \hyperref[Build:Identity]{Build Identity page}
|
||||
show the values of this PDF. Metadata is produced in the temporary workspace;
|
||||
no workflow step commits or pushes generated version changes. This avoids a
|
||||
push/build loop. A local compile instead says \texttt{+local.unverified} and
|
||||
must not be presented as an Actions artifact. The manifest correlates full
|
||||
commit, run/attempt, PDF checksum and page count. The checkout and artifact
|
||||
actions are pinned to tested commits, not floating tags~\cite{GiteaActionsComparisonManual}.
|
||||
|
||||
\section{Downloadable artifact}
|
||||
\phantomsection\label{GlossaryRef:buildartifact}\index{artifact!retention}
|
||||
On success, the artifact name is
|
||||
\texttt{assignment5-1.7.1-run-RUN-FULLSHA}; it contains the PDF and JSON
|
||||
manifest. Open the matching \href{\BuildRunURL}{Actions run}, select that named
|
||||
artifact, download its ZIP and extract \texttt{main.pdf}. Retention is
|
||||
explicitly requested as 14 days, rather than relying on the server default;
|
||||
expiration enforcement has not yet been observed. Keep the submitted PDF
|
||||
outside this temporary retention window~\cite{GiteaActionsConfigManual}.
|
||||
Artifacts are temporary build outputs, not permanent backups.
|
||||
|
||||
Checkout v4.2.2 is pinned to
|
||||
\path{11bd71901bbe5b1630ceea73d27597364c9af683}; upload-artifact v3.2.2 to
|
||||
\path{c6a366c94c3e0affe28c06c8df20a878f24da3cf}. The latter's legacy artifacts
|
||||
are available from the run's named download link even though the newer REST
|
||||
artifact-list endpoint returned no entries in the preflight. The direct
|
||||
preflight artifact download was verified, including ZIP checksum and contents.
|
||||
Manual artifact downloads and visible PDF checks are recorded below.
|
||||
\href{\BuildRunURL/artifacts/assignment5-1.7.1-run-\BuildRun-\BuildCommit}{Download the artifact for this PDF}.
|
||||
|
||||
\section{Change, failure, and repair evidence}
|
||||
% BEGIN BUILD EVIDENCE
|
||||
All observations below were made on October 6, 2026 (America/New\_York). Logs use UTC, where these runs are dated October 7. These are actual push-triggered manual builds, separate from infrastructure preflight runs 1--2.
|
||||
|
||||
|
||||
\paragraph{Source change 1.}
|
||||
\EvidenceID{MAN-BUILD-01}: Imported the full manual and activated its workflow. Expected: a successful full build and downloadable PDF with the triggering revision. Actual: \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/3}{run 3 passed}; full commit \path{c74087a93bf53b44a75a25c3658fc178ff253225}.
|
||||
Visible version: \path{1.7.1+build.3.c74087a.attempt.1}; 72 pages. The \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/3/artifacts/assignment5-1.7.1-run-3-c74087a93bf53b44a75a25c3658fc178ff253225}{named PDF and manifest artifact} was downloaded, opened with a PDF parser, and its PDF SHA-256 matched the manifest:
|
||||
\path{ab99995751da7a67684d97e32344cfc8d7f3d0c6c26055bbd0670b3dc030d337}.
|
||||
|
||||
|
||||
\paragraph{Source change 2.}
|
||||
\EvidenceID{MAN-BUILD-02}: Improved long-identifier wrapping and clarified the introduction. Expected: a successful full build and downloadable PDF with the triggering revision. Actual: \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/4}{run 4 passed}; full commit \path{2b8be117c7c9b2a074cc7fbfcf152e34d0e65b2a}.
|
||||
Visible version: \path{1.7.1+build.4.2b8be11.attempt.1}; 72 pages. The \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/4/artifacts/assignment5-1.7.1-run-4-2b8be117c7c9b2a074cc7fbfcf152e34d0e65b2a}{named PDF and manifest artifact} was downloaded, opened with a PDF parser, and its PDF SHA-256 matched the manifest:
|
||||
\path{ba87740958bada14f31d2236638c9b175d8b24797f715252cdb0f0af6668be06}.
|
||||
|
||||
|
||||
\paragraph{Controlled failure.}
|
||||
\EvidenceID{MAN-FAIL-01}: Expected: an invalid LaTeX command fails compilation and publishes no PDF. Actual: \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/5}{run 5 failed} for commit \path{f0e7b74ee63b40811334ee9cd4aecf035f1b0864}, on \texttt{manual-build-validation}. The deliberate \texttt{\string\AssignmentFiveControlledFailure} command caused ``Undefined control sequence'' at chapter line 4; latexmk returned 12. The workflow skipped PDF upload and the expected named artifact returned HTTP 404. Main and the deployed services remained operational.
|
||||
|
||||
|
||||
\paragraph{Repair.}
|
||||
\EvidenceID{MAN-REPAIR-01}: Removed the deliberate undefined command on the validation branch. Expected: a successful full build and downloadable PDF with the triggering revision. Actual: \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/6}{run 6 passed}; full commit \path{a4737f1a4eed5e1b786038bb917ca1ab9f1ed856}.
|
||||
Visible version: \path{1.7.1+build.6.a4737f1.attempt.1}; 72 pages. The \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/6/artifacts/assignment5-1.7.1-run-6-a4737f1a4eed5e1b786038bb917ca1ab9f1ed856}{named PDF and manifest artifact} was downloaded, opened with a PDF parser, and its PDF SHA-256 matched the manifest:
|
||||
\path{7591b1cd87f319dfc77eaa4ca9fd9727d1e7b97253a05d9a93e8624296bc736e}.
|
||||
|
||||
|
||||
The artifact name for each successful row is \texttt{assignment5-1.7.1-run-} followed by the run number, a hyphen and the full commit above. The run links and artifact links therefore identify the same source revision; version suffixes use its first seven hex digits. Full machine-readable records and downloaded PDF checksums are retained in \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/ops/manual-build/manual-build-evidence.json}{the versioned evidence manifest}. The controlled error was confined to the validation branch and its repair restored the exact source content of the second successful build.
|
||||
Visual inspection of the downloaded run-4 chapter identified overlapping architecture labels; the final source corrects the diagram. Final publication uses the current \hyperref[Build:Identity]{Build Identity} and its linked run. Download verification of that final artifact is performed after publication, without editing the PDF or creating an automatic source commit loop.
|
||||
% END BUILD EVIDENCE
|
||||
|
||||
\section{Runner and secret boundary}
|
||||
\index{runner!security}\index{Docker socket}
|
||||
The repository's Owners team may change workflows; preflight found no direct
|
||||
collaborators and no branch-protection rules. Peer review is a team procedure,
|
||||
not an enforced gate for this assignment. Only trusted team pushes to the
|
||||
selected branches execute. Untrusted pull-request triggers are not enabled.
|
||||
The runner controls the host Docker socket and therefore has powerful host
|
||||
access; containers are not a security boundary against a malicious trusted
|
||||
workflow author or Docker administrator. Jobs receive no socket or runner-state
|
||||
mount; \texttt{valid\_volumes: []}, \texttt{docker\_host: '-'}, nonprivileged
|
||||
execution and the separate bridge reduce accidental exposure. These controls
|
||||
are recorded in the non-secret
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/ops/manual-build/runner-config.yaml}{runner configuration}
|
||||
and \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/ops/manual-build/runner-compose.yaml}{runner Compose file};
|
||||
the \href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/.gitea/workflows/manual-pdf.yml}{workflow}
|
||||
records trusted push triggers and checkout permissions.
|
||||
|
||||
Registration state is stored outside Git in a mode-700 directory, with its
|
||||
\texttt{.runner} file mode 600. Registration tokens were passed without logging
|
||||
their values. A temporary implementation token has \texttt{write:repository}
|
||||
scope and resides in restricted storage outside Git; that scope covers the
|
||||
account's accessible repositories and is not a per-repository credential.
|
||||
It is not passed to build jobs. Checkout uses the Actions job credential with
|
||||
read-only workflow permissions and removes persisted Git credentials.
|
||||
The \hyperref[Table:CredentialRegistry]{Passwords table} contains hints only.
|
||||
|
||||
\section{Manual quality and controls}
|
||||
The \hyperref[Table:HostRegistry]{Hosts table} now identifies the runner,
|
||||
compiler execution and ports. The \hyperref[Table:CredentialRegistry]{Passwords
|
||||
table} now identifies protected runner state and the temporary implementation
|
||||
credential without values. \hyperref[Chapter:DocumentHistory]{Document History} and
|
||||
\AppendixRef{AIPromptLog} record the work and retain earlier attribution.
|
||||
Figure~\ref{Fig:ManualBuildArchitecture}, linked glossary/index terms and
|
||||
citations connect the operational record to its configuration and evidence.
|
||||
|
||||
The MyFileAgent team owns this single-Droplet runner. Preflight measured one
|
||||
CPU, 961 MiB RAM, about 292 MiB available memory, no swap and 18 GiB free disk;
|
||||
after the compiler image build about 17 GiB remained. No paid resize or new
|
||||
machine was purchased. Existing cloud/domain charges and transfer allowances
|
||||
were not re-audited; do not assume perpetual free service. Historical domain,
|
||||
firewall, backup and instructor-exception evidence remains in
|
||||
\ChapterRef{GiteaStartupFoundation}.
|
||||
|
||||
For a queued job, inspect branch trigger, Actions enablement, runner online
|
||||
state and label. For a compile failure, read the first LaTeX error in the
|
||||
matching job log, repair the source and push again. For absent artifacts,
|
||||
confirm PDF existence, upload success and the legacy run download link before
|
||||
assuming the REST listing is complete. Check memory/disk before retrying.
|
||||
Stop only the added runner using its separate Compose project for recovery;
|
||||
this leaves Gitea and the grading apps running. On retirement, remove runner
|
||||
ID 1 through repository settings, revoke temporary credentials, and remove
|
||||
only identified runner/job storage after preserving submission evidence.
|
||||
Do not prune all Docker storage on this shared host.
|
||||
@@ -0,0 +1,190 @@
|
||||
\chapter{DigitalOcean Docker Deployment}
|
||||
\ChapterLabel{DigitalOceanDockerDeployment}
|
||||
\index{DigitalOcean!Docker deployment}
|
||||
\index{Docker!Ubuntu installation}
|
||||
|
||||
\section{Overview}
|
||||
|
||||
The team created an Ubuntu Droplet in the DigitalOcean project named
|
||||
\textit{SSW 590 DevOps}. The Droplet is currently named
|
||||
\texttt{ssw590-group7-droplet} and has one virtual CPU, 1 GB of RAM, 25 GB of
|
||||
disk space, and the public IP address
|
||||
\href{http://142.93.193.110}{142.93.193.110}. Docker Engine was then installed
|
||||
on the Droplet by following Docker's official Ubuntu installation instructions
|
||||
\cite{DockerUbuntuInstall}. Figure~\ref{fig:digitalocean-droplet} preserves the
|
||||
original pre-upgrade cloud-console view; the text and host registry record the
|
||||
current name and capacity.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{digitalocean-droplet.png}
|
||||
\caption{Original pre-upgrade view of the Ubuntu Droplet in the SSW 590
|
||||
DevOps project; the current resource is named
|
||||
\texttt{ssw590-group7-droplet} with 1 GB RAM and 25 GB storage.}
|
||||
\label{fig:digitalocean-droplet}
|
||||
\end{figure}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\section{Installing Docker Engine on Ubuntu}
|
||||
|
||||
The package index was updated, the required certificate and download utilities
|
||||
were installed, and Docker's official GPG key was saved in the APT keyring.
|
||||
|
||||
\begin{minted}{bash}
|
||||
sudo apt update
|
||||
sudo apt install ca-certificates curl
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
|
||||
-o /etc/apt/keyrings/docker.asc
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
\end{minted}
|
||||
|
||||
The Docker repository was then added to the Ubuntu APT sources. The suite and
|
||||
architecture values were determined automatically from the operating system.
|
||||
|
||||
\begin{minted}{bash}
|
||||
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
|
||||
Types: deb
|
||||
URIs: https://download.docker.com/linux/ubuntu
|
||||
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
|
||||
Components: stable
|
||||
Architectures: $(dpkg --print-architecture)
|
||||
Signed-By: /etc/apt/keyrings/docker.asc
|
||||
EOF
|
||||
|
||||
sudo apt update
|
||||
sudo apt install docker-ce docker-ce-cli containerd.io \
|
||||
docker-buildx-plugin docker-compose-plugin
|
||||
\end{minted}
|
||||
|
||||
After installation, Docker was checked before the application images were
|
||||
built and started.
|
||||
|
||||
\begin{minted}{bash}
|
||||
sudo systemctl status docker
|
||||
sudo docker --version
|
||||
sudo docker run hello-world
|
||||
\end{minted}
|
||||
|
||||
\section{First Container: Hello World Website}
|
||||
|
||||
Following Section 2.5 of the supplied Docker setup guide, the team created a
|
||||
minimal Node.js HTTP server, its \texttt{package.json}, a
|
||||
\texttt{.dockerignore} file, and a Dockerfile based on
|
||||
\texttt{node:20-alpine}. The image was built as \texttt{hello-node}; container
|
||||
port 3000 was published through host port 5050.
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd hello-node-docker
|
||||
sudo docker build -t hello-node .
|
||||
sudo docker run -d --name hello-node -p 5050:3000 hello-node
|
||||
sudo docker ps
|
||||
\end{minted}
|
||||
|
||||
The deployed endpoint is
|
||||
\href{http://142.93.193.110:5050}{http://142.93.193.110:5050}.
|
||||
|
||||
\section{Second Container: Two Buttons Website}
|
||||
|
||||
Following Section 2.6 of the supplied guide, the team created an Express-based
|
||||
Node.js website with Blue and Red buttons. The project contained
|
||||
\texttt{server.js}, \texttt{package.json}, \texttt{public/index.html},
|
||||
\texttt{public/script.js}, and a Dockerfile. For Assignment 3 Step 3, the
|
||||
original direct event-listener functions were replaced by a reusable
|
||||
\texttt{ColorButtonController} class. Each button is represented by an instance
|
||||
that stores its DOM element and target color, binds its click event, and changes
|
||||
the page background through a class method.
|
||||
|
||||
\subsection{Class-Based JavaScript Implementation}
|
||||
|
||||
\begin{minted}{javascript}
|
||||
class ColorButtonController {
|
||||
constructor(buttonId, color) {
|
||||
this.button = document.getElementById(buttonId);
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
changeBackground() {
|
||||
document.body.style.backgroundColor = this.color;
|
||||
}
|
||||
|
||||
bind() {
|
||||
this.button.addEventListener("click", () => this.changeBackground());
|
||||
}
|
||||
}
|
||||
|
||||
const blueButton = new ColorButtonController("blueBtn", "blue");
|
||||
const redButton = new ColorButtonController("redBtn", "red");
|
||||
|
||||
blueButton.bind();
|
||||
redButton.bind();
|
||||
\end{minted}
|
||||
|
||||
The HTML loads the class-based script after defining both buttons.
|
||||
|
||||
\begin{minted}{html}
|
||||
<button id="blueBtn">Blue</button>
|
||||
<button id="redBtn">Red</button>
|
||||
<script src="script.js"></script>
|
||||
\end{minted}
|
||||
|
||||
\subsection{UML Class Diagram}
|
||||
|
||||
Figure~\ref{fig:color-button-uml} shows the updated object-oriented design.
|
||||
The minus sign indicates private implementation data and the plus sign indicates
|
||||
public operations. The same class is instantiated once for the Blue button and
|
||||
once for the Red button.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\begin{tikzpicture}[
|
||||
uml/.style={draw=black, rounded corners=1pt, align=left,
|
||||
inner sep=0pt, text width=10.5cm, font=\small}
|
||||
]
|
||||
\node[uml] (class) {%
|
||||
\begin{minipage}{10.5cm}
|
||||
\centering\textbf{ColorButtonController}\\[-2pt]
|
||||
\rule{\linewidth}{0.4pt}
|
||||
\raggedright $-$ button: HTMLButtonElement\\
|
||||
$-$ color: string\\[-2pt]
|
||||
\rule{\linewidth}{0.4pt}
|
||||
$+$ ColorButtonController(buttonId: string, color: string)\\
|
||||
$+$ bind(): void\\
|
||||
$+$ changeBackground(): void
|
||||
\end{minipage}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
\caption{UML class diagram for the class-based two-button website.}
|
||||
\label{fig:color-button-uml}
|
||||
\end{figure}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\subsection{Build and Deployment}
|
||||
|
||||
The image was rebuilt as \texttt{color-buttons-app}; container port 3000 was
|
||||
published through host port 8080. The existing container must be stopped and
|
||||
removed before the revised image is deployed with the same container name.
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd color-buttons-app
|
||||
sudo docker build -t color-buttons-app .
|
||||
sudo docker stop color-buttons-app
|
||||
sudo docker rm color-buttons-app
|
||||
sudo docker run -d --name color-buttons-app -p 8080:3000 color-buttons-app
|
||||
sudo docker ps
|
||||
\end{minted}
|
||||
|
||||
The deployed two-button website is
|
||||
\href{http://142.93.193.110:8080}{http://142.93.193.110:8080}. Clicking either
|
||||
button calls its controller instance and changes the page background to the
|
||||
corresponding color.
|
||||
|
||||
\section{Deployment Summary}
|
||||
|
||||
The completed work for Steps 1 through 3 establishes a repeatable cloud deployment
|
||||
workflow: provision the Ubuntu Droplet, install Docker from its official APT
|
||||
repository, build each application image, run the containers with published
|
||||
ports, implement reusable class-based client behavior, and confirm container
|
||||
status with \texttt{docker ps}.
|
||||
@@ -0,0 +1,156 @@
|
||||
\chapter{Document Authoring Guide}
|
||||
\ChapterLabel{DocumentGuide}
|
||||
\index{LaTeX}
|
||||
\index{document conventions}
|
||||
\index{Appendix!Document Authoring Guide}
|
||||
|
||||
\section{How to Use This Appendix}
|
||||
Use this appendix to maintain the template's file conventions, build process,
|
||||
and review rules. Update it when the document structure or toolchain changes.
|
||||
|
||||
\section{Template Provenance}
|
||||
This template was developed by \textbf{Darian Muresan, Ph.D.}, in conjunction
|
||||
with \textbf{OpenAI Codex} and \textbf{Anthropic Claude Code}. Keep this
|
||||
attribution distinct from the assignment-specific instructor metadata.
|
||||
|
||||
\section{File Naming and Responsibilities}
|
||||
Every chapter file shall use the \texttt{devops} prefix, a PascalCase chapter
|
||||
name, and the \texttt{.tex} suffix. Each such file shall contain one complete
|
||||
chapter, beginning with \texttt{\string\chapter\{...\}}, and all of its
|
||||
sections and subsections. Do not split one chapter into section-level
|
||||
\texttt{.tex} files. For example, all of Chapter~2 is contained in
|
||||
\path{devopsExampleAssignment.tex}. Do not add requirements or
|
||||
architecture-design chapters; this template records a DevOps learning activity
|
||||
and its operational evidence.
|
||||
|
||||
\section{Synonyms and Controlled Terms}
|
||||
\index{synonyms}
|
||||
Use one preferred term for each important concept. If an assignment uses
|
||||
equivalent terms, record them here before release. For example, state whether
|
||||
``continuous delivery'' refers to \gls{cd} generally or specifically excludes
|
||||
automatic production deployment. Add important terms to
|
||||
\texttt{devopsGlossary.tex} and index them where used.
|
||||
|
||||
\section{Building the PDF}
|
||||
For Assignment 5, the authoritative publication route is the versioned
|
||||
\path{.gitea/workflows/manual-pdf.yml} workflow in the MyFileAgent Gitea
|
||||
repository. A trusted push to \texttt{main} or
|
||||
\texttt{manual-build-validation} runs the registered \texttt{manual-latex}
|
||||
runner and pinned temporary TeX container. Its command is:
|
||||
\begin{verbatim}
|
||||
python3 documentation/ci/build_manual.py
|
||||
\end{verbatim}
|
||||
The workflow supplies the triggering SHA, run number, run ID and attempt
|
||||
through environment variables. The helper checks the checkout, creates
|
||||
uncommitted build metadata in a fresh temporary workspace, runs
|
||||
\texttt{latexmk -pdf} with minted shell escape, validates the PDF and references,
|
||||
and publishes only successful output. It creates
|
||||
\path{documentation/build/main.pdf} and a matching JSON manifest.
|
||||
Download the named artifact from the successful Actions run and submit only
|
||||
its PDF. See \ChapterRef{AutomatedManualBuild} for versions, limits, evidence,
|
||||
retention, troubleshooting and credential boundaries.
|
||||
|
||||
For an explicitly unverified local draft, run from the documentation folder
|
||||
inside the recorded TeX environment:
|
||||
\begin{verbatim}
|
||||
latexmk -pdf -shell-escape -interaction=nonstopmode \
|
||||
-halt-on-error -file-line-error main.tex
|
||||
\end{verbatim}
|
||||
Without generated metadata the draft visibly says \texttt{+local.unverified}.
|
||||
The legacy platform makefiles mentioned by the original template are not
|
||||
included in this project; do not present those commands as tested here.
|
||||
The toolchain includes bibliography, index and glossary utilities. This
|
||||
manual's glossary/acronym lists are authored and linked directly; repeated
|
||||
LaTeX passes resolve their links. Review compiler errors, undefined references,
|
||||
layout and navigation, and do not edit generated auxiliary files or PDFs.
|
||||
|
||||
\section{Install LaTeX Tools on macOS}
|
||||
\index{macOS}
|
||||
\index{MacTeX}
|
||||
\subsection{Recommended Installation}
|
||||
Install the current full \href{https://www.tug.org/mactex/}{MacTeX}
|
||||
distribution. It includes TeX Live, \texttt{pdflatex}, \texttt{bibtex},
|
||||
\texttt{latexmk}, \texttt{makeglossaries}, \texttt{makeindex}, and useful
|
||||
applications such as TeXShop and TeX Live Utility. The full distribution is the
|
||||
least troublesome choice for this template because it includes the packages
|
||||
used by the glossary, table, listing, color, and hyperlink features.
|
||||
|
||||
Either download the signed installer from the MacTeX web site and complete the
|
||||
macOS installation dialog, or, if Homebrew is already installed, run:
|
||||
\begin{verbatim}
|
||||
brew install --cask mactex
|
||||
\end{verbatim}
|
||||
Close and reopen Terminal after installation. If the TeX commands are not
|
||||
found, add the MacTeX binary directory to the current shell session:
|
||||
\begin{verbatim}
|
||||
export PATH="/Library/TeX/texbin:$PATH"
|
||||
\end{verbatim}
|
||||
Do not place this command in a shell profile until it has been verified on the
|
||||
local computer.
|
||||
|
||||
\subsection{Verification and Compilation}
|
||||
From the template directory, verify the tools:
|
||||
\begin{verbatim}
|
||||
command -v pdflatex bibtex latexmk makeglossaries makeindex
|
||||
\end{verbatim}
|
||||
Each command should print a path. Then create the PDF:
|
||||
\begin{verbatim}
|
||||
make -f makefileMacLinux pdf
|
||||
\end{verbatim}
|
||||
To remove generated intermediate files while keeping the PDF, run:
|
||||
\begin{verbatim}
|
||||
make -f makefileMacLinux clean
|
||||
\end{verbatim}
|
||||
|
||||
\section{Install LaTeX Tools on Windows}
|
||||
\index{Windows}
|
||||
\index{MiKTeX}
|
||||
\subsection{Recommended Installation}
|
||||
Install the current Basic MiKTeX distribution using the official
|
||||
\href{https://miktex.org/howto/install-miktex}{MiKTeX Windows installation
|
||||
guide}. During installation, choose a per-user installation when appropriate
|
||||
and set missing-package installation to \emph{Ask me first} or \emph{Yes}.
|
||||
The latter is convenient for a student machine with Internet access; the former
|
||||
makes each package installation explicit.
|
||||
|
||||
Open MiKTeX Console after installation, apply available updates, and install
|
||||
the \texttt{latexmk} package if the verification command below cannot find it.
|
||||
On an organization-managed computer, obtain approval before installing software
|
||||
or changing execution policy.
|
||||
|
||||
\subsection{Verification and Compilation}
|
||||
Open a new PowerShell window in the template directory and verify:
|
||||
\begin{verbatim}
|
||||
Get-Command pdflatex,bibtex,latexmk,makeglossaries,makeindex
|
||||
\end{verbatim}
|
||||
Each command should display a command record. Build the PDF with:
|
||||
\begin{verbatim}
|
||||
.\makefilePowerShell.ps1 -Action pdf
|
||||
\end{verbatim}
|
||||
If PowerShell blocks the script under a managed execution policy, ask the
|
||||
system administrator for the approved procedure. Do not bypass institutional
|
||||
security policy. To remove intermediate build files, run:
|
||||
\begin{verbatim}
|
||||
.\makefilePowerShell.ps1 -Action clean
|
||||
\end{verbatim}
|
||||
|
||||
\section{Common Build Problems}
|
||||
\begin{tabularx}{\linewidth}{L{3.0cm}Y}
|
||||
\toprule \textbf{Symptom} & \textbf{Resolution}\\ \midrule
|
||||
Command not found & Close and reopen the terminal. On macOS, verify the TeX
|
||||
binary path; on Windows, verify MiKTeX completed installation and is on the user PATH.\\
|
||||
Missing LaTeX package & Use MiKTeX Console or its approved on-the-fly package
|
||||
installation prompt on Windows. On macOS, install the full MacTeX distribution
|
||||
or use TeX Live Utility to add the missing package.\\
|
||||
References or glossary incomplete & Run the supplied platform build instead of
|
||||
a single \texttt{pdflatex} command; it runs BibTeX, the glossary tool, and the
|
||||
index tool in the required order.\\
|
||||
Script is blocked & Follow the institution's approved PowerShell policy or run
|
||||
the documented build commands with an approved administrator.\\ \bottomrule
|
||||
\end{tabularx}
|
||||
|
||||
\section{Authoring and Review Rules}
|
||||
Replace bracketed placeholders with assignment facts. Keep operational examples
|
||||
safe, bounded, and free of credentials. Link activities to evidence, retain
|
||||
history, and state unknowns or instructor decisions explicitly. Rebuild after
|
||||
structural, cross-reference, table, glossary, or index changes.
|
||||
@@ -0,0 +1,31 @@
|
||||
\chapter*{Document History}
|
||||
\phantomsection
|
||||
\ChapterLabel{DocumentHistory}
|
||||
\addcontentsline{toc}{chapter}{Document History}
|
||||
\markboth{Document History}{Document History}
|
||||
\index{document history}
|
||||
|
||||
\footnotesize
|
||||
\begin{longtable}{L{2.8cm}L{1.7cm}L{6.1cm}L{2.3cm}}
|
||||
\caption{Document Update History}\label{Table:DocumentHistory}\\
|
||||
\toprule
|
||||
\textbf{Date / Version} & \textbf{Author Initials} & \textbf{Change} & \textbf{Changed At} \\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\multicolumn{4}{l}{\footnotesize\itshape Document Update History (continued)}\\
|
||||
\toprule
|
||||
\textbf{Date / Version} & \textbf{Author Initials} & \textbf{Change} & \textbf{Changed At} \\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
October 6--7, 2026 / 1.7.1 & GDL, CDX, NK & Implemented Assignment 5: imported the full manual and historical images; deployed the repository-scoped runner and pinned TeX image; enabled push builds with visible commit/run identity and downloadable artifacts. Verified source builds 3--4, controlled failure 5, repair 6, and downloaded publication PDFs. Updated Hosts for runner/job resources and Passwords for credential-storage hints only. Corrected layout and links, aligned the build guide, consolidated this history and the AI log, and checked all instruction Section 3.5 requirements. & \ChapterRef{AutomatedManualBuild}, \ChapterRef{Hosts}, \ChapterRef{Passwords}, \AppendixRef{AIPromptLog} \\
|
||||
September 29, 2026 / 1.6.1 & NK, GDL, CDX & Activated \texttt{myfileagent.tech} with DNS, Caddy HTTPS, certificate and ACME evidence; documented the isolated backup/restore test, live links and temporary ports; refined the firewall, extra-credit, credential, figure-layout, and reference material; compiled and visually reviewed the manual. & \ChapterRef{GiteaStartupFoundation}, \ChapterRef{Passwords}, \AppendixRef{AIPromptLog} \\
|
||||
September 26, 2026 / 1.6.0 & NK, GDL, CDX & Established the pinned Gitea/SQLite foundation, persistence test, two-member workflow, Cloud Firewall, key-only SSH, architecture and operations; updated Hosts and Passwords and documented the instructor-cleared SSH exception. & \ChapterRef{Hosts}, \ChapterRef{Passwords}, \ChapterRef{GiteaStartupFoundation}, \AppendixRef{AIPromptLog} \\
|
||||
September 18, 2026 / 1.5.1 & NK, GDL, CDX & Added Chapter 8, the Project Proposal, describing the MyFileAgent one-click DevSecOps installation, build, configuration, testing, deployment, security, and Grafana monitoring pipeline. & \ChapterRef{ProjectProposal}, \AppendixRef{AIPromptLog} \\
|
||||
September 18, 2026 / 1.5.0 & NK, GDL, CDX & Added Chapter 6 documenting the DigitalOcean Droplet, Docker installation, website deployment, class-based JavaScript button design, and UML diagram. Added Chapter 7 documenting the TeX Live Docker image, sample LaTeX source, build and run commands, and PDF verification. Updated the supporting report sections and project files. & \ChapterRef{DigitalOceanDockerDeployment}, \ChapterRef{LatexDocker}, \AppendixRef{AIPromptLog} \\
|
||||
September 12, 2026 / 1.4.1 & NK, GDL, CDX & Added the complete Section 3 problem-set record with human-run outputs; organized the problem set as Section 3.2; included the Hosts and Passwords chapters; reduced and linked the assignment glossary; and verified the index links. & \ChapterRef{LinuxProblemSet}, \ChapterRef{Hosts}, \ChapterRef{Passwords}, \AppendixRef{AIPromptLog} \\
|
||||
September 11, 2026 / 1.4.0 & NK, GDL, CDX & Customized the group report for Assignment 2; documented the Linux setup activity; added the Linux problem-set chapter & \ChapterRef{Introduction}, \ChapterRef{LinuxCommands}, \ChapterRef{LinuxProblemSet}, \AppendixRef{AIPromptLog} \\
|
||||
September 2, 2026 / 1.3 & DDM, CDX & Provided the reusable \phantomsection\label{AcronymRef:SSW}SSW 590 DevOps assignment template and its one-file-per-chapter convention. & \hyperref[Chapter:TemplateAttribution]{Template baseline} \\
|
||||
\end{longtable}
|
||||
\normalsize
|
||||
@@ -0,0 +1,126 @@
|
||||
\chapter{Example Assignment}
|
||||
\ChapterLabel{ExampleAssignment}
|
||||
\index{activity brief}
|
||||
\index{workflow}
|
||||
\index{automation}
|
||||
\index{infrastructure as code}
|
||||
\index{evidence}
|
||||
\index{observability}
|
||||
\index{rollback}
|
||||
\index{retrospective}
|
||||
\index{continuous improvement}
|
||||
\index{submission}
|
||||
\index{cleanup}
|
||||
|
||||
\section{Activity Brief}
|
||||
\subsection{Scenario}
|
||||
Describe the operational scenario and why it matters. Use a bounded,
|
||||
non-production system. \textit{Example: A team must deploy a small service
|
||||
reliably to a remote Linux host and recover from a failed release.}
|
||||
|
||||
\subsection{Activities}
|
||||
Assign stable IDs to each assessed activity. Add rows as needed.
|
||||
\begin{tabularx}{\linewidth}{L{2.1cm}L{3.1cm}Y}
|
||||
\caption{Activity Register\label{Table:ActivityRegister}}\\
|
||||
\toprule \textbf{ID} & \textbf{Activity} & \textbf{Completion criterion}\\ \midrule
|
||||
\ActivityID{ACT-01} & \textit{[Prepare environment]} & \textit{[repeatable environment baseline is present]}\\
|
||||
\ActivityID{ACT-02} & \textit{[Automate workflow]} & \textit{[workflow runs from documented inputs]}\\
|
||||
\ActivityID{ACT-03} & \textit{[Observe and recover]} & \textit{[evidence shows monitoring and recovery]}\\ \bottomrule
|
||||
\end{tabularx}
|
||||
|
||||
\subsection{Success Criteria}
|
||||
State observable outcomes, not implementation prescriptions. Include security,
|
||||
cost, cleanup, and reproducibility criteria where applicable.
|
||||
|
||||
\subsection{Assessment Rubric}
|
||||
\begin{tabularx}{\linewidth}{L{3.2cm}L{2.0cm}Y}
|
||||
\toprule \textbf{Criterion} & \textbf{Weight} & \textbf{Evidence expected}\\ \midrule
|
||||
Reproducible workflow & \textit{[points]} & \textit{[automation and clean-run proof]}\\
|
||||
Operational quality & \textit{[points]} & \textit{[observability, rollback, security]}\\
|
||||
Evidence and explanation & \textit{[points]} & \textit{[commands, outputs, rationale]}\\
|
||||
Reflection & \textit{[points]} & \textit{[failure analysis and improvement]}\\ \bottomrule
|
||||
\end{tabularx}
|
||||
|
||||
\section{Workflow and Implementation}
|
||||
\subsection{Environment Baseline}
|
||||
Specify the authorized environment, prerequisites, access model, versioned
|
||||
inputs, and teardown procedure. Record commands in a repository script or
|
||||
infrastructure-as-code definition; do not rely on a sequence of undocumented
|
||||
console clicks.
|
||||
|
||||
\subsection{Procedure}
|
||||
For each activity, state the goal, input, command or automation entry point,
|
||||
expected result, and rollback or cleanup action. Link the corresponding
|
||||
activity identifier and evidence identifier.
|
||||
|
||||
\begin{lstlisting}[language=bash,caption={Replace with a safe, repeatable workflow entry point.}]
|
||||
# ./scripts/provision.sh --environment sandbox
|
||||
# ./scripts/deploy.sh --version <tag>
|
||||
# ./scripts/destroy.sh --environment sandbox
|
||||
\end{lstlisting}
|
||||
|
||||
\subsection{Operational Controls}
|
||||
Describe least-privilege access, secret handling, logging, monitoring, change
|
||||
control, budget guardrails, backup or rollback, and resource cleanup. A secret
|
||||
shall be referenced by its approved storage location, never pasted into this
|
||||
document or committed to the repository.
|
||||
|
||||
\subsection{Failure Exercise}
|
||||
Define one safe failure or degradation scenario. State the trigger, expected
|
||||
signal, diagnosis path, recovery action, and evidence required. Never direct
|
||||
students to disrupt shared or production infrastructure.
|
||||
|
||||
\section{Evidence Register}
|
||||
\subsection{How to Use This Section}
|
||||
Evidence demonstrates an actual execution; an expected result is not evidence.
|
||||
Use sanitized command output, logs, screenshots, links to versioned files, or
|
||||
recorded metrics. Redact secrets and personal information.
|
||||
|
||||
\begin{tabularx}{\linewidth}{L{1.7cm}L{2.2cm}L{2.6cm}Y}
|
||||
\caption{Evidence Register\label{Table:EvidenceRegister}}\\
|
||||
\toprule \textbf{ID} & \textbf{Activity} & \textbf{Evidence type} & \textbf{Location and interpretation}\\ \midrule
|
||||
\EvidenceID{EVD-01} & \ActivityRef{ACT-01} & \textit{[log / script / image]} & \textit{[repository path or sanitized URL; what it demonstrates]}\\
|
||||
\EvidenceID{EVD-02} & \ActivityRef{ACT-02} & \textit{[pipeline output]} & \textit{[location; result and relevant timestamp]}\\
|
||||
\EvidenceID{EVD-03} & \ActivityRef{ACT-03} & \textit{[monitoring / recovery output]} & \textit{[location; failure signal and recovery result]}\\ \bottomrule
|
||||
\end{tabularx}
|
||||
|
||||
\subsection{Evidence Quality Checks}
|
||||
Evidence should identify the executed version, environment, time, command or
|
||||
automation entry point, outcome, and any deviation from the expected result.
|
||||
State failures plainly; they are valuable inputs to the retrospective.
|
||||
|
||||
\section{Retrospective}
|
||||
\subsection{Outcome}
|
||||
Summarize what happened, including completed work, gaps, and unexpected
|
||||
behavior. Distinguish facts from interpretation.
|
||||
|
||||
\subsection{Flow and Feedback}
|
||||
Identify queues, handoffs, manual steps, slow feedback, and sources of rework.
|
||||
Explain which changes improved delivery flow or made failures visible sooner.
|
||||
This emphasis on flow, feedback, and continual learning is consistent with the
|
||||
DevOps framing introduced in \cite{PhoenixProject}.
|
||||
|
||||
\subsection{Improvement Experiments}
|
||||
Propose one or more small, testable improvements. State the hypothesis, change,
|
||||
measurement, expected result, and risk. Do not represent a proposal as an
|
||||
approved production change.
|
||||
|
||||
\subsection{Team Contributions}
|
||||
For team assignments, concisely identify each member's meaningful contribution
|
||||
and any collaboration constraints.
|
||||
|
||||
\section{Submission and Cleanup}
|
||||
\subsection{Submission Checklist}
|
||||
\begin{itemize}
|
||||
\item Versioned automation, configuration, and runbook are committed.
|
||||
\item Evidence links resolve and contain no secrets or personal data.
|
||||
\item The retrospective is complete and distinguishes results from proposals.
|
||||
\item Remote resources have been destroyed or explicitly transferred as directed.
|
||||
\item The repository identifies the final commit or release tag.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Academic Integrity and Responsible Use}
|
||||
Follow the course policy for collaboration and AI assistance. Cite external
|
||||
code, tutorials, and AI-generated material as required by the instructor.
|
||||
Students remain responsible for understanding, testing, and explaining all
|
||||
submitted work.
|
||||
@@ -0,0 +1,719 @@
|
||||
\chapter{Startup Foundation with Gitea}
|
||||
\ChapterLabel{GiteaStartupFoundation}
|
||||
\index{Gitea}
|
||||
\index{Docker!Gitea deployment}
|
||||
\index{SQLite}
|
||||
\index{persistent storage}
|
||||
\index{DNS}
|
||||
\index{HTTPS}
|
||||
\index{ACME}
|
||||
\index{Caddy}
|
||||
\index{certificate renewal}
|
||||
\index{Cloud Firewall}
|
||||
\index{Docker volume}
|
||||
\index{GitHub Student Developer Pack}
|
||||
\index{pull request}
|
||||
\index{SSH}
|
||||
\index{TLS}
|
||||
|
||||
\section{Student Pack Domain and DNS}
|
||||
On September 29, 2026, the team secured
|
||||
\href{https://myfileagent.tech}{\texttt{myfileagent.tech}} through
|
||||
\texttt{.TECH domains} using the
|
||||
\href{https://education.github.com/pack}{GitHub Student Developer Pack}. The
|
||||
team confirmed its eligible Pack account; the published offer provides one
|
||||
standard \texttt{.TECH} domain free for one year. The registrar listed renewal
|
||||
at \$29.99 per year. Nick owns the renewal task, disabled automatic renewal,
|
||||
and recorded the September 29, 2027 expiration date. These non-secret terms
|
||||
are recorded here without reproducing registrar account details.
|
||||
|
||||
The public \phantomsection\label{AcronymRef:DNS}DNS A record maps
|
||||
\texttt{myfileagent.tech} to the Droplet IPv4
|
||||
address \texttt{142.93.193.110}. An independently timed Windows lookup returned
|
||||
that address, plain \phantomsection\label{AcronymRef:HTTP}HTTP returned
|
||||
\texttt{308 Permanent Redirect} to the same hostname over
|
||||
\phantomsection\label{AcronymRef:HTTPS}HTTPS, and HTTPS returned
|
||||
\texttt{200 OK} through Caddy.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=0.68\textwidth]{hw4_images/domain_http_evidence.png}
|
||||
\caption{Dated independent DNS and HTTP evidence showing the public A record,
|
||||
Caddy's HTTP-to-HTTPS redirect, and a successful HTTPS response.}
|
||||
\label{fig:domain-http-evidence}
|
||||
\end{figure}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\section{Pinned Gitea Deployment}
|
||||
On September 26, 2026, the team established a deployment of
|
||||
\phantomsection\label{GlossaryRef:gitea}Gitea. It runs on
|
||||
\texttt{ssw590-group7-droplet}. The deployment uses the official rootless
|
||||
Gitea image following the official container guidance
|
||||
\cite{GiteaDockerRootless}, and the official Caddy image from Docker Hub
|
||||
\cite{CaddyDockerImage}. The exact pinned images and recorded digests are:
|
||||
|
||||
\begin{minted}{text}
|
||||
gitea_image=docker.gitea.com/gitea:1.27.3-rootless
|
||||
gitea_digest=sha256:1c17ecaead42eb3b5391553d8708103a4beb0e86edf5b9ebc1eb269c318845f2
|
||||
caddy_image=caddy:2.11.4-alpine
|
||||
caddy_digest=sha256:6aeddd44c3078b0f9a35206472a11420648a79c184603ef95957d0a20044cb2b
|
||||
\end{minted}
|
||||
|
||||
The minimal definition consists of a versioned \texttt{compose.yaml}
|
||||
and \texttt{Caddyfile}. The Gitea and Caddy services use
|
||||
\texttt{restart: unless-stopped}; Git-over-\phantomsection\label{AcronymRef:SSH}SSH
|
||||
is disabled.
|
||||
|
||||
The non-secret deployment files are versioned in the MyFileAgent repository as
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/ops/gitea/compose.yaml}{\texttt{ops/gitea/}\allowbreak\texttt{compose.yaml}}
|
||||
and
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/ops/gitea/Caddyfile}{\texttt{ops/gitea/}\allowbreak\texttt{Caddyfile}}.
|
||||
The team verified the current public files after activation. The initial
|
||||
Compose definition and Caddyfile were recorded by these commits, with later
|
||||
commits preserving their version history:
|
||||
|
||||
\begin{minted}{text}
|
||||
compose_commit=533ddfb38aaefaa36fbd130695b2e1adf566e822
|
||||
caddyfile_commit=11ac824a326d40fdce71642cd37e2543b9eea12c
|
||||
\end{minted}
|
||||
|
||||
The
|
||||
following sanitized excerpt records the reproducible service, mount, port, and
|
||||
network choices without credentials:
|
||||
|
||||
\begin{minted}{yaml}
|
||||
name: myfileagent-gitea
|
||||
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:2.11.4-alpine
|
||||
container_name: myfileagent-caddy
|
||||
restart: unless-stopped
|
||||
profiles: [https]
|
||||
ports: ["80:80", "443:443"]
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
networks: [edge, gitea-private]
|
||||
|
||||
gitea:
|
||||
image: docker.gitea.com/gitea:1.27.3-rootless
|
||||
container_name: myfileagent-gitea
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
GITEA__database__DB_TYPE: sqlite3
|
||||
GITEA__database__PATH: /var/lib/gitea/data/gitea.db
|
||||
GITEA__server__DOMAIN: "${GITEA_DOMAIN:-myfileagent.tech}"
|
||||
GITEA__server__ROOT_URL: "${GITEA_ROOT_URL:-https://myfileagent.tech/}"
|
||||
GITEA__server__DISABLE_SSH: "true"
|
||||
GITEA__service__DISABLE_REGISTRATION: "true"
|
||||
ports: ["127.0.0.1:3000:3000"]
|
||||
volumes:
|
||||
- gitea-data:/var/lib/gitea
|
||||
- gitea-config:/etc/gitea
|
||||
networks: [gitea-private]
|
||||
\end{minted}
|
||||
|
||||
From a directory containing those two files, another authorized operator can
|
||||
reproduce the current deployment with:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker compose pull
|
||||
docker compose --profile https up -d
|
||||
docker compose ps
|
||||
\end{minted}
|
||||
|
||||
Host port 3000 remains bound only to the
|
||||
\phantomsection\label{GlossaryRef:loopback}loopback interface as
|
||||
\texttt{127.0.0.1:3000}. An external connection attempt to public port 3000
|
||||
failed as expected, while a request from the Droplet to
|
||||
\texttt{http://127.0.0.1:3000/} returned HTTP 200. Public requests now terminate
|
||||
at Caddy on ports 80 and 443 and traverse the private Compose network to
|
||||
\texttt{gitea:3000}; the backend itself is never published publicly.
|
||||
|
||||
\section{Database and Persistence}
|
||||
The team selected \phantomsection\label{GlossaryRef:sqlite}SQLite because this
|
||||
is a small two-person course deployment and it avoids an unnecessary database
|
||||
service and network port. Gitea stores its database at
|
||||
\path{/var/lib/gitea/data/gitea.db}. The Docker-managed
|
||||
\phantomsection\label{GlossaryRef:dockervolume}volumes
|
||||
\texttt{myfileagent-gitea\_gitea-data} and
|
||||
\texttt{myfileagent-gitea\_gitea-config} persist application data and
|
||||
configuration outside the disposable container layer.
|
||||
|
||||
The team completed that replacement test on September 26, 2026 from
|
||||
19:52:28 to 19:53:44 UTC. The exact before and after identifiers were:
|
||||
|
||||
\begin{minted}{text}
|
||||
before_id=b0b377f252218b9495028307532d3529cd10c153dc18d3187470795b542618a8
|
||||
after_id=186dbfeaf4d21609d8fa0b98741945844c69fc4a2d35d074935508ea0b008b48
|
||||
\end{minted}
|
||||
|
||||
Before replacement, the first container served the MyFileAgent product
|
||||
repository and open Issue~\#2,
|
||||
``Implement validation that permits file operations only within the configured
|
||||
demonstration directory and rejects traversal or out-of-scope paths.'' The
|
||||
team then ran:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker compose up -d --force-recreate --no-deps gitea
|
||||
\end{minted}
|
||||
|
||||
The replacement container had the distinct after identifier shown above. The
|
||||
same repository and open issue remained available, and the command record
|
||||
reported \texttt{container\_replaced=PASS}. Both named volumes remained
|
||||
mounted at \texttt{/var/lib/gitea} and \texttt{/etc/gitea}. Therefore the
|
||||
repository, issue metadata, and configuration survived because their state was
|
||||
stored in persistent volumes rather than the replaced container layer.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{gitea_persistence_evidence.png}
|
||||
\caption{Dated container-replacement evidence showing distinct before and
|
||||
after container identifiers, the surviving MyFileAgent repository and Issue
|
||||
\#2, a PASS result, and both persistent volume mounts.}
|
||||
\label{fig:gitea-persistence-evidence}
|
||||
\end{figure}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
This test verifies container-replacement persistence only; it is not a backup
|
||||
or restore test.
|
||||
|
||||
\section{HTTPS and Certificate Renewal}
|
||||
The team selected Caddy as the \phantomsection\label{GlossaryRef:reverseproxy}
|
||||
reverse proxy and public \phantomsection\label{GlossaryRef:tls}
|
||||
\phantomsection\label{AcronymRef:TLS}TLS termination
|
||||
point. Caddy accepts public HTTPS and forwards private HTTP to
|
||||
\texttt{gitea:3000} by Compose service name on the private
|
||||
\texttt{gitea-private} network. Gitea never needs to publish its backend port
|
||||
to the public interface. Caddy publishes ports 80 and 443 through the enabled
|
||||
\texttt{https} profile. Its certificate and runtime state persist in the
|
||||
\texttt{caddy-data} and \texttt{caddy-config} volumes.
|
||||
|
||||
The team compared Let's Encrypt and ZeroSSL, two publicly trusted ACME
|
||||
certificate authorities supported by automated clients. Let's Encrypt was
|
||||
selected because it provides free automated certificates without requiring a
|
||||
paid plan and is the option recommended by the assignment. The Caddyfile pins
|
||||
the Let's Encrypt production ACME directory. Caddy's
|
||||
\phantomsection\label{GlossaryRef:acme}\phantomsection\label{AcronymRef:ACME}ACME
|
||||
automation obtained the production
|
||||
certificate, manages renewal, and adds the HTTP-to-HTTPS redirect
|
||||
\cite{CaddyAutomaticHTTPS}.
|
||||
|
||||
The production proxy configuration selects the Let's Encrypt production ACME
|
||||
directory and routes by Compose service name over the private network:
|
||||
|
||||
\begin{minted}{text}
|
||||
{
|
||||
acme_ca https://acme-v02.api.letsencrypt.org/directory
|
||||
}
|
||||
|
||||
{$GITEA_HOSTNAME} {
|
||||
reverse_proxy gitea:3000
|
||||
}
|
||||
\end{minted}
|
||||
|
||||
The Compose file defaults Gitea's \texttt{DOMAIN} to
|
||||
\texttt{myfileagent.tech} and \texttt{ROOT\_URL} to
|
||||
\texttt{https://myfileagent.tech/}. The live public repository is
|
||||
available through the
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline}{MyFileAgent product-repository link}.
|
||||
|
||||
\paragraph{Activation and rollback.}
|
||||
After the team confirmed the A record and firewall rules, it activated the
|
||||
versioned deployment with the \texttt{https} profile:
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd /home/codex/myfileagent-gitea
|
||||
docker compose --profile https config --quiet
|
||||
docker compose --profile https up -d
|
||||
\end{minted}
|
||||
|
||||
The activation preserved all four named volumes. If public access fails, the
|
||||
bounded recovery path preserves data and stops only the proxy while operators
|
||||
test the loopback service:
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd /home/codex/myfileagent-gitea
|
||||
docker compose --profile https stop caddy
|
||||
docker compose up -d gitea
|
||||
curl -fsS -o /dev/null -w 'loopback_http=%{http_code}\n' \
|
||||
http://127.0.0.1:3000/
|
||||
\end{minted}
|
||||
|
||||
\paragraph{Validation and observed production result.}
|
||||
The team validated the merged Compose model and Caddyfile before activation,
|
||||
then verified the live endpoint after activation \cite{CaddyCommandLine}:
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd /home/codex/myfileagent-gitea
|
||||
docker compose --profile https config --quiet
|
||||
docker exec myfileagent-caddy caddy validate \
|
||||
--config /etc/caddy/Caddyfile --adapter caddyfile
|
||||
\end{minted}
|
||||
|
||||
The production certificate has subject \texttt{CN=myfileagent.tech}, issuer
|
||||
\texttt{Let's Encrypt E1}, a September 29, 2026 start date, and a December 28,
|
||||
2026 expiration date. Figure~\ref{fig:domain-certificate-evidence} records
|
||||
those fields and its thumbprint; Figure~\ref{fig:domain-http-evidence} records
|
||||
the redirect and successful HTTPS response.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{hw4_images/domain_evidence.png}
|
||||
\caption{Production certificate evidence showing the MyFileAgent hostname,
|
||||
Let's Encrypt issuer, validity interval, and certificate thumbprint.}
|
||||
\label{fig:domain-certificate-evidence}
|
||||
\end{figure}
|
||||
|
||||
Caddy automatically obtains, stores, and renews managed certificates and
|
||||
creates the HTTP redirect \cite{CaddyAutomaticHTTPS}. Caddy does not document
|
||||
a Certbot-style \texttt{renew --dry-run} command. The team therefore tested
|
||||
the same automation path with a temporary \texttt{acme-test.myfileagent.tech}
|
||||
A record and Let's Encrypt staging directory. The first attempts occurred
|
||||
before public DNS propagation and reported that no record existed. The team
|
||||
confirmed the A record through the \texttt{1.1.1.1} and \texttt{8.8.8.8}
|
||||
resolvers, retried, and observed multiple external HTTP-01 requests, a valid
|
||||
authorization, and \texttt{certificate obtained successfully}. It then removed
|
||||
the temporary Caddy block and DNS record and reconfirmed production HTTPS 200.
|
||||
This is recorded as a successful staging automation exercise, not as a claim
|
||||
that the production certificate was forcibly renewed.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{hw4_images/caddy_renewal_test_evidence.png}
|
||||
\caption{Dated Caddy ACME staging evidence showing renewal information,
|
||||
successful certificate acquisition for the temporary test hostname, and a
|
||||
subsequent successful production HTTPS response.}
|
||||
\label{fig:caddy-renewal-test-evidence}
|
||||
\end{figure}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\section{Firewall and External Exposure}
|
||||
\phantomsection\label{GlossaryRef:cloudfirewall}
|
||||
\paragraph{Exposure policy and temporary exceptions.}
|
||||
The host currently publishes the earlier Assignment 3 applications on ports
|
||||
5050 and 8080 while that work is graded; both returned HTTP 200 during the
|
||||
September 26 check and were not altered. At Nick's direction, these two ports
|
||||
will remain open only until Group Assignment~\#3 is graded; afterward, the team
|
||||
will remove their inbound firewall rules when the earlier services are no
|
||||
longer needed. The new Gitea backend is not public:
|
||||
the host listener is \texttt{127.0.0.1:3000}, and an external port-3000 check
|
||||
could not connect. The DigitalOcean Cloud Firewall
|
||||
\texttt{ssw590-group7-gitea-firewall} was created and attached to the
|
||||
\texttt{ssw590-group7-droplet}. The control panel reports eight total rules,
|
||||
five inbound and three outbound. It permits
|
||||
\phantomsection\label{AcronymRef:TCPAssignment4}80/TCP,
|
||||
443/TCP, and---at the team's direction---administrative SSH on 22/TCP from all
|
||||
IPv4 and IPv6 sources, and temporarily permits 5050/TCP and 8080/TCP for
|
||||
Assignment 3 grading. Because the team requires SSH access from changing
|
||||
locations, restricting SSH to a stable list of source addresses is not
|
||||
operationally feasible. The instructor cleared this exception. SSH therefore
|
||||
remains reachable from all IPv4 and IPv6 sources while the separately verified
|
||||
key-only controls prohibit password and keyboard-interactive authentication.
|
||||
|
||||
\paragraph{Defense in depth.}
|
||||
The Droplet has public IPv4 but no public IPv6 address. Outbound
|
||||
traffic remains allowed for DNS, time synchronization, image retrieval, and
|
||||
certificate services. This control must be implemented at the DigitalOcean
|
||||
boundary rather than relying only on host UFW because Docker-published ports
|
||||
can bypass expected UFW paths \cite{DigitalOceanCloudFirewalls}. The firewall
|
||||
remains necessary even with HTTPS: HTTPS authenticates and encrypts web traffic,
|
||||
but it does not close unrelated ports, restrict which services are reachable,
|
||||
or prevent an accidentally published container port from accepting connections.
|
||||
The firewall
|
||||
is attached to one Droplet, shown by the control panel as
|
||||
\texttt{ssw590-group7-droplet}, with the expected 1~GB / 25~GB / NYC1 facts.
|
||||
Its three outbound rules allow ICMP, all TCP, and all UDP to IPv4 and IPv6
|
||||
destinations. The control panel listed no overlapping firewall.
|
||||
|
||||
\paragraph{External verification.}
|
||||
From an
|
||||
external Windows client, the team obtained the final expected results on
|
||||
September 29: 22/TCP, 80/TCP, 443/TCP, 5050/TCP, and 8080/TCP were reachable;
|
||||
the Gitea backend on 3000/TCP and database port 5432/TCP were not reachable. A
|
||||
fresh key-authenticated SSH connection also succeeded after firewall creation.
|
||||
The team additionally opened an authenticated SSH local-forwarding session
|
||||
from the same external workstation and loaded
|
||||
\path{http://localhost:3000/myfileagent/myfileagent-pipeline}. This confirms that
|
||||
the private Gitea administration path remains functional even though direct
|
||||
public access to 3000/TCP is blocked.
|
||||
Figure~\ref{fig:firewall-configuration-evidence} records the applied IPv4 and
|
||||
IPv6 rule set, and Figure~\ref{fig:firewall-external-test-evidence} records the
|
||||
external port-test results.
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\caption{Host and container port mappings after firewall creation}
|
||||
\label{tab:gitea-port-mappings}
|
||||
\small
|
||||
\begin{tabularx}{\textwidth}{L{1.9cm}L{3.4cm}Y Y}
|
||||
\toprule
|
||||
\textbf{Port} & \textbf{Listener or mapping} & \textbf{Current exposure} & \textbf{Purpose} \\
|
||||
\midrule
|
||||
22/TCP & Host OpenSSH & Public IPv4/IPv6; keys only & Administration and the verified Gitea tunnel \\
|
||||
80/TCP & Caddy \texttt{80:80} & Public through firewall & HTTP redirect and ACME validation \\
|
||||
443/TCP & Caddy \texttt{443:443} & Public through firewall & MyFileAgent HTTPS \\
|
||||
3000/TCP & \path{127.0.0.1:3000:3000} & Loopback only & Private Gitea backend and SSH tunnel \\
|
||||
5050/TCP & Earlier assignment service & Temporarily public & Assignment 3 grading \\
|
||||
5432/TCP & No listener or mapping & Not public & Unused because SQLite was selected \\
|
||||
8080/TCP & Earlier assignment service & Temporarily public & Assignment 3 grading \\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
\end{table}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{hw4_images/firewall_configuration_evidence.png}
|
||||
\caption{Sanitized DigitalOcean Cloud Firewall evidence showing inbound
|
||||
allowances for SSH, HTTP, HTTPS, and the two temporarily preserved grading
|
||||
services, plus outbound ICMP, TCP, and UDP rules for IPv4 and IPv6.}
|
||||
\label{fig:firewall-configuration-evidence}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.62\textwidth]{hw4_images/firewall_external_test_evidence.png}
|
||||
\caption{Dated external Windows-client evidence showing public ports 22, 80,
|
||||
443, 5050, and 8080 reachable while the loopback-only Gitea backend on 3000
|
||||
and the unused database port 5432 remain unreachable.}
|
||||
\label{fig:firewall-external-test-evidence}
|
||||
\end{figure}
|
||||
|
||||
\paragraph{SSH hardening and firewall attachment.}
|
||||
An initial attempt in the SSW590 team context was blocked by an account
|
||||
permissions warning related to the payment method. Switching to the authorized My Team
|
||||
context resolved that blocker and made the correct Droplet available for
|
||||
attachment. Before permitting public SSH from arbitrary locations, the team
|
||||
installed \path{/etc/ssh/sshd_config.d/00-ssw590-ssh-hardening.conf}. It
|
||||
disables password and keyboard-interactive authentication, permits root only
|
||||
with a key, and explicitly enables public-key authentication. The file passed
|
||||
\texttt{sshd -t}, and SSH was reloaded without terminating the active session.
|
||||
The team then confirmed a new key-authenticated session, confirmed that a
|
||||
password-only session was rejected, and recorded the following effective
|
||||
configuration at 23:27:51 UTC:
|
||||
|
||||
\begin{minted}{text}
|
||||
2026-09-26T23:27:51+00:00
|
||||
permitrootlogin without-password
|
||||
pubkeyauthentication yes
|
||||
passwordauthentication no
|
||||
kbdinteractiveauthentication no
|
||||
\end{minted}
|
||||
|
||||
OpenSSH reports \texttt{without-password} as the effective equivalent of the
|
||||
configured \texttt{prohibit-password} policy. These human-run checks established
|
||||
key-only SSH before Cloud Firewall attachment, and the final external test
|
||||
reconfirmed port 22. These controls support the instructor-cleared exception
|
||||
for administration from changing locations.
|
||||
|
||||
\clearpage
|
||||
\section{Startup Team Workflow}
|
||||
The team created the
|
||||
\href{https://myfileagent.tech/myfileagent}{\texttt{myfileagent} organization}
|
||||
and public
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline}{\texttt{myfileagent-pipeline} product repository}
|
||||
with an initialized
|
||||
\href{https://myfileagent.tech/myfileagent/myfileagent-pipeline/src/branch/main/README.md}{\texttt{README.md}}.
|
||||
The organization contains \texttt{nkogut} and \texttt{glovely} in the Owners
|
||||
team. The supplied configuration evidence confirms that both accounts are
|
||||
active and have the team's intended site-administrator role. Both accounts
|
||||
also participate in the organization's Owners team so that either team member
|
||||
can administer the shared startup workspace.
|
||||
|
||||
The repository contains five actionable product and operations issues. Issue
|
||||
\#1 traces the MyFileAgent product-scope documentation through branch
|
||||
\texttt{issue-1-product-scope} and Pull Request~\#6: \texttt{nkogut} authored
|
||||
the merged change and the linked issue closed. Issue~\#4 traces the versioned Gitea deployment
|
||||
through branch \texttt{issue-4-gitea-deployment} and Pull Request~\#7:
|
||||
\texttt{glovely} authored the merged change and the linked issue closed. The
|
||||
remaining issues retain the product and operations backlog.
|
||||
|
||||
The team then completed reciprocal approval on two additional merged changes:
|
||||
\texttt{nkogut} authored Pull Request~\#8 and \texttt{glovely} submitted an
|
||||
\texttt{APPROVED} review; \texttt{glovely} authored Pull Request~\#9 and
|
||||
\texttt{nkogut} submitted an \texttt{APPROVED} review. The dated evidence also
|
||||
shows both intended administrator accounts. Pull Request~\#8 references closed
|
||||
operations Issue~\#4, while Pull Request~\#9 references closed product Issue~\#1.
|
||||
Figure~\ref{fig:gitea-configuration-evidence} therefore records two complete
|
||||
issue-linked, reciprocally reviewed, merged, and closed workflow traces while
|
||||
leaving unfinished Issues~\#2, \#3, and \#5 open.
|
||||
|
||||
\noindent\textit{Evidence note.} This image was captured on September 26,
|
||||
2026, before the organization and repository received their current names.
|
||||
The displayed \texttt{filepilot/filepilot-pipeline} repository is the same
|
||||
repository now available as
|
||||
\texttt{myfileagent/myfileagent-pipeline}; its issues, pull requests, reviews,
|
||||
and history were preserved.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=0.72\textwidth]{hw4_images/gitea_configuration_evidence.png}
|
||||
\caption{Dated Gitea configuration and workflow evidence showing both
|
||||
administrator accounts, the public MyFileAgent repository, five actionable
|
||||
issues, merged Pull Requests~\#8 and \#9 linked to closed Issues~\#4 and
|
||||
\#1, and reciprocal approved reviews.}
|
||||
\label{fig:gitea-configuration-evidence}
|
||||
\end{figure}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
\section{Architecture and Operation}
|
||||
The production request path is browser to DigitalOcean Cloud Firewall to Caddy
|
||||
on 443, then Caddy to
|
||||
\texttt{gitea:3000} over the private Compose bridge network. Gitea reads its SQLite
|
||||
file and repository data from persistent Docker volumes. There is no public
|
||||
Gitea application or database port. Caddy is configured for both the edge and
|
||||
private networks; Gitea is attached only to the private network. Public
|
||||
isolation is enforced by the loopback host binding and firewall rather than
|
||||
Docker's \texttt{internal} network flag. An initial attempt using that flag
|
||||
left the requested loopback publication unprogrammed, causing an empty browser
|
||||
response; the team corrected the network definition while preserving the
|
||||
named data volumes. An authenticated SSH local-forward remains available as an
|
||||
administrative fallback and was verified before public activation.
|
||||
|
||||
Figure~\ref{fig:gitea-architecture} adapts the assignment reference to the
|
||||
team's actual SQLite deployment. Solid arrows show the active public HTTPS
|
||||
request path, the dashed arrow shows the verified SSH-tunnel fallback,
|
||||
and the data arrow terminates in Docker-managed persistent storage rather than
|
||||
the disposable Gitea container layer.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\begin{tikzpicture}[
|
||||
node distance=9mm and 12mm,
|
||||
component/.style={draw, rounded corners, align=center, minimum height=12mm,
|
||||
text width=2.45cm, fill=devopsLightBlue},
|
||||
private/.style={draw, rounded corners, align=center, minimum height=12mm,
|
||||
text width=2.45cm, fill=green!10},
|
||||
data/.style={draw, cylinder, shape border rotate=90, aspect=0.28,
|
||||
align=center, minimum height=15mm, text width=2.55cm, fill=gray!12},
|
||||
flow/.style={-{Latex[length=2.5mm]}, thick},
|
||||
tunnel/.style={-{Latex[length=2.5mm]}, thick, dashed}
|
||||
]
|
||||
\node[component] (browser) {Public browser\\HTTPS};
|
||||
\node[component, right=of browser] (firewall) {DigitalOcean\\Cloud Firewall};
|
||||
\node[component, right=of firewall] (caddy) {Caddy proxy\\\texttt{https} profile};
|
||||
\node[private, right=of caddy] (gitea) {Gitea\\\texttt{gitea:3000}};
|
||||
\node[data, below=of gitea] (storage) {\texttt{gitea-data}\\repositories +\\SQLite file};
|
||||
\node[component, below=of browser] (admin) {Team admin\\SSH client};
|
||||
\node[component, below=of firewall] (sshd) {Host OpenSSH\\key-only};
|
||||
|
||||
\draw[flow] (browser) -- node[above, font=\tiny]{443 / optional 80} (firewall);
|
||||
\draw[flow] (firewall) -- node[above, font=\tiny]{80, 443} (caddy);
|
||||
\draw[flow] (caddy) -- node[above, font=\tiny]{private} (gitea);
|
||||
\draw[flow] (gitea) -- node[right, font=\scriptsize]{mounted path} (storage);
|
||||
\draw[tunnel] (admin) -- node[above, font=\scriptsize]{22/TCP} (sshd);
|
||||
\draw[tunnel] (sshd) -| node[pos=0.72, below, font=\scriptsize]{\texttt{127.0.0.1:3000}} (gitea);
|
||||
\end{tikzpicture}
|
||||
\caption{MyFileAgent Gitea request, administration, and persistence paths.
|
||||
Caddy alone publishes the web edge; Gitea and its SQLite data remain private.}
|
||||
\label{fig:gitea-architecture}
|
||||
\end{figure}
|
||||
|
||||
\FloatBarrier
|
||||
|
||||
The service is operated from \path{/home/codex/myfileagent-gitea} with
|
||||
\texttt{docker compose}. Container status, recent logs, loopback HTTP response,
|
||||
volume presence, and memory availability were checked after startup. This
|
||||
startup check is not the required persistence-replacement test and is not a
|
||||
backup or restore test.
|
||||
|
||||
Routine restart and first-line troubleshooting use the versioned Compose
|
||||
project and do not delete named volumes:
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd /home/codex/myfileagent-gitea
|
||||
docker compose restart gitea
|
||||
docker compose ps
|
||||
docker compose logs --tail=100 gitea
|
||||
curl -fsS -o /dev/null -w 'loopback_http=%{http_code}\n' \
|
||||
http://127.0.0.1:3000/
|
||||
docker inspect myfileagent-gitea \
|
||||
--format '{{range .Mounts}}{{println .Name "->" .Destination}}{{end}}'
|
||||
\end{minted}
|
||||
|
||||
Operators first check container state and recent logs, then the loopback HTTP
|
||||
response and expected volume mounts. If public HTTPS fails while the
|
||||
loopback check succeeds, the fault domain moves outward to the private proxy
|
||||
network, Caddy logs, certificate state, DNS, and Cloud Firewall. A routine
|
||||
restart reuses the existing volumes; the completed container-replacement test
|
||||
proved persistence across replacement. Neither operation proves recoverability
|
||||
from deletion or corruption, so neither is described as a backup/restore test.
|
||||
|
||||
\section{Manual Quality and Controls}
|
||||
This chapter distinguishes observed results from planned or optional work. The
|
||||
Hosts table records the current Droplet name, capacity, address, and non-root
|
||||
administrative account, the private SSH-forwarded fallback, and the active
|
||||
public hostname \texttt{myfileagent.tech}. The Passwords table
|
||||
records only the Bitwarden entry names \texttt{Gitea - Nick},
|
||||
\texttt{Gitea - Gowri}, and \texttt{.tech Domain} for the individual
|
||||
\texttt{nkogut} and \texttt{glovely} accounts and registrar access; it contains
|
||||
no passwords or derivation information. This Assignment 4 work uses one
|
||||
consolidated history entry and one consolidated AI-assistance entry. The
|
||||
required implementation and evidence are complete, with an instructor-cleared
|
||||
SSH source-policy exception documented above. The optional backup/restore test
|
||||
is recorded separately below and is not counted among the eight required
|
||||
rubric items. Version~1.6.1 was compiled and visually inspected after the final
|
||||
content and layout updates.
|
||||
|
||||
\clearpage
|
||||
\section{Optional Extra Credit: Verified Backup and Restore}
|
||||
\index{backup and restore}
|
||||
\index{Gitea!backup and restore}
|
||||
|
||||
\paragraph{Completion status.}
|
||||
The team completed and documented every part of the optional extra credit:
|
||||
\begin{enumerate}[label=\arabic*.,leftmargin=*,nosep]
|
||||
\item a dated backup method with its scope and temporary storage location;
|
||||
\item a sanitized archive listing and a consistent cold-backup procedure; and
|
||||
\item a pre-backup repository and issue, isolated restore, repository and
|
||||
issue usability checks, labeled original/restored screenshots, and a
|
||||
dated PASS outcome with cleanup evidence.
|
||||
\end{enumerate}
|
||||
|
||||
On September 29, 2026, the team created the public
|
||||
\href{https://myfileagent.tech/nkogut/backup-restore-proof}{\texttt{nkogut/backup-restore-proof}}
|
||||
repository with an initialized \texttt{main} branch and open Issue~\#1,
|
||||
``Verify repository and issue survive isolated restore.'' Both records existed
|
||||
before the backup and served as recovery acceptance criteria.
|
||||
|
||||
\paragraph{Backup method and consistency.}
|
||||
The team used a \phantomsection\label{GlossaryRef:coldbackup}cold backup so the
|
||||
SQLite database, repositories,
|
||||
attachments, and application files belonged to one recoverable point in time.
|
||||
It stopped only the production Gitea container, archived the
|
||||
\texttt{myfileagent-gitea\_gitea-data} and
|
||||
\texttt{myfileagent-gitea\_gitea-config} volumes, then immediately restarted
|
||||
Gitea. Caddy, the firewall, and the earlier grading services were unchanged.
|
||||
Production was stopped at 20:19:13 UTC and healthy again at 20:19:17 UTC.
|
||||
|
||||
The archive was stored temporarily at
|
||||
\path{/home/codex/myfileagent-gitea/backups/}
|
||||
\path{myfileagent-gitea-backup-20260929T201913Z.tar.gz}. It was 117~KiB and
|
||||
had SHA-256 digest
|
||||
\texttt{b58b378bf1fca318160c0df370552e80ebfe967351daf3b88256c37e59bbe716}.
|
||||
The backup command used read-only source mounts:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker compose stop gitea
|
||||
docker run --rm -u "$(id -u):$(id -g)" \
|
||||
-v myfileagent-gitea_gitea-data:/source/data:ro \
|
||||
-v myfileagent-gitea_gitea-config:/source/config:ro \
|
||||
-v /home/codex/myfileagent-gitea/backups:/backup \
|
||||
caddy:2.11.4-alpine \
|
||||
sh -c 'tar -czf /backup/myfileagent-gitea-backup-20260929T201913Z.tar.gz \
|
||||
-C /source data config'
|
||||
docker compose up -d gitea
|
||||
\end{minted}
|
||||
|
||||
The sanitized listing showed both the SQLite database and repository objects
|
||||
inside the same archive:
|
||||
|
||||
\begin{minted}{text}
|
||||
data/data/gitea.db
|
||||
data/git/repositories/nkogut/backup-restore-proof.git/HEAD
|
||||
data/git/repositories/nkogut/backup-restore-proof.git/refs/heads/main
|
||||
production_after=nkogut/backup-restore-proof state=available
|
||||
production_issue_after=#1 state=open
|
||||
backup_phase=PASS
|
||||
\end{minted}
|
||||
|
||||
\paragraph{Isolated restore and verification.}
|
||||
The archive was extracted into new volumes
|
||||
\texttt{myfileagent-restore-gitea-data} and
|
||||
\texttt{myfileagent-restore-gitea-config}. A separate container named
|
||||
\texttt{myfileagent-gitea-restore-test} used the same pinned Gitea image and
|
||||
published only \texttt{127.0.0.1:3300}; it was never added to Caddy or the
|
||||
Cloud Firewall. The production volumes were not mounted into the restore
|
||||
container.
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker volume create myfileagent-restore-gitea-data
|
||||
docker volume create myfileagent-restore-gitea-config
|
||||
docker run --rm -u 0 \
|
||||
-v myfileagent-restore-gitea-data:/restore/data \
|
||||
-v myfileagent-restore-gitea-config:/restore/config \
|
||||
-v /home/codex/myfileagent-gitea/backups:/backup:ro \
|
||||
caddy:2.11.4-alpine \
|
||||
sh -c 'tar -xzf /backup/myfileagent-gitea-backup-20260929T201913Z.tar.gz \
|
||||
-C /restore && chown -R 1000:1000 /restore/data /restore/config'
|
||||
|
||||
docker run -d --name myfileagent-gitea-restore-test --restart no \
|
||||
-p 127.0.0.1:3300:3000 \
|
||||
-e GITEA__server__ROOT_URL=http://127.0.0.1:3300/ \
|
||||
-e GITEA__server__DISABLE_SSH=true \
|
||||
-v myfileagent-restore-gitea-data:/var/lib/gitea \
|
||||
-v myfileagent-restore-gitea-config:/etc/gitea \
|
||||
docker.gitea.com/gitea:1.27.3-rootless
|
||||
\end{minted}
|
||||
|
||||
The restored \phantomsection\label{AcronymRef:API}API returned the same public
|
||||
repository, default branch, and open
|
||||
issue. A Git smart-HTTP \texttt{ls-remote} request returned two refs, showing
|
||||
that the repository was usable rather than merely listed. Production remained
|
||||
healthy throughout the isolated restore test.
|
||||
|
||||
\begin{minted}{text}
|
||||
restore_ready=1
|
||||
restored_repo=nkogut/backup-restore-proof default_branch=main private=false
|
||||
restored_issue=#1 Verify repository and issue survive isolated restore state=open
|
||||
restored_git_refs=2
|
||||
restore_port=127.0.0.1:3300
|
||||
production_status=1.27.3
|
||||
restore_phase=PASS
|
||||
\end{minted}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\begin{minipage}[t]{0.49\textwidth}
|
||||
\centering
|
||||
\textbf{Production repository}\par\smallskip
|
||||
\includegraphics[width=\linewidth,trim=0 450 0 0,clip]{hw4_images/backup_original_repository.png}
|
||||
\end{minipage}\hfill
|
||||
\begin{minipage}[t]{0.49\textwidth}
|
||||
\centering
|
||||
\textbf{Isolated restored repository}\par\smallskip
|
||||
\includegraphics[width=\linewidth,trim=0 450 0 0,clip]{hw4_images/backup_restored_repository.png}
|
||||
\end{minipage}
|
||||
\caption{The initialized proof repository in production and in the separate
|
||||
loopback-only restored Gitea instance.}
|
||||
\label{fig:gitea-backup-repository-evidence}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\begin{minipage}[t]{0.49\textwidth}
|
||||
\centering
|
||||
\textbf{Production Issue \#1}\par\smallskip
|
||||
\includegraphics[width=\linewidth,trim=0 130 0 0,clip]{hw4_images/backup_original_issue.png}
|
||||
\end{minipage}\hfill
|
||||
\begin{minipage}[t]{0.49\textwidth}
|
||||
\centering
|
||||
\textbf{Restored Issue \#1}\par\smallskip
|
||||
\includegraphics[width=\linewidth,trim=0 130 0 0,clip]{hw4_images/backup_restored_issue.png}
|
||||
\end{minipage}
|
||||
\caption{The same open issue and pre-backup description in production and
|
||||
in the isolated restored instance.}
|
||||
\label{fig:gitea-backup-issue-evidence}
|
||||
\end{figure}
|
||||
|
||||
The full sanitized command record is retained as
|
||||
\path{backup_restore_evidence.txt} in the Assignment 4 working directory. It
|
||||
contains no archive contents, credentials, private keys, or access tokens. The
|
||||
backup archive itself is not part of the submitted manual. After evidence
|
||||
capture, the team removed the temporary restore container, both restore
|
||||
volumes, and the sensitive archive at 20:25:38 UTC. Each cleanup check reported
|
||||
\texttt{PASS}, and the production proof repository remained available.
|
||||
|
||||
\begin{minted}{text}
|
||||
restore_container_removed=PASS
|
||||
restore_volumes_removed=PASS
|
||||
backup_archive_removed=PASS
|
||||
production_repo=nkogut/backup-restore-proof available
|
||||
cleanup_completed=2026-09-29T20:25:38+00:00
|
||||
\end{minted}
|
||||
@@ -0,0 +1,20 @@
|
||||
% Assignment 2 glossary: only terms directly used in the assignment.
|
||||
% Each page number is an explicit hyperlink to the corresponding occurrence.
|
||||
\chapter*{Glossary}
|
||||
\markboth{Glossary}{Glossary}
|
||||
\index{glossary}
|
||||
|
||||
\begin{description}[style=nextline,leftmargin=3.1cm,labelindent=0pt]
|
||||
\item[\textbf{ACME}] The automated protocol Caddy uses to obtain and renew the MyFileAgent TLS certificate. \hfill Reference: \hyperref[GlossaryRef:acme]{p.~\pageref*{GlossaryRef:acme}}
|
||||
\item[\textbf{Cloud Firewall}] A DigitalOcean network-boundary control that permits only selected inbound traffic before it reaches the Droplet. \hfill Reference: \hyperref[GlossaryRef:cloudfirewall]{p.~\pageref*{GlossaryRef:cloudfirewall}}
|
||||
\item[\textbf{cold backup}] A consistent backup taken while the application writing the data is stopped. \hfill Reference: \hyperref[GlossaryRef:coldbackup]{p.~\pageref*{GlossaryRef:coldbackup}}
|
||||
\item[\textbf{Docker volume}] Docker-managed persistent storage whose contents survive replacement of the container that mounts it. \hfill Reference: \hyperref[GlossaryRef:dockervolume]{p.~\pageref*{GlossaryRef:dockervolume}}
|
||||
\item[\textbf{Gitea}] A self-hosted software-development service providing Git repositories, issues, organizations, and pull requests. \hfill Reference: \hyperref[GlossaryRef:gitea]{p.~\pageref*{GlossaryRef:gitea}}
|
||||
\item[\textbf{loopback interface}] A host-local interface; binding Gitea to \texttt{127.0.0.1} prevents direct access through the Droplet's public interface. \hfill Reference: \hyperref[GlossaryRef:loopback]{p.~\pageref*{GlossaryRef:loopback}}
|
||||
\item[\textbf{reverse proxy}] A service that accepts public requests and forwards them to a private backend; Caddy performs this role for Gitea. \hfill Reference: \hyperref[GlossaryRef:reverseproxy]{p.~\pageref*{GlossaryRef:reverseproxy}}
|
||||
\item[\textbf{SQLite}] An embedded database stored in a local file rather than a separately exposed database service. \hfill Reference: \hyperref[GlossaryRef:sqlite]{p.~\pageref*{GlossaryRef:sqlite}}
|
||||
\item[\textbf{TLS}] The protocol that authenticates the HTTPS endpoint and encrypts browser traffic. \hfill Reference: \hyperref[GlossaryRef:tls]{p.~\pageref*{GlossaryRef:tls}}
|
||||
\item[\textbf{build artifact}] A file produced by a workflow and retained with its run for download. \hfill Reference: \hyperref[GlossaryRef:buildartifact]{p.~\pageref*{GlossaryRef:buildartifact}}
|
||||
\item[\textbf{build identity}] The manual version combined with the triggering Git revision and workflow run identifier. \hfill Reference: \hyperref[GlossaryRef:buildidentity]{p.~\pageref*{GlossaryRef:buildidentity}}
|
||||
\item[\textbf{Actions runner}] A registered worker that requests Gitea workflow jobs and executes them in its configured environment. \hfill Reference: \hyperref[GlossaryRef:actionsrunner]{p.~\pageref*{GlossaryRef:actionsrunner}}
|
||||
\end{description}
|
||||
@@ -0,0 +1,20 @@
|
||||
\chapter{Hosts}
|
||||
\ChapterLabel{Hosts}
|
||||
\index{hosts}
|
||||
\index{DigitalOcean}
|
||||
|
||||
\section{Overview}
|
||||
This chapter lists the hosts used in the development environment for this
|
||||
assignment and any that will be configured in future assignments.
|
||||
|
||||
\section{Host Registry}
|
||||
\begin{tabularx}{\linewidth}{L{3.4cm}L{2.6cm}Y}
|
||||
\caption{Host Registry\label{Table:HostRegistry}}\\
|
||||
\toprule \textbf{Host Name} & \textbf{Provider} & \textbf{Purpose / Notes}\\ \midrule
|
||||
\endfirsthead
|
||||
\multicolumn{3}{l}{\small\itshape Host Registry (continued)}\\
|
||||
\toprule \textbf{Host Name} & \textbf{Provider} & \textbf{Purpose / Notes}\\ \midrule
|
||||
\endhead \bottomrule \endlastfoot
|
||||
\texttt{ssw590-group7-}\newline\texttt{droplet} & DigitalOcean & Ubuntu Linux development environment at \texttt{142.93.193.110}; 1 virtual CPU, 1 GB memory, and 25 GB storage; administered through the non-root \texttt{codex} account. Hosts the MyFileAgent Gitea service at \href{https://myfileagent.tech}{\texttt{myfileagent.tech}} through Caddy-managed HTTPS. Gitea remains bound to \texttt{127.0.0.1:3000}; an authenticated SSH local forward is retained as an administrative fallback.\\
|
||||
\texttt{assignment5-}\newline\texttt{manual} & Existing Droplet & Repository-scoped Actions runner ID 1; temporary TeX jobs on the same host. Team-owned, capacity one, no public runner/compiler ports; runner 192 MiB and jobs 256 MiB. HTTPS to \href{https://myfileagent.tech}{Gitea}; separate Docker bridges. Runner state is outside Git; service health was checked during setup. See \ChapterRef{AutomatedManualBuild}.\\
|
||||
\end{tabularx}
|
||||
@@ -0,0 +1,84 @@
|
||||
\chapter{Introduction}
|
||||
\ChapterLabel{Introduction}
|
||||
\index{introduction}
|
||||
\index{Linux}
|
||||
\index{Docker}
|
||||
\index{DigitalOcean}
|
||||
\index{LaTeX}
|
||||
|
||||
\section{Assignment Purpose}
|
||||
This report records the team's developing DevOps environment and the work
|
||||
completed through Assignment 4, together with the Assignment 5 automated
|
||||
manual-build work described in \ChapterRef{AutomatedManualBuild}. The earlier chapters establish Linux
|
||||
\phantomsection\label{GlossaryRef:bash}Bash command-line skills, the Ubuntu working environment, host configuration, and
|
||||
password-management concepts. Earlier assignments extended that foundation
|
||||
by deploying Docker Engine on a DigitalOcean Droplet, containerizing two Node.js
|
||||
websites, redesigning the two-button website with class-based JavaScript, and
|
||||
using a TeX Live container to compile a simple LaTeX document. The report also
|
||||
proposes the MyFileAgent Pipeline, a Python-based DevSecOps project centered on a
|
||||
one-click workflow that installs dependencies, configures the environment,
|
||||
builds containers, runs tests and security checks, deploys to DigitalOcean, and
|
||||
verifies and monitors the result. A deliberately limited LLM file-replacement
|
||||
task serves only as the pipeline's working demonstration. Assignment 4 adds a
|
||||
version-pinned Gitea service with SQLite persistence, a Student Pack domain,
|
||||
Caddy-managed HTTPS, a DigitalOcean Cloud Firewall, and a verified two-member
|
||||
repository workflow.
|
||||
|
||||
\section{Team and Environment}
|
||||
The work was completed by Nicholas Kogut and Gowri Das Lovely. The execution
|
||||
environment is an Ubuntu Linux Droplet hosted on DigitalOcean, accessed remotely
|
||||
with PuTTY. Docker provides the repeatable application environments used for
|
||||
the Node.js and LaTeX workflows. Assignment 5 moves the complete report source into the team Gitea repository
|
||||
and uses Gitea Actions for the submission PDF; operational verification is
|
||||
recorded in \ChapterRef{AutomatedManualBuild}.
|
||||
Authentication secrets, passwords, and private keys are not included in this
|
||||
report.
|
||||
|
||||
\section{Assignment Requirements}
|
||||
The retained earlier assignments required the team to:
|
||||
\begin{enumerate}[label=\arabic*.]
|
||||
\item create a DigitalOcean Droplet, install Docker Engine on Ubuntu, and
|
||||
document the deployment commands and website links using minted LaTeX;
|
||||
\item deploy the Hello World and two-button Node.js websites in Docker
|
||||
containers;
|
||||
\item replace the two-button page's direct JavaScript handlers with a reusable
|
||||
class-based design and present its UML class diagram;
|
||||
\item create and document a TeX Live Docker container that compiles a simple
|
||||
LaTeX document into a \phantomsection\label{AcronymRef:PDF}PDF; and
|
||||
\item propose a one-click DevSecOps pipeline, a minimal working demonstration,
|
||||
its DigitalOcean environment, Python toolchain, Grafana monitoring,
|
||||
comparison plan, testing strategy, and security controls.
|
||||
\item establish the MyFileAgent startup foundation with pinned Gitea,
|
||||
persistent SQLite storage, a two-member issue and pull-request
|
||||
workflow, a Student Pack domain, HTTPS, and controlled external
|
||||
exposure.
|
||||
\end{enumerate}
|
||||
|
||||
\paragraph{Assignment 5 scope.}
|
||||
Implement Chapter 3 of the instruction PDF, \texttt{dosManual-V1.18.pdf}:
|
||||
version the full manual source, configure a self-managed Gitea runner, build
|
||||
on source pushes, embed commit/run identity, publish a PDF artifact, and
|
||||
record two successful source changes plus a controlled compile failure and
|
||||
repair. Chapter 4 of the instruction PDF is outside the current scope.
|
||||
|
||||
\section{Report Organization}
|
||||
\ChapterRef{LinuxCommands} and \ChapterRef{LinuxProblemSet} retain the Linux
|
||||
environment setup, command record, questions, solutions, and observed outputs.
|
||||
\ChapterRef{Hosts} and \ChapterRef{Passwords} document the related host and
|
||||
credential-management exercises. \ChapterRef{DigitalOceanDockerDeployment}
|
||||
records the Droplet, Docker installation, Node.js deployments, class-based
|
||||
JavaScript, and UML class diagram. \ChapterRef{LatexDocker} presents the TeX Live
|
||||
container, sample source, build commands, and verification procedure.
|
||||
\ChapterRef{ProjectProposal} describes the MyFileAgent Pipeline, its one-click
|
||||
workflow, Python demonstration, tests, security gates, deployment,
|
||||
Grafana-based observability, comparison strategy, and delivery plan.
|
||||
\ChapterRef{GiteaStartupFoundation} records the verified Gitea foundation and
|
||||
its domain, HTTPS, persistence, firewall, workflow, architecture, and operating
|
||||
evidence.
|
||||
\AppendixRef{AIPromptLog} records material \phantomsection\label{AcronymRef:AI}AI
|
||||
assistance used to organize, author, and review the report.
|
||||
|
||||
\section{Submission and Verification}
|
||||
Assignment 4 evidence is retained as a historical record. Assignment 5 has verified the runner, two successive source builds, downloaded versioned artifacts, and a controlled failure/repair exercise. Submit only the PDF downloaded from the final successful
|
||||
Gitea Actions run after visual and navigation checks; a local draft is not the
|
||||
final submission. Current status appears in \ChapterRef{AutomatedManualBuild}.
|
||||
@@ -0,0 +1,105 @@
|
||||
% !TeX root = main.tex
|
||||
% This is an included chapter. Compile the top-level main.tex for the full report.
|
||||
\chapter{LaTeX Docker}
|
||||
\ChapterLabel{LatexDocker}
|
||||
\index{Docker!LaTeX container}
|
||||
\index{LaTeX!Docker compilation}
|
||||
\index{TeX Live}
|
||||
|
||||
\section{Purpose and Design}
|
||||
|
||||
Assignment 3 Step 4 requires a Docker container that compiles a simple LaTeX
|
||||
document with TeX Live, which is the TeX distribution used by Overleaf. The
|
||||
project separates the build environment from the host computer: the Docker
|
||||
image installs the required TeX Live package, copies the source document into
|
||||
the image, and runs \texttt{pdflatex}. A bind mount returns the generated PDF
|
||||
and supporting files to an \texttt{output} directory on the host.
|
||||
|
||||
The project has the following structure:
|
||||
|
||||
\begin{minted}{text}
|
||||
latex-docker/
|
||||
|-- Dockerfile
|
||||
|-- .dockerignore
|
||||
|-- sample-source.txt
|
||||
`-- output/
|
||||
\end{minted}
|
||||
|
||||
\section{Sample LaTeX Document}
|
||||
|
||||
The container compiles the following small source document. It uses only the
|
||||
base LaTeX packages installed in the image.
|
||||
|
||||
\inputminted{latex}{latex-docker/sample-source.txt}
|
||||
|
||||
\section{Dockerfile}
|
||||
|
||||
The image uses a small Debian base and installs
|
||||
\texttt{texlive-latex-base} together with the recommended fonts needed by the
|
||||
sample document. Removing the APT package lists keeps the resulting image
|
||||
smaller.
|
||||
|
||||
\begin{minted}{dockerfile}
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
texlive-latex-base \
|
||||
lmodern \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /workspace
|
||||
COPY sample-source.txt .
|
||||
|
||||
CMD ["pdflatex", "-interaction=nonstopmode", \
|
||||
"-halt-on-error", "sample-source.txt"]
|
||||
\end{minted}
|
||||
|
||||
The Docker build context excludes generated and editor-specific files.
|
||||
|
||||
\begin{minted}{text}
|
||||
output/
|
||||
*.aux
|
||||
*.log
|
||||
*.pdf
|
||||
.git
|
||||
.DS_Store
|
||||
\end{minted}
|
||||
|
||||
\section{Build and Run Procedure}
|
||||
|
||||
From the \texttt{latex-docker} directory, the output directory is created and
|
||||
the Docker image is built with the tag \texttt{latex-compiler}.
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd latex-docker
|
||||
mkdir -p output
|
||||
sudo docker build -t latex-compiler .
|
||||
\end{minted}
|
||||
|
||||
The container is then run with the host output directory mounted at
|
||||
\texttt{/workspace/output}. The command overrides the default container command
|
||||
so that all generated files are written to the mounted location. The container
|
||||
is removed automatically after compilation.
|
||||
|
||||
\begin{minted}{bash}
|
||||
sudo docker run --rm \
|
||||
-v "$(pwd)/output:/workspace/output" \
|
||||
latex-compiler \
|
||||
pdflatex -interaction=nonstopmode -halt-on-error \
|
||||
-output-directory=/workspace/output sample-source.txt
|
||||
\end{minted}
|
||||
|
||||
\section{Verification}
|
||||
|
||||
The following commands verify that the container exited successfully and that
|
||||
the expected PDF was written to the host.
|
||||
|
||||
\begin{minted}{bash}
|
||||
ls -lh output/sample-source.pdf
|
||||
file output/sample-source.pdf
|
||||
\end{minted}
|
||||
|
||||
The expected result is a valid PDF named \texttt{sample-source.pdf}. Because the build
|
||||
environment is encoded in the Dockerfile, the same source and image definition
|
||||
can be used on another Docker host to obtain a consistent compilation workflow.
|
||||
@@ -0,0 +1,148 @@
|
||||
\chapter{Linux Commands}
|
||||
\ChapterLabel{LinuxCommands}
|
||||
\index{Linux}
|
||||
\index{Linux!commands}
|
||||
\index{DigitalOcean}
|
||||
\index{PuTTY}
|
||||
|
||||
\section{Purpose}
|
||||
This chapter documents the Linux command-line activities completed for
|
||||
Assignment 2. The commands were executed on an Ubuntu Linux Droplet hosted
|
||||
on DigitalOcean. PuTTY was used to establish a secure remote terminal
|
||||
connection to the Droplet.
|
||||
|
||||
The activity created a controlled working directory containing text, \phantomsection\label{AcronymRef:CSV}CSV,
|
||||
log, binary, directory, symbolic-link, and timestamped test artifacts. These
|
||||
artifacts will be used to complete the Linux problem set.
|
||||
|
||||
\section{Execution Environment}
|
||||
Table~\ref{Table:LinuxEnvironment} summarizes the environment used for this
|
||||
activity. Passwords, private keys, and complete authentication credentials
|
||||
are not included.
|
||||
|
||||
\begin{table}[htbp]
|
||||
\centering
|
||||
\caption{Linux command execution environment}
|
||||
\label{Table:LinuxEnvironment}
|
||||
\begin{tabularx}{\linewidth}{L{0.28\linewidth}Y}
|
||||
\toprule
|
||||
\textbf{Environment Item} & \textbf{Configuration} \\
|
||||
\midrule
|
||||
Cloud platform & DigitalOcean \\
|
||||
Virtual host & Ubuntu Droplet \\
|
||||
Droplet name & \texttt{ssw590-group7-droplet} \\
|
||||
Droplet configuration & 1 virtual CPU, 1 GB memory, and 25 GB storage \\
|
||||
Remote-access tool & PuTTY \\
|
||||
Operating system & Ubuntu Linux \\
|
||||
Remote user & \texttt{root} \\
|
||||
Working directory & \texttt{/root/lx-test} \\
|
||||
Activity status & Initial test environment successfully created \\
|
||||
\bottomrule
|
||||
\end{tabularx}
|
||||
\end{table}
|
||||
|
||||
\section{Test Environment Setup}
|
||||
The following instructor-provided commands were executed in the DigitalOcean
|
||||
Ubuntu terminal. \phantomsection\label{AcronymRef:EE}\phantomsection\label{AcronymRef:CS} to perform the setup steps required for the problem set. These commands normally produce no terminal output when they
|
||||
complete successfully.
|
||||
|
||||
\begin{lstlisting}[language=bash,caption={Initial DigitalOcean terminal record},label={Listing:InitialTerminalRecord}]
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~#
|
||||
mkdir -p ~/lx-test && cd ~/lx-test
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
printf "alpha\nbeta\nGamma\ngamma\nbeta\n" > words.txt
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
printf "id,name,dept\n1,Ada,EE\n2,Linus,CS\n3,Grace,EE\n4,Dennis,CS\n" > people.csv
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
printf "INFO boot ok\nWARN disk low\nERROR fan fail\nINFO shutdown\n" > sys.log
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
dd if=/dev/zero of=blob.bin bs=1K count=48 status=none
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
mkdir -p src/lib tmp archive
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
printf "one two three four\n" > src/file1.txt
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
printf "two three four five\n" > src/file2.txt
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
ln -s src/file1.txt link-to-file1
|
||||
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
touch -t 202401020304 old.txt
|
||||
root@ubuntu-s-1vcpu-512mb-10gb-nyc1:~/lx-test#
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{comment}
|
||||
\section{Created Artifacts}
|
||||
The setup commands created the artifacts summarized in
|
||||
Table~\ref{Table:LinuxArtifacts}.
|
||||
|
||||
\footnotesize
|
||||
\begin{longtable}{L{0.25\linewidth}L{0.22\linewidth}L{0.42\linewidth}}
|
||||
\caption{Artifacts created by the Linux setup commands}\label{Table:LinuxArtifacts}\\
|
||||
\toprule
|
||||
\textbf{Artifact} & \textbf{Type} & \textbf{Purpose or Contents} \\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\multicolumn{3}{l}{\footnotesize\itshape Created Linux artifacts (continued)}\\
|
||||
\toprule
|
||||
\textbf{Artifact} & \textbf{Type} & \textbf{Purpose or Contents} \\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
\texttt{words.txt} & Text file & Contains mixed-case and repeated words for sorting and filtering.\\
|
||||
\texttt{people.csv} & CSV file & Contains a header and four EE and CS personnel records.\\
|
||||
\texttt{sys.log} & Log file & Contains INFO, WARN, and ERROR entries for searching and filtering.\\
|
||||
\texttt{blob.bin} & Binary file & Contains 48 KiB of zero-valued data from \texttt{/dev/zero}.\\
|
||||
\texttt{src/} & Directory & Contains two text files and the nested \texttt{lib/} directory.\\
|
||||
\texttt{tmp/} & Directory & Temporary working location for later commands.\\
|
||||
\texttt{archive/} & Directory & Destination for later archive operations.\\
|
||||
\texttt{src/file1.txt} & Text file & Contains \texttt{one two three four}.\\
|
||||
\texttt{src/file2.txt} & Text file & Contains \texttt{two three four five}.\\
|
||||
\texttt{link-to-file1} & Symbolic link & Points to \texttt{src/file1.txt}.\\
|
||||
\texttt{old.txt} & Timestamped file & Modification time set to January 2, 2024 at 03:04.\\
|
||||
\end{longtable}
|
||||
\normalsize
|
||||
|
||||
\section{Initial Terminal Record}
|
||||
The following record reproduces the observed terminal interaction. The return
|
||||
of the shell prompt without an error indicates that each silent setup command
|
||||
was accepted.
|
||||
|
||||
|
||||
|
||||
\section{Verification Procedure}
|
||||
The following commands will verify the working directory, created files,
|
||||
directory hierarchy, symbolic link, file contents, binary size, and timestamp.
|
||||
|
||||
\begin{lstlisting}[language=bash,caption={Linux test-environment verification commands},label={Listing:LinuxVerificationCommands}]
|
||||
pwd
|
||||
ls -lah
|
||||
find . -maxdepth 3 -type d | sort
|
||||
cat words.txt
|
||||
cat people.csv
|
||||
cat sys.log
|
||||
cat src/file1.txt
|
||||
cat src/file2.txt
|
||||
ls -l link-to-file1
|
||||
cat link-to-file1
|
||||
stat -c "%n: %s bytes" blob.bin
|
||||
stat -c "%n: %y" old.txt
|
||||
\end{lstlisting}
|
||||
|
||||
The observed output will be added after the team executes these verification
|
||||
commands on the shared Droplet.
|
||||
|
||||
\section{Linux Problem Set}
|
||||
The solutions to \texttt{linuxProblemSet.pdf} will be added to this section
|
||||
after the problem set is reviewed. Each solution will include the executed
|
||||
command, relevant output, and a concise explanation.
|
||||
\end{comment}
|
||||
@@ -0,0 +1,607 @@
|
||||
\chapter{Linux Command Problem Set}
|
||||
\ChapterLabel{LinuxProblemSet}
|
||||
\index{Linux!problem set}
|
||||
|
||||
\section{Execution Guidance}
|
||||
The following answers are written for the test environment created in \ChapterRef{LinuxCommands}. Commands were suggested by AI for the team to run, then verified by the team before execution; the team made changes as needed, ran the commands, and gathered the outputs. All problem-set commands and recorded outputs were executed and collected by humans, not by AI. Commands were executed from \texttt{/root/lx-test}.
|
||||
|
||||
\section{Problem Set}
|
||||
|
||||
\subsection*{A) Navigation \& File Ops}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=1]
|
||||
\item \textbf{Show your present working directory path only.}
|
||||
\index{Linux command!pwd}
|
||||
\begin{lstlisting}[language=bash]
|
||||
pwd
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
/root/lx-test
|
||||
\end{lstlisting}
|
||||
The command reports the current working directory used for the problem set.
|
||||
\item \textbf{List all entries in the current directory, one per line, including dotfiles.}
|
||||
\index{Linux command!ls}
|
||||
\begin{lstlisting}[language=bash]
|
||||
ls -a1
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
.
|
||||
..
|
||||
archive
|
||||
blob.bin
|
||||
link-to-file1
|
||||
old.txt
|
||||
people.csv
|
||||
src
|
||||
sys.log
|
||||
tmp
|
||||
words.txt
|
||||
\end{lstlisting}
|
||||
The `-a` option includes dotfiles and the `-1` option displays one entry per line.
|
||||
\item \textbf{Copy `src/file1.txt` to `tmp/` only if `tmp` exists; do it verbosely.}
|
||||
\index{Linux command!cp}
|
||||
\begin{lstlisting}[language=bash]
|
||||
[ -d tmp ] && cp -v src/file1.txt tmp/
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
'src/file1.txt' -> 'tmp/file1.txt'
|
||||
\end{lstlisting}
|
||||
The conditional copy runs only when `tmp` exists, and verbose mode reports the copy operation.
|
||||
\item \textbf{Move `old.txt` into `archive/` and keep its original timestamp.}
|
||||
\index{Linux command!mv}
|
||||
\begin{lstlisting}[language=bash]
|
||||
mv -v old.txt archive/
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
renamed 'old.txt' -> 'archive/old.txt'
|
||||
\end{lstlisting}
|
||||
The move is performed as a rename within the same filesystem, so the file's modification timestamp is retained.
|
||||
\item \textbf{Create a new empty file `notes.md` only if it does not already exist.}
|
||||
\index{Linux command!touch}
|
||||
\begin{lstlisting}[language=bash]
|
||||
[ -e notes.md ] || touch notes.md
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
(no terminal output)
|
||||
\end{lstlisting}
|
||||
The existence test prevents `touch` from changing an existing file's timestamp.
|
||||
\item \textbf{Show human-readable disk usage for the `src` directory only.}
|
||||
\index{Linux command!du}
|
||||
\begin{lstlisting}[language=bash]
|
||||
du -sh src
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
16K src
|
||||
\end{lstlisting}
|
||||
The command reports the allocated disk usage for `src` in human-readable form.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection*{B) Viewing \& Searching}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=7]
|
||||
\item \textbf{Print line numbers while displaying `sys.log`.}
|
||||
\index{Linux command!nl}
|
||||
\begin{lstlisting}[language=bash]
|
||||
nl -ba sys.log
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
1 INFO boot ok
|
||||
2 WARN disk low
|
||||
3 ERROR fan fail
|
||||
4 INFO shutdown
|
||||
\end{lstlisting}
|
||||
The `-b` option numbers all lines, including blank lines if present.
|
||||
\item \textbf{Show only lines in `sys.log` containing `ERROR`, case-sensitively.}
|
||||
\index{Linux command!grep}
|
||||
\begin{lstlisting}[language=bash]
|
||||
grep 'ERROR' sys.log
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
ERROR fan fail
|
||||
\end{lstlisting}
|
||||
The pattern is matched with case sensitivity, so only matching lines are returned.
|
||||
\item \textbf{Count the distinct words in `words.txt`, case-insensitively.}
|
||||
\index{Linux command!sort}
|
||||
\begin{lstlisting}[language=bash]
|
||||
sort -fu words.txt | wc -l
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
3
|
||||
\end{lstlisting}
|
||||
Sorting with `-f` and `-u` provides a case-insensitive unique count.
|
||||
\item \textbf{Show lines in `words.txt` that start with `g` or `G`.}
|
||||
\index{Linux command!grep}
|
||||
\begin{lstlisting}[language=bash]
|
||||
grep -i '^g' words.txt
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
Gamma
|
||||
gamma
|
||||
\end{lstlisting}
|
||||
The case-insensitive anchored pattern selects lines beginning with the letter `g`.
|
||||
\item \textbf{Display the first two lines of `people.csv` without an editor.}
|
||||
\index{Linux command!head}
|
||||
\begin{lstlisting}[language=bash]
|
||||
head -n 2 people.csv
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
id,name,dept
|
||||
1,Ada,EE
|
||||
\end{lstlisting}
|
||||
The command returns the first two lines of the CSV.
|
||||
\item \textbf{Show the last three lines of `sys.log` and keep following if it grows.}
|
||||
\index{Linux command!tail}
|
||||
\begin{lstlisting}[language=bash]
|
||||
tail -n 3 -f sys.log
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
WARN disk low
|
||||
ERROR fan fail
|
||||
INFO shutdown
|
||||
^C
|
||||
\end{lstlisting}
|
||||
The command displays the current final three lines and then waits for additional lines until interrupted.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection*{C) Text Processing}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=13]
|
||||
\item \textbf{Print only the second, name column from `people.csv`, excluding the header.}
|
||||
\index{Linux command!awk}
|
||||
\begin{lstlisting}[language=bash]
|
||||
awk -F, 'NR > 1 {print $2}' people.csv
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
Ada
|
||||
Linus
|
||||
Grace
|
||||
Dennis
|
||||
\end{lstlisting}
|
||||
The `awk` field separator is a comma, and records after the header print field 2.
|
||||
\item \textbf{Sort `words.txt` case-insensitively and remove duplicates.}
|
||||
\index{Linux command!tr}
|
||||
\begin{lstlisting}[language=bash]
|
||||
tr '[:upper:]' '[:lower:]' < words.txt | sort -u
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
alpha
|
||||
beta
|
||||
gamma
|
||||
\end{lstlisting}
|
||||
The pipeline lowercases the input before sorting uniquely.
|
||||
\item \textbf{Replace every `three` with `3` in all files under `src/` in place, creating `.bak` backups.}
|
||||
\index{Linux command!sed}
|
||||
\begin{lstlisting}[language=bash]
|
||||
find src -type f ! -name '*.bak' -exec sed -i.bak 's/three/3/g' {} +
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
(no terminal output)
|
||||
\end{lstlisting}
|
||||
The command edits matching files in place while excluding existing backup files and creating `.bak` copies.
|
||||
\textbf{Verification step:}
|
||||
\begin{lstlisting}
|
||||
$ cat src/file1.txt
|
||||
one two 3 four
|
||||
\end{lstlisting}
|
||||
The verification command is included as evidence of the resulting file state and is not part of the solution command.
|
||||
\item \textbf{Print the line, word, and byte counts for every `*.txt` file in `src/`.}
|
||||
\index{Linux command!wc}
|
||||
\begin{lstlisting}[language=bash]
|
||||
find src -type f -name '*.txt' -exec wc -l -w -c {} +
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
1 4 15 src/file1.txt
|
||||
1 4 16 src/file2.txt
|
||||
2 8 31 total
|
||||
\end{lstlisting}
|
||||
The command reports line, word, and byte counts for the matching text files and a total.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection*{D) Permissions \& Ownership}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=17]
|
||||
\item \textbf{Make `tmp/` readable, writable, and searchable only by its owner.}
|
||||
\index{Linux command!chmod}
|
||||
\begin{lstlisting}[language=bash]
|
||||
chmod 700 tmp
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
(no terminal output)
|
||||
\end{lstlisting}
|
||||
Mode `700` grants the owner read, write, and execute \phantomsection\label{GlossaryRef:permissions}\gls{permissions} while granting none to group or others.
|
||||
\item \textbf{Give group execute permission to `src/lib` recursively without changing owner or other bits.}
|
||||
\index{Linux command!chmod}
|
||||
\begin{lstlisting}[language=bash]
|
||||
chmod -R g+x src/lib
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
(no terminal output)
|
||||
\end{lstlisting}
|
||||
The recursive `g+x` operation adds group execute permission without changing the other \gls{permissions}.
|
||||
\item \textbf{Show the numeric octal permissions of `src/file2.txt`.}
|
||||
\index{Linux command!stat}
|
||||
\begin{lstlisting}[language=bash]
|
||||
stat -c '%a' src/file2.txt
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
644
|
||||
\end{lstlisting}
|
||||
The command prints the file's numeric \gls{permissions} mode.
|
||||
\item \textbf{Make `notes.md` append-only via file attributes, if supported.}
|
||||
\index{Linux command!chattr}
|
||||
\begin{lstlisting}[language=bash]
|
||||
chattr +a notes.md && lsattr notes.md
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
-----a--------e------- notes.md
|
||||
\end{lstlisting}
|
||||
The command sets the append-only attribute and then displays the file attributes to verify it.
|
||||
\end{enumerate}
|
||||
|
||||
\section*{E) Links and Find}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=21]
|
||||
\item \textbf{Verify that `link-to-file1` is a symbolic link and show its target.}
|
||||
\index{Linux command!symbolic links}
|
||||
\begin{lstlisting}[language=bash]
|
||||
[ -L link-to-file1 ] && readlink link-to-file1
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
src/file1.txt
|
||||
\end{lstlisting}
|
||||
The test succeeds only for a \phantomsection\label{GlossaryRef:symboliclink}\gls{symboliclink}, after which `readlink` prints its target.
|
||||
\item \textbf{Find all regular files under the current tree larger than 40 KiB.}
|
||||
\index{Linux command!find}
|
||||
\begin{lstlisting}[language=bash]
|
||||
find . -type f -size +40k -print
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
./blob.bin
|
||||
\end{lstlisting}
|
||||
The search restricts results to regular files whose size exceeds 40 KiB.
|
||||
\item \textbf{Find files modified in the last ten minutes under `tmp/` and print their sizes.}
|
||||
\index{Linux command!find}
|
||||
\begin{lstlisting}[language=bash]
|
||||
find tmp -type f -mmin -10 -printf '%s %p\n'
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
19 tmp/file1.txt
|
||||
\end{lstlisting}
|
||||
The search filters by modification time and prints each matching size followed by its path.
|
||||
\end{enumerate}
|
||||
|
||||
\section*{F) Processes \& Job Control}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=24]
|
||||
\item \textbf{Show your processes in a tree view.}\phantomsection\label{AcronymRef:PPID}
|
||||
\index{Linux command!processes}
|
||||
\begin{lstlisting}[language=bash]
|
||||
ps -u "$USER" --forest -o pid,ppid,stat,cmd
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
PID PPID STAT CMD
|
||||
2 0 S [kthreadd]
|
||||
3 2 S \_ [pool_workqueue_release]
|
||||
4 2 I< \_ [kworker/R-rcu_g]
|
||||
5 2 I< \_ [kworker/R-rcu_p]
|
||||
6 2 I< \_ [kworker/R-slub_]
|
||||
7 2 I< \_ [kworker/R-netns]
|
||||
9 2 I< \_ [kworker/0:0H-kblockd]
|
||||
12 2 I< \_ [kworker/R-mm_pe]
|
||||
13 2 I \_ [rcu_tasks_kthread]
|
||||
14 2 I \_ [rcu_tasks_rude_kthread]
|
||||
15 2 I \_ [rcu_tasks_trace_kthread]
|
||||
16 2 S \_ [ksoftirqd/0]
|
||||
17 2 I \_ [rcu_preempt]
|
||||
18 2 S \_ [migration/0]
|
||||
19 2 S \_ [idle_inject/0]
|
||||
20 2 S \_ [cpuhp/0]
|
||||
21 2 S \_ [kdevtmpfs]
|
||||
22 2 I< \_ [kworker/R-inet_]
|
||||
23 2 S \_ [kauditd]
|
||||
24 2 S \_ [khungtaskd]
|
||||
26 2 S \_ [oom_reaper]
|
||||
28 2 I< \_ [kworker/R-write]
|
||||
29 2 S \_ [kcompactd0]
|
||||
30 2 SN \_ [ksmd]
|
||||
31 2 I< \_ [kworker/R-kinte]
|
||||
32 2 I< \_ [kworker/R-kbloc]
|
||||
33 2 I< \_ [kworker/R-blkcg]
|
||||
34 2 S \_ [irq/9-acpi]
|
||||
35 2 I< \_ [kworker/R-tpm_d]
|
||||
36 2 I< \_ [kworker/R-ata_s]
|
||||
37 2 I< \_ [kworker/R-md]
|
||||
38 2 I< \_ [kworker/R-md_bi]
|
||||
39 2 I< \_ [kworker/R-edac-]
|
||||
40 2 I< \_ [kworker/R-devfr]
|
||||
41 2 S \_ [watchdogd]
|
||||
42 2 I< \_ [kworker/R-quota]
|
||||
43 2 I< \_ [kworker/0:1H-kblockd]
|
||||
44 2 S \_ [kswapd0]
|
||||
45 2 S \_ [ecryptfs-kthread]
|
||||
46 2 I< \_ [kworker/R-kthro]
|
||||
47 2 I< \_ [kworker/R-acpi_]
|
||||
48 2 S \_ [scsi_eh_0]
|
||||
49 2 I< \_ [kworker/R-scsi_]
|
||||
50 2 S \_ [scsi_eh_1]
|
||||
51 2 I< \_ [kworker/R-scsi_]
|
||||
52 2 S \_ [scsi_eh_2]
|
||||
53 2 I< \_ [kworker/R-scsi_]
|
||||
56 2 I< \_ [kworker/R-mld]
|
||||
57 2 I< \_ [kworker/R-ipv6_]
|
||||
64 2 I< \_ [kworker/R-kstrp]
|
||||
66 2 I< \_ [kworker/u3:0]
|
||||
71 2 I< \_ [kworker/R-crypt]
|
||||
81 2 I< \_ [kworker/R-charg]
|
||||
163 2 I< \_ [kworker/R-raid5]
|
||||
200 2 S \_ [jbd2/vda1-8]
|
||||
201 2 I< \_ [kworker/R-ext4-]
|
||||
293 2 I< \_ [kworker/R-kmpat]
|
||||
294 2 I< \_ [kworker/R-kmpat]
|
||||
398 2 S \_ [jbd2/vda16-8]
|
||||
399 2 I< \_ [kworker/R-ext4-]
|
||||
1163 2 I< \_ [kworker/R-tls-s]
|
||||
34191 2 S \_ [psimon]
|
||||
52833 2 I \_ [kworker/u2:0-events_power_efficient]
|
||||
53308 2 I \_ [kworker/u2:2-events_power_efficient]
|
||||
53346 2 I \_ [kworker/u2:3-events_power_efficient]
|
||||
53379 2 I \_ [kworker/0:1-cgroup_free]
|
||||
53425 2 S \_ [psimon]
|
||||
53433 2 S \_ [psimon]
|
||||
53615 2 I \_ [kworker/0:2-events]
|
||||
53633 2 I \_ [kworker/u2:4-events_unbound]
|
||||
1 0 Ss /usr/lib/systemd/systemd --system --deserialize=75
|
||||
837 1 Ss /usr/lib/systemd/systemd-logind
|
||||
914 1 Ss+ /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 - vt220
|
||||
920 1 Ssl /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
|
||||
960 1 Ss+ /sbin/agetty -o -p -- \u --noclear - linux
|
||||
8058 1 Ssl /opt/digitalocean/bin/droplet-agent
|
||||
20679 1 SLsl /sbin/multipathd -d -s
|
||||
32446 1 Ss /usr/sbin/cron -f -P
|
||||
34152 1 S<s /usr/lib/systemd/systemd-journald
|
||||
34178 1 Ss /usr/lib/systemd/systemd-udevd
|
||||
34749 1 Ssl /usr/libexec/udisks2/udisksd
|
||||
34750 1 Ss sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
|
||||
53422 34750 Ss \_ sshd: root@pts/0
|
||||
53536 53422 Ss \_ -bash
|
||||
53665 53536 R+ \_ ps -u root --forest -o pid,ppid,stat,cmd
|
||||
34756 1 Ssl /usr/libexec/fwupd/fwupd
|
||||
34772 1 Ssl /usr/sbin/ModemManager
|
||||
53427 1 Ss /usr/lib/systemd/systemd --user
|
||||
53428 53427 S \_ (sd-pam)
|
||||
\end{lstlisting}
|
||||
The `--forest` option renders the \phantomsection\label{GlossaryRef:process}\gls{process} relationships as a tree for the selected user.
|
||||
\item \textbf{Start `sleep 120` in the background and show its \phantomsection\label{AcronymRef:PID}PID.}
|
||||
\index{Linux command!sleep}
|
||||
\begin{lstlisting}[language=bash]
|
||||
sleep 120 & echo "$!"
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
[1] 53666
|
||||
53666
|
||||
\end{lstlisting}
|
||||
\$! expands to the process \phantomsection\label{AcronymRef:ID}ID of the most recently started background job.
|
||||
\item \textbf{Send TERM to all `sleep` processes owned by the current user without using `kill -9`.}
|
||||
\index{Linux command!pkill}
|
||||
\begin{lstlisting}[language=bash]
|
||||
pkill -TERM -u "$USER" -x sleep
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
[1]+ Terminated sleep 120
|
||||
\end{lstlisting}
|
||||
The command requests graceful termination of exact-name `sleep` \gls{process}es belonging to the current user.
|
||||
\item \textbf{Show the top five processes by memory usage in a noninteractive snapshot.}
|
||||
\index{Linux command!ps}
|
||||
\begin{lstlisting}[language=bash]
|
||||
ps -eo pid,user,%mem,comm --sort=-%mem | head -n 6
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
PID USER %MEM COMMAND
|
||||
34152 root 6.3 systemd-journal
|
||||
20679 root 5.8 multipathd
|
||||
34756 root 4.7 fwupd
|
||||
53427 root 2.4 systemd
|
||||
7679 do-agent 2.3 do-agent
|
||||
\end{lstlisting}
|
||||
The output is sorted by descending memory percentage, with the header included.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection*{G) Archiving and Compression}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=28]
|
||||
\item \textbf{Create a gzipped tar archive named `src.tgz` from `src/` using relative paths.}
|
||||
\index{Linux command!tar}
|
||||
\begin{lstlisting}[language=bash]
|
||||
tar -czf src.tgz src/
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
(no terminal output)
|
||||
\end{lstlisting}
|
||||
The \phantomsection\label{GlossaryRef:archive}\gls{archive} is created from the relative `src/` path.
|
||||
\item \textbf{List the contents of `src.tgz` without extracting it.}
|
||||
\index{Linux command!tar}
|
||||
\begin{lstlisting}[language=bash]
|
||||
tar -tzf src.tgz
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
src/
|
||||
src/file1.txt
|
||||
src/file2.txt
|
||||
src/lib/
|
||||
src/file1.txt.bak
|
||||
src/file2.txt.bak
|
||||
\end{lstlisting}
|
||||
The archive member names are displayed without extracting files.
|
||||
\item \textbf{Extract only `file2.txt` from `src.tgz` into `tmp/`.}
|
||||
\index{Linux command!tar}
|
||||
\begin{lstlisting}[language=bash]
|
||||
tar -xzf src.tgz -C tmp --strip-components=1 src/file2.txt
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
(no terminal output)
|
||||
\end{lstlisting}
|
||||
The selected \gls{archive} member is extracted into `tmp/` after stripping the leading `src/` path component.
|
||||
\textbf{Verification step:}
|
||||
\begin{lstlisting}
|
||||
$ ls -l tmp/file2.txt
|
||||
-rw-r--r-- 1 root root 16 Sep 12 13:23 tmp/file2.txt
|
||||
$ cat tmp/file2.txt
|
||||
two 3 four five
|
||||
\end{lstlisting}
|
||||
The verification command is included as evidence of the resulting file state and is not part of the solution command.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection*{H) Networking \& System Info}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=31]
|
||||
\item \textbf{Show all listening \phantomsection\label{AcronymRef:TCP}TCP sockets with associated PIDs without assuming root access.}
|
||||
\index{Linux command!ss}
|
||||
\begin{lstlisting}[language=bash]
|
||||
ss -ltnp
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
|
||||
LISTEN 0 4096 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=34750,fd=3),("systemd",pid=1,fd=109))
|
||||
LISTEN 0 4096 127.0.0.54:53 0.0.0.0:* users:(("systemd-resolve",pid=34166,fd=17))
|
||||
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=34166,fd=15))
|
||||
LISTEN 0 4096 [::]:22 [::]:* users:(("sshd",pid=34750,fd=4),("systemd",pid=1,fd=110))
|
||||
\end{lstlisting}
|
||||
The command lists listening TCP sockets and includes process information where permitted.
|
||||
\item \textbf{Print the default route or gateway concisely.}
|
||||
\index{Linux command!ip route}
|
||||
\begin{lstlisting}[language=bash]
|
||||
ip route show default
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
default via 142.93.192.1 dev eth0 proto static
|
||||
\end{lstlisting}
|
||||
The command displays the system's default route.
|
||||
\item \textbf{Display the kernel name, release, and machine architecture.}
|
||||
\index{Linux command!uname}
|
||||
\begin{lstlisting}[language=bash]
|
||||
uname -srm
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
Linux 6.8.0-124-generic x86_64
|
||||
\end{lstlisting}
|
||||
The output contains the kernel name, release, and machine architecture.
|
||||
\item \textbf{Show the last five successful logins or sessions on the system.}
|
||||
\index{Linux command!last}
|
||||
\begin{lstlisting}[language=bash]
|
||||
last -n 5
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
root pts/0 100.8.220.73 Sat Sep 12 13:12 still logged in
|
||||
root pts/1 155.246.151.34 Thu Sep 10 21:23 - 22:23 (00:59)
|
||||
root pts/0 155.246.151.34 Thu Sep 10 21:22 - 00:36 (03:13)
|
||||
reboot system boot 6.8.0-124-generi Thu Sep 10 21:16 still running
|
||||
|
||||
wtmp begins Thu Sep 10 21:16:00 2026
|
||||
\end{lstlisting}
|
||||
The command displays the most recent login/session records available from the system accounting log.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection*{I) Package \& Services (Debian/Ubuntu)}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=35]
|
||||
\item \textbf{Show the installed version of the `coreutils` package.}
|
||||
\index{Linux command!coreutils}
|
||||
\begin{lstlisting}[language=bash]
|
||||
dpkg-query -W -f='${Version}\n' coreutils
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
9.4-3ubuntu6.3
|
||||
\end{lstlisting}
|
||||
The package query prints the installed version string.
|
||||
\item \textbf{Search available packages whose names contain `ripgrep`.}
|
||||
\index{Linux command!apt-cache}
|
||||
\begin{lstlisting}[language=bash]
|
||||
apt-cache search --names-only ripgrep
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
ripgrep - Recursively searches directories for a regex pattern
|
||||
\end{lstlisting}
|
||||
The package cache is searched by package name only.
|
||||
\item \textbf{Check whether the `cron` service is active and print only its status line.}
|
||||
\index{Linux command!systemctl}
|
||||
\begin{lstlisting}[language=bash]
|
||||
systemctl is-active cron
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
active
|
||||
\end{lstlisting}
|
||||
The command returns the service's active-state value.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection*{J) Bash \& Scripting}
|
||||
\begin{enumerate}[label=\textbf{\arabic*.},leftmargin=*,start=38]
|
||||
\item \textbf{Loop over `*.txt` in `src/` and print each filename and word count.}
|
||||
\index{Linux command!Bash}
|
||||
\begin{lstlisting}[language=bash]
|
||||
shopt -s nullglob
|
||||
for f in src/*.txt; do
|
||||
printf '%s : %s\n' "$f" "$(wc -w < "$f")"
|
||||
done
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
src/file1.txt : 4
|
||||
src/file2.txt : 4
|
||||
\end{lstlisting}
|
||||
The loop uses `nullglob` so an unmatched pattern expands to no files, and `wc -w` supplies each word count in \gls{bash}.
|
||||
\item \textbf{Export CSV rows where `dept == "CS"` to `cs.txt`, excluding the header.}
|
||||
\index{Linux command!awk}
|
||||
\begin{lstlisting}[language=bash]
|
||||
awk -F, 'NR > 1 && $3 == "CS"' people.csv > cs.txt
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
(no terminal output)
|
||||
\end{lstlisting}
|
||||
The `awk` condition selects records after the header whose third field equals `CS`.
|
||||
\textbf{Verification step:}
|
||||
\begin{lstlisting}
|
||||
$ cat cs.txt
|
||||
2,Linus,CS
|
||||
4,Dennis,CS
|
||||
\end{lstlisting}
|
||||
The verification command is included as evidence of the resulting file state and is not part of the solution command.
|
||||
\item \textbf{Create an environment variable `X` with value `42`, print it, and remove it from the environment.}
|
||||
\index{Linux command!environment variables}
|
||||
\begin{lstlisting}[language=bash]
|
||||
export X=42; printf '%s\n' "$X"; unset X
|
||||
\end{lstlisting}
|
||||
\textbf{Observed output:}
|
||||
\begin{lstlisting}
|
||||
42
|
||||
\end{lstlisting}
|
||||
The \phantomsection\label{GlossaryRef:environmentvariable}\gls{environmentvariable} is exported, printed, and then unset in the current shell.
|
||||
\end{enumerate}
|
||||
@@ -0,0 +1,23 @@
|
||||
\chapter{Passwords}
|
||||
\ChapterLabel{Passwords}
|
||||
\index{passwords}
|
||||
\index{credentials}
|
||||
|
||||
\section{Overview}
|
||||
For security reasons, passwords in this document are stored only as links to another password store (shared BitWarden cloud account), never as the credential itself. When a new credential is created, add a row naming the user and server, add the corresponding entry to the password manager, and record only the password manager's entry name here.
|
||||
|
||||
\section{Credential Registry}
|
||||
\begin{tabularx}{\linewidth}{L{1.8cm}L{2.6cm}L{3.4cm}Y}
|
||||
\caption{Credential Registry\label{Table:CredentialRegistry}}\\
|
||||
\toprule \textbf{User} & \textbf{Server} & \textbf{Credential Reference} & \textbf{Rotation / Notes}\\ \midrule
|
||||
\endfirsthead
|
||||
\multicolumn{4}{l}{\small\itshape Credential Registry (continued)}\\
|
||||
\toprule \textbf{User} & \textbf{Server} & \textbf{Credential Reference} & \textbf{Rotation / Notes}\\ \midrule
|
||||
\endhead \bottomrule \endlastfoot
|
||||
Group 7 & Droplet (DigitalOcean) & Password manager entry: \texttt{DigitalOcean Droplet} & Credentials for droplet resource management web interface; rotate every 90 days\\
|
||||
\texttt{nkogut} & MyFileAgent Gitea & Password manager entry: \texttt{Gitea - Nick} & Individual Gitea administrator account; keep distinct from other service credentials\\
|
||||
\texttt{glovely} & MyFileAgent Gitea & Password manager entry: \texttt{Gitea - Gowri} & Individual Gitea administrator account; keep distinct from other service credentials\\
|
||||
Group 7 & \texttt{.TECH domains} & Password manager entry: \texttt{.tech Domain} & Registrar access for \texttt{myfileagent.tech}\\
|
||||
Group 7 & Actions runner & Restricted runner-state directory; \texttt{.runner} file & Repository registration; mode-700 directory and mode-600 state. No value stored here. Re-register/revoke on compromise or retirement.\\
|
||||
\texttt{glovely} & Setup access & Restricted temporary token file outside Git & \texttt{write:repository} scope; used by authorized setup, never injected into jobs. Revoke when implementation ends.\\
|
||||
\end{tabularx}
|
||||
@@ -0,0 +1,161 @@
|
||||
\chapter{Project Proposal}
|
||||
\ChapterLabel{ProjectProposal}
|
||||
\index{project proposal}
|
||||
\index{DevSecOps pipeline}
|
||||
\index{agentic LLM}
|
||||
\index{Python}
|
||||
\index{Grafana}
|
||||
|
||||
\section{Project Title}
|
||||
|
||||
\begin{center}
|
||||
\Large\textbf{MyFileAgent Pipeline: One-Click DevSecOps Deployment for an Agentic LLM}
|
||||
\end{center}
|
||||
|
||||
\section{Project Description and Primary Focus}
|
||||
|
||||
The primary product of this project is an automated, repeatable DevSecOps
|
||||
pipeline that will install, configure, and demonstrate file-interaction tasks with an LLM. The pipeline will install required
|
||||
packages, download a pinned small language model from the Hugging Face Hub,
|
||||
build the containers, create the configuration, run security and functional
|
||||
tests, deploy the services to a DigitalOcean Ubuntu Droplet, and perform
|
||||
post-deployment health checks. A user will start the complete workflow through
|
||||
one manual GitHub Actions button or one documented local command.
|
||||
|
||||
Once automatically configured for the specific environment it is deployed to, the LLM can be given a file name or expected text which it will use to locate a file on the system. It will also be given the new contents for that file and will perform a controlled text replacement. It will call a tool using Python libraries to perform the deterministic
|
||||
file validation, backup, diff display, and write operation. The project
|
||||
does not promise general desktop control, autonomous file discovery, open-ended
|
||||
planning, or unrestricted shell access, and will focus on the installation and setup pipeline rather than the extending the LLM's capabilities.
|
||||
|
||||
The model will be downloaded from the Hugging Face Hub using its supported
|
||||
download workflow \cite{HuggingFaceHubDownload}. A small quantized GGUF model
|
||||
will run locally through \texttt{llama.cpp} \cite{LlamaCpp}. Pinning the model
|
||||
revision and checksum will make repeated pipeline runs reproducible.
|
||||
|
||||
\section{Demonstration Task}
|
||||
|
||||
The pipeline's end-to-end acceptance test will demonstrate installation, configuration, deployment, and usage of the LLM model. Each step of this process will be clearly displayed using visual metrics from GitHub actions, DigitalOcean droplet system resource monitoring, and Grafana. Finally, the following task (implemented as a test case) will demonstrate that this process was successful:
|
||||
|
||||
\begin{quote}
|
||||
``In the approved demonstration folder, open the file about \texttt{project status}, verify
|
||||
that it contains \texttt{Status: Draft}, and replace that line with
|
||||
\texttt{Status: Reviewed}.''
|
||||
\end{quote}
|
||||
|
||||
The application will receive a description of the target file's name (not necessarily an exact path) and replacement values, confirm
|
||||
that the file exists inside the allowed folder, create a backup, show a diff,
|
||||
perform the replacement, verify the saved result, and append a JSON Lines audit
|
||||
record. If validation fails, it will stop without modifying the file.
|
||||
|
||||
\section{One-Click Pipeline}
|
||||
|
||||
The pipeline will perform the following stages in order:
|
||||
|
||||
\begin{enumerate}[label=\arabic*.]
|
||||
\item validate required secrets, variables, model identifiers, and target
|
||||
Droplet information;
|
||||
\item install or verify Docker, Docker Compose, Python dependencies, and
|
||||
required monitoring components;
|
||||
\item download the pinned model and verify its checksum;
|
||||
\item lint and statically analyze the Python source;
|
||||
\item run unit, integration, security, and minimal end-to-end tests;
|
||||
\item build and scan versioned container images;
|
||||
\item generate deployment configuration from protected variables;
|
||||
\item deploy the application, inference, Prometheus, and Grafana services;
|
||||
\item run health checks and the fixed file-replacement acceptance test; and
|
||||
\item publish test (e.g., via the task outlined above), scan, deployment, and monitoring results.
|
||||
\end{enumerate}
|
||||
|
||||
The workflow will fail immediately when a required stage fails. Deployment
|
||||
will use pinned versions, health checks, restart policies, resource limits, and
|
||||
a rollback target. Re-running the same workflow should be idempotent and should
|
||||
not duplicate configuration or damage an existing deployment.
|
||||
|
||||
\section{Proposed Architecture and Tools}
|
||||
|
||||
\begin{longtable}{L{2.7cm}L{4.2cm}L{7.3cm}}
|
||||
\caption{Proposed MyFileAgent pipeline}\label{Table:MyFileAgentPipeline}\\
|
||||
\toprule
|
||||
\textbf{Stage} & \textbf{Planned Tools} & \textbf{Purpose} \\
|
||||
\midrule
|
||||
\endfirsthead
|
||||
\toprule
|
||||
\textbf{Stage} & \textbf{Planned Tools} & \textbf{Purpose} \\
|
||||
\midrule
|
||||
\endhead
|
||||
\bottomrule
|
||||
\endlastfoot
|
||||
Source control & Git and GitHub & Store pipeline definitions, Python source, tests, Docker files, configuration templates, issues, and version history. \\
|
||||
One-click orchestration & GitHub Actions \texttt{workflow\_dispatch}, Bash, and a Makefile & Provide one manual action that validates, builds, tests, scans, deploys, and verifies the complete system \cite{GitHubActions}. \\
|
||||
File operations & Python \texttt{pathlib}, \texttt{shutil}, \texttt{difflib}, and atomic replacement & Provide a tool the LLM Agent will call to enforce the approved folder, create a backup, generate a diff, perform the single text replacement, and verify the result \cite{PythonPathlib}. \\
|
||||
Model acquisition & Hugging Face Hub & Download a selected small model and pin its revision and checksum. \\
|
||||
Inference & \texttt{llama.cpp} with a quantized GGUF model & Run a resource-conscious local model for the demonstration. \\
|
||||
Testing & \texttt{pytest}, mocks, and temporary directories & Test configuration, file safeguards, backup and replacement behavior, failure handling, and the deployed acceptance case \cite{PytestDocs}. \\
|
||||
Security & Ruff & Check Python quality, static-analysis rules. \\
|
||||
Packaging and deployment & Docker Compose and DigitalOcean & Build and deploy versioned application, inference, and monitoring services on the Ubuntu Droplet. \\
|
||||
Application monitoring & Prometheus and Grafana & Collect pipeline and application metrics and display build, test, deployment, health, latency, token, and failure information in a dashboard \cite{PrometheusOverview,GrafanaPrometheus}. \\
|
||||
Host monitoring & DigitalOcean Monitoring & Supplement Grafana with Droplet-level CPU, memory, disk, and availability graphs and alerts \cite{DigitalOceanMonitoring}. \\
|
||||
Audit storage & JSON Lines files and retained CI artifacts & Preserve pipeline results and a small append-only record of demonstration runs without requiring a separate database service. \\
|
||||
\end{longtable}
|
||||
|
||||
\section{DevSecOps and Testing Strategy}
|
||||
|
||||
Security and verification are pipeline gates rather than later manual tasks.
|
||||
Pull requests will run formatting, linting, unit tests, dependency checks,
|
||||
static analysis, and container scanning. Only an approved main-branch revision
|
||||
may start deployment. The containers will run as non-root users, secrets will
|
||||
come from protected variables, and the demonstration workspace will be the
|
||||
only writable application mount.
|
||||
|
||||
The automated test suite will emphasize the delivery system:
|
||||
|
||||
\begin{itemize}
|
||||
\item pipeline configuration tests for required variables, pinned versions,
|
||||
repeatable installation, failure handling, and rollback information;
|
||||
\item Python tool to be called by the LLM; unit tests for path boundaries, backups, diffs, atomic writes,
|
||||
audit records, and rejection of invalid input;
|
||||
\item integration tests using temporary folders and a mocked inference
|
||||
response;
|
||||
\item security gates for source, dependencies, secrets, and images; and
|
||||
\item a post-deployment acceptance test that performs only the fixed sample
|
||||
replacement and confirms the backup, result, audit entry, and health
|
||||
status.
|
||||
\end{itemize}
|
||||
|
||||
\section{Monitoring Dashboard}
|
||||
|
||||
Grafana will be the main operational dashboard. Prometheus will supply metrics
|
||||
for pipeline duration, test pass or failure counts, deployment status,
|
||||
container health, inference latency, limited token estimates, acceptance-test
|
||||
results, and application errors. These measures show whether the automated
|
||||
delivery pipeline is reliable and repeatable; token information is a supporting
|
||||
metric rather than the project's main goal. DigitalOcean Monitoring may be used
|
||||
in addition for host-level CPU, memory, disk, and availability information.
|
||||
|
||||
\section{Planned Deliverables and Milestones}
|
||||
|
||||
\begin{enumerate}[label=\arabic*.]
|
||||
\item define the one-click pipeline stages, configuration contract, success
|
||||
criteria, and rollback approach;
|
||||
\item create the GitHub repository, Python demonstration service and LLM-callable tool, and automated tests;
|
||||
\item Choose a small model, pin and download it, and confirm the single demonstration
|
||||
task locally;
|
||||
\item create the Docker Compose deployment and security gates;
|
||||
\item automate installation, configuration, build, test, scan, deployment,
|
||||
health checking, and acceptance testing through one trigger;
|
||||
\item configure Prometheus and Grafana, with DigitalOcean host monitoring as
|
||||
an optional additional source;
|
||||
and
|
||||
\item demonstrate a clean one-click run and document timing, test, security,
|
||||
monitoring, failure, and rollback results.
|
||||
\end{enumerate}
|
||||
|
||||
\section{Success Criteria and Unique Contribution}
|
||||
|
||||
The project succeeds when one authorized action can take a documented target
|
||||
from prerequisites to a healthy, tested, monitored deployment. The run must
|
||||
install or validate dependencies, retrieve the pinned model, build containers,
|
||||
pass automated tests and security gates, deploy the services, complete health
|
||||
checks, execute the fixed file-replacement acceptance test, and expose results
|
||||
in Grafana. A repeated run must be safe and produce consistent results, while a
|
||||
failed gate must prevent or stop deployment and provide useful logs.
|
||||
@@ -0,0 +1,130 @@
|
||||
@book{PhoenixProject,
|
||||
author = {Kim, Gene and Behr, Kevin and Spafford, George},
|
||||
title = {The Phoenix Project: A Novel about IT, DevOps, and Helping Your Business Win},
|
||||
publisher = {IT Revolution Press},
|
||||
year = {2018}
|
||||
}
|
||||
|
||||
@misc{HuggingFaceHubDownload,
|
||||
author = {{Hugging Face}},
|
||||
title = {Download Files from the Hub},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://huggingface.co/docs/huggingface_hub/guides/download}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{LlamaCpp,
|
||||
author = {{llama.cpp contributors}},
|
||||
title = {llama.cpp: LLM Inference in C/C++},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://github.com/ggml-org/llama.cpp}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{PythonPathlib,
|
||||
author = {{Python Software Foundation}},
|
||||
title = {pathlib---Object-Oriented Filesystem Paths},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://docs.python.org/3/library/pathlib.html}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{PytestDocs,
|
||||
author = {{pytest contributors}},
|
||||
title = {pytest Documentation},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://docs.pytest.org/}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{PrometheusOverview,
|
||||
author = {{Prometheus Authors}},
|
||||
title = {Prometheus Overview},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://prometheus.io/docs/introduction/overview/}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{GrafanaPrometheus,
|
||||
author = {{Grafana Labs}},
|
||||
title = {Prometheus Monitoring and Grafana Dashboards},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://grafana.com/oss/prometheus/}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{DigitalOceanMonitoring,
|
||||
author = {{DigitalOcean}},
|
||||
title = {Monitoring Documentation},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://docs.digitalocean.com/products/monitoring/}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{GitHubActions,
|
||||
author = {{GitHub}},
|
||||
title = {GitHub Actions Documentation},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://docs.github.com/actions}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{DockerUbuntuInstall,
|
||||
author = {{Docker, Inc.}},
|
||||
title = {Install Docker Engine on Ubuntu},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://docs.docker.com/engine/install/ubuntu/}},
|
||||
note = {Accessed: September 18, 2026}
|
||||
}
|
||||
|
||||
@misc{GiteaDockerRootless,
|
||||
author = {{Gitea Limited}},
|
||||
title = {Installation with Docker (rootless)},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://docs.gitea.com/installation/install-with-docker-rootless/}},
|
||||
note = {Accessed: September 26, 2026}
|
||||
}
|
||||
|
||||
@misc{CaddyDockerImage,
|
||||
author = {{Docker, Inc.}},
|
||||
title = {Caddy Official Image},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://hub.docker.com/_/caddy}},
|
||||
note = {Accessed: September 26, 2026}
|
||||
}
|
||||
|
||||
@misc{CaddyAutomaticHTTPS,
|
||||
author = {{Caddy Project}},
|
||||
title = {Automatic HTTPS},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://caddyserver.com/docs/automatic-https}},
|
||||
note = {Accessed: September 26, 2026}
|
||||
}
|
||||
|
||||
@misc{CaddyCommandLine,
|
||||
author = {{Caddy Documentation}},
|
||||
title = {Command Line},
|
||||
howpublished = {\url{https://caddyserver.com/docs/command-line}},
|
||||
note = {Accessed September 26, 2026}
|
||||
}
|
||||
|
||||
@misc{DigitalOceanCloudFirewalls,
|
||||
author = {{DigitalOcean}},
|
||||
title = {Cloud Firewalls Documentation},
|
||||
year = {2026},
|
||||
howpublished = {\url{https://docs.digitalocean.com/products/networking/firewalls/}},
|
||||
note = {Accessed: September 26, 2026}
|
||||
}
|
||||
|
||||
@misc{GiteaActRunnerManual,
|
||||
author={{Gitea}}, title={Act Runner},
|
||||
howpublished={\url{https://docs.gitea.com/1.26/usage/actions/act-runner/}},
|
||||
note={Accessed October 6, 2026}}
|
||||
@misc{GiteaActionsComparisonManual,
|
||||
author={{Gitea}}, title={Compared to GitHub Actions},
|
||||
howpublished={\url{https://docs.gitea.com/1.27/usage/actions/comparison/}},
|
||||
note={Accessed October 6, 2026}}
|
||||
@misc{GiteaActionsConfigManual,
|
||||
author={{Gitea}}, title={Configuration Cheat Sheet: Actions},
|
||||
howpublished={\url{https://docs.gitea.com/1.27/administration/config-cheat-sheet/}},
|
||||
note={Accessed October 6, 2026}}
|
||||
|
After Width: | Height: | Size: 387 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 69 KiB |
@@ -0,0 +1,12 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
texlive-latex-base \
|
||||
lmodern \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /workspace
|
||||
COPY sample-source.txt .
|
||||
|
||||
CMD ["pdflatex", "-interaction=nonstopmode", "-halt-on-error", "sample-source.txt"]
|
||||
@@ -0,0 +1,21 @@
|
||||
\documentclass{article}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{lmodern}
|
||||
\usepackage{hyperref}
|
||||
|
||||
\title{LaTeX Compiled Inside Docker}
|
||||
\author{Nicholas Kogut and Gowri Das Lovely}
|
||||
\date{September 18, 2026}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\section{Purpose}
|
||||
This document verifies that a Docker container with TeX Live can compile
|
||||
LaTeX source into a PDF without requiring a local LaTeX installation.
|
||||
|
||||
\section{Result}
|
||||
The source was processed with \texttt{pdflatex} inside the container. The
|
||||
generated PDF was written to a host-mounted output directory.
|
||||
|
||||
\end{document}
|
||||
@@ -0,0 +1,182 @@
|
||||
% !TeX program = pdflatex
|
||||
% Authoritative top-level Overleaf document. Select main.tex as Main document.
|
||||
% SSW 590 DevOps Assignment Template
|
||||
% Developed by Darian Muresan, Ph.D., with OpenAI Codex and Anthropic Claude Code.
|
||||
% AI agents: read devopsAIAgentGuide.tex before editing this template.
|
||||
\documentclass[12pt]{cornell}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{lmodern}
|
||||
\usepackage{xspace}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{amsmath,amssymb}
|
||||
\usepackage{array}
|
||||
\usepackage{booktabs}
|
||||
\usepackage{longtable}
|
||||
\usepackage{tabularx}
|
||||
\usepackage{ltablex}
|
||||
\usepackage{float}
|
||||
\usepackage{placeins}
|
||||
\keepXColumns
|
||||
\usepackage{enumitem}
|
||||
\usepackage{listings}
|
||||
\usepackage[newfloat]{minted}
|
||||
\usepackage{tcolorbox}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows.meta,positioning,shapes.geometric}
|
||||
\usepackage{makeidx}
|
||||
\usepackage[acronym]{glossaries}
|
||||
\usepackage{titlesec}
|
||||
\usepackage{xurl}
|
||||
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=blue]{hyperref}
|
||||
|
||||
\makeindex
|
||||
\makeglossaries
|
||||
|
||||
\newglossaryentry{bash}{name={Bash},description={The shell used to execute the problem-set commands and shell scripts}}
|
||||
\newglossaryentry{permissions}{name={file permissions},description={Access settings that control whether users may read, write, or execute a file or directory}}
|
||||
\newglossaryentry{symboliclink}{name={symbolic link},description={A filesystem entry that points to another pathname}}
|
||||
\newglossaryentry{process}{name={process},description={A running instance of a program identified by a process ID}}
|
||||
\newglossaryentry{archive}{name={archive},description={A file containing stored filesystem entries; this assignment uses a gzipped tar archive}}
|
||||
\newglossaryentry{environmentvariable}{name={environment variable},description={A named value maintained by the shell and inherited by processes it starts}}
|
||||
|
||||
\definecolor{devopsBlue}{RGB}{31,78,121}
|
||||
\definecolor{devopsGreen}{RGB}{46,125,50}
|
||||
\definecolor{devopsRed}{RGB}{183,28,28}
|
||||
\definecolor{devopsGray}{RGB}{90,90,90}
|
||||
\definecolor{devopsLightBlue}{RGB}{232,240,247}
|
||||
|
||||
% Replace these values for each assignment.
|
||||
\newcommand{\AssignmentTitle}{Automated LaTeX Manual Builds with Gitea Actions}
|
||||
\newcommand{\AssignmentNumber}{5}
|
||||
\newcommand{\DocumentVersion}{1.7.1}
|
||||
\newcommand{\DocumentStatus}{Group Assignment Report}
|
||||
\newcommand{\CourseNumber}{SSW 590}
|
||||
\newcommand{\CourseName}{DevOps Principles and Practices}
|
||||
\newcommand{\Instructor}{Darian Muresan}
|
||||
\newcommand{\StudentNames}{Nicholas Kogut\\Gowri Das Lovely}
|
||||
\newcommand{\PDFAuthors}{Nicholas Kogut and Gowri Das Lovely}
|
||||
\newcommand{\Organization}{Stevens Institute of Technology}
|
||||
\newcommand{\DocumentDate}{October 7, 2026}
|
||||
\newcommand{\DueDate}{Not specified}
|
||||
% Generated only in the build workspace; never committed by the workflow.
|
||||
\newcommand{\BuildSuffix}{+local.unverified}
|
||||
\newcommand{\BuildCommit}{Not built by Gitea Actions}
|
||||
\newcommand{\BuildRun}{Not assigned}
|
||||
\newcommand{\BuildRunURL}{https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions}
|
||||
\InputIfFileExists{build-metadata.tex}{}{}
|
||||
\newcommand{\VERSION}{Version \DocumentVersion\BuildSuffix}
|
||||
|
||||
\hypersetup{
|
||||
pdftitle={\CourseNumber\ --- Assignment \AssignmentNumber: \AssignmentTitle},
|
||||
pdfauthor={\PDFAuthors},
|
||||
pdfcreator={Darian Muresan, Ph.D., with OpenAI Codex and Anthropic Claude Code},
|
||||
pdfsubject={SSW 590 Assignment 5 automated LaTeX manual builds with Gitea Actions},
|
||||
pdfkeywords={DevOps, DigitalOcean, Docker, Gitea Actions, LaTeX, runner, build artifact, traceability}
|
||||
}
|
||||
|
||||
\newcolumntype{Y}{>{\raggedright\arraybackslash}X}
|
||||
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
|
||||
\setlength{\tabcolsep}{4pt}
|
||||
\renewcommand{\arraystretch}{1.12}
|
||||
\setlength{\LTpre}{6pt}
|
||||
\setlength{\LTpost}{6pt}
|
||||
|
||||
% Stable IDs make activity, evidence, and artifact references durable.
|
||||
\newcommand{\ArtifactLabel}[2]{\phantomsection\label{#1:#2}}
|
||||
\newcommand{\ArtifactID}[2]{\texttt{#2}\ArtifactLabel{#1}{#2}\index{#1!#2}}
|
||||
\newcommand{\ArtifactRef}[2]{\hyperref[#1:#2]{\texttt{#2}}}
|
||||
\newcommand{\ActivityID}[1]{\ArtifactID{Activity}{#1}}
|
||||
\newcommand{\ActivityRef}[1]{\ArtifactRef{Activity}{#1}}
|
||||
\newcommand{\EvidenceID}[1]{\ArtifactID{Evidence}{#1}}
|
||||
\newcommand{\EvidenceRef}[1]{\ArtifactRef{Evidence}{#1}}
|
||||
\newcommand{\ChapterLabel}[1]{\label{Chapter:#1}}
|
||||
\newcommand{\ChapterRef}[1]{\hyperref[Chapter:#1]{Chapter~\ref*{Chapter:#1}}}
|
||||
\newcommand{\AppendixRef}[1]{\hyperref[Chapter:#1]{Appendix~\ref*{Chapter:#1}}}
|
||||
\newcommand{\StatusPass}{\textbf{\footnotesize\textcolor{devopsGreen}{PASS}}}
|
||||
\newcommand{\StatusPending}{\textbf{\footnotesize\textcolor{devopsGray}{PENDING}}}
|
||||
\newcommand{\StatusFail}{\textbf{\footnotesize\textcolor{devopsRed}{FAIL}}}
|
||||
|
||||
\newtcolorbox{devopsNote}[1][]{
|
||||
colback=devopsLightBlue, colframe=devopsBlue, boxrule=0.6pt, arc=1mm, title=#1
|
||||
}
|
||||
|
||||
\lstset{
|
||||
backgroundcolor=\color{white}, basicstyle=\ttfamily\footnotesize,
|
||||
breaklines=true, frame=single, keywordstyle=\color{blue},
|
||||
commentstyle=\color{devopsGreen}, numbers=left, numbersep=6pt,
|
||||
numberstyle=\tiny\color{devopsGray}, showstringspaces=false,
|
||||
stringstyle=\color{devopsRed}, tabsize=2
|
||||
}
|
||||
|
||||
\setminted{
|
||||
fontsize=\footnotesize,
|
||||
breaklines=true,
|
||||
frame=single,
|
||||
framesep=2mm,
|
||||
linenos=true,
|
||||
numbersep=6pt,
|
||||
tabsize=2
|
||||
}
|
||||
|
||||
\titleformat{\chapter}[display]
|
||||
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{8pt}{\Huge}
|
||||
\titlespacing*{\chapter}{0pt}{-20pt}{24pt}
|
||||
\setlength{\emergencystretch}{2em}
|
||||
|
||||
\changenormalspacing{\singlespacing}
|
||||
\begin{document}
|
||||
\pagenumbering{roman}
|
||||
\singlespacing
|
||||
\include{prologue}
|
||||
|
||||
\setcounter{page}{1}
|
||||
\pagenumbering{arabic}
|
||||
\pagestyle{fancy}
|
||||
\fancyhf{}
|
||||
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
|
||||
\lhead{\small Assignment \AssignmentNumber}
|
||||
\chead{\small\nouppercase{\leftmark}}
|
||||
\rhead{\small\thepage}
|
||||
\lfoot{\small\CourseNumber}
|
||||
\cfoot{\small\copyright\ \Organization}
|
||||
\rfoot{\scriptsize Version \DocumentVersion\\Run \BuildRun}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
|
||||
\include{devopsIntroduction}
|
||||
\include{devopsLinuxCommands}
|
||||
\include{devopsLinuxProblemSet}
|
||||
\include{devopsHosts}
|
||||
\include{devopsPasswords}
|
||||
\include{devopsDigitalOceanDockerDeployment}
|
||||
\include{devopsLatexDocker}
|
||||
\include{devopsProjectProposal}
|
||||
\include{devopsGiteaStartupFoundation}
|
||||
\include{devopsAutomatedManualBuild}
|
||||
|
||||
\bibliographystyle{IEEEtran}
|
||||
\bibliography{devopsReferences}
|
||||
|
||||
\appendix
|
||||
\include{devopsAIPromptLog}
|
||||
|
||||
\cleardoublepage
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{chapter}{Glossary}
|
||||
\input{devopsGlossary.tex}
|
||||
|
||||
\cleardoublepage
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{chapter}{Acronyms}
|
||||
\input{devopsAcronyms.tex}
|
||||
|
||||
\cleardoublepage
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{chapter}{Index}
|
||||
\small
|
||||
\printindex
|
||||
\normalsize
|
||||
\end{document}
|
||||
@@ -0,0 +1,42 @@
|
||||
\title{\CourseNumber\ --- \CourseName\\[0.5em]\large Assignment \AssignmentNumber: \AssignmentTitle\\[1.5em]\normalsize\VERSION\\\DocumentStatus}
|
||||
\author{\StudentNames\\[0.75em]\Organization\\[0.75em]Instructor: \Instructor}
|
||||
\conferraldate{}{\DocumentDate}
|
||||
\copyrightholder{\Organization}
|
||||
\copyrightyear{2026}
|
||||
\maketitle
|
||||
\makecopyright
|
||||
|
||||
\cleardoublepage
|
||||
\chapter*{Build Identity}
|
||||
\phantomsection\label{Build:Identity}
|
||||
\addcontentsline{toc}{chapter}{Build Identity}
|
||||
\markboth{Build Identity}{Build Identity}
|
||||
\index{build identity}
|
||||
Human-maintained version: \texttt{\DocumentVersion}.\\
|
||||
Build suffix: \texttt{\BuildSuffix}.\\
|
||||
Source commit: \texttt{\BuildCommit}.\\
|
||||
Workflow run: \texttt{\BuildRun}.\\
|
||||
\href{\BuildRunURL}{Gitea Actions run or workflow overview}.
|
||||
|
||||
The workflow generates these fields from its triggering revision and run.
|
||||
The local fallback explicitly identifies an unverified build and must not be
|
||||
presented as a successful Actions artifact.
|
||||
|
||||
\cleardoublepage
|
||||
\phantomsection
|
||||
\chapter*{Template Attribution}
|
||||
\ChapterLabel{TemplateAttribution}
|
||||
\addcontentsline{toc}{chapter}{Template Attribution}
|
||||
\markboth{Template Attribution}{Template Attribution}
|
||||
\index{template attribution}
|
||||
\index{Muresan, Darian}
|
||||
This DevOps assignment template was developed by \textbf{Darian Muresan, Ph.D.},
|
||||
in conjunction with \textbf{OpenAI Codex} and \textbf{Anthropic Claude Code}.
|
||||
|
||||
% A separate abstract page is omitted because this short assignment report
|
||||
% begins with a purpose-focused introduction.
|
||||
\input{devopsDocumentHistory.tex}
|
||||
\contentspage
|
||||
\tablelistpage
|
||||
\figurelistpage
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
acme_ca https://acme-v02.api.letsencrypt.org/directory
|
||||
}
|
||||
|
||||
{$GITEA_HOSTNAME} {
|
||||
reverse_proxy gitea:3000
|
||||
}
|
||||
@@ -1,25 +1,53 @@
|
||||
name: filepilot-gitea
|
||||
name: myfileagent-gitea
|
||||
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:2.11.4-alpine
|
||||
container_name: myfileagent-caddy
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- https
|
||||
environment:
|
||||
GITEA_HOSTNAME: ${GITEA_HOSTNAME:-localhost}
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
networks:
|
||||
- edge
|
||||
- gitea-private
|
||||
depends_on:
|
||||
- gitea
|
||||
|
||||
gitea:
|
||||
image: docker.gitea.com/gitea:1.27.3-rootless
|
||||
container_name: filepilot-gitea
|
||||
container_name: myfileagent-gitea
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
GITEA__database__DB_TYPE: sqlite3
|
||||
GITEA__database__PATH: /var/lib/gitea/data/gitea.db
|
||||
GITEA__server__DOMAIN: localhost
|
||||
GITEA__server__ROOT_URL: http://localhost:3000/
|
||||
GITEA__server__DOMAIN: "${GITEA_DOMAIN:-localhost}"
|
||||
GITEA__server__ROOT_URL: "${GITEA_ROOT_URL:-http://localhost:3000/}"
|
||||
GITEA__server__HTTP_PORT: 3000
|
||||
GITEA__server__DISABLE_SSH: "true"
|
||||
GITEA__service__DISABLE_REGISTRATION: "false"
|
||||
GITEA__service__DISABLE_REGISTRATION: "true"
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000"
|
||||
volumes:
|
||||
- gitea-data:/var/lib/gitea
|
||||
- gitea-config:/etc/gitea
|
||||
networks:
|
||||
- gitea-private
|
||||
|
||||
volumes:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
gitea-data:
|
||||
gitea-config:
|
||||
|
||||
networks:
|
||||
edge:
|
||||
gitea-private:
|
||||
@@ -0,0 +1,8 @@
|
||||
FROM debian:bookworm-slim@sha256:7c7b2c966bc9ee8cedfeef67e0e279108992c77681fa595db4a9d65c06ccc587
|
||||
# Immutable Debian snapshot fixes the TeX Live 2022 and supporting package set.
|
||||
RUN rm /etc/apt/sources.list.d/debian.sources \
|
||||
&& printf '%s\n' 'deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20261001T000000Z bookworm main' > /etc/apt/sources.list \
|
||||
&& apt-get -o Acquire::Check-Valid-Until=false update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates git nodejs python3 python3-pygments python3-pypdf latexmk texlive-latex-extra texlive-fonts-recommended lmodern texlive-science poppler-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /workspace
|
||||
@@ -0,0 +1,116 @@
|
||||
# Assignment 5 manual build infrastructure
|
||||
|
||||
Status on October 6, 2026 (America/New_York): source transfer resolved. The
|
||||
complete manual now resides in documentation/. Push-triggered manual runs 3
|
||||
and 4 passed; controlled LaTeX failure run 5 published no PDF; repaired run 6
|
||||
passed. All three successful artifacts were downloaded and checksum-verified.
|
||||
See manual-build-evidence.json and documentation/devopsAutomatedManualBuild.tex.
|
||||
Assignment metadata remains 1.7.1, October 6, 2026. Final PDF publication uses
|
||||
its generated Build Identity; final download verification is retained separately.
|
||||
|
||||
## Deployment
|
||||
|
||||
Existing host: /home/codex/myfileagent-gitea. Gitea 1.27.3 and Caddy 2.11.4
|
||||
were left running. Public HTTPS remains https://myfileagent.tech, with the
|
||||
Gitea backend bound to 127.0.0.1:3000 and its private Docker bridge. The existing
|
||||
5050/8080 grading apps and SSH configuration were not changed.
|
||||
|
||||
Runner 0.6.1 is pinned by registry digest in runner-compose.yaml. The live
|
||||
configuration is at /home/codex/myfileagent-gitea/runner. Registration is scoped to
|
||||
myfileagent/myfileagent-pipeline; runner ID 1, name assignment5-manual,
|
||||
label manual-latex, capacity one. Live runner state is outside Git in a
|
||||
mode-700 directory; .runner is mode 600. No registration credential is in
|
||||
Compose, source, or this record. The temporary implementation credential has
|
||||
write:repository scope and is stored outside Git; revoke it when work ends.
|
||||
|
||||
The runner controls the host Docker socket and therefore has powerful host
|
||||
access. Only trusted team workflows may run. Jobs have no socket, registration
|
||||
state or permitted host-volume mounts. The runner exposes no ports, cache or
|
||||
metrics listener. Jobs use the separate manual-build-jobs bridge, a 256 MiB
|
||||
memory ceiling, no swap, 0.65 CPU and a PID limit of 256. The runner itself is
|
||||
limited to 192 MiB (Go soft memory target 128 MiB) and 0.25 CPU. This does not protect the host against a malicious
|
||||
trusted workflow or Docker administrator. Workflow triggers must remain push
|
||||
only on main/manual-build-validation; do not enable untrusted PR jobs.
|
||||
|
||||
The repository is public, has no direct collaborators, and grants its Owners
|
||||
team owner rights. No branch protections existed at preflight. Team review of
|
||||
workflow changes remains a procedural control, not an enforced approval gate.
|
||||
|
||||
## Toolchain and evidence
|
||||
|
||||
Dockerfile pins Debian by digest and packages by the October 1, 2026 Debian
|
||||
snapshot. It supplies TeX Live 2022, latexmk, minted/Pygments, Latin Modern,
|
||||
recommended fonts, BibTeX, index/glossary tools, Node and pypdf. Full source compatibility was verified by precompilation and successful Actions runs.
|
||||
|
||||
runner-preflight.yml is an isolated infrastructure test on branch
|
||||
manual-runner-preflight. It is not one of the required manual source builds.
|
||||
It tests exact-commit checkout, HTTPS, backend isolation, dependency presence,
|
||||
and the pinned upload-artifact v3.2.2 protocol. Its text artifact has 14-day
|
||||
retention; the eventual PDF workflow must also record its actual retention.
|
||||
Checkout is pinned to v4.2.2 commit 11bd71901bbe5b1630ceea73d27597364c9af683.
|
||||
Upload is pinned to v3.2.2 commit c6a366c94c3e0affe28c06c8df20a878f24da3cf.
|
||||
|
||||
## Source and build
|
||||
|
||||
The user supplied Assignment5-source-prepared.zip, SHA-256
|
||||
ad93f9f2e71bc66a2b882b57510cbb7f51827637047073d6a6f78c0170e6205e.
|
||||
The original archive and instruction PDF remain outside the public repository.
|
||||
All actual manual dependencies, including twelve hw4_images files, are versioned.
|
||||
The active workflow is .gitea/workflows/manual-pdf.yml, triggered by pushes to
|
||||
main and manual-build-validation. Its helper runs from documentation/ci and
|
||||
creates uncommitted build metadata in a fresh temporary workspace. Compiler
|
||||
errors, missing/empty PDFs and failed identity/reference checks stop publication.
|
||||
The requested artifact retention is 14 days. No generated PDF is auto-committed.
|
||||
|
||||
## Ownership, cost, cleanup and recovery
|
||||
|
||||
The MyFileAgent team owns the runner and storage. Preflight measured one CPU,
|
||||
961 MiB RAM, about 292 MiB available memory, no swap, and 18 GiB free disk.
|
||||
No paid resize or additional machine was purchased. Existing account billing
|
||||
and transfer charges were not inspected; do not claim the work is free.
|
||||
|
||||
Stop only the added service with docker compose -f runner/compose.yaml stop
|
||||
from the deployment directory. This preserves Gitea and historical data.
|
||||
Remove runner ID 1 through repository Settings / Actions / Runners if retiring
|
||||
it, then remove only its identified state and temporary credentials. Preserve
|
||||
required artifacts before their retention expires. Do not prune all Docker
|
||||
images, networks, volumes, or containers on this shared host.
|
||||
|
||||
For queued jobs check scope, online state, label and branch. For build failures
|
||||
inspect the first LaTeX error and pinned dependencies. For uploads inspect the
|
||||
PDF path and action compatibility. Check memory/disk before retrying.
|
||||
|
||||
References: https://docs.gitea.com/1.26/usage/actions/act-runner/;
|
||||
https://docs.gitea.com/1.27/usage/actions/comparison/;
|
||||
https://docs.gitea.com/1.27/administration/config-cheat-sheet/.
|
||||
|
||||
Compiler image built successfully: local immutable image ID
|
||||
sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1
|
||||
(1.32 GB). The runner selects this exact local image ID with force_pull false.
|
||||
Rebuilds on a replacement host must record their image ID before enabling jobs.
|
||||
|
||||
## Verified compatibility result
|
||||
|
||||
On October 6, 2026 (America/New_York), push commit
|
||||
2fcbcbf6390273b8d3be14bfb656ec02ce050a97 completed successfully in
|
||||
https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/2 .
|
||||
The downloaded text artifact is
|
||||
https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/2/artifacts/runner-preflight-2 .
|
||||
Its ZIP SHA-256 is recorded in evidence-2026-10-06.json; the extracted payload
|
||||
is preserved in preflight-result-2.txt. The actual checks passed: triggering
|
||||
revision, HTTPS, blocked direct private backend/gateway port 3000, absent
|
||||
Docker socket/runner state, and compiler dependencies. This does not imply
|
||||
all outbound destinations or other host ports are blocked.
|
||||
|
||||
The pinned upload-artifact v3.2.2 action works with this server. Its legacy
|
||||
artifact is downloadable from the run URL but absent from the newer REST
|
||||
artifact listing. Use the run's named download link for this protocol. Retention
|
||||
is requested as 14 days; expiry enforcement has not yet been observed.
|
||||
The active manual workflow is .gitea/workflows/manual-pdf.yml; manual-pdf.yml.example is the original preparation template.
|
||||
|
||||
The first preflight hit the runner's 96 MiB cap during action download. Its
|
||||
orphaned container was stopped; the cap is now 192 MiB with GOMEMLIMIT=128MiB.
|
||||
Run 2 then passed without another runner restart. This infrastructure repair
|
||||
is NOT the required controlled LaTeX error and repair exercise.
|
||||
|
||||
The original manual is now imported. Its complete automated-build chapter, history, prompt log, introduction, references and Hosts/Passwords hints have been updated while preserving earlier evidence. The glossary and index link the build concepts; the final artifact requires visual review after download.
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"observed_at_utc": "2026-10-07T01:13:05.277196+00:00",
|
||||
"assignment": "5",
|
||||
"document_version": "1.7.1",
|
||||
"document_date": "2026-10-06",
|
||||
"gitea_version": "1.27.3",
|
||||
"runner_version": "0.6.1",
|
||||
"runner_id": 1,
|
||||
"runner_scope": "myfileagent/myfileagent-pipeline",
|
||||
"concurrency": 1,
|
||||
"runner_memory_mib": 192,
|
||||
"job_memory_mib": 256,
|
||||
"runner_image": "gitea/act_runner@sha256:b5c35d6bdbb9bb25e531230bfc7cc663cb751406cbec90a2a891b85fea54de86",
|
||||
"compiler_image_id": "sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1",
|
||||
"source_transfer": "resolved: user-provided archive imported into documentation",
|
||||
"manual_builds_verified": 3,
|
||||
"preflight_1": {
|
||||
"commit": "194cce7c657ff1166c4cddb5dd6f47bfa9c97e93",
|
||||
"run_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/1",
|
||||
"observed_result": "runner hit 96 MiB memory limit during action clone; orphan job container stopped"
|
||||
},
|
||||
"preflight_2": {
|
||||
"commit": "2fcbcbf6390273b8d3be14bfb656ec02ce050a97",
|
||||
"run_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/2",
|
||||
"observed_result": "success; downloaded artifact verified",
|
||||
"artifact_name": "runner-preflight-2",
|
||||
"artifact_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/2/artifacts/runner-preflight-2",
|
||||
"artifact_zip_sha256": "03e9f73aae55c2fa5151471732a253bf297398d9004edc6890f2dcf88d412273",
|
||||
"retention_days_requested": 14,
|
||||
"rest_artifact_listing": "empty for this legacy v3 artifact; direct run download verified",
|
||||
"checks": [
|
||||
"exact triggering commit",
|
||||
"HTTPS certificate verification",
|
||||
"private Gitea backend and gateway port 3000 unreachable from job",
|
||||
"no Docker socket or runner state in job",
|
||||
"latexmk 4.79",
|
||||
"TeX Live 2022/Debian",
|
||||
"Pygments 2.14.0",
|
||||
"Node 18.20.4",
|
||||
"pypdf 3.4.1"
|
||||
]
|
||||
},
|
||||
"preserved_services": [
|
||||
"Gitea",
|
||||
"Caddy",
|
||||
"hello-node on 5050",
|
||||
"color-buttons-app on 8080"
|
||||
],
|
||||
"secret_boundary": "runner state and temporary repository write token outside Git, restricted storage; no credential values in evidence",
|
||||
"hosts_passwords_manual_tables": "updated with runner and protected credential-storage hints",
|
||||
"manual_evidence": "manual-build-evidence.json"
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"observed_date": "2026-10-06 America/New_York",
|
||||
"source_archive_sha256": "ad93f9f2e71bc66a2b882b57510cbb7f51827637047073d6a6f78c0170e6205e",
|
||||
"successful_builds": [
|
||||
{
|
||||
"commit": "c74087a93bf53b44a75a25c3658fc178ff253225",
|
||||
"run_number": "3",
|
||||
"run_id": "3",
|
||||
"attempt": "1",
|
||||
"suffix": "+build.3.c74087a.attempt.1",
|
||||
"run_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/3",
|
||||
"document_version": "1.7.1",
|
||||
"pdf_sha256": "ab99995751da7a67684d97e32344cfc8d7f3d0c6c26055bbd0670b3dc030d337",
|
||||
"pages": 72,
|
||||
"artifact_name": "assignment5-1.7.1-run-3-c74087a93bf53b44a75a25c3658fc178ff253225",
|
||||
"artifact_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/3/artifacts/assignment5-1.7.1-run-3-c74087a93bf53b44a75a25c3658fc178ff253225",
|
||||
"artifact_zip_sha256": "f4ebf6cf6e9278715dd8347a6e38a9034e62256ea5e619887109a6bddece6b2d",
|
||||
"result": "success"
|
||||
},
|
||||
{
|
||||
"commit": "2b8be117c7c9b2a074cc7fbfcf152e34d0e65b2a",
|
||||
"run_number": "4",
|
||||
"run_id": "4",
|
||||
"attempt": "1",
|
||||
"suffix": "+build.4.2b8be11.attempt.1",
|
||||
"run_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/4",
|
||||
"document_version": "1.7.1",
|
||||
"pdf_sha256": "ba87740958bada14f31d2236638c9b175d8b24797f715252cdb0f0af6668be06",
|
||||
"pages": 72,
|
||||
"artifact_name": "assignment5-1.7.1-run-4-2b8be117c7c9b2a074cc7fbfcf152e34d0e65b2a",
|
||||
"artifact_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/4/artifacts/assignment5-1.7.1-run-4-2b8be117c7c9b2a074cc7fbfcf152e34d0e65b2a",
|
||||
"artifact_zip_sha256": "87d3ed75e74caf0eaf823a8b3dd7355fd090e7a13b28ae75ba82020ff2045bbc",
|
||||
"result": "success"
|
||||
},
|
||||
{
|
||||
"commit": "a4737f1a4eed5e1b786038bb917ca1ab9f1ed856",
|
||||
"run_number": "6",
|
||||
"run_id": "6",
|
||||
"attempt": "1",
|
||||
"suffix": "+build.6.a4737f1.attempt.1",
|
||||
"run_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/6",
|
||||
"document_version": "1.7.1",
|
||||
"pdf_sha256": "7591b1cd87f319dfc77eaa4ca9fd9727d1e7b97253a05d9a93e8624296bc736e",
|
||||
"pages": 72,
|
||||
"artifact_name": "assignment5-1.7.1-run-6-a4737f1a4eed5e1b786038bb917ca1ab9f1ed856",
|
||||
"artifact_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/6/artifacts/assignment5-1.7.1-run-6-a4737f1a4eed5e1b786038bb917ca1ab9f1ed856",
|
||||
"artifact_zip_sha256": "e7de44f82686fdb57b8c57480f4b0079dca1b27751a08b15b980adaaa10473d8",
|
||||
"result": "success"
|
||||
}
|
||||
],
|
||||
"controlled_failure": {
|
||||
"run": 5,
|
||||
"commit": "f0e7b74ee63b40811334ee9cd4aecf035f1b0864",
|
||||
"run_url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/actions/runs/5",
|
||||
"error": "Undefined control sequence: AssignmentFiveControlledFailure",
|
||||
"latexmk_exit": 12,
|
||||
"artifact_download_status": 404
|
||||
},
|
||||
"final_publication": "Current PDF build identity and matching Actions artifact identify the final source; external verification follows download."
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# Activate as .gitea/workflows/manual-pdf.yml only after the authoritative
|
||||
# documentation sources have been transferred and clean compilation verified.
|
||||
name: Assignment 5 manual PDF
|
||||
on:
|
||||
push:
|
||||
branches: [main, manual-build-validation]
|
||||
jobs:
|
||||
manual:
|
||||
runs-on: manual-latex
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
- name: Compile the complete manual with visible build identity
|
||||
env:
|
||||
GITEA_SHA: ${{ github.sha }}
|
||||
GITEA_RUN_NUMBER: ${{ github.run_number }}
|
||||
GITEA_RUN_ID: ${{ github.run_id }}
|
||||
GITEA_RUN_ATTEMPT: ${{ github.run_attempt }}
|
||||
run: |
|
||||
python3 documentation/ci/build_manual.py
|
||||
test -s documentation/build/main.pdf
|
||||
test -s documentation/build/build-manifest.json
|
||||
- name: Publish verified PDF and traceability manifest
|
||||
uses: https://github.com/actions/upload-artifact@c6a366c94c3e0affe28c06c8df20a878f24da3cf
|
||||
with:
|
||||
name: assignment5-1.7.1-run-${{ github.run_number }}-${{ github.sha }}
|
||||
path: |
|
||||
documentation/build/main.pdf
|
||||
documentation/build/build-manifest.json
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
@@ -0,0 +1,21 @@
|
||||
Trigger commit: 2fcbcbf6390273b8d3be14bfb656ec02ce050a97
|
||||
HTTPS: {"version":"1.27.3"}
|
||||
Private backend connection blocked: True
|
||||
Private backend connection blocked: True
|
||||
Docker socket and runner state absent from job
|
||||
Latexmk, John Collins, 7 Jan. 2023. Version 4.79
|
||||
pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian)
|
||||
kpathsea version 6.3.4
|
||||
Copyright 2022 Han The Thanh (pdfTeX) et al.
|
||||
There is NO warranty. Redistribution of this software is
|
||||
covered by the terms of both the pdfTeX copyright and
|
||||
the Lesser GNU General Public License.
|
||||
For more information about these matters, see the file
|
||||
named COPYING and the pdfTeX source.
|
||||
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
|
||||
Compiled with libpng 1.6.39; using libpng 1.6.39
|
||||
Compiled with zlib 1.2.13; using zlib 1.2.13
|
||||
Compiled with xpdf version 4.04
|
||||
Pygments version 2.14.0, (c) 2006-2022 by Georg Brandl, Matthäus Chajdas and contributors.
|
||||
v18.20.4
|
||||
3.4.1
|
||||
@@ -0,0 +1,20 @@
|
||||
name: manual-build
|
||||
services:
|
||||
runner:
|
||||
image: gitea/act_runner:0.6.1@sha256:b5c35d6bdbb9bb25e531230bfc7cc663cb751406cbec90a2a891b85fea54de86
|
||||
container_name: myfileagent-manual-runner
|
||||
restart: unless-stopped
|
||||
entrypoint: [act_runner]
|
||||
command: [daemon, --config, /config.yaml]
|
||||
mem_limit: 192m
|
||||
memswap_limit: 192m
|
||||
environment:
|
||||
GOMEMLIMIT: 128MiB
|
||||
cpus: 0.25
|
||||
volumes:
|
||||
- ./state:/data
|
||||
- ./config.yaml:/config.yaml:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
networks: [runner-egress]
|
||||
networks:
|
||||
runner-egress:
|
||||
@@ -0,0 +1,22 @@
|
||||
log:
|
||||
level: info
|
||||
runner:
|
||||
file: /data/.runner
|
||||
capacity: 1
|
||||
timeout: 30m
|
||||
shutdown_timeout: 30s
|
||||
insecure: false
|
||||
labels:
|
||||
- manual-latex:docker://sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1
|
||||
cache:
|
||||
enabled: false
|
||||
container:
|
||||
network: manual-build-jobs
|
||||
privileged: false
|
||||
options: --memory=256m --memory-swap=256m --cpus=0.65 --pids-limit=256
|
||||
valid_volumes: []
|
||||
docker_host: '-'
|
||||
force_pull: false
|
||||
force_rebuild: false
|
||||
metrics:
|
||||
enabled: false
|
||||
@@ -0,0 +1,23 @@
|
||||
# Instruction PDF section 3.5 documentation review
|
||||
|
||||
Reviewed October 7, 2026 against the supplied dosManual-V1.18.pdf, section 3.5
|
||||
(printed pages 13–14). This checks documented coverage, not a grade prediction.
|
||||
The title remains Assignment 5, version 1.7.1, October 6, 2026.
|
||||
|
||||
| Requirement | Documentation and evidence | Result |
|
||||
|---|---|---|
|
||||
| Eight numbered subsections in rubric order; dated, labeled, sanitized evidence and clickable links | Chapter 10 has sections 10.1–10.8 in the required order; MAN-RUNNER-01 and MAN-BUILD/FAIL/REPAIR records have dates, expected/actual results and real run links. | Included |
|
||||
| 1. Source and trigger: repository/main/workflow links, branch and push trigger, observed triggered run, HTTPS path and ports, no runner submission port | 10.1 names main and manual-build-validation, links source/workflow, traces HTTPS 443 → Caddy → private Gitea 3000, and explains outbound runner polling; 10.6 correlates source pushes and runs. | Included |
|
||||
| 2. Runner setup: version, location, scope, label, execution mode, network path, capacity, online/assigned evidence, isolation and temporary jobs | 10.2 records runner 0.6.1, same-Droplet configuration location, repository scope, ID 1, manual-latex, explicit Docker docker:// execution, temporary TeX containers, HTTPS paths, capacity one, resource limits, online API observation and assigned run 2. No public runner/job ports or socket mount in jobs. | Included |
|
||||
| 3. Reproducible compilation: image, dependencies, command, main file, output, successful log, failure detection, compiler location and source/artifact exchange | 10.3 records the pinned image ID, tool versions, latexmk command, helper/output path and validation gates; 10.1 identifies main.tex. A direct successful run-9 job-log link is included. Sections 10.2–10.3 and Figure 10.1 explain temporary compiler installation and HTTPS exchange without a Gitea/shared compiler filesystem. | Included |
|
||||
| 4. PDF identity: human version, build suffix, full commit/run, matching run and no auto-commit loop | 10.4 and the visible Build Identity page describe generated temporary metadata. The title includes the actual build suffix; matching runs and PDF identities are in 10.6. | Included |
|
||||
| 5. Artifact: named successful artifact link, downloaded file opens, retention and no permanent-backup claim | 10.5 provides a generated link to the current PDF artifact and requests 14-day retention; it explicitly states artifacts are not permanent backups. 10.6 records downloaded/parsed PDFs and matching checksums for runs 3, 4 and 6. The newly revised artifact is downloaded and checked after this review is committed. | Included; revised artifact verification follows build |
|
||||
| 6. Two successive source changes plus controlled failure and repair, expected/actual results and matched commits | 10.6 correlates successful runs 3–4, failed run 5 (compiler error, upload skipped, artifact 404), and repaired run 6 with full commits, visible PDF versions, named artifacts and checksums. | Included |
|
||||
| 7. Workflow rights, secret storage hints, isolation, Docker privilege risk and non-secret configuration links | 10.7 documents Owners-team rights, trusted push triggers, protected runner/token storage, socket risk and job restrictions. It directly links runner-config.yaml, runner-compose.yaml and the workflow. | Included |
|
||||
| 8. Version/history and chapter link; explicit Hosts/Passwords changes; current hints-only tables; citations, glossary/index, evidence, failed-build procedure | Consolidated 1.7.1 history explicitly records Hosts and Passwords updates and links the chapters. 10.8 links the tables/history/log, cites supporting material and gives troubleshooting. Existing glossary/index destinations and all earlier-version history remain. | Included |
|
||||
|
||||
The four 1.7.1 rows in each log were merged into one concise October 6–7 row.
|
||||
Their rendered height is checked against the requested two-thirds-page maximum
|
||||
(preferably one-half page) in the downloaded Actions PDF. No earlier-version
|
||||
entry was removed. Section 10.1's requested sentence was removed; historical
|
||||
records in other chapters remain intact.
|
||||