Compare commits

..
Author SHA1 Message Date
nkogut b42689f02f Merge pull request 'Assignment 7: add tested monitoring, alerts, and incident evidence' (#14) from assignment7/monitoring into main
myfileagent-python-ci/pipeline/head This commit looks good
Assignment 5 manual PDF / manual (push) Successful in 1m36s
Reviewed-on: #14
Reviewed-by: nkogut <nkogut@stevens.edu>
2026-10-28 18:03:59 +00:00
Codex (authorized Assignment 5 implementation) 6605394d7a Add Assignment 7 monitoring, tested alerts, and incident evidence
myfileagent-python-ci/pipeline/head This commit looks good
myfileagent-python-ci/pipeline/pr-main This commit looks good
2026-10-28 17:51:31 +00:00
glovely 131d605c5e Merge pull request 'Assignment 6: enforce Python CI before merging' (#11) from assignment6/python-ci into main
Assignment 5 manual PDF / manual (push) Successful in 1m11s
myfileagent-python-ci/pipeline/head This commit looks good
Reviewed-on: #11
Reviewed-by: nkogut <nkogut@stevens.edu>
2026-10-09 19:14:44 +00:00
Codex (authorized Assignment 5 implementation) b7ef4850b7 Record private webhook configuration and enforced PR merge gate
myfileagent-python-ci/pipeline/pr-main This commit looks good
2026-10-09 19:08:59 +00:00
Codex (authorized Assignment 5 implementation) 02d31699aa Repair pricing multiplication and restore passing CI for #10
myfileagent-python-ci/pipeline/pr-main This commit looks good
2026-10-09 19:05:51 +00:00
Codex (authorized Assignment 5 implementation) d6477b3df6 Demonstrate failing pricing calculation for issue #10
myfileagent-python-ci/pipeline/pr-main There was a failure building this commit
2026-10-09 19:04:32 +00:00
nkogut ad056a363c Update project name to MyFileAgent
myfileagent-python-ci/pipeline/pr-main This commit looks good
2026-10-09 19:02:06 +00:00
Codex (authorized Assignment 5 implementation) 041adfcda4 Add Assignment 6 Python application and Jenkins pipeline
myfileagent-python-ci/pipeline/head This commit looks good
2026-10-09 18:33:17 +00:00
Codex (authorized Assignment 5 implementation) 4a67a09780 Include NK in latest AI assistance record
Assignment 5 manual PDF / manual (push) Successful in 1m2s
2026-10-07 21:41:15 +00:00
Codex (authorized Assignment 5 implementation) 8a9f4b3b5b Apply final manual editorial revisions
Assignment 5 manual PDF / manual (push) Successful in 49s
2026-10-07 21:36:36 +00:00
Codex (authorized Assignment 5 implementation) 2b82307761 Consolidate 1.7.1 records and clarify Chapter 3 rubric coverage
Assignment 5 manual PDF / manual (push) Successful in 1m0s
2026-10-07 19:09:56 +00:00
Codex (authorized Assignment 5 implementation) d812910ba8 Keep runner and credential labels within their table columns
Assignment 5 manual PDF / manual (push) Successful in 1m3s
2026-10-07 18:30:15 +00:00
Codex (authorized Assignment 5 implementation) b6511602f7 Finish manual navigation and align the tested build guide
Assignment 5 manual PDF / manual (push) Successful in 55s
2026-10-07 18:25:58 +00:00
Codex (authorized Assignment 5 implementation) db2a8be2ec Document verified manual builds, controlled failure and repair
Assignment 5 manual PDF / manual (push) Successful in 48s
2026-10-07 01:33:23 +00:00
Codex (authorized Assignment 5 implementation) 2b8be117c7 Improve manual traceability layout and record first source build
Assignment 5 manual PDF / manual (push) Successful in 54s
2026-10-07 01:28:49 +00:00
Codex (authorized Assignment 5 implementation) c74087a93b Build the complete Assignment 5 manual on trusted branch pushes
Assignment 5 manual PDF / manual (push) Successful in 47s
2026-10-07 01:27:17 +00:00
Codex (authorized Assignment 5 implementation) fa9a32f8a9 Record verified runner artifact delivery and pending manual workflow [skip ci] 2026-10-07 01:15:02 +00:00
Codex (authorized Assignment 5 implementation) 2fcbcbf639 Allow bounded action download memory for the manual runner
Runner compatibility preflight / preflight (push) Successful in 3m23s
2026-10-07 01:09:56 +00:00
Codex (authorized Assignment 5 implementation) 194cce7c65 Prepare pinned manual runner and isolated compatibility check
Runner compatibility preflight / preflight (push) Failing after 13m36s
2026-10-07 01:08:53 +00:00
nkogut b2daa0dbd9 update name to myfileagent 2026-09-29 19:41:00 +00:00
nkogut 11ac824a32 ops: version staged Caddy HTTPS configuration 2026-09-27 00:09:27 +00:00
nkogut 533ddfb38a ops: version staged Caddy HTTPS configuration 2026-09-27 00:08:54 +00:00
nkogut 620dec7b2a ops: parameterize Gitea domain and public URL 2026-09-27 00:06:58 +00:00
nkogut c8feda9d0a Merge pull request 'Update README.md' (#9) from branch_1 into main
Reviewed-on: http://localhost:3000/filepilot/filepilot-pipeline/pulls/9
Reviewed-by: nkogut <nkogut@stevens.edu>
2026-09-26 20:36:19 +00:00
glovely 7b6d0031b4 Update README.md 2026-09-26 20:35:42 +00:00
glovely fe7b75aa4d Update README.md 2026-09-26 20:34:46 +00:00
glovely 1d941afe01 Merge pull request 'docs: add a single newline' (#8) from nkogut-patch-1 into main
Reviewed-on: http://localhost:3000/filepilot/filepilot-pipeline/pulls/8
Reviewed-by: glovely <glovely@stevens.edu>
2026-09-26 20:33:25 +00:00
nkogut 48ec71ae1d docs: add a single newline 2026-09-26 20:32:00 +00:00
nkogut c54d549545 Update ops/gitea/compose.yaml 2026-09-26 20:00:28 +00:00
nkogut 08f9864b1e Merge pull request 'Issue 4 gitea deployment' (#7) from issue-4-gitea-deployment into main
Reviewed-on: http://localhost:3000/filepilot/filepilot-pipeline/pulls/7
2026-09-26 19:50:54 +00:00
glovely 6048911c30 docs: add Gitea operating notes 2026-09-26 19:48:49 +00:00
glovely 7ea76fe2ec Add ops/gitea/compose.yaml 2026-09-26 19:42:30 +00:00
glovely 8a8f7632fb Merge pull request 'Define FilePilot product scope and acceptance criteria' (#6) from issue-1-product-scope into main
Reviewed-on: http://localhost:3000/filepilot/filepilot-pipeline/pulls/6
2026-09-26 19:28:13 +00:00
115 changed files with 10371 additions and 4 deletions
+34
View File
@@ -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
+47
View File
@@ -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
Vendored
+29
View File
@@ -0,0 +1,29 @@
pipeline {
agent any
options {
skipDefaultCheckout()
disableConcurrentBuilds()
timeout(time: 5, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '10'))
timestamps()
}
stages {
stage('Checkout') {
steps {
checkout scm
sh 'git rev-parse HEAD'
}
}
stage('Syntax check') {
steps {
sh 'python3 --version'
sh 'python3 -m py_compile pricing.py tests/test_pricing.py'
}
}
stage('Test') {
steps {
sh 'python3 -m unittest discover -s tests -v'
}
}
}
}
+4 -4
View File
@@ -1,17 +1,17 @@
## Product Scope
FilePilot demonstrates a controlled file-update workflow. It accepts a target
MyFileAgent demonstrates a controlled file-update workflow. It accepts a target
file description, expected text, and replacement text. The application locates
the file only within an approved demonstration directory, verifies the expected
text, creates a backup, presents a diff, performs the replacement, verifies the
result, and records the outcome.
FilePilot does not provide unrestricted filesystem access, general desktop
MyFileAgent does not provide unrestricted filesystem access, general desktop
control, arbitrary shell execution, or open-ended autonomous planning.
## Demonstration Acceptance Criteria
The demonstration succeeds when FilePilot:
The demonstration succeeds when MyFileAgent:
1. finds the approved project-status file;
2. confirms that it contains `Status: Draft`;
@@ -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.
+32
View File
@@ -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
File diff suppressed because it is too large Load Diff
+11
View File
@@ -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.
+14
View File
@@ -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.
+123
View File
@@ -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();
+14
View File
@@ -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}`);
});
+367
View File
@@ -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'.
+107
View File
@@ -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}
+38
View File
@@ -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}}
+18
View File
@@ -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}
+3
View File
@@ -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}.
+156
View File
@@ -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.
+31
View File
@@ -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
+126
View File
@@ -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}
+20
View File
@@ -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}
+20
View File
@@ -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}
+84
View File
@@ -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}.
+105
View File
@@ -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.
+148
View File
@@ -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}
+607
View File
@@ -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}
+23
View File
@@ -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}
+161
View File
@@ -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.
+130
View File
@@ -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}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

+12
View File
@@ -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}
+182
View File
@@ -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}
+42
View File
@@ -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
+3
View File
@@ -0,0 +1,3 @@
*.secret
.env
notification-setup/
+5
View File
@@ -0,0 +1,5 @@
# Grafana route installed on October 24, 2026. Merge with existing routes.
metrics.myfileagent.tech {
reverse_proxy grafana:3000
}
+31
View File
@@ -0,0 +1,31 @@
# Assignment 7 monitoring
Deployed on the existing Droplet and validated October 24-28, 2026. Source is submitted for peer review; see incidents/2026-10-24-jenkins-outage.md. Report integration and compilation are deferred by the team.
## Architecture and access
Caddy serves authenticated Grafana at https://metrics.myfileagent.tech over the existing private proxy bridge. Grafana uses private http://prometheus:9090. Prometheus scrapes itself, Node Exporter, Blackbox Exporter and the actual Gitea/Jenkins HTTPS login probes every 30 seconds. TLS verification stays enabled. No monitoring host ports, privileged containers or Docker socket mounts are used. Only Grafana joins the existing proxy bridge.
Node Exporter reads host root/proc/sys through a read-only root mount and uses the host PID namespace for whole-host CPU, memory and filesystem measurements. This is sensitive host visibility; it does not measure per-container attribution or whole-host network interfaces.
## Versions and resource settings
Compose fixes Prometheus v3.15.1, Grafana 13.2.4, Node Exporter v1.12.1 and Blackbox Exporter v0.29.1. Pulled image digests are in evidence/monitoring-image-digests-2026-10-24.json. Existing Gitea/Jenkins versions are preserved.
Prometheus has a 160 MiB memory/swap cap and 120 MiB Go memory target; exporters each have 32 MiB caps. Grafana memory/swap limits were removed at the team's request after bounded startup failed. CPU quotas remain. This is measured lab operation on a shared host, not guaranteed sizing. Avoid overlapping Jenkins/manual builds; monitor actual availability and resource pressure.
Prometheus retention is seven days and 512 MB of TSDB blocks. WAL/head/compaction require additional space; this is not a hard total-volume limit.
## Deployment and secrets
Run from this monitoring directory on the Droplet. Review `docker compose config --quiet` before changes. The external proxy network must exist as myfileagent-gitea_gitea-private. The compose override reflects the existing Droplet paths and supplemental group 1000; adapt only after verifying host identities.
Secrets stay outside Git under /home/codex/myfileagent-gitea/secrets with restricted permissions. The admin-password file is only the initial setup value; do not use it to reset a changed password. Private Discord routing provisioning is mounted separately over the committed empty placeholder. Recreate the approved contact point/policy privately for a new deployment; never commit the webhook URL. Obsolete SMTP setup files are excluded from this change. Gmail SMTP was not the working delivery route.
Preserve the live Caddyfile; the example fragment is not a replacement for all existing routes. Validate/reload Caddy only for an approved proxy change.
## Dashboards, alerts and validation
The six-panel team dashboard and two-panel runbook dashboard are file-provisioned. Dashboard JSON copies under grafana/dashboards and grafana/provisioning/dashboards/json must remain identical. UI annotations live in Grafana state and are not reconstructed by dashboard JSON.
Service alert: separate expected URL instances, one-minute pending, every 30 seconds. Capacity: root /dev/vda1 ext4, available space below 15% for five minutes. Missing expected probe series, no-data and evaluation errors surface as alerting. Discord delivery uses group wait 10 seconds, group interval one minute and repeat four hours, with resolved delivery enabled. No notification secret is present in this tree.
The threshold-only capacity test and Jenkins-only outage both delivered firing and resolved messages. Final capacity threshold is 15%. See runbooks, slo and incidents. Evidence JSON and selected team screenshots are under evidence/.
Python CI regression checks run through the established Jenkins multibranch job; Compose/promtool/Blackbox validation is recorded separately. These existing Python checks alone do not validate all monitoring semantics.
## Persistence, backup and recovery
Prometheus and Grafana use separate named volumes. October 28 separate restarts preserved historical readings, resource-backed dashboards, data source, two alert rules and 18 annotations. A missed Jenkins probe sample was recorded; monitoring gaps are unknown, not service success. See evidence/monitoring-restart-persistence.json. This is restart persistence, not tested backup/restore.
Before future upgrades, use a consistent stopped Grafana SQLite/volume backup and an approved consistent Prometheus snapshot/backup procedure, preserving ownership and private routing secrets separately. Restore into isolation and verify before replacing live volumes; this monitoring backup/restore exercise has not been performed.
Monitoring rollback: `docker compose stop` from this directory only. Resume: `docker compose start`. Do not use down -v, global prune, or stop the existing Gitea/Jenkins project as monitoring rollback. For Jenkins-only recovery use the exact command in runbooks/service-unavailable.md.
## Review status
Feature branch assignment7/monitoring. P1 external-check issue 12 and P2 timestamp/recovery issue 13 are assigned to glovely. Peer approval, merge and final report publication remain separate steps. Same-Droplet monitoring cannot reliably report a total host failure; no external checker has been deployed.
+11
View File
@@ -0,0 +1,11 @@
modules:
http_2xx:
prober: http
timeout: 10s
http:
method: GET
preferred_ip_protocol: ip4
follow_redirects: true
fail_if_not_ssl: true
tls_config:
insecure_skip_verify: false
+8
View File
@@ -0,0 +1,8 @@
services:
grafana:
group_add:
- "1000"
environment:
GF_SMTP_ENABLED: "false"
volumes:
- /home/codex/myfileagent-gitea/secrets/grafana-discord-routing.json:/etc/grafana/provisioning/alerting/team-discord-routing.json:ro
+79
View File
@@ -0,0 +1,79 @@
name: myfileagent-monitoring
services:
prometheus:
image: prom/prometheus:v3.15.1
restart: unless-stopped
mem_limit: 160m
memswap_limit: 160m
cpus: 0.35
pids_limit: 128
environment:
GOMEMLIMIT: 120MiB
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=7d
- --storage.tsdb.retention.size=512MB
- --query.max-concurrency=2
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
networks: [monitoring]
grafana:
image: grafana/grafana:13.2.4
restart: unless-stopped
cpus: 0.35
pids_limit: 128
environment:
GF_SERVER_ROOT_URL: https://metrics.myfileagent.tech
GF_AUTH_ANONYMOUS_ENABLED: "false"
GF_USERS_ALLOW_SIGN_UP: "false"
GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_admin_password
GF_ANALYTICS_REPORTING_ENABLED: "false"
GF_ANALYTICS_CHECK_FOR_UPDATES: "false"
secrets: [grafana_admin_password]
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning:ro
networks: [monitoring, proxy]
node-exporter:
image: quay.io/prometheus/node-exporter:v1.12.1
restart: unless-stopped
mem_limit: 32m
memswap_limit: 32m
cpus: 0.15
pids_limit: 64
pid: host
command:
- --path.rootfs=/host
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --collector.disable-defaults
- --collector.cpu
- --collector.meminfo
- --collector.filesystem
volumes:
- /:/host:ro,rslave
networks: [monitoring]
blackbox-exporter:
image: quay.io/prometheus/blackbox-exporter:v0.29.1
restart: unless-stopped
mem_limit: 32m
memswap_limit: 32m
cpus: 0.15
pids_limit: 64
command: [--config.file=/config/blackbox.yml]
volumes:
- ./blackbox/blackbox.yml:/config/blackbox.yml:ro
networks: [monitoring]
networks:
monitoring:
proxy:
external: true
name: myfileagent-gitea_gitea-private
volumes:
prometheus_data:
grafana_data:
secrets:
grafana_admin_password:
file: /home/codex/myfileagent-gitea/secrets/grafana-admin-password
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
[
"[2026-10-24T20:34:42.991Z] + python3 -m py_compile pricing.py tests/test_pricing.py",
"[2026-10-24T20:34:44.991Z] + python3 -m unittest discover -s tests -v",
"[2026-10-24T20:34:44.991Z] Ran 2 tests in 0.000s",
"[2026-10-24T20:34:44.992Z] OK",
"[Gitea] Notifying branch build status: SUCCESS This commit looks good",
"Finished: SUCCESS"
]
@@ -0,0 +1,18 @@
{
"created_via": "Existing user-signed-in Gitea session",
"author_shown_in_gitea": "jenkins-ci",
"issues": [
{
"number": 12,
"priority": "P1",
"owner": "glovely",
"url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/12"
},
{
"number": 13,
"priority": "P2",
"owner": "glovely",
"url": "https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/13"
}
]
}
@@ -0,0 +1,186 @@
{
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"values": [
[
1792876991.023,
"1"
],
[
1792877021.023,
"1"
],
[
1792877051.023,
"1"
],
[
1792877081.023,
"1"
],
[
1792877111.023,
"1"
],
[
1792877141.023,
"1"
],
[
1792877171.023,
"1"
],
[
1792877201.023,
"1"
],
[
1792877231.023,
"0"
],
[
1792877261.023,
"0"
],
[
1792877291.023,
"0"
],
[
1792877321.023,
"0"
],
[
1792877351.023,
"0"
],
[
1792877381.023,
"0"
],
[
1792877411.023,
"0"
],
[
1792877441.023,
"0"
],
[
1792877471.023,
"1"
],
[
1792877501.023,
"1"
],
[
1792877531.023,
"1"
],
[
1792877561.023,
"1"
]
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"values": [
[
1792877004.889,
"1"
],
[
1792877034.889,
"1"
],
[
1792877064.889,
"1"
],
[
1792877094.889,
"1"
],
[
1792877124.889,
"1"
],
[
1792877154.889,
"1"
],
[
1792877184.889,
"1"
],
[
1792877214.889,
"1"
],
[
1792877244.889,
"1"
],
[
1792877274.889,
"1"
],
[
1792877304.889,
"1"
],
[
1792877334.889,
"1"
],
[
1792877364.889,
"1"
],
[
1792877394.889,
"1"
],
[
1792877424.889,
"1"
],
[
1792877454.889,
"1"
],
[
1792877484.889,
"1"
],
[
1792877514.889,
"1"
],
[
1792877544.889,
"1"
],
[
1792877574.889,
"1"
]
]
}
]
}
}
@@ -0,0 +1,133 @@
{
"start_utc": "2026-10-24T21:23:00+00:00",
"end_utc": "2026-10-24T21:33:00+00:00",
"qualification": "Fixed 10-minute incident window; sampled availability, not 24-hour SLO",
"queries": {
"availability_percent": {
"promql": "100*avg_over_time(probe_success{job=\"https\"}[10m])",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"60"
]
},
{
"metric": {
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"100"
]
}
]
}
}
},
"samples": {
"promql": "count_over_time(probe_success{job=\"https\"}[10m])",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"20"
]
},
{
"metric": {
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"20"
]
}
]
}
}
},
"failures": {
"promql": "count_over_time(probe_success{job=\"https\"}[10m])-sum_over_time(probe_success{job=\"https\"}[10m])",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"8"
]
},
{
"metric": {
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"0"
]
}
]
}
}
},
"end_probe": {
"promql": "probe_success{job=\"https\"}",
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
}
]
}
}
}
}
}
@@ -0,0 +1,12 @@
[
{
"check": "prometheus",
"exit": 0,
"output": "Checking /config/prometheus.yml\n SUCCESS: /config/prometheus.yml is valid prometheus config file syntax\n\n"
},
{
"check": "blackbox",
"exit": 0,
"output": "time=2026-10-24T19:55:58.503Z level=INFO source=main.go:99 msg=\"Starting blackbox_exporter\" version=\"(version=0.29.1, branch=HEAD, revision=ad91668339ca265f460c23fc422a27ba6d788db9)\"\ntime=2026-10-24T19:55:58.504Z level=INFO source=main.go:100 msg=\"(go=go1.27.3, platform=linux/amd64, user=root@ab03ed60a291, date=20261021-18:03:25, tags=unknown)\"\ntime=2026-10-24T19:55:58.506Z level=INFO source=config.go:144 msg=\"Configuration file change detected, reloading the configuration.\"\ntime=2026-10-24T19:55:58.507Z level=INFO source=main.go:108 msg=\"Config file is ok exiting...\"\n"
}
]
@@ -0,0 +1,38 @@
[
{
"image": "prom/prometheus:v3.15.1",
"digests": [
"prom/prometheus@sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:fa3302279710be2f21a8301ec17a8b4f2301fd829bd113839b3b6b02b6f191a2"
},
{
"image": "grafana/grafana:13.2.4",
"digests": [
"grafana/grafana@sha256:dbbc38ea21103cefb50396340cd88afec779c7e070b0a7bf5a75b4ce46651d3f"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:dbbc38ea21103cefb50396340cd88afec779c7e070b0a7bf5a75b4ce46651d3f"
},
{
"image": "quay.io/prometheus/node-exporter:v1.12.1",
"digests": [
"quay.io/prometheus/node-exporter@sha256:1b4e4438faca4dd7e001dd445d161a4a2091b0fededa84093b3a8dfeae1f1be0"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:1b4e4438faca4dd7e001dd445d161a4a2091b0fededa84093b3a8dfeae1f1be0"
},
{
"image": "quay.io/prometheus/blackbox-exporter:v0.29.1",
"digests": [
"quay.io/prometheus/blackbox-exporter@sha256:ea1c7aa3ef3f307cd03e85f34abb604478ccb90b567fc690da0cd9776da76b13"
],
"architecture": "amd64",
"os": "linux",
"id": "sha256:ea1c7aa3ef3f307cd03e85f34abb604478ccb90b567fc690da0cd9776da76b13"
}
]
@@ -0,0 +1,281 @@
{
"started_utc": "2026-10-28T17:31:31.276382+00:00",
"purpose": "Separate service restart persistence, not backup/restore",
"events": [
{
"service": "prometheus",
"restart_requested_utc": "2026-10-28T17:31:34.517301+00:00",
"restart_exit": 0,
"restart_finished_utc": "2026-10-28T17:31:36.010653+00:00",
"ready_observed_utc": "2026-10-28T17:31:40.102642+00:00"
},
{
"service": "grafana",
"restart_requested_utc": "2026-10-28T17:32:15.105596+00:00",
"restart_exit": 0,
"restart_finished_utc": "2026-10-28T17:32:20.870015+00:00",
"ready_observed_utc": "2026-10-28T17:32:55.109817+00:00"
}
],
"before": {
"utc": "2026-10-28T17:31:31.276421+00:00",
"containers": {
"prometheus": {
"id": "28b35f29a8f87de81ff57432bf01ffd220cff426152d4428800efd9c305005ae",
"mounts": [
[
"myfileagent-monitoring_prometheus_data",
"/prometheus"
]
]
},
"grafana": {
"id": "d71ae8d91703940df0a9128a5e9741c66b8d1798cae50f1306d0064a54e527cc",
"mounts": [
[
"myfileagent-monitoring_grafana_data",
"/var/lib/grafana"
]
]
}
},
"historical_probe": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
}
]
}
},
"database": {
"dashboard": {
"count": 0,
"sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945"
},
"data_source": {
"count": 1,
"sha256": "e951bf9a8c74d5329a16b8da0b49a932564592f49b778735c7e54badcf94dbdf"
},
"alert_rule": {
"count": 2,
"sha256": "bb4b682af4f1b2e37f82d6fc0270cd773b6123dc4ada8352df2bec2bf1f7c5f8"
},
"annotation": {
"count": 18,
"sha256": "c5531a98daa5397b436ddd9692ce7bfcf8a8c5b67a7255e7679fb4b6d75bc0a8"
}
}
},
"after": {
"utc": "2026-10-28T17:33:30.259795+00:00",
"containers": {
"prometheus": {
"id": "28b35f29a8f87de81ff57432bf01ffd220cff426152d4428800efd9c305005ae",
"mounts": [
[
"myfileagent-monitoring_prometheus_data",
"/prometheus"
]
]
},
"grafana": {
"id": "d71ae8d91703940df0a9128a5e9741c66b8d1798cae50f1306d0064a54e527cc",
"mounts": [
[
"myfileagent-monitoring_grafana_data",
"/var/lib/grafana"
]
]
}
},
"historical_probe": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1792877580,
"1"
]
}
]
}
},
"database": {
"dashboard": {
"count": 0,
"sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945"
},
"data_source": {
"count": 1,
"sha256": "e951bf9a8c74d5329a16b8da0b49a932564592f49b778735c7e54badcf94dbdf"
},
"alert_rule": {
"count": 2,
"sha256": "bb4b682af4f1b2e37f82d6fc0270cd773b6123dc4ada8352df2bec2bf1f7c5f8"
},
"annotation": {
"count": 18,
"sha256": "c5531a98daa5397b436ddd9692ce7bfcf8a8c5b67a7255e7679fb4b6d75bc0a8"
}
}
},
"database_equal": true,
"historical_values_equal": true,
"current_probes": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "probe_success",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1793208813.125,
"1"
]
},
{
"metric": {
"__name__": "probe_success",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1793208813.125,
"1"
]
}
]
}
},
"target_health": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "up",
"instance": "https://myfileagent.tech/user/login",
"job": "https"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "https://ci.myfileagent.tech/login",
"job": "https"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "node-exporter:9100",
"job": "node"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "blackbox-exporter:9115",
"job": "blackbox"
},
"value": [
1793208813.419,
"1"
]
},
{
"metric": {
"__name__": "up",
"instance": "prometheus:9090",
"job": "prometheus"
},
"value": [
1793208813.419,
"1"
]
}
]
}
},
"finished_utc": "2026-10-28T17:33:33.422124+00:00",
"collection_gaps": [
{
"instance": "https://ci.myfileagent.tech/login",
"samples": 19,
"gaps_over_45_seconds": [
{
"from_epoch": 1793208671.023,
"to_epoch": 1793208731.022,
"seconds": 59.999
}
]
},
{
"instance": "https://myfileagent.tech/user/login",
"samples": 20,
"gaps_over_45_seconds": []
}
],
"restart_readiness_seconds": {
"prometheus": 5.585,
"grafana": 40.004
},
"dashboard_storage_note": "Legacy dashboard table is empty in this Grafana version; see monitoring-restart-state-verification.json for resource-backed dashboards."
}
@@ -0,0 +1,25 @@
{
"grafana_state": {
"dashboards": [
{
"uid": "myfileagent-sre",
"title": "MyFileAgent - SRE Monitoring",
"panels": 6,
"creationTimestamp": "2026-10-24T20:29:24Z"
},
{
"uid": "myfileagent-sre-runbooks",
"title": "MyFileAgent - Alert Runbooks",
"panels": 2,
"creationTimestamp": "2026-10-24T20:56:55Z"
}
],
"annotations": 18
},
"https": {
"https://metrics.myfileagent.tech/api/health": 200,
"https://ci.myfileagent.tech/login": 200,
"https://myfileagent.tech/user/login": 200
},
"checked_utc": "2026-10-28T17:33:28.307692+00:00"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

@@ -0,0 +1,25 @@
{
"saved_utc": "2026-10-24T20:49:53.986453+00:00",
"role": "Primary dashboard screenshot evidence, selected by the team",
"files": [
{
"path": "screenshots/team-dashboard-cpu-memory.png",
"source": "User-supplied original screenshot: codex-clipboard-2808a8e1-d36c-4128-bea2-f55e38d9a858.png",
"bytes": 390149,
"sha256": "5de62ffbc6213d4215acfe681dd7bbe5b0f35fbc71e4411862d69532204f5b07"
},
{
"path": "screenshots/team-dashboard-root-gitea.png",
"source": "User-supplied original screenshot: codex-clipboard-e57208ff-5657-4534-b2df-ff5e4a44f437.png",
"bytes": 352388,
"sha256": "be7768538882732dbf77c07d6757c9aa68ed75633f258759d9184459a8c68176"
},
{
"path": "screenshots/team-dashboard-jenkins-duration.png",
"source": "User-supplied original screenshot: codex-clipboard-0b34de30-5510-47c5-97ea-80ce8b5597d6.png",
"bytes": 412894,
"sha256": "537f54b2d73c8a0c23c984de35d3c70150020ebf64764f9bcd5f4ca915984c45"
}
],
"context": "Screenshots show a rolling Last 15 minutes range and 5-minute refresh, captured at different times (visible taskbar 16:44, 16:48 and 16:49 on October 24, 2026). Do not describe these as identical fixed-window captures. Exact build times and raw measurements remain in ci-build4-dashboard-correlation.json. Originals preserved, including browser chrome and desktop notification in the third screenshot."
}
@@ -0,0 +1,45 @@
{
"id": null,
"uid": "myfileagent-sre-runbooks",
"title": "MyFileAgent - Alert Runbooks",
"tags": [
"SSW590",
"runbooks"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"editable": false,
"panels": [
{
"id": 1,
"title": "Service unavailable",
"type": "text",
"gridPos": {
"x": 0,
"y": 0,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# HTTPS service unavailable\nOwner: SSW590 Group 7. Severity: critical. Evaluate every 30s; pending 1 minute.\n\nThe rule produces separate instances for Gitea and Jenkins by URL label.\nMissing expected probe series are explicitly treated as failure; datasource\nno-data and evaluation errors enter Alerting rather than reporting health.\n\n1. Acknowledge the alert and record receipt/acknowledgement time.\n2. Inspect the instance URL and the availability/duration panels. Check collection\nhealth and exporter logs to distinguish probe failure from broken monitoring.\n3. Check DNS, valid TLS, expected response and redirects from the monitoring network.\nNever disable certificate verification to clear an alert.\n4. Inspect the affected container status/logs, Caddy routing, resource pressure,\nand recent changes. Confirm the actual cause before restarting anything.\n5. For the planned Jenkins-only exercise, restore using:\n`cd /home/codex/myfileagent-gitea && docker compose -f compose.yaml -f compose.jenkins.yaml start jenkins`\nVerify the live Compose service remains named jenkins before running it.\nDo not stop the Droplet, Gitea or monitoring; never delete service volumes.\n6. Verify HTTPS probe success, a normal Jenkins pipeline, webhook/status and\nGitea manual build as applicable. Record first success and resolved notification.\n7. Escalate unresolved faults to the other team member; capture impact/timeline\nand corrective actions. A complete Droplet failure can also stop these alerts.\n\nNotification destination and delivery timings are pending SMTP/contact-point\nsetup. Scrape (30s), evaluation (30s), pending (1m) and notification delays add\nlatency; do not expect an immediate message. No outage test has been run.\n"
}
},
{
"id": 2,
"title": "Root capacity",
"type": "text",
"gridPos": {
"x": 0,
"y": 18,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# Root capacity below 15 percent\nOwner: SSW590 Group 7. Severity: warning. Evaluate every 30s; pending 5 minutes.\n\nSelector: instance node-exporter:9100; mountpoint /; device /dev/vda1; ext4.\nQuery is 100 * available bytes / size bytes for that same filesystem.\nThe 15% threshold leaves operational room for builds, compaction and logs.\nNo-data or evaluation errors enter Alerting and require monitoring diagnosis.\n\n1. Acknowledge and record times. Compare exporter values to `df -B1 /`.\n2. Inspect directory usage, Docker images/volumes and logs read-only first.\nIdentify growth and protect Gitea/Jenkins/Grafana/Prometheus persistent data.\n3. Agree with the team on safe cleanup or retention changes; avoid global\nDocker pruning and do not delete repositories, service volumes or evidence.\n4. Restore adequate headroom, verify the metric and wait for rule resolution.\n5. Record cause, corrective action, delivered notification and recovery time.\n\nSafe planned test: temporarily raise the free-percentage threshold above the\nmeasured current value, wait through the full five-minute pending period and\ncapture real firing/delivery, then restore 15% and verify resolved delivery.\nNever fill the disk. The test has not yet been run. For file-provisioned rules,\nchange the reviewed provisioning threshold and reload/restart Grafana; retain\nfinal 15% configuration. Notification setup is still pending.\n"
}
}
]
}
+425
View File
@@ -0,0 +1,425 @@
{
"id": null,
"uid": "myfileagent-sre",
"title": "MyFileAgent - SRE Monitoring",
"tags": [
"SSW590",
"Assignment 7",
"SRE"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"editable": true,
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"panels": [
{
"id": 1,
"title": "Whole-droplet CPU utilization",
"description": "CPU busy percentage averaged across all host CPUs. Whole-host load cannot attribute consumption to Jenkins or a single container.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 75
},
{
"color": "red",
"value": 90
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{job=\"node\",instance=\"node-exporter:9100\",mode=\"idle\"}[2m])))",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 2,
"title": "Available host memory",
"description": "Host memory available to applications, including reclaimable memory; not merely free RAM.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "bytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "node_memory_MemAvailable_bytes{job=\"node\",instance=\"node-exporter:9100\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 3,
"title": "Root filesystem available space",
"description": "Available space on the verified host root filesystem: /dev/vda1, ext4, mountpoint /. Excludes other mounts and pseudo filesystems.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "yellow",
"value": 15
},
{
"color": "green",
"value": 25
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * node_filesystem_avail_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"} / node_filesystem_size_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 4,
"title": "Gitea HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded with TLS validation; 0 means failure. Does not establish authenticated Git operation.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://myfileagent.tech/user/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 5,
"title": "Jenkins HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded; a successful response does not establish a successful pipeline.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://ci.myfileagent.tech/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 6,
"title": "HTTPS probe duration",
"description": "End-to-end probe duration for both login URLs from this Droplet. Does not establish reachability from every user network.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_duration_seconds{job=\"https\",instance=~\"https://(myfileagent.tech/user/login|ci.myfileagent.tech/login)\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
}
]
}
@@ -0,0 +1 @@
{"apiVersion":1}
@@ -0,0 +1,180 @@
{
"apiVersion": 1,
"groups": [
{
"orgId": 1,
"name": "team-sre",
"folder": "SSW590",
"interval": "30s",
"rules": [
{
"uid": "sre-service-unavailable",
"title": "HTTPS service unavailable",
"condition": "B",
"data": [
{
"refId": "A",
"datasourceUid": "prometheus",
"relativeTimeRange": {
"from": 600,
"to": 0
},
"model": {
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "min by (instance) (probe_success{job=\"https\"} or on(instance) label_replace(vector(0), \"instance\", \"https://myfileagent.tech/user/login\", \"\", \"\") or on(instance) label_replace(vector(0), \"instance\", \"https://ci.myfileagent.tech/login\", \"\", \"\"))",
"instant": true,
"range": false,
"refId": "A",
"intervalMs": 1000,
"maxDataPoints": 43200
}
},
{
"refId": "B",
"datasourceUid": "__expr__",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"model": {
"refId": "B",
"type": "threshold",
"expression": "A",
"datasource": {
"type": "__expr__",
"uid": "__expr__"
},
"conditions": [
{
"evaluator": {
"params": [
1
],
"type": "lt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"B"
]
},
"reducer": {
"params": [],
"type": "last"
},
"type": "query"
}
]
}
}
],
"noDataState": "Alerting",
"execErrState": "Alerting",
"for": "1m",
"isPaused": false,
"labels": {
"owner": "SSW590-Group7",
"team": "group7",
"severity": "critical",
"scope": "assignment7"
},
"annotations": {
"summary": "HTTPS probe failed or the expected service probe series is missing for at least one minute.",
"description": "Follow the linked runbook. Alerts route to the team Discord contact point; inspect probe/collection health and record acknowledgement and recovery times.",
"runbook_url": "https://metrics.myfileagent.tech/d/myfileagent-sre-runbooks?viewPanel=panel-1"
},
"dashboardUid": "myfileagent-sre"
},
{
"uid": "sre-root-capacity",
"title": "Host root available space below 15 percent",
"condition": "B",
"data": [
{
"refId": "A",
"datasourceUid": "prometheus",
"relativeTimeRange": {
"from": 600,
"to": 0
},
"model": {
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "100 * node_filesystem_avail_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"} / node_filesystem_size_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"}",
"instant": true,
"range": false,
"refId": "A",
"intervalMs": 1000,
"maxDataPoints": 43200
}
},
{
"refId": "B",
"datasourceUid": "__expr__",
"relativeTimeRange": {
"from": 0,
"to": 0
},
"model": {
"refId": "B",
"type": "threshold",
"expression": "A",
"datasource": {
"type": "__expr__",
"uid": "__expr__"
},
"conditions": [
{
"evaluator": {
"params": [
15
],
"type": "lt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"B"
]
},
"reducer": {
"params": [],
"type": "last"
},
"type": "query"
}
]
}
}
],
"noDataState": "Alerting",
"execErrState": "Alerting",
"for": "5m",
"isPaused": false,
"labels": {
"owner": "SSW590-Group7",
"team": "group7",
"severity": "warning",
"scope": "assignment7"
},
"annotations": {
"summary": "Available space on the verified host root filesystem is below 15 percent for five minutes.",
"description": "Follow the linked runbook. Alerts route to the team Discord contact point; inspect probe/collection health and record acknowledgement and recovery times.",
"runbook_url": "https://metrics.myfileagent.tech/d/myfileagent-sre-runbooks?viewPanel=panel-2"
},
"dashboardUid": "myfileagent-sre",
"panelId": 3
}
]
}
]
}
@@ -0,0 +1,45 @@
{
"id": null,
"uid": "myfileagent-sre-runbooks",
"title": "MyFileAgent - Alert Runbooks",
"tags": [
"SSW590",
"runbooks"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"editable": false,
"panels": [
{
"id": 1,
"title": "Service unavailable",
"type": "text",
"gridPos": {
"x": 0,
"y": 0,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# HTTPS service unavailable\nOwner: SSW590 Group 7. Severity: critical. Evaluate every 30s; pending 1 minute.\n\nThe rule produces separate instances for Gitea and Jenkins by URL label.\nMissing expected probe series are explicitly treated as failure; datasource\nno-data and evaluation errors enter Alerting rather than reporting health.\n\n1. Acknowledge the alert and record receipt/acknowledgement time.\n2. Inspect the instance URL and the availability/duration panels. Check collection\nhealth and exporter logs to distinguish probe failure from broken monitoring.\n3. Check DNS, valid TLS, expected response and redirects from the monitoring network.\nNever disable certificate verification to clear an alert.\n4. Inspect the affected container status/logs, Caddy routing, resource pressure,\nand recent changes. Confirm the actual cause before restarting anything.\n5. For the planned Jenkins-only exercise, restore using:\n`cd /home/codex/myfileagent-gitea && docker compose -f compose.yaml -f compose.jenkins.yaml start jenkins`\nVerify the live Compose service remains named jenkins before running it.\nDo not stop the Droplet, Gitea or monitoring; never delete service volumes.\n6. Verify HTTPS probe success, a normal Jenkins pipeline, webhook/status and\nGitea manual build as applicable. Record first success and resolved notification.\n7. Escalate unresolved faults to the other team member; capture impact/timeline\nand corrective actions. A complete Droplet failure can also stop these alerts.\n\nNotification destination and delivery timings are pending SMTP/contact-point\nsetup. Scrape (30s), evaluation (30s), pending (1m) and notification delays add\nlatency; do not expect an immediate message. No outage test has been run.\n"
}
},
{
"id": 2,
"title": "Root capacity",
"type": "text",
"gridPos": {
"x": 0,
"y": 18,
"w": 24,
"h": 18
},
"options": {
"mode": "markdown",
"content": "# Root capacity below 15 percent\nOwner: SSW590 Group 7. Severity: warning. Evaluate every 30s; pending 5 minutes.\n\nSelector: instance node-exporter:9100; mountpoint /; device /dev/vda1; ext4.\nQuery is 100 * available bytes / size bytes for that same filesystem.\nThe 15% threshold leaves operational room for builds, compaction and logs.\nNo-data or evaluation errors enter Alerting and require monitoring diagnosis.\n\n1. Acknowledge and record times. Compare exporter values to `df -B1 /`.\n2. Inspect directory usage, Docker images/volumes and logs read-only first.\nIdentify growth and protect Gitea/Jenkins/Grafana/Prometheus persistent data.\n3. Agree with the team on safe cleanup or retention changes; avoid global\nDocker pruning and do not delete repositories, service volumes or evidence.\n4. Restore adequate headroom, verify the metric and wait for rule resolution.\n5. Record cause, corrective action, delivered notification and recovery time.\n\nSafe planned test: temporarily raise the free-percentage threshold above the\nmeasured current value, wait through the full five-minute pending period and\ncapture real firing/delivery, then restore 15% and verify resolved delivery.\nNever fill the disk. The test has not yet been run. For file-provisioned rules,\nchange the reviewed provisioning threshold and reload/restart Grafana; retain\nfinal 15% configuration. Notification setup is still pending.\n"
}
}
]
}
@@ -0,0 +1,425 @@
{
"id": null,
"uid": "myfileagent-sre",
"title": "MyFileAgent - SRE Monitoring",
"tags": [
"SSW590",
"Assignment 7",
"SRE"
],
"timezone": "America/New_York",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"editable": true,
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"panels": [
{
"id": 1,
"title": "Whole-droplet CPU utilization",
"description": "CPU busy percentage averaged across all host CPUs. Whole-host load cannot attribute consumption to Jenkins or a single container.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 75
},
{
"color": "red",
"value": 90
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{job=\"node\",instance=\"node-exporter:9100\",mode=\"idle\"}[2m])))",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 2,
"title": "Available host memory",
"description": "Host memory available to applications, including reclaimable memory; not merely free RAM.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "bytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "node_memory_MemAvailable_bytes{job=\"node\",instance=\"node-exporter:9100\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 3,
"title": "Root filesystem available space",
"description": "Available space on the verified host root filesystem: /dev/vda1, ext4, mountpoint /. Excludes other mounts and pseudo filesystems.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "yellow",
"value": 15
},
{
"color": "green",
"value": 25
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 100
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "100 * node_filesystem_avail_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"} / node_filesystem_size_bytes{job=\"node\",instance=\"node-exporter:9100\",mountpoint=\"/\",device=\"/dev/vda1\",fstype=\"ext4\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 4,
"title": "Gitea HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded with TLS validation; 0 means failure. Does not establish authenticated Git operation.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 9,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://myfileagent.tech/user/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 5,
"title": "Jenkins HTTPS availability",
"description": "1 means the HTTPS login-page probe succeeded; a successful response does not establish a successful pipeline.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
},
"min": 0,
"max": 1,
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_success{job=\"https\",instance=\"https://ci.myfileagent.tech/login\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
},
{
"id": 6,
"title": "HTTPS probe duration",
"description": "End-to-end probe duration for both login URLs from this Droplet. Does not establish reachability from every user network.",
"type": "timeseries",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 18,
"w": 12,
"h": 9
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"fillOpacity": 10,
"lineWidth": 2,
"showPoints": "never",
"spanNulls": false
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi"
}
},
"targets": [
{
"refId": "A",
"expr": "probe_duration_seconds{job=\"https\",instance=~\"https://(myfileagent.tech/user/login|ci.myfileagent.tech/login)\"}",
"legendFormat": "{{instance}}",
"range": true
}
]
}
]
}
@@ -0,0 +1,11 @@
apiVersion: 1
providers:
- name: team-sre
orgId: 1
folder: SSW590
type: file
disableDeletion: true
allowUiUpdates: false
updateIntervalSeconds: 30
options:
path: /etc/grafana/provisioning/dashboards/json
@@ -0,0 +1,11 @@
apiVersion: 1
datasources:
- name: Prometheus
uid: prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: false
jsonData:
timeInterval: 30s
@@ -0,0 +1,48 @@
# Blameless review: controlled Jenkins outage
Status: evidence-based draft for team verification, prepared October 28, 2026. Operational source remains on the Droplet working branch; not yet committed, pushed or peer approved. This is a review of an approved exercise, not an unplanned production incident.
## Impact and cause
On October 24 only the existing Jenkins service was deliberately stopped to validate HTTPS monitoring, the one-minute unavailable rule, Discord delivery and recovery. Builds were checked idle before injection. The team approved the exercise and the agent executed the known stop/start commands. The cause was intentional fault injection; no individual error or underlying application defect is established. Gitea remained healthy in recorded HTTP checks and all 20 probes of the selected window. No volumes were removed.
## Timeline
All times below are October 24, 2026, America/New_York (EDT, UTC-04:00), except the explicitly dated later checks.
| Event | Time | Evidence/qualification |
|---|---|---|
| Stop requested | 17:26:45.883 | Automation event |
| Jenkins stopped | 17:26:51.997 | Stop command completed |
| First failed probe sample | 17:27:11.023 | Actual Prometheus sample timestamp |
| Failure first observed by polling | 17:27:12.740 | Observer timestamp |
| Rule firing transition | 17:28:20 | Grafana instance UI |
| Firing first observed by polling | 17:28:34.086 | Observer timestamp |
| Discord firing delivery | displayed 17:28 | User screenshot; no exact second |
| Team acknowledgment | confirmed in chat | Exact clock time not supplied |
| Restart requested | 17:29:55.087 | Automatic recovery |
| Start command finished | 17:29:57.750 | Exit 0; not readiness |
| HTTPS ready observed | 17:30:48.613 | HTTP 200 |
| First successful probe after failure | 17:31:11.023 | Actual sample timestamp |
| Rule returned Normal | 17:31:20 | Grafana instance UI |
| Discord resolved delivery | confirmed | Screenshot lacks visible delivery time |
## Detection and restoration
Stop-to-first-failed-sample: 19.026 seconds. Stop-to-rule-firing transition: 88.003 seconds. First failed sample to firing transition: 68.977 seconds. The 30-second scrape, 30-second evaluation interval and one-minute pending period explain quantization; polling first observed firing another 14.086 seconds later. Discord grouping adds configured delivery delay (10-second group wait, one-minute group interval), but exact delivery latency and acknowledgment latency cannot be calculated from the screenshots.
Stopped-to-restart-requested: 183.090 seconds. Restart-requested-to-observed-HTTPS-ready: 53.526 seconds. Stopped-to-observed-HTTPS-ready: 236.617 seconds (about 3 minutes 57 seconds). The injection was approximately three minutes; startup extended service unavailability. Failed-to-successful sampled transition spans 240 seconds; that is a sampled interval, not an exact downtime duration.
## SLI result and limits
Fixed window: October 24 17:23:00-17:33:00 EDT; evaluation epoch 1792877580. At 30-second intervals, both services returned the expected 20 samples. Jenkins had 12 successes and 8 failures: 60% sampled availability. Gitea had 20 successes: 100%. Both ended with probe_success=1. No missing samples were observed in this window. This short exercise does not establish a full-day 99% SLO result, an SLA, or availability from every client network. Missing collection in other windows is unknown, not success.
## Response and recovery verification
The automatic recovery path started only Jenkins and preserved volumes. Discord firing and resolved delivery are confirmed by team screenshots. Normal rule thresholds remain unchanged. Build #5 on October 25 passed syntax validation and two unit tests in 36.837 seconds on revision 131d605c5edb5b5080e4d54861c3c7bf7c360c9c; its log records Gitea SUCCESS notification. This was following-day validation after fresh sign-in, not an immediate recovery build. No manual/PDF build was rerun because the team explicitly deferred compilation. Earlier failed/repaired PR 11 demonstrates pipeline test failure, which differs from service unavailability: https://myfileagent.tech/myfileagent/myfileagent-pipeline/pulls/11 . Build #5: https://ci.myfileagent.tech/job/myfileagent-python-ci/job/main/5/ .
## What worked and measurement gaps
The isolated exercise, prechecked idle queue, explicit recovery command, automatic restart, per-service alert instances and team-controlled Discord routing worked. Polling timestamps and actual sample timestamps are retained separately. Delivery/acknowledgment timing and prompt post-recovery build validation need improvement. Manual build verification remains deferred by team instruction. Incident graph annotations have not yet been added; the fixed-window raw probe samples are preserved and must support any later figure. No claims of completed peer review or publication are made.
October 28 separate Prometheus/Grafana restarts retained historical readings, both resource-backed dashboards, data source, two alert rules and 18 annotations. One approximately 60-second interval between Jenkins probe samples was recorded (one missed scheduled sample). Grafana restart pauses evaluation and notifications. Persistence is not backup/restore proof.
## Shared failure domain and prioritized follow-up
All monitoring shares the Droplet with its monitored services. Total host/network failure can prevent local detection and notification. P1: independent external HTTPS checks. P2: complete incident timestamps and prompt recovery-build validation. Owner for both: Gowri Das Lovely (@glovely); Gitea issues created October 28: [P1 issue 12](https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/12), [P2 issue 13](https://myfileagent.tech/myfileagent/myfileagent-pipeline/issues/13). Both assigned to glovely; author shown as jenkins-ci from the user-signed-in session. These issues authorize tracking, not a new outage, paid purchase or deployment.
## Evidence
Droplet evidence directory: /home/codex/myfileagent-gitea/evidence/assignment7 . Primary records: jenkins-incident-timeline.json, jenkins-incident-probe-samples.json, jenkins-incident-sli-fixed-window.json, jenkins-recovery-build5.json, monitoring-restart-persistence.json and monitoring-restart-state-verification.json. Team screenshots: jenkins-discord-firing-team.png and jenkins-discord-resolved-team.png under screenshots/. These files have not yet been published as reviewed Git artifacts; final report integration must use verified source links.
+28
View File
@@ -0,0 +1,28 @@
global:
scrape_interval: 30s
scrape_timeout: 15s
scrape_configs:
- job_name: prometheus
static_configs:
- targets: [prometheus:9090]
- job_name: node
static_configs:
- targets: [node-exporter:9100]
- job_name: blackbox
static_configs:
- targets: [blackbox-exporter:9115]
- job_name: https
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- https://myfileagent.tech/user/login
- https://ci.myfileagent.tech/login
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
+22
View File
@@ -0,0 +1,22 @@
# Root capacity below 15 percent
Owner: SSW590 Group 7. Severity: warning. Evaluate every 30s; pending 5 minutes.
Selector: instance node-exporter:9100; mountpoint /; device /dev/vda1; ext4.
Query is 100 * available bytes / size bytes for that same filesystem.
The 15% threshold leaves operational room for builds, compaction and logs.
No-data or evaluation errors enter Alerting and require monitoring diagnosis.
1. Acknowledge and record times. Compare exporter values to `df -B1 /`.
2. Inspect directory usage, Docker images/volumes and logs read-only first.
Identify growth and protect Gitea/Jenkins/Grafana/Prometheus persistent data.
3. Agree with the team on safe cleanup or retention changes; avoid global
Docker pruning and do not delete repositories, service volumes or evidence.
4. Restore adequate headroom, verify the metric and wait for rule resolution.
5. Record cause, corrective action, delivered notification and recovery time.
Safe planned test: temporarily raise the free-percentage threshold above the
measured current value, wait through the full five-minute pending period and
capture real firing/delivery, then restore 15% and verify resolved delivery.
Never fill the disk. The October 24 threshold-only test delivered firing and resolved notifications. For file-provisioned rules,
change the reviewed provisioning threshold and reload/restart Grafana; retain
final 15% configuration. Discord team-alerts is active with resolved notifications enabled.
@@ -0,0 +1,25 @@
# HTTPS service unavailable
Owner: SSW590 Group 7. Severity: critical. Evaluate every 30s; pending 1 minute.
The rule produces separate instances for Gitea and Jenkins by URL label.
Missing expected probe series are explicitly treated as failure; datasource
no-data and evaluation errors enter Alerting rather than reporting health.
1. Acknowledge the alert and record receipt/acknowledgement time.
2. Inspect the instance URL and the availability/duration panels. Check collection
health and exporter logs to distinguish probe failure from broken monitoring.
3. Check DNS, valid TLS, expected response and redirects from the monitoring network.
Never disable certificate verification to clear an alert.
4. Inspect the affected container status/logs, Caddy routing, resource pressure,
and recent changes. Confirm the actual cause before restarting anything.
5. For the planned Jenkins-only exercise, restore using:
`cd /home/codex/myfileagent-gitea && docker compose -f compose.yaml -f compose.jenkins.yaml start jenkins`
Verify the live Compose service remains named jenkins before running it.
Do not stop the Droplet, Gitea or monitoring; never delete service volumes.
6. Verify HTTPS probe success, a normal Jenkins pipeline, webhook/status and
Gitea manual build as applicable. Record first success and resolved notification.
7. Escalate unresolved faults to the other team member; capture impact/timeline
and corrective actions. A complete Droplet failure can also stop these alerts.
Discord team-alerts is the active route; resolved notifications are enabled.
Scrape 30s, evaluation 30s, pending 1m, group wait 10s, group interval 1m and repeat 4h contribute delay. The approved October 24 exercise delivered firing and resolved notifications; see ../incidents/2026-10-24-jenkins-outage.md. Do not repeat an outage without team approval.
+62
View File
@@ -0,0 +1,62 @@
# SLI, SLO and error budget - Assignment 7
Status: baseline and controlled-outage short-window measurements completed.
No full-day SLO evaluation is claimed.
This file is an operational working note, not an edit to the team manual/PDF.
## Definitions and scope
SLI: fraction of received scheduled HTTPS login probes that succeed, reported
separately for Gitea and Jenkins, alongside expected/received sample coverage.
SLO: internal lab target of at least 99% successful scheduled probes over a
24-hour window for each service. No customer SLA is established by this lab.
SLA: a customer service agreement that may specify consequences for a miss.
A successful login probe does not establish Git operations or passing builds.
A same-Droplet probe does not prove external user reachability. A total host
outage may stop both collection and notification; missing data is unknown.
## Required hypothetical worked example (not measured results)
At a 30-second interval, 24 hours contains 2,880 scheduled probes per service.
Assume every scheduled observation is present.
- Gitea: 2,880 successes / 2,880 = 100%; meets the 99% target.
- Jenkins: 2,850 successes / 2,880 = 98.958333...%; misses the 99% target.
- The 1% theoretical budget is 28.8 failed samples, equivalent to 14.4 minutes
under uniform sampling. At most 28 whole failures meet this target.
- 30 failed samples exceed 28.8 by 1.2 samples, about 0.6 minutes.
These minute equivalents assume uniform sampling; they are not exact measured
outage durations and must not be presented as actual lab results.
## Measurement queries
See queries.json. The job filter is https and the instance label preserves
the exact Gitea/Jenkins URL. Each series is evaluated separately.
availability_percent: 100 * avg_over_time(probe_success{job="https"}[10m])
received_samples: count_over_time(probe_success{job="https"}[10m])
observed_failed_samples: count_over_time(...) - sum_over_time(...)
collection_health: up{job=~"https|blackbox|prometheus"}
A 10-minute interval has approximately 20 scheduled samples at 30 seconds.
Range boundaries, jitter and restarts can change received counts. avg_over_time
uses only received observations; an absent observation is not success.
The difference in the failure-count query is valid because probe_success is
binary. Count sample failures separately from exporter/collection failures.
Prometheus query evaluation time must be fixed and recorded for reproduction.
## Baseline check
The exact fixed query time, start/end, results and scrape-health observations
are saved in evidence/assignment7/sli-slo-baseline-query-check.json under
/home/codex/myfileagent-gitea. This checks queries against live data only.
It does not satisfy the controlled-outage evidence requirement or establish
that the 24-hour SLO was met. Do not extrapolate a short window into a day.
If missing samples are present, report coverage and the uncertainty explicitly;
a received-sample average alone cannot classify a complete-window SLO result.
## Later approved outage measurement
After alerts and their notification route work, agree on a maintenance window.
Record exact injection/recovery events, then select a short window spanning
before, during and after the controlled Jenkins outage. Use one timezone
(America/New_York) and record query evaluation time in UTC as well.
Evaluate both services at that exact time using the same 10-minute window.
Report successes/failures, received vs approximately expected samples, coverage,
collection health and known gaps. Save raw results and annotate the incident.
Keep the hypothetical example separate from measured findings.
Full-day collection and meeting the SLO are optional in manual version 1.42.
The October 24 incident is documented in ../incidents/2026-10-24-jenkins-outage.md.
Fixed window 17:23-17:33 EDT: both services 20/20 expected observations; Jenkins 12 successes/8 failures (60%), Gitea 20 successes/0 failures (100%). See ../evidence/jenkins-incident-sli-fixed-window.json.
+10
View File
@@ -0,0 +1,10 @@
{
"window_seconds": 600,
"scrape_interval_seconds": 30,
"queries": {
"availability_percent": "100 * avg_over_time(probe_success{job=\"https\"}[10m])",
"received_samples": "count_over_time(probe_success{job=\"https\"}[10m])",
"observed_failed_samples": "count_over_time(probe_success{job=\"https\"}[10m]) - sum_over_time(probe_success{job=\"https\"}[10m])",
"collection_health": "up{job=~\"https|blackbox|prometheus\"}"
}
}
+7
View File
@@ -0,0 +1,7 @@
{
acme_ca https://acme-v02.api.letsencrypt.org/directory
}
{$GITEA_HOSTNAME} {
reverse_proxy gitea:3000
}
+27
View File
@@ -0,0 +1,27 @@
# Gitea Operations
This directory contains the versioned, non-secret Gitea deployment.
## Current staging design
- Gitea image: `docker.gitea.com/gitea:1.27.3-rootless`
- Database: SQLite
- Application data volume: `filepilot-gitea_gitea-data`
- Configuration volume: `filepilot-gitea_gitea-config`
- Temporary access: `127.0.0.1:3000`
- Public backend port: none
- Git-over-SSH: disabled
The loopback mapping is temporary until the assignment domain, HTTPS proxy,
and final hostname are configured.
## Operations
Start or update the service:
```bash
docker compose up -d
docker compose ps
docker compose logs --tail=100 gitea
docker compose down
```
+53
View File
@@ -0,0 +1,53 @@
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: 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:-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: "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:
+7
View File
@@ -0,0 +1,7 @@
# Merge this site block into the deployment's existing Caddyfile.
# Gitea delivers directly to Jenkins through the private Docker bridge.
ci.myfileagent.tech {
@giteaHook path /gitea-webhook /gitea-webhook/*
respond @giteaHook "Webhook is available only on the private network" 403
reverse_proxy jenkins:8080
}
+59
View File
@@ -0,0 +1,59 @@
# Assignment 6 Python CI
The pipeline runs on the trusted Jenkins controller executor. Only trusted
team members may change pipeline code. Do not supply secrets or privileged
Docker access to untrusted pull requests. Fork PR discovery is disabled.
The controller uses the official Jenkins LTS image recorded in compose.jenkins.yaml.
Python comes from that image's Debian package repositories; record the actual
Python version from each build. No pip dependencies or Docker socket are needed.
After replacing the container, run `sh ops/jenkins/install-python.sh` on the
Droplet before building. A restart retains Python; replacement requires reinstall.
Jenkins jobs and settings persist in the jenkins-home volume.
From the repository root, reproduce checks with:
python3 -m py_compile pricing.py tests/test_pricing.py
python3 -m unittest discover -s tests -v
Expected: both tests pass. Syntax or test failures must fail the Jenkins run.
Multibranch origin PR discovery tests the current PR revision, not a merged revision.
The printed checkout commit identifies what was actually tested.
Webhook delivery, status reporting, branch protection, and the controlled
failure/repair demonstration must be configured and verified separately.
## Gitea webhook and required merge gate
Configure the repository Gitea webhook with POST, application/json, active,
push and pull-request events, branch filter `*`, and target
`http://jenkins:8080/gitea-webhook/post`. Gitea must allow the exact `jenkins`
host through its webhook destination allowlist; see `compose.webhook.yaml`.
The deployed base Compose file includes this same environment setting.
The hook is configured manually, so Jenkins does not manage repository hooks.
The installed Gitea plugin handler does not verify a shared-secret signature.
Leave the hook secret empty and use the existing private Docker network.
Block `/gitea-webhook` and `/gitea-webhook/*` at the public Caddy site, as in
`Caddyfile.jenkins`. Raw port 8080 remains loopback-only. Do not claim HMAC
authentication, and do not expose the unsigned receiver publicly.
Require `myfileagent-python-ci/pipeline/pr-main` on `main`; this is the
observed PR-head context. The branch context ending `/pipeline/head` is
not the PR context. `main-branch-protection.json` records the applied rule:
no direct or force pushes, one approval, dismiss stale approvals, reject
changes-requested reviews, and no administrator merge override.
October 9, 2026 acceptance exercise, linked to issue #10 and PR #11:
- PR build 1 passed on ad056a3 after a real pull-request-open webhook.
- Commit d6477b3 changed multiplication to addition; PR build 2 failed with
`AssertionError: 13 != 30`; Gitea showed the required check failed.
- Commit 02d3169 restored multiplication; the webhook started PR build 3,
which passed both tests and updated the same required context.
- PR #11 remains open for reviewer nkogut. No review approval or merge has
been performed by automation.
For delivery diagnosis, inspect Gitea's recent delivery response and compare
its event/head SHA with Jenkins' console. A 200 `Processed` delivery alone
is not proof that tests passed. Save the failed and repaired PR gate views
before further commits. A new commit needs a new success status and review.

Some files were not shown because too many files have changed in this diff Show More