Compare commits
45 Commits
issue-1
...
3b79b7e07a
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b79b7e07a | |||
| 5c0ed9fbcd | |||
| b4007504b7 | |||
| a482ef9ef9 | |||
| 1bfa31acc0 | |||
| 2ab41bdce5 | |||
| 01f842323e | |||
| d6ea94f20d | |||
| 6d65f29674 | |||
| 4c098708f4 | |||
| 3301e2463e | |||
| ae289072ed | |||
| 696b328a7d | |||
| 38d2e1e965 | |||
| 1de58d4742 | |||
| 84a44f0477 | |||
| a5180ad781 | |||
| 8ba340e32f | |||
| c5538a84d1 | |||
| 81c343ddb6 | |||
| 091a9a9695 | |||
| ab0bcc25f3 | |||
| fa22a0d512 | |||
| b779817f2c | |||
| b899233138 | |||
| 7ffe1f0b34 | |||
| 75c2f21bae | |||
| 8174773cfb | |||
| 898660fd30 | |||
| b76eba3c4f | |||
| 67e9e17eab | |||
| 543be42786 | |||
| 05ef5690b1 | |||
| 1b0d53291f | |||
| f95aa89208 | |||
| c61c4d9d86 | |||
| bd6dc0a865 | |||
| a7b93e380a | |||
| ebd8b2e424 | |||
| 5e0b7e595d | |||
| 46cb1aac07 | |||
| 45dfb9b7ed | |||
| c6decd1f08 | |||
| cc290d65ff | |||
| 6f76e53e5d |
@@ -0,0 +1,83 @@
|
||||
# Builds the DevOps IT manual (manual/) into a PDF on every push to main
|
||||
# that touches the manual or this workflow, and uploads it as an artifact.
|
||||
name: Build IT manual
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "manual/**"
|
||||
- ".gitea/workflows/manual.yml"
|
||||
workflow_dispatch: # lets a team member re-run a build by hand from the Actions tab
|
||||
|
||||
jobs:
|
||||
build-manual:
|
||||
# Runner label registered in Part 2. The label maps to the job image built
|
||||
# from manual/ci/Dockerfile (TeX Live + Node.js), so each job runs in a
|
||||
# fresh, temporary container -- never inside the Gitea container.
|
||||
runs-on: latex
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Check out the triggering commit
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate build metadata
|
||||
working-directory: manual
|
||||
env:
|
||||
GIT_COMMIT: ${{ github.sha }}
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
run: |
|
||||
MANUAL_VERSION="v1.5"
|
||||
SHORT_SHA="${GIT_COMMIT:0:7}"
|
||||
BUILD_ID="${MANUAL_VERSION}+build.${BUILD_NUMBER}.${SHORT_SHA}"
|
||||
|
||||
cat > build-metadata.tex <<EOF
|
||||
\newcommand{\ManualVersion}{${MANUAL_VERSION}}
|
||||
\newcommand{\BuildIdentifier}{${BUILD_ID}}
|
||||
\newcommand{\BuildCommit}{${GIT_COMMIT}}
|
||||
\newcommand{\BuildRunNumber}{${BUILD_NUMBER}}
|
||||
EOF
|
||||
|
||||
cat >> build-metadata.tex <<'EOF'
|
||||
\noindent\textbf{Manual version:} \ManualVersion\\
|
||||
\textbf{Build identifier:} \BuildIdentifier\\
|
||||
\textbf{Commit hash:} \BuildCommit\\
|
||||
\textbf{Gitea Actions run:} \BuildRunNumber
|
||||
EOF
|
||||
|
||||
- name: Record build identity and toolchain
|
||||
run: |
|
||||
SHORT_SHA="${GITHUB_SHA::7}"
|
||||
echo "SHORT_SHA=${SHORT_SHA}" >> "$GITHUB_ENV"
|
||||
echo "Commit: ${GITHUB_SHA} (${SHORT_SHA})"
|
||||
echo "Run number: ${GITHUB_RUN_NUMBER}"
|
||||
pdflatex --version | head -n 1
|
||||
latexmk -v | head -n 2 | tail -n 1
|
||||
python3 -c "import pygments; print('Pygments', pygments.__version__)"
|
||||
|
||||
- name: Compile the manual
|
||||
working-directory: manual
|
||||
# All options live in manual/.latexmkrc; it stops with a non-zero
|
||||
# exit code on the first LaTeX error, which fails this step.
|
||||
run: latexmk devopsAssignment.tex
|
||||
|
||||
- name: Verify the PDF exists
|
||||
working-directory: manual
|
||||
run: |
|
||||
if [ ! -s devopsAssignment.pdf ]; then
|
||||
echo "ERROR: manual/devopsAssignment.pdf is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
ls -l devopsAssignment.pdf
|
||||
|
||||
- name: Upload the PDF as an artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: it-manual-build-${{ github.run_number }}-${{ env.SHORT_SHA }}
|
||||
path: manual/devopsAssignment.pdf
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
@@ -0,0 +1 @@
|
||||
__pycache__/
|
||||
@@ -0,0 +1,40 @@
|
||||
// CI pipeline for Scrap-Web (SSW 590, Continuous Integration with Jenkins).
|
||||
// Runs for every pull request through the Multibranch Pipeline job and reports
|
||||
// its result to Gitea as a commit status. Uses only the Python 3 standard
|
||||
// library, so no packages are downloaded during the build.
|
||||
pipeline {
|
||||
// Builds run on the Jenkins controller executor (see the IT manual for the
|
||||
// documented risk). python3 must be installed in the Jenkins container.
|
||||
agent any
|
||||
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
timeout(time: 10, unit: 'MINUTES')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm
|
||||
// Record exactly which commit is being tested, for traceability.
|
||||
sh 'git rev-parse HEAD'
|
||||
sh 'python3 --version'
|
||||
}
|
||||
}
|
||||
stage('Syntax check') {
|
||||
steps {
|
||||
sh 'python3 -m py_compile pricing.py tests/test_pricing.py'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh 'python3 -m unittest discover -s tests -v'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success { echo 'All checks passed.' }
|
||||
failure { echo 'A stage failed: see the stage view for which one.' }
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
# Scrap-Web
|
||||
|
||||
This Repo is here to act as Group 8's repo for the SSW590 course
|
||||
|
||||
In the 10/2 assignment, we added a domain, reverse proxy, https, and created our repo in Gitea
|
||||
|
||||
In the 10/10 assignment, we added an automation workflow for compiling a LaTeX artifact upon git pushes
|
||||
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
jenkins:
|
||||
build: .
|
||||
image: custom-jenkins:lts-jdk21-python3
|
||||
container_name: jenkins
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
JAVA_OPTS: "-Xms256m -Xmx512m"
|
||||
volumes:
|
||||
- jenkins-home:/var/jenkins_home
|
||||
networks:
|
||||
- gitea-net
|
||||
|
||||
volumes:
|
||||
jenkins-home:
|
||||
name: jenkins_home
|
||||
|
||||
networks:
|
||||
gitea-net:
|
||||
external: true
|
||||
name: gitea-net
|
||||
@@ -0,0 +1,29 @@
|
||||
# LaTeX build output: generated by every compile, never committed.
|
||||
# The PDF is produced by the Gitea Actions workflow and downloaded as an artifact.
|
||||
*.pdf
|
||||
*.aux
|
||||
*.log
|
||||
*.out
|
||||
*.toc
|
||||
*.lof
|
||||
*.lot
|
||||
*.bbl
|
||||
*.blg
|
||||
*.idx
|
||||
*.ilg
|
||||
*.ind
|
||||
*.glo
|
||||
*.gls
|
||||
*.glg
|
||||
*.acn
|
||||
*.acr
|
||||
*.alg
|
||||
*.ist
|
||||
*.fls
|
||||
*.fdb_latexmk
|
||||
*.synctex.gz
|
||||
_minted*/
|
||||
|
||||
# Exception: PDFs used as figures inside the manual must stay tracked.
|
||||
# Uncomment and adjust if you ever include a PDF image:
|
||||
# !images/**/*.pdf
|
||||
@@ -0,0 +1,21 @@
|
||||
# Build configuration for the SSW 590 DevOps IT manual.
|
||||
# Usage (from the repository root): latexmk devopsAssignment.tex
|
||||
|
||||
# Produce a PDF with pdflatex.
|
||||
$pdf_mode = 1;
|
||||
|
||||
# -shell-escape : required by the minted package (calls Python Pygments)
|
||||
# -interaction=nonstopmode, -halt-on-error : stop on the first LaTeX error
|
||||
# instead of waiting for input, so CI fails clearly
|
||||
# -file-line-error : print errors as file:line:message
|
||||
$pdflatex = 'pdflatex -shell-escape -interaction=nonstopmode -halt-on-error -file-line-error %O %S';
|
||||
|
||||
# Run makeglossaries when the glossary or acronym inputs change.
|
||||
# (bibtex and makeindex are handled by latexmk automatically.)
|
||||
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
|
||||
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
|
||||
sub run_makeglossaries {
|
||||
return system("makeglossaries \"$_[0]\"");
|
||||
}
|
||||
|
||||
push @generated_exts, 'glo', 'gls', 'glg', 'acn', 'acr', 'alg', 'ist';
|
||||
|
After Width: | Height: | Size: 232 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 584 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 327 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 146 KiB |
|
After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 194 KiB |
|
After Width: | Height: | Size: 220 KiB |
|
After Width: | Height: | Size: 617 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 422 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 174 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 123 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 432 KiB |
|
After Width: | Height: | Size: 235 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 522 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 472 KiB |
|
After Width: | Height: | Size: 257 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 281 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 172 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 85 KiB |
@@ -0,0 +1,5 @@
|
||||
# Scrap-Web
|
||||
|
||||
This Repo is here to act as Group 8's repo for the SSW590 course
|
||||
|
||||
In the 10/2 assignment, we added a domain, reverse proxy, https, and created our repo in Gitea
|
||||
@@ -0,0 +1,5 @@
|
||||
This assignment guides students through a reproducible DevOps activity. It
|
||||
defines the learning objectives, environment boundary, workflow, evidence,
|
||||
reflection, and submission criteria. Replace bracketed text with assignment-
|
||||
specific facts before release. Students should be able to recreate the work
|
||||
from the submitted automation and runbook rather than from undocumented manual steps.
|
||||
@@ -0,0 +1,31 @@
|
||||
# Job image for the "latex" Gitea runner label (see .gitea/workflows/manual.yml).
|
||||
#
|
||||
# Base: official TeX Live image. It already includes Python + Pygments, which
|
||||
# the minted package needs. A fixed release tag is used instead of "latest" so
|
||||
# builds are reproducible; record the resolved digest in the manual.
|
||||
FROM texlive/texlive:TL2025-historic
|
||||
|
||||
# The workflow's actions (checkout, upload-artifact) are JavaScript actions and
|
||||
# need Node.js inside the job container; git lets checkout do a real clone.
|
||||
# Packages come from the image's own Debian repositories -- no downloaded scripts.
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
nodejs git ca-certificates python3 python3-pip python3-venv curl \
|
||||
&& python3 -m venv /opt/latex-venv \
|
||||
&& /opt/latex-venv/bin/pip install --upgrade pip \
|
||||
&& /opt/latex-venv/bin/pip install --upgrade latexminted==0.7.1 Pygments \
|
||||
&& mkdir -p /tmp/minted-src /usr/local/share/texmf/tex/latex/minted \
|
||||
&& curl -fsSL https://mirrors.ctan.org/macros/latex/contrib/minted/minted.dtx \
|
||||
-o /tmp/minted-src/minted.dtx \
|
||||
&& curl -fsSL https://mirrors.ctan.org/macros/latex/contrib/minted/minted.ins \
|
||||
-o /tmp/minted-src/minted.ins \
|
||||
&& cd /tmp/minted-src \
|
||||
&& latex minted.ins \
|
||||
&& cp minted.sty /usr/local/texlive/2025/texmf-dist/tex/latex/minted/minted.sty \
|
||||
&& mktexlsr \
|
||||
&& rm -rf /tmp/minted-src \
|
||||
&& mktexlsr \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH="/opt/latex-venv/bin:/usr/local/bin:${PATH}"
|
||||
@@ -0,0 +1,367 @@
|
||||
%%
|
||||
%% This is file `cornell.cls',
|
||||
%% generated with the docstrip utility.
|
||||
%%
|
||||
%% The original source files were:
|
||||
%%
|
||||
%% cornell.dtx (with options: `class')
|
||||
%%
|
||||
%% IMPORTANT NOTICE:
|
||||
%%
|
||||
%% For the copyright see the source file.
|
||||
%%
|
||||
%% Any modified versions of this file must be renamed
|
||||
%% with new filenames distinct from cornell.cls.
|
||||
%%
|
||||
%% For distribution of the original source see the terms
|
||||
%% for copying and modification in the file cornell.dtx.
|
||||
%%
|
||||
%% This generated file may be distributed as long as the
|
||||
%% original source files, as listed above, are part of the
|
||||
%% same distribution. (The sources need not necessarily be
|
||||
%% in the same archive or directory.)
|
||||
%% Document class `cornell' to use with LaTeX 2e.
|
||||
%% Based on `crnlphd' class. The following is from the file `crnlphd.dtx':
|
||||
%% Based loosely on old cuphdthesis style file.
|
||||
%% Found to give good results, according to the thesis secretary.
|
||||
%% File: crnlphd.dtx Copyright (C) 1994 Sergio Gelato
|
||||
%% Made available without any warranty, express or implied.
|
||||
%% Modifications
|
||||
%% 03/26/98 Mike Heisler
|
||||
%% Conform to Eric's final version. Margins are subject to
|
||||
%% The whim of the printer.
|
||||
%% 10/10/97 Mike Heisler and Eric Dahl
|
||||
%% Altered footnotesize and changed the Acknowledgement and
|
||||
%% Biographical titles per thesis secretary guideline that
|
||||
%% they must match the rest of the document, i.e. flush left
|
||||
%% and capitalized rather than all caps
|
||||
%% 05/21/97 Mike Heisler
|
||||
%% Added a 'papers' option to handle bibliographis as sections
|
||||
%% at the end of each chapter. Reduced top margin.
|
||||
%%
|
||||
%% $Id$
|
||||
%% \CharacterTable
|
||||
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
|
||||
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
|
||||
%% Digits \0\1\2\3\4\5\6\7\8\9
|
||||
%% Exclamation \! Double quote \" Hash (number) \#
|
||||
%% Dollar \$ Percent \% Ampersand \&
|
||||
%% Acute accent \' Left paren \( Right paren \)
|
||||
%% Asterisk \* Plus \+ Comma \,
|
||||
%% Minus \- Point \. Solidus \/
|
||||
%% Colon \: Semicolon \; Less than \<
|
||||
%% Equals \= Greater than \> Question mark \?
|
||||
%% Commercial at \@ Left bracket \[ Backslash \\
|
||||
%% Right bracket \] Circumflex \^ Underscore \_
|
||||
%% Grave accent \` Left brace \{ Vertical bar \|
|
||||
%% Right brace \} Tilde \~}
|
||||
%%
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesClass{cornell}
|
||||
[1998/03/26 v2.0
|
||||
Cornell University thesis class]
|
||||
\newif\ifphd
|
||||
\DeclareOption{phd}{\phdtrue}
|
||||
\DeclareOption{master}{\phdfalse}
|
||||
\ExecuteOptions{phd}
|
||||
\newif\ifpapers
|
||||
\DeclareOption{papers}{\paperstrue}
|
||||
\DeclareOption{10pt}{%
|
||||
\OptionNotUsed%
|
||||
\ClassWarningNoLine{cornell}{Font size 10pt not allowed; using 12pt}%
|
||||
}
|
||||
\DeclareOption{11pt}{%
|
||||
\OptionNotUsed%
|
||||
\ClassWarningNoLine{cornell}{Font size 11pt not allowed; using 12pt}%
|
||||
}
|
||||
\newcommand{\prelim@contents}[1]{}
|
||||
\DeclareOption{tocprelim}{%
|
||||
\renewcommand{\prelim@contents}[1]{\addcontentsline{toc}{section}{#1}}
|
||||
}
|
||||
\DeclareOption*{%
|
||||
\PassOptionsToClass{\CurrentOption}{report}%
|
||||
}
|
||||
\ProcessOptions
|
||||
|
||||
\LoadClass[12pt]{report}[1994/06/01]
|
||||
\renewcommand{\defaultscriptratio}{.75}
|
||||
\renewcommand{\defaultscriptscriptratio}{.6}
|
||||
\setlength\headsep{25\p@}
|
||||
\if@twocolumn
|
||||
\else
|
||||
\setlength\oddsidemargin{0in}
|
||||
\setlength\evensidemargin{0in}
|
||||
\setlength\textwidth{6.5in}
|
||||
\setlength\topmargin{-0.5in}
|
||||
\setlength\headheight{0.2in}
|
||||
\setlength\headsep{0.35in}
|
||||
\setlength\textheight{8.85in}
|
||||
\setlength\footskip{0.5in}
|
||||
\setlength\marginparwidth{0.85in}
|
||||
\setlength\marginparsep{0.125in}
|
||||
\fi
|
||||
\if@compatibility
|
||||
\setlength\topmargin{0\p@}
|
||||
\else
|
||||
\fi
|
||||
\newcommand{\ps@cornell}{%
|
||||
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
|
||||
\def\@oddfoot{}%
|
||||
\def\@evenhead{\thepage\hfil{\slshape\leftmark}}%
|
||||
\def\@evenfoot{}%
|
||||
\def\chaptermark##1{}%
|
||||
\def\sectionmark##1{}%
|
||||
}
|
||||
\newcommand{\ps@cornellc}{%
|
||||
\def\@oddhead{\hfil\thepage\hfil}%
|
||||
\def\@oddfoot{}%
|
||||
\def\@evenhead{\@oddhead}%
|
||||
\def\@evenfoot{}%
|
||||
\def\chaptermark##1{}%
|
||||
\def\sectionmark##1{}%
|
||||
}
|
||||
\raggedbottom
|
||||
\newcommand{\@prolformat}[1]{{\begin{flushleft} \Huge #1 \end{flushleft}} }
|
||||
\newcommand{\ackname}{\@prolformat{Acknowledgements}}
|
||||
\newcommand{\bioname}{\@prolformat{Biographical Sketch}}
|
||||
\renewcommand{\contentsname}{\@prolformat{Table of Contents}}
|
||||
\renewcommand{\listtablename}{\@prolformat{List of Tables}}
|
||||
\renewcommand{\listfigurename}{\@prolformat{List of Figures}}
|
||||
\renewcommand{\l@figure}{\@dottedtocline{1}{1.5em}{2.6em}}
|
||||
\let\l@table\l@figure
|
||||
|
||||
\renewenvironment{thebibliography}[1]
|
||||
{\ifpapers \clearpage \section*{\bibname%
|
||||
\@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}%
|
||||
\else%
|
||||
\chapter*{\bibname%
|
||||
\@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}}%
|
||||
\fi%
|
||||
\list{\@biblabel{\arabic{enumiv}}}%
|
||||
{\settowidth\labelwidth{\@biblabel{#1}}%
|
||||
\leftmargin\labelwidth
|
||||
\advance\leftmargin\labelsep
|
||||
\@openbib@code
|
||||
\usecounter{enumiv}%
|
||||
\let\p@enumiv\@empty
|
||||
\renewcommand\theenumiv{\arabic{enumiv}}}%
|
||||
\sloppy\clubpenalty4000\widowpenalty4000%
|
||||
\sfcode`\.\@m\relax
|
||||
\ifpapers%
|
||||
\addcontentsline{toc}{section}{\bibname}%
|
||||
\else%
|
||||
\addcontentsline{toc}{chapter}{\bibname}%
|
||||
\fi
|
||||
\singlespacing}
|
||||
{\def\@noitemerr
|
||||
{\@latex@warning{Empty `thebibliography' environment}}%
|
||||
\normalspacing
|
||||
\endlist}
|
||||
|
||||
\newcommand{\@titlesize}{\Large}
|
||||
\newcommand{\@subtitlesize}{\large}
|
||||
\newcommand{\@authorsize}{\normalsize} % No Pharaoh he.
|
||||
\newcommand{\@conferralmonth}{January}
|
||||
\newcommand{\@conferralyear}{}
|
||||
|
||||
\newcommand{\titlesize}[1]{\renewcommand{\@titlesize}{#1}}
|
||||
\newcommand{\subtitlesize}[1]{\renewcommand{\@subtitlesize}{#1}}
|
||||
\newcommand{\authorsize}[1]{\renewcommand{\@authorsize}{#1}}
|
||||
\newcommand{\conferraldate}[2]{%
|
||||
\renewcommand{\@conferralmonth}{#1}
|
||||
\renewcommand{\@conferralyear}{#2}
|
||||
}
|
||||
\newcommand{\@degreefield}{Master of Science} %CHANGED
|
||||
\newcommand{\degreefield}[1]{\renewcommand{\@degreefield}{#1}} %CHANGED
|
||||
|
||||
\renewcommand{\maketitle}{%
|
||||
\begin{titlepage}%
|
||||
\vspace*{-0.24in}
|
||||
\begin{center}%
|
||||
\@titlesize \@title
|
||||
\end{center}
|
||||
\vfill
|
||||
%\begin{center}
|
||||
%\@subtitlesize
|
||||
%A \ifphd Dissertation \else Thesis \fi \\ %CHANGED
|
||||
%Presented to the Faculty of the Graduate School \\
|
||||
%of Cornell University \\
|
||||
%in Partial Fulfillment of the Requirements for the Degree of \\
|
||||
%\ifphd Doctor of Philosophy \else \@degreefield \fi %CHANGED
|
||||
%\end{center}
|
||||
\vfill
|
||||
\begin{center}
|
||||
\@authorsize
|
||||
by \\
|
||||
\@author \\
|
||||
\@conferralmonth\ \@conferralyear
|
||||
\end{center}
|
||||
\vspace*{0.26in}
|
||||
\end{titlepage}
|
||||
}
|
||||
|
||||
\renewenvironment{titlepage}{%
|
||||
\typeout{Title page}
|
||||
\pagestyle{empty}
|
||||
\doublespacing
|
||||
}{%
|
||||
\normalspacing\clearpage
|
||||
}
|
||||
|
||||
|
||||
\newenvironment{copyrightpage}{%
|
||||
\typeout{Copyleft page}
|
||||
\pagestyle{empty}
|
||||
\null\vfil
|
||||
\begin{center}
|
||||
}{%
|
||||
\end{center}
|
||||
\vfil\null
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\makecopyright}{%
|
||||
\begin{copyrightpage}
|
||||
\copyright\ \@copyrightholder\ \@copyrightyear \\
|
||||
ALL RIGHTS RESERVED \\[.5in]
|
||||
\end{copyrightpage}
|
||||
}
|
||||
\newcommand{\@copyrightholder}{\@author}
|
||||
\newcommand{\@copyrightyear}{\@conferralyear}
|
||||
|
||||
\newcommand{\copyrightholder}[1]{\renewcommand{\@copyrightholder}{#1}}
|
||||
\newcommand{\copyrightyear}[1]{\renewcommand{\@copyrightyear}{#1}}
|
||||
|
||||
|
||||
\newlength{\@abhdskip}
|
||||
\renewenvironment{abstract}{%
|
||||
\typeout{Abstract}
|
||||
\singlespacing
|
||||
\ifphd %CHANGED
|
||||
\setlength{\@abhdskip}{.25in}
|
||||
\addtolength{\@abhdskip}{-\topmargin}
|
||||
\vspace*{\@abhdskip}
|
||||
\begin{center}
|
||||
\@abstracttitle \\
|
||||
\ \\
|
||||
\@author \\
|
||||
\@conferralyear
|
||||
\end{center}
|
||||
\vspace{.25in}
|
||||
\else %CHANGED
|
||||
\chapter*{%
|
||||
\begin{center}
|
||||
\normalsize
|
||||
ABSTRACT
|
||||
\end{center}
|
||||
}
|
||||
\par
|
||||
\fi %CHANGED
|
||||
\pagestyle{empty}
|
||||
\thispagestyle{empty}
|
||||
}{%
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\@abstracttitle}{\@title}
|
||||
\newcommand{\abstracttitle}[1]{\renewcommand{\@abstracttitle}{#1}}
|
||||
|
||||
|
||||
\newenvironment{biosketch}{%
|
||||
\typeout{Vita}
|
||||
\pagestyle{plain}
|
||||
\pagenumbering{roman}
|
||||
\setcounter{page}{3}
|
||||
\prelim@contents{Biographical Sketch}
|
||||
\chapter*{%
|
||||
\bioname
|
||||
}
|
||||
\par
|
||||
}{%
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newenvironment{dedication}{%
|
||||
\prelim@contents{Dedication}
|
||||
\null\vfil
|
||||
\begin{center}
|
||||
}{
|
||||
\end{center}
|
||||
\vfil\null
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newenvironment{acknowledgements}{%
|
||||
\prelim@contents{Acknowledgments}
|
||||
\chapter*{%
|
||||
\ackname
|
||||
}
|
||||
\par
|
||||
}{%
|
||||
\cleardoublepage
|
||||
}
|
||||
|
||||
\newcommand{\contentspage}{%
|
||||
\singlespacing
|
||||
\label{toc}
|
||||
\prelim@contents{\contentsname}
|
||||
\tableofcontents
|
||||
\normalspacing
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\tablelistpage}{%
|
||||
\singlespacing
|
||||
\label{lot}
|
||||
\prelim@contents{\listtablename}
|
||||
\listoftables
|
||||
\normalspacing
|
||||
\clearpage
|
||||
}
|
||||
|
||||
\newcommand{\figurelistpage}{%
|
||||
\singlespacing
|
||||
\label{lof}
|
||||
\prelim@contents{\listfigurename}
|
||||
\listoffigures
|
||||
\normalspacing
|
||||
\clearpage
|
||||
}
|
||||
\newcommand{\abbrlist}{%
|
||||
\singlespacing
|
||||
\prelim@contents{List of Abbreviations}
|
||||
\chapter*{List of Abbreviations}
|
||||
}
|
||||
|
||||
\newcommand{\symlist}{%
|
||||
\singlespacing
|
||||
\prelim@contents{List of Symbols}
|
||||
\chapter*{List of Symbols}
|
||||
}
|
||||
|
||||
\newcommand{\preface}{%
|
||||
\singlespacing
|
||||
\prelim@contents{Preface}
|
||||
\chapter*{Preface}
|
||||
}
|
||||
|
||||
\newcommand{\singlespacing}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{1.0}\tiny\CS}
|
||||
\newcommand{\singlespacingplus}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{1.25}\tiny\CS}
|
||||
\newcommand{\doublespacing}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{1.75}\tiny\CS}
|
||||
\newcommand{\realdoublespacing}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{2}\tiny\CS}
|
||||
\newcommand{\normalspacing}{\doublespacing}
|
||||
\newcommand{\footnotespacing}{\singlespacing}
|
||||
\newcommand{\changespacing}[2]{%
|
||||
\renewcommand{#1}{%
|
||||
\let\CS=\@currsize\renewcommand{\baselinestretch}{#2}\tiny\CS}%
|
||||
}
|
||||
\newcommand{\changenormalspacing}[1]{\renewcommand{\normalspacing}{#1}}
|
||||
\normalspacing
|
||||
|
||||
\endinput
|
||||
%%
|
||||
%% End of file `cornell.cls'.
|
||||
@@ -0,0 +1,107 @@
|
||||
\chapter{AI Agent Usage Guide}
|
||||
\ChapterLabel{AIAgentGuide}
|
||||
\index{AI agent}
|
||||
\index{AI agent!DevOps workflow}
|
||||
\index{Appendix!AI Agent Usage Guide}
|
||||
|
||||
\section{How to Use This Appendix}
|
||||
An AI agent that creates, reviews, or maintains an assignment shall read this
|
||||
file first. It shall identify the task in the routing table, read the minimum
|
||||
authoritative sources, and expand context only for a discovered dependency or
|
||||
inconsistency. This guide is maintained in LaTeX so it is visible, versioned,
|
||||
and reviewable with the assignment.
|
||||
|
||||
\section{Governing Principles}
|
||||
The authored LaTeX files, versioned automation, and approved assignment
|
||||
materials are authoritative. The PDF is a review artifact and shall not be
|
||||
edited directly. AI may draft, explain, analyze, check consistency, and assist
|
||||
with builds. It shall not invent completion, evidence, access, costs, grades,
|
||||
approvals, command output, security posture, or operational results.
|
||||
|
||||
\section{Chapter File Convention}
|
||||
\index{AI agent!chapter file convention}
|
||||
Every assignment chapter shall be stored in exactly one file named with the
|
||||
\texttt{devops} prefix, a PascalCase chapter name, and the \texttt{.tex}
|
||||
suffix. For example, Chapter~2 is fully contained in
|
||||
\path{devopsExampleAssignment.tex}. A chapter file shall begin with its
|
||||
\texttt{\string\chapter\{...\}} command and contain all of that chapter's
|
||||
sections and subsections. Do not split one chapter across files, create
|
||||
section-only \texttt{.tex} files, or use \texttt{\string\input} or
|
||||
\texttt{\string\include} to assemble a chapter from smaller fragments.
|
||||
|
||||
Supporting non-chapter files may use a different name only when they are not
|
||||
chapter content: \texttt{prologue.tex}, \texttt{abstract.tex},
|
||||
\texttt{devopsGlossary.tex}, and \texttt{devopsReferences.bib} are examples.
|
||||
Appendix chapters follow the same chapter-file convention.
|
||||
|
||||
\section{AI Quick Start}
|
||||
\begin{enumerate}
|
||||
\item Read this guide and identify the requested outcome.
|
||||
\item Select the closest task below and load only its listed sources.
|
||||
\item Inspect supplied facts and report consequential gaps or assumptions.
|
||||
\item Make narrowly scoped changes; preserve stable IDs, glossary terms, and history.
|
||||
\item Never request, print, store, or commit credentials, tokens, personal data, or production data.
|
||||
\item Build the complete PDF, inspect the log, visually inspect affected pages, and record material AI use in \ChapterRef{AIPromptLog}.
|
||||
\end{enumerate}
|
||||
|
||||
\section{Task Routing}
|
||||
\small
|
||||
\begin{tabularx}{\linewidth}{L{4.0cm}Y}
|
||||
\caption{AI Task-Routing Table\label{Table:AITaskRouting}}\\
|
||||
\toprule \textbf{Task} & \textbf{Minimum authoritative sources}\\ \midrule
|
||||
Initialize an assignment & \texttt{devopsAssignment.tex}, \texttt{prologue.tex}, \texttt{devopsIntroduction.tex}, \texttt{devopsExampleAssignment.tex}, and the instructor's assignment facts.\\
|
||||
Develop a workflow & \texttt{devopsExampleAssignment.tex}, source repository materials, and authorized environment constraints.\\
|
||||
Define evidence & \texttt{devopsExampleAssignment.tex} and controlled execution outputs.\\
|
||||
Review a retrospective & \texttt{devopsExampleAssignment.tex} and the submitted workflow or runbook.\\
|
||||
Edit AI guidance & \texttt{devopsAIAgentGuide.tex}, \texttt{devopsAIPromptLog.tex}, \texttt{devopsDocumentGuide.tex}, and \texttt{devopsAssignment.tex}.\\
|
||||
Compile or troubleshoot & \texttt{devopsAssignment.tex}, \texttt{devopsDocumentGuide.tex}, the affected chapter, and the build log.\\ \bottomrule
|
||||
\end{tabularx}
|
||||
\normalsize
|
||||
|
||||
\section{DevOps-Specific Rules}
|
||||
\begin{enumerate}
|
||||
\item Prefer versioned, repeatable automation over undocumented manual steps.
|
||||
\item Treat deployment output, monitoring data, and screenshots as evidence only when they reflect an actual execution.
|
||||
\item Design failure exercises to be isolated, reversible, and authorized.
|
||||
\item Apply least privilege and never place secrets in LaTeX, source control, prompts, screenshots, or logs.
|
||||
\item State expected cloud cost, cleanup action, and resource ownership for each remote-environment activity.
|
||||
\item Identify whether a recommendation is a proposal, an instructor directive, or demonstrated evidence.
|
||||
\end{enumerate}
|
||||
|
||||
\section{Example AI Requests}
|
||||
\subsection{Create an Assignment Brief}
|
||||
\begin{verbatim}
|
||||
Read devopsAIAgentGuide.tex and use the Initialize an Assignment context.
|
||||
From the supplied SSW 590 objective and constraints, fill only supported
|
||||
placeholders in the introduction and activity brief. Propose clear, observable
|
||||
completion criteria, a safe cleanup action, and a rubric. Do not invent cloud
|
||||
access, due dates, policy, costs, or approved tools. Update history, compile,
|
||||
and report instructor decisions still needed.
|
||||
\end{verbatim}
|
||||
|
||||
\subsection{Review a Student Workflow}
|
||||
\begin{verbatim}
|
||||
Read devopsAIAgentGuide.tex and the workflow, evidence, and retrospective
|
||||
chapters. Review the supplied repository and sanitized evidence for
|
||||
reproducibility, least privilege, observability, rollback, and cleanup.
|
||||
Separate verified facts from gaps and recommendations. Do not claim that an
|
||||
unexecuted command passed, and do not request credentials or operate resources.
|
||||
\end{verbatim}
|
||||
|
||||
\section{Human Decisions and Information Boundaries}
|
||||
The instructor retains authority over assignment scope, grading, due dates,
|
||||
approved tooling, access, budgets, security posture, exceptions, and policy.
|
||||
An AI agent shall surface alternatives and evidence, not represent a decision
|
||||
as approved. Record material prompts, assumptions, corrections, and unresolved
|
||||
issues in \ChapterRef{AIPromptLog}.
|
||||
|
||||
\section{Completion Checklist}
|
||||
\begin{itemize}
|
||||
\item Scope, deliverables, environment, constraints, and cleanup are clear.
|
||||
\item Activity identifiers and evidence references are valid and unique.
|
||||
\item Examples contain no secrets, personal data, or unsafe production actions.
|
||||
\item New controlled terms are added to the glossary and indexed.
|
||||
\item The newest approved change is recorded in document history.
|
||||
\item The complete build succeeds with no unresolved references or missing files.
|
||||
\item A human reviews all decisions requiring instructional or operational authority.
|
||||
\end{itemize}
|
||||
@@ -0,0 +1,117 @@
|
||||
\chapter{AI Prompt Log}
|
||||
\ChapterLabel{AIPromptLog}
|
||||
\index{AI prompt log}
|
||||
\section{How to Use This Appendix}
|
||||
Use this log when AI assistance materially affects assignment wording,
|
||||
automation, evidence interpretation, troubleshooting, or feedback. Record
|
||||
enough context for an instructor or reviewer to understand the input, output,
|
||||
assumptions, and human corrections. Do not record credentials or personal data.
|
||||
|
||||
\section{Example Record}
|
||||
Date: \textit{[timestamp]}; Tool and model: \textit{[name]}; Task:
|
||||
\textit{[requested outcome]}; Inputs: \textit{[sanitized constraints and
|
||||
evidence]}; Output used: \textit{[summary]}; Human review and corrections:
|
||||
\textit{[summary]}; Unresolved assumptions: \textit{[list or none]}.
|
||||
|
||||
\section{Log Entries}
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item \textbf{Project selection.} Date: September 24, 2026. Tool and
|
||||
model: Claude, model claude-sonnet-5. Task: choose a semester project
|
||||
satisfying the "master a DevOps technology" option. Inputs: assignment
|
||||
prompt, rubric, team constraints. Output used: recommendation to master
|
||||
GitHub Actions, compared against GitLab CI/CD to satisfy the
|
||||
two-comparable-tools rubric criterion. Human review and corrections:
|
||||
team selected the direction. Unresolved assumptions: none.
|
||||
|
||||
\item \textbf{Project scoping.} Date: September 24, 2026. Tool and model:
|
||||
Claude, model claude-sonnet-5. Task: apply the DevOps project to the
|
||||
team's Senior Design project (Scrap) without altering Scrap itself, and
|
||||
draft the Project Proposal chapter. Inputs: Scrap's Milestone 1 report
|
||||
and development plan; Project Proposal instructions and rubric. Output
|
||||
used: recommendation to target Scrap's decoupled companion website only;
|
||||
full Project Proposal chapter. Human review and corrections: team
|
||||
confirmed the scoping and confirmed DigitalOcean as the deployment
|
||||
environment after free alternatives (Google Cloud Run, Oracle Cloud) were
|
||||
researched and compared. Unresolved assumptions: course team membership
|
||||
(two-person vs.\ Scrap's three-person team) not explicitly confirmed.
|
||||
|
||||
\item \textbf{LaTeX Docker chapter.} Date: September 24, 2026. Tool and
|
||||
model: Claude, model claude-sonnet-5. Task: build and document a Docker
|
||||
container that compiles a LaTeX document with TeX Live, using
|
||||
\texttt{minted}. Inputs: assignment instructions for this chapter.
|
||||
Output used: \texttt{Dockerfile}, sample \texttt{hello.tex}, and chapter
|
||||
text. Human review and corrections: LaTeX/Dockerfile logic verified by
|
||||
direct \texttt{pdflatex} compilation (no Docker available in the
|
||||
assistant's sandbox); the student ran the actual container and reported
|
||||
a bug (an empty mounted folder hid the built-in \texttt{hello.tex}),
|
||||
which was diagnosed and fixed by mounting the project directory instead.
|
||||
Unresolved assumptions: none.
|
||||
|
||||
\item \textbf{Document History update.} Date: September 24, 2026. Tool
|
||||
and model: Claude, model claude-sonnet-5. Task: update the Document
|
||||
History table to reflect this assignment's completed chapters. Inputs:
|
||||
assignment instructions; chapters completed. Output used: consolidated
|
||||
Document History entry. Human review and corrections: student requested
|
||||
a single consolidated version entry rather than one per chapter, and
|
||||
later supplied the report's authoritative Document History text
|
||||
directly. Unresolved assumptions: chapter labels for the Digital Ocean
|
||||
Docker Deployment and class-based JavaScript refactor chapters not
|
||||
confirmed, as the assistant did not create those two chapters.
|
||||
|
||||
\item \textbf{Automated manual build.} Date: October 8--9, 2026. Tool and
|
||||
model: Claude, model claude-opus-5-5. Task: plan the team work split, create
|
||||
the reproducible build configuration (\texttt{.latexmkrc}), the Gitea
|
||||
Actions workflow, the job-image Dockerfile, and draft the Automated Manual
|
||||
Build chapter. Inputs: assignment instructions; the manual's LaTeX source.
|
||||
Output used: build configuration, workflow, Dockerfile, chapter text for
|
||||
sections 1, 3 and 5. Human review and corrections: the build command and
|
||||
workflow shell steps were tested by compiling the manual in the assistant's
|
||||
sandbox; the student moved the manual from issue~5 to a dedicated issue~8
|
||||
branch. Unresolved assumptions: runner label \texttt{latex} and the TL2025
|
||||
job image are pending the runner registration.
|
||||
|
||||
|
||||
\item \textbf{Continuous integration with Jenkins.} Date: October 18--24,
|
||||
2026. Tool and model: Claude, model claude-opus-5-5. Task: split the work,
|
||||
guide the Gitea integration account, branch protection and pull-request
|
||||
demonstration, write the pricing tests and \texttt{Jenkinsfile}, and draft
|
||||
and edit the Continuous Integration chapter. Inputs: assignment
|
||||
instructions; sanitized screenshots, console logs, and commit IDs. Output
|
||||
used: \texttt{Jenkinsfile}, tests, chapter text, and edits merging both
|
||||
partners' sections. Human review and corrections: the students ran every
|
||||
step on the real services and supplied the evidence; the assistant's claims
|
||||
were checked against the screenshots (for example, the token scopes).
|
||||
Unresolved assumptions: none.
|
||||
|
||||
\item \textbf{SRE monitoring and reliability.} Date: October 25--29, 2026.
|
||||
Tool and model: Claude, model claude-opus-5-5. Task: split the work, choose
|
||||
pinned releases, write the monitoring Compose, Prometheus, Blackbox, Grafana
|
||||
provisioning and dashboard files and the runbook, guide the alert set-up
|
||||
and incident exercise, and draft sections of the SRE chapter. Inputs:
|
||||
assignment instructions; baseline and \texttt{docker stats} output;
|
||||
Prometheus API query output; Grafana and Discord screenshots. Output used:
|
||||
configuration files, dashboard JSON, runbook, and chapter text. Human review
|
||||
and corrections: the student deployed and ran everything on the Droplet;
|
||||
the SMTP failure led to the Discord route; an incorrect alert condition and
|
||||
summary found during testing were corrected; all timestamps come from the
|
||||
recorded logs and screenshots. Unresolved assumptions: none.
|
||||
|
||||
\item \textbf{SRE chapter completion.} Date: October 30, 2026. Tool and
|
||||
model: Claude (configured model claude-sonnet-5-5). Task: complete the
|
||||
\texttt{HostDiskLow} alert subsection and its repeat test; merge the two
|
||||
exported alert rules into one file; draft the capacity and retention
|
||||
rationale, the deployment diagram, the SLI, SLO, and SLA definitions and
|
||||
worked example, the metric inventory, and the access-control text; add the
|
||||
Hosts and Passwords rows. Inputs: manual Chapter 5; the existing chapter
|
||||
text and Compose file; Grafana, Discord, and terminal screenshots; the
|
||||
exported alert-rule YAML. Output used: chapter text, a Graphviz diagram, and
|
||||
\texttt{alert-rules.yaml}. Human review and corrections: the students ran
|
||||
every test and supplied all evidence; a Grafana address in an early export
|
||||
command was wrong and returned an empty file, which was caught from the
|
||||
output and corrected. Unresolved assumptions: the probe route from Blackbox
|
||||
Exporter to the public hostnames is inferred from the Compose networks, not
|
||||
tested.
|
||||
|
||||
\end{itemize}
|
||||
@@ -0,0 +1,151 @@
|
||||
% SSW 590 DevOps Assignment Template
|
||||
\documentclass[12pt]{cornell}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{lmodern}
|
||||
\usepackage{xspace}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{amsmath,amssymb}
|
||||
\usepackage{array}
|
||||
\usepackage{seqsplit}
|
||||
\usepackage{booktabs}
|
||||
\usepackage{longtable}
|
||||
\usepackage{tabularx}
|
||||
\usepackage{ltablex}
|
||||
\keepXColumns
|
||||
\usepackage{enumitem}
|
||||
\usepackage{listings}
|
||||
\usepackage{tcolorbox}
|
||||
\usepackage{makeidx}
|
||||
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=blue]{hyperref}
|
||||
\usepackage[acronym,toc]{glossaries}
|
||||
\usepackage{float}
|
||||
|
||||
% Cache minted outputs to prevent Overleaf free-plan timeouts
|
||||
\usepackage[cache=true]{minted}
|
||||
|
||||
\makeindex
|
||||
\makeglossaries
|
||||
\input{devopsGlossary.tex}
|
||||
|
||||
\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}
|
||||
|
||||
\newcommand{\DocumentStatus}{Final}
|
||||
\newcommand{\CourseNumber}{SSW 590}
|
||||
\newcommand{\CourseName}{DevOps}
|
||||
\newcommand{\Instructor}{Samah Keshiro and Kayla Holmes}
|
||||
\newcommand{\Organization}{Stevens Institute of Technology}
|
||||
\newcommand{\DocumentDate}{October 29, 2026}
|
||||
\newcommand{\DueDate}{[Due Date and Time]}
|
||||
\newcommand{\VERSION}{Version 1.6}
|
||||
\newcommand{\AssignmentNumber}{6}
|
||||
|
||||
\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}
|
||||
|
||||
\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{\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
|
||||
}
|
||||
|
||||
\lstdefinestyle{cmdstyle}{
|
||||
backgroundcolor=\color{blue!6},
|
||||
basicstyle=\ttfamily\small\color{blue!65!black},
|
||||
frame=single,
|
||||
framerule=0.3pt,
|
||||
rulecolor=\color{blue!40},
|
||||
breaklines=true,
|
||||
columns=fullflexible,
|
||||
xleftmargin=2pt, xrightmargin=2pt,
|
||||
}
|
||||
\lstdefinestyle{outstyle}{
|
||||
backgroundcolor=\color{black!5},
|
||||
basicstyle=\ttfamily\small,
|
||||
frame=single,
|
||||
framerule=0.3pt,
|
||||
rulecolor=\color{black!30},
|
||||
breaklines=true,
|
||||
columns=fullflexible,
|
||||
xleftmargin=2pt, xrightmargin=2pt,
|
||||
}
|
||||
|
||||
\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
|
||||
}
|
||||
|
||||
\changenormalspacing{\singlespacing}
|
||||
\begin{document}
|
||||
\pagenumbering{roman}
|
||||
\singlespacing
|
||||
\include{prologue}
|
||||
|
||||
% Display build metadata generated by Gitea Actions.
|
||||
\IfFileExists{build-metadata.tex}{
|
||||
\input{build-metadata.tex}
|
||||
}{
|
||||
\textit{Build metadata is available in automated builds.}
|
||||
}
|
||||
|
||||
% Adds in variables for title page
|
||||
\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{\small\VERSION}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
|
||||
\include{devopsLinux}
|
||||
\include{devopsDigitalOcean}
|
||||
\include{devopsWebsites}
|
||||
\include{devopsLatexDocker}
|
||||
\include{devopsProjectProposal}
|
||||
\include{devopsJenkinsCI}
|
||||
\include{devopsPasswordsAndHosts}
|
||||
\include{devopsAutomatedManualBuild}
|
||||
\include{devopsCI}
|
||||
\include{devopsSRE}
|
||||
|
||||
\printglossaries
|
||||
|
||||
\bibliographystyle{IEEEtran}
|
||||
\bibliography{devopsReferences}
|
||||
|
||||
\appendix
|
||||
\include{devopsAIPromptLog}
|
||||
|
||||
\printindex
|
||||
|
||||
\end{document}
|
||||
@@ -0,0 +1,517 @@
|
||||
\chapter{Automated Manual Build}
|
||||
\ChapterLabel{AutomatedManualBuild}
|
||||
\index{Gitea Actions}
|
||||
\index{automated manual build}
|
||||
|
||||
% ---------------------------------------------------------------------------
|
||||
% Bracketed italic text marks evidence that is added once the runner is online
|
||||
% and a real workflow run exists. Replace each placeholder with the actual
|
||||
% value or screenshot; do not fill them in before the run has happened.
|
||||
% ---------------------------------------------------------------------------
|
||||
|
||||
\section{Source and Trigger}
|
||||
|
||||
\textbf{Repository and files:}
|
||||
\begin{description}
|
||||
\item[Repository:] \url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web}
|
||||
\item[Manual source folder:]
|
||||
\url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/src/branch/main/manual}
|
||||
\item[Main file:]
|
||||
\url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/src/branch/main/manual/devopsAssignment.tex}
|
||||
\item[Workflow:]
|
||||
\url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/src/branch/main/.gitea/workflows/manual.yml}
|
||||
\item[Tracking issue:]
|
||||
\url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/issues/8}
|
||||
\item[Pull request:] \url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/pulls/9}
|
||||
\end{description}
|
||||
|
||||
The manual is stored in the \texttt{manual/} folder of the team's existing
|
||||
product repository, Scrap-Web, rather than in a separate repository. The
|
||||
complete buildable project is version-controlled there: every chapter file,
|
||||
the \texttt{cornell.cls} document class, the \texttt{IEEEtran.bst}
|
||||
bibliography style, \texttt{devopsReferences.bib}, the glossary, and all
|
||||
figures under \texttt{HW2 images/} and \texttt{HW4 images/}. Generated files
|
||||
(PDF, \texttt{.aux}, \texttt{.log}, minted cache, and so on) are excluded by
|
||||
\texttt{manual/.gitignore}, so the repository holds source only. The
|
||||
repository is the source of truth; the PDF is never edited directly.
|
||||
|
||||
\textbf{How the source was added:} the manual was committed on the branch
|
||||
\texttt{issue-8} (tracked by issue \#8), pushed to Gitea, and merged into
|
||||
\texttt{main} through a pull request. Work on the website itself happens on
|
||||
other branches and is unaffected.
|
||||
|
||||
\textbf{Selected branch and event:} the workflow runs on a \texttt{push} to
|
||||
\texttt{main}. A path filter limits it to pushes that change
|
||||
\texttt{manual/**} or the workflow file itself, so website-only commits do
|
||||
not rebuild the manual. Merging a pull request into \texttt{main} counts as
|
||||
such a push. The workflow can also be started by hand from the Actions tab
|
||||
(\texttt{workflow\_dispatch}).
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/actions.png}
|
||||
\caption{10/09/26 Screenshot of Actions tab}
|
||||
\label{fig:actions}
|
||||
\end{figure}
|
||||
|
||||
\textbf{Git remote and network path:} team members push over HTTPS. The
|
||||
remote is configured as:
|
||||
\begin{verbatim}
|
||||
$ git remote -v
|
||||
origin https://git.ssw590-08.me/SSW-590-08/Scrap-Web.git (fetch)
|
||||
origin https://git.ssw590-08.me/SSW-590-08/Scrap-Web.git (push)
|
||||
\end{verbatim}
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{lll}
|
||||
\toprule
|
||||
Hop & Port & Exposure \\
|
||||
\midrule
|
||||
Laptop $\rightarrow$ Caddy (TLS proxy) & 443/TCP (HTTPS) & Public \\
|
||||
Caddy $\rightarrow$ Gitea web service & 3000/TCP (HTTP) & Private Docker network only \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
A \texttt{git push} connects to \texttt{git.ssw590-08.me} on port 443,
|
||||
exactly as a browser does. Caddy terminates TLS and forwards the request over
|
||||
the internal Docker network to Gitea on port 3000, which is not published to
|
||||
the internet. Gitea's public root URL is set to
|
||||
\url{https://git.ssw590-08.me/}, so clone URLs and links point at the HTTPS
|
||||
hostname. SSH pushes are not needed for this assignment.
|
||||
|
||||
\textbf{Why the runner needs no public port:} the runner never receives
|
||||
connections. It contacts Gitea outbound over HTTPS to register and to poll
|
||||
for jobs; the job then checks out the source and uploads the PDF over the
|
||||
same HTTPS URL. Because all traffic is initiated by the runner, no submission
|
||||
or management port has to be opened for it.
|
||||
|
||||
\section{Runner Setup}
|
||||
|
||||
Gitea Actions was enabled for the Scrap-Web repository to support automated builds of the DevOps IT manual. A Gitea Actions runner was registered to execute workflow jobs. The runner was configured with the label \texttt{latex}, allowing the workflow to select the appropriate execution environment through the \texttt{runs-on: latex} setting in \texttt{.gitea/workflows/manual.yml}. The runner uses \texttt{act\_runner} and executes the build job in a Docker container based on the custom image \texttt{latex-job:local}. This image provides the TeX Live environment and the additional tools required to compile the LaTeX document, including \texttt{latexmk}, \texttt{latexminted}, and Pygments. \subsection{Runner Details} The runner configuration is summarized below. \begin{itemize} \item \textbf{Location:} The runner was hosted on a local macOS computer using Docker Desktop, separate from the DigitalOcean Droplet hosting Gitea. \item \textbf{Version:} Gitea Actions runner \texttt{act\_runner} version 0.6.1. \item \textbf{Execution mode:} Docker-based job execution using the custom image \texttt{latex-job:local}. Each job runs in a temporary container. \item \textbf{Capacity:} One concurrent job, configured with \texttt{capacity: 1} in the runner configuration. \item \textbf{Registration scope:} The runner was registered for the repository's Actions workflow. The registration scope was configured through the Gitea repository's runner settings. \end{itemize}
|
||||
|
||||
\subsection{Connectivity and Security} The runner connects to the Gitea instance at \texttt{https://git.ssw590-08.me}. The runner container uses the configured Gitea instance URL and Docker socket to retrieve workflow jobs and launch their job containers. Docker-based execution isolates the build environment from the Gitea application container. The Docker daemon socket is mounted inside the runner container so that it can create job containers; therefore, access to the socket is restricted to the trusted runner environment. No separate runner-management or Docker daemon port was intentionally exposed to the public internet. The runner communicates with Gitea over HTTPS, while the job environment must have network access to the resources required for the build.
|
||||
|
||||
\subsection{Resource Considerations} The DigitalOcean Droplet hosting Gitea had approximately 458 MiB of total memory, with approximately 114 MiB available during the earlier resource check. Because this was limited memory, the LaTeX runner was placed on the local macOS computer rather than adding another resource-intensive service to the Droplet. This arrangement reduces the additional memory and disk load on the Gitea server while allowing the runner to use the custom Docker image required for the manual build.
|
||||
|
||||
\subsection{Network Path and Runner Verification}
|
||||
|
||||
The Gitea Actions runner operates on the local macOS computer
|
||||
using Docker Desktop. It connects to the Gitea instance at
|
||||
\texttt{https://git.ssw590-08.me} over HTTPS. The runner retrieves
|
||||
workflow jobs from Gitea and launches the assigned job in a
|
||||
Docker container using the custom image
|
||||
\texttt{latex-job:local}.
|
||||
|
||||
The workflow targets the runner through the label
|
||||
\texttt{latex}, configured with \texttt{runs-on: latex}.
|
||||
The runner has a capacity of one concurrent job, allowing
|
||||
one workflow job to execute at a time.
|
||||
|
||||
The runner uses the Docker socket to create job containers.
|
||||
The Docker daemon is not intentionally exposed through a
|
||||
public network port. Because access to the Docker socket
|
||||
provides substantial control over the Docker host, access is
|
||||
restricted to the trusted runner environment.
|
||||
|
||||
Figure~\ref{fig:runner-job-assigned} provides evidence of the
|
||||
runner's status and its assignment to a workflow job.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]
|
||||
{HW5 images/runner-verification.png}
|
||||
\caption{Gitea Actions runner online with a workflow job assigned.}
|
||||
\label{fig:runner-job-assigned}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\section{Reproducible Compilation}
|
||||
|
||||
\begin{description}
|
||||
\item[Main file:] \texttt{manual/devopsAssignment.tex}
|
||||
\item[Build command:] \texttt{latexmk devopsAssignment.tex}, run in the
|
||||
\texttt{manual/} folder
|
||||
\item[Build configuration:] \texttt{manual/.latexmkrc}
|
||||
\item[Expected PDF path:] \texttt{manual/devopsAssignment.pdf}
|
||||
\item[Job image definition:] \texttt{manual/ci/Dockerfile}
|
||||
\item[Base image:] \texttt{texlive/texlive:TL2025-historic}
|
||||
\item[Resolved image ID/digest:] \textit{b5c35d6bdbb9}
|
||||
\end{description}
|
||||
|
||||
\textbf{Where TeX runs:} the compiler is not installed in the Gitea
|
||||
container. The workflow targets the runner label \texttt{latex}
|
||||
(\texttt{runs-on: latex}), which maps to a job image built from
|
||||
\texttt{manual/ci/Dockerfile}. That image is the official TeX Live image,
|
||||
which already contains \texttt{pdflatex}, \texttt{latexmk}, \texttt{bibtex},
|
||||
\texttt{makeindex}, \texttt{makeglossaries}, and Python with Pygments (needed
|
||||
by the \texttt{minted} package). The Dockerfile adds only Node.js and Git from
|
||||
the image's own Debian package repositories, which the checkout and upload
|
||||
actions require; no external script is downloaded and executed. The base
|
||||
image uses a fixed TeX Live release tag rather than \texttt{latest}, so every
|
||||
build uses the same toolchain.
|
||||
|
||||
\textbf{Build command and dependencies:} all compiler options are stored in
|
||||
\texttt{manual/.latexmkrc}, so the same command works on a laptop and in the
|
||||
workflow:
|
||||
\begin{minted}[breaklines]{perl}
|
||||
$pdf_mode = 1;
|
||||
$pdflatex = 'pdflatex -shell-escape -interaction=nonstopmode -halt-on-error -file-line-error %O %S';
|
||||
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
|
||||
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
|
||||
sub run_makeglossaries { return system("makeglossaries \"$_[0]\""); }
|
||||
\end{minted}
|
||||
\texttt{latexmk} runs \texttt{pdflatex} as many times as needed and calls
|
||||
\texttt{bibtex}, \texttt{makeindex}, and \texttt{makeglossaries} when their
|
||||
inputs change. \texttt{-shell-escape} is required by \texttt{minted}.
|
||||
|
||||
\textbf{Workflow:} the complete workflow file,
|
||||
\texttt{.gitea/workflows/manual.yml}, is shown below.
|
||||
\begin{minted}[breaklines]{yaml}
|
||||
name: Build IT manual
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'manual/**'
|
||||
- '.gitea/workflows/manual.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-manual:
|
||||
runs-on: latex
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- name: Check out the triggering commit
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate build metadata
|
||||
working-directory: manual
|
||||
env:
|
||||
GIT_COMMIT: ${{ github.sha }}
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
run: |
|
||||
MANUAL_VERSION="v1.4"
|
||||
SHORT_SHA="${GIT_COMMIT:0:7}"
|
||||
BUILD_ID="${MANUAL_VERSION}+build.${BUILD_NUMBER}.${SHORT_SHA}"
|
||||
|
||||
cat > build-metadata.tex <<EOF
|
||||
\newcommand{\ManualVersion}{${MANUAL_VERSION}}
|
||||
\newcommand{\BuildIdentifier}{${BUILD_ID}}
|
||||
\newcommand{\BuildCommit}{${GIT_COMMIT}}
|
||||
\newcommand{\BuildRunNumber}{${BUILD_NUMBER}}
|
||||
EOF
|
||||
|
||||
cat >> build-metadata.tex <<'EOF'
|
||||
\noindent\textbf{Manual version:} \ManualVersion\\
|
||||
\textbf{Build identifier:} \BuildIdentifier\\
|
||||
\textbf{Commit hash:} \BuildCommit\\
|
||||
\textbf{Gitea Actions run:} \BuildRunNumber
|
||||
EOF
|
||||
|
||||
- name: Record build identity and toolchain
|
||||
run: |
|
||||
SHORT_SHA="${GITHUB_SHA::7}"
|
||||
echo "SHORT_SHA=${SHORT_SHA}" >> "$GITHUB_ENV"
|
||||
echo "Commit: ${GITHUB_SHA} (${SHORT_SHA})"
|
||||
echo "Run number: ${GITHUB_RUN_NUMBER}"
|
||||
pdflatex --version | head -n 1
|
||||
latexmk -v | head -n 2 | tail -n 1
|
||||
python3 -c "import pygments; print('Pygments', pygments.__version__)"
|
||||
|
||||
- name: Compile the manual
|
||||
working-directory: manual
|
||||
run: latexmk devopsAssignment.tex
|
||||
|
||||
- name: Verify the PDF exists
|
||||
working-directory: manual
|
||||
run: |
|
||||
if [ ! -s devopsAssignment.pdf ]; then
|
||||
echo "ERROR: manual/devopsAssignment.pdf is missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
ls -l devopsAssignment.pdf
|
||||
|
||||
- name: Upload the PDF as an artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: it-manual-build-${{ github.run_number }}-${{ env.SHORT_SHA }}
|
||||
path: manual/devopsAssignment.pdf
|
||||
if-no-files-found: error
|
||||
retention-days: 30
|
||||
\end{minted}
|
||||
|
||||
\textbf{Failure detection:} the build fails in three independent ways.
|
||||
\begin{enumerate}
|
||||
\item A LaTeX error stops \texttt{pdflatex} immediately
|
||||
(\texttt{-halt-on-error}); \texttt{latexmk} then exits with a non-zero
|
||||
code, which fails the \emph{Compile the manual} step. The log shows the
|
||||
failing file and line (\texttt{-file-line-error}).
|
||||
\item If compilation reports success but the PDF is missing or empty, the
|
||||
\emph{Verify the PDF exists} step exits with code 1 and prints an error.
|
||||
\item The upload step uses \texttt{if-no-files-found: error}, so it cannot
|
||||
silently upload nothing.
|
||||
\end{enumerate}
|
||||
A failed step stops the job, so no artifact is produced from a broken build.
|
||||
|
||||
\textbf{Checkout and upload without a shared filesystem:} the job container
|
||||
shares no files with Gitea. The \texttt{actions/checkout} step clones the
|
||||
exact triggering commit from Gitea over HTTPS, the compile happens inside the
|
||||
temporary job container, and \texttt{actions/upload-artifact} sends the PDF
|
||||
back to Gitea over HTTPS, where it is attached to the matching run. The
|
||||
container is discarded when the job ends.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/run-build-log.png}
|
||||
\caption{Successful build log}
|
||||
\label{fig:run-log}
|
||||
\end{figure}
|
||||
|
||||
\section{PDF Version Traceability}
|
||||
|
||||
Every PDF produced by the workflow carries two kinds of version information:
|
||||
a \emph{human-maintained} manual version, which the team changes deliberately
|
||||
when the manual's content is revised, and a \emph{generated} build
|
||||
identifier, which the workflow creates automatically for every run. The
|
||||
build identifier appends the run number and the triggering commit to the
|
||||
manual version:
|
||||
\begin{center}
|
||||
\texttt{<manual version>+build.<run number>.<short commit hash>}
|
||||
\end{center}
|
||||
|
||||
\subsection{Build Identifier for Run \#10}
|
||||
|
||||
The table below traces one build from its source commit to the finished PDF.
|
||||
|
||||
\begin{tabularx}{\linewidth}{L{3.4cm}L{4.4cm}Y}
|
||||
\toprule
|
||||
\textbf{Field} & \textbf{Where it comes from} & \textbf{Value for run \#10}\\ \midrule
|
||||
Manual version & \texttt{MANUAL\_VERSION} in the \emph{Generate build metadata} step of \texttt{manual.yml}, edited by the team & \texttt{v1.4}\\
|
||||
Workflow run number & \texttt{GITHUB\_RUN\_NUMBER}, set by Gitea Actions & \texttt{10}\\
|
||||
Source commit & \texttt{GITHUB\_SHA}, the triggering commit, shortened to 7 characters & \texttt{67e9e17}\\
|
||||
Build identifier & Combined by the workflow & \texttt{v1.4+build.10.67e9e17}\\
|
||||
Gitea run & Actions tab & \url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/actions/runs/10}\\
|
||||
Artifact & Uploaded by the same run & \texttt{it-manual-build-10-67e9e17}\\ \bottomrule
|
||||
\end{tabularx}
|
||||
|
||||
The same three values appear in three places: the run's log
|
||||
(Figure~\ref{fig:gitea-buildhash}), the artifact name, and the generated
|
||||
PDF itself (Figure~\ref{fig:pdf-buildhash}). In the PDF, the build
|
||||
identifier, full commit hash, and run number are printed on
|
||||
\textit{[the title page / in the page footer: state where]}. Because the
|
||||
commit hash in the PDF matches the commit listed on run \#10, a reader
|
||||
holding only the PDF can find the exact source revision that produced it.
|
||||
|
||||
\subsection{How the Metadata Is Injected}
|
||||
|
||||
The human-maintained version is set once, in the \emph{Generate build
|
||||
metadata} step of the workflow, and is kept equal to \texttt{\string\VERSION}
|
||||
on the title page. The team changes it only when the manual's content is
|
||||
revised, together with a new Document History entry. The run number and
|
||||
commit hash are never typed by hand: Gitea Actions supplies them to every
|
||||
job as \texttt{github.run\_number} and \texttt{github.sha}.
|
||||
|
||||
Before compiling, the workflow combines these values and writes a small
|
||||
LaTeX file, \texttt{manual/build-metadata.tex}, inside the job container.
|
||||
The file defines four macros and a short block that prints them:
|
||||
\begin{minted}[breaklines]{yaml}
|
||||
- name: Generate build metadata
|
||||
working-directory: manual
|
||||
env:
|
||||
GIT_COMMIT: ${{ github.sha }}
|
||||
BUILD_NUMBER: ${{ github.run_number }}
|
||||
run: |
|
||||
MANUAL_VERSION="v1.4"
|
||||
SHORT_SHA="${GIT_COMMIT:0:7}"
|
||||
BUILD_ID="${MANUAL_VERSION}+build.${BUILD_NUMBER}.${SHORT_SHA}"
|
||||
|
||||
cat > build-metadata.tex <<EOF
|
||||
\newcommand{\ManualVersion}{${MANUAL_VERSION}}
|
||||
\newcommand{\BuildIdentifier}{${BUILD_ID}}
|
||||
\newcommand{\BuildCommit}{${GIT_COMMIT}}
|
||||
\newcommand{\BuildRunNumber}{${BUILD_NUMBER}}
|
||||
EOF
|
||||
|
||||
cat >> build-metadata.tex <<'EOF'
|
||||
\noindent\textbf{Manual version:} \ManualVersion\\
|
||||
\textbf{Build identifier:} \BuildIdentifier\\
|
||||
\textbf{Commit hash:} \BuildCommit\\
|
||||
\textbf{Gitea Actions run:} \BuildRunNumber
|
||||
EOF
|
||||
\end{minted}
|
||||
For run \#10 the generated file therefore defined
|
||||
\texttt{\string\BuildIdentifier} as \texttt{v1.4+build.10.67e9e17}. The manual
|
||||
reads the file during compilation:
|
||||
\begin{minted}[breaklines]{latex}
|
||||
run: |
|
||||
MANUAL_VERSION="v1.4"
|
||||
SHORT_SHA="${GIT_COMMIT:0:7}"
|
||||
BUILD_ID="${MANUAL_VERSION}+build.${BUILD_NUMBER}.${SHORT_SHA}"
|
||||
|
||||
cat > build-metadata.tex <<EOF
|
||||
\newcommand{\ManualVersion}{${MANUAL_VERSION}}
|
||||
\newcommand{\BuildIdentifier}{${BUILD_ID}}
|
||||
\newcommand{\BuildCommit}{${GIT_COMMIT}}
|
||||
\newcommand{\BuildRunNumber}{${BUILD_NUMBER}}
|
||||
EOF
|
||||
|
||||
cat >> build-metadata.tex <<'EOF'
|
||||
\noindent\textbf{Manual version:} \ManualVersion\\
|
||||
\textbf{Build identifier:} \BuildIdentifier\\
|
||||
\textbf{Commit hash:} \BuildCommit\\
|
||||
\textbf{Gitea Actions run:} \BuildRunNumber
|
||||
EOF
|
||||
\end{minted}
|
||||
The first \texttt{cat} uses an unquoted heredoc so that the shell
|
||||
substitutes the version, run number and commit into the macro definitions;
|
||||
the second uses a quoted heredoc (\texttt{<<'EOF'}) so that the LaTeX
|
||||
commands are written literally.
|
||||
|
||||
\subsection{No Commit or Push Loop}
|
||||
|
||||
The metadata file exists only inside the temporary job container, and
|
||||
\texttt{build-metadata.tex} is listed in \texttt{manual/.gitignore} so that a
|
||||
local test build cannot commit it by accident. The workflow contains no \texttt{git commit} or \texttt{git push} step, so the
|
||||
generated version is never written back to \texttt{main}; the container and
|
||||
the file are discarded when the job ends. This matters because the workflow
|
||||
is triggered by pushes to \texttt{main}: a workflow that committed its own
|
||||
version file would trigger itself again on every build. The human-maintained
|
||||
version and the Document History table therefore stay entirely under the
|
||||
team's control, and change only when a team member edits them.
|
||||
|
||||
\subsection{Re-runs}
|
||||
|
||||
Re-running a workflow in Gitea keeps the same run number and checks out the
|
||||
same commit, so a re-run produces a PDF with the same build identifier.
|
||||
Because the source is identical, the team treats such a re-run as the same
|
||||
build, and the run-attempt number is not included in the identifier.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/gitea-buildhash.png}
|
||||
\caption{Gitea build report}
|
||||
\label{fig:gitea-buildhash}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/pdf-buildhas.png}
|
||||
\caption{PDF compiled build report}
|
||||
\label{fig:pdf-buildhash}
|
||||
\end{figure}
|
||||
|
||||
\section{Downloadable Artifact}
|
||||
|
||||
\begin{description}
|
||||
\item[Artifact name:] \texttt{it-manual-build-\textit{N}-\textit{H}},
|
||||
where \textit{N} is the workflow run number and \textit{H} is the short
|
||||
commit hash; for example, \texttt{it-manual-build-12-a1b2c3d}
|
||||
\item[Contents:] \texttt{devopsAssignment.pdf}
|
||||
\item[Retention:] 30 days, set in the workflow
|
||||
(\texttt{retention-days: 30}).
|
||||
\item[Example artifact link:] \url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/actions/runs/10/artifacts/it-manual-build-10-67e9e17}
|
||||
\end{description}
|
||||
|
||||
Because the run number and commit hash are part of the artifact name, each
|
||||
downloaded file can be matched to the run and commit that produced it.
|
||||
|
||||
\textbf{How a team member downloads the PDF:}
|
||||
\begin{enumerate}
|
||||
\item Open \url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web/actions}.
|
||||
\item Select the \emph{Build IT manual} workflow and open the run for the
|
||||
commit of interest (the run lists its commit hash and branch).
|
||||
\item Confirm the run finished successfully.
|
||||
\item In the run's \emph{Artifacts} section, click
|
||||
\texttt{it-manual-build-\ldots} to download it, then extract and open
|
||||
\texttt{devopsAssignment.pdf}.
|
||||
\end{enumerate}
|
||||
|
||||
Artifacts expire after the retention period and are not a backup. The
|
||||
permanent record is the LaTeX source in Git, from which any version of the
|
||||
manual can be rebuilt.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/gitea-running-artifact.png}
|
||||
\caption{Run page with the artifact listed, and the downloaded PDF open, dated}
|
||||
\label{fig:fig:gitea-artifact-running}
|
||||
\end{figure}
|
||||
|
||||
\section{Change, Failure, and Repair Evidence}
|
||||
|
||||
To verify the automated manual-build pipeline, two successive changes were committed to the main branch of the Scrap-Web repository. Each commit triggered a separate Gitea Actions run. Both builds completed successfully, and the generated PDF artifacts were checked to confirm that their build identifiers corresponded to the appropriate commits and run numbers.
|
||||
|
||||
A deliberate LaTeX error was then introduced into the manual source. The workflow detected the compilation error and terminated with a failed status because the build uses the -halt-on-error option. The failed run and its error log were recorded as evidence that the pipeline prevents an invalid manual from being treated as a successful build.
|
||||
|
||||
The invalid command was subsequently removed in a repair commit. A new Actions run compiled the corrected source successfully and produced a new PDF artifact. The repaired artifact's commit hash and run number were compared with the corresponding Gitea Actions run to verify that the output was generated from the repaired revision.
|
||||
|
||||
The generated metadata was produced during the workflow rather than committed back to the source branch. This kept the build identifier associated with the specific build while preserving the distinction between source commits and generated artifacts.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/run-build-log.png}
|
||||
\caption{Run log showing 2 successive builds, followed by an error, and another successful build}
|
||||
\label{fig:buildlogs}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/errormessage.png}
|
||||
\caption{Failed build error message}
|
||||
\label{fig:error-message}
|
||||
\end{figure}
|
||||
|
||||
\section{Runner and Secret Boundary}
|
||||
\subsection{Workflow edit permissions} The automated build workflow is stored in .gitea/workflows/manual.yml. Users who can modify the workflow may change the commands executed by the runner. Repository write permissions and any branch-protection rules were reviewed to identify who can modify the workflow and its associated source files. The repository's actual permissions and branch-protection configuration are recorded in the accompanying evidence.
|
||||
|
||||
\subsection{Runner registration credentials} The Gitea Actions runner is hosted on the local macOS development machine. Its configuration is stored in ~/gitea-runner/runner-data/config.yaml, and its local runner credentials are stored in the runner-data directory, including the .runner file when present. These files are not included in the report or committed to the repository because they may contain sensitive authentication information. The registration token is used to register the runner; it is distinct from the credentials subsequently stored by the registered runner.
|
||||
|
||||
\subsection{Runner isolation} The runner uses the latex label, which matches the workflow's runs-on: latex setting. The runner executes the manual-build job in a Docker container based on the custom latex-job:local image. Its configured capacity is one job at a time. Hosting the runner on the development machine rather than the DigitalOcean Gitea server avoids placing the additional build workload on the server's limited memory and disk resources. Containerization provides isolation for the build environment, but it is not treated as a complete security boundary.
|
||||
|
||||
\subsection{Docker socket risk} The runner container has access to the Docker Desktop socket so that it can create job containers. Access to this socket is security-sensitive because it may allow control over Docker resources and potentially affect the host system. The socket is mounted locally for runner operation rather than deliberately exposed as a public network endpoint. The runner is therefore restricted to trusted coursework workflows, and its credentials and configuration files are kept out of source control.
|
||||
|
||||
Evidence includes the repository permission settings, runner configuration with secrets omitted, and the runner's Docker configuration. No authentication tokens or credential values are reproduced in this report.
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/adminpage.png}
|
||||
\caption{Listed repo admins}
|
||||
\label{fig:admin-perms}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/ownerpage.png}
|
||||
\caption{Listed repo owners}
|
||||
\label{fig:owner-perms}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/tokenlocations.png}
|
||||
\caption{Verification of token existence}
|
||||
\label{fig:tokenlocations}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/twosuccessruns.png}
|
||||
\caption{Two Successive Runs}
|
||||
\label{fig:successfulruns}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=1\linewidth]{HW5 images/pdfidentifiers.png}
|
||||
\caption{Associated PDF identifiers}
|
||||
\label{fig:pdfidentify}
|
||||
\end{figure}
|
||||
|
||||
\section{Manual Quality and Controls}
|
||||
\subsection{Common Troubleshooting Methods}
|
||||
Throughout this exercise, there came many times where the builds failed (around 8 times). The main method of troubleshooting involved checking version statuses, updating and restarting file instances, and parsing of error messages to pinpoint.
|
||||
@@ -0,0 +1,228 @@
|
||||
\chapter{Digital Ocean Docker Deployment}
|
||||
\ChapterLabel{Digital Ocean}
|
||||
|
||||
\section{Overview}
|
||||
|
||||
This chapter documents the deployment of the Dockerized website to a
|
||||
DigitalOcean Droplet. The DigitalOcean Droplet was configured as an Ubuntu
|
||||
Linux server and was accessed remotely using SSH. Docker was then installed
|
||||
and configured on the Droplet so that the website could run inside a Docker
|
||||
container.
|
||||
|
||||
The deployment process consisted of creating the DigitalOcean Droplet,
|
||||
connecting to the Droplet through SSH, updating the Ubuntu operating system,
|
||||
installing Docker, transferring the website project to the server, building
|
||||
the Docker image, running the Docker container, configuring the firewall, and
|
||||
accessing the deployed website through the Droplet's public IP address.
|
||||
|
||||
DigitalOcean Droplets are Linux-based virtual machines that can be used to
|
||||
host websites and other applications. The DigitalOcean documentation
|
||||
recommends using SSH keys for secure access to Droplets
|
||||
|
||||
\section{Create the DigitalOcean Droplet}
|
||||
|
||||
A DigitalOcean Droplet was created through the DigitalOcean Control Panel.
|
||||
The Droplet was configured with an Ubuntu operating system and a suitable
|
||||
shared CPU plan for the website deployment.
|
||||
|
||||
After the Droplet was created, DigitalOcean provided a public IPv4 address.
|
||||
This address was used to remotely access the server and later to access the
|
||||
deployed website.
|
||||
|
||||
The public IPv4 address of the deployed Droplet is:
|
||||
|
||||
\begin{center}
|
||||
\textbf{137.184.211.98}
|
||||
\end{center}
|
||||
|
||||
\section{Connect to the Droplet Using SSH}
|
||||
|
||||
After creating the Droplet, an SSH connection was established from the local
|
||||
Mac terminal. The following command was used to connect to the remote Ubuntu
|
||||
server:
|
||||
|
||||
\begin{minted}{bash}
|
||||
ssh root@137.184.211.98
|
||||
\end{minted}
|
||||
|
||||
After successfully connecting, the terminal displayed the Ubuntu server
|
||||
prompt. This confirmed that commands entered in the terminal were being
|
||||
executed on the DigitalOcean Droplet rather than on the local computer.
|
||||
|
||||
\section{Update the Ubuntu Server}
|
||||
|
||||
The Ubuntu package repository was updated before installing the software
|
||||
required for the deployment. The following command was executed:
|
||||
|
||||
\begin{minted}{bash}
|
||||
apt update
|
||||
\end{minted}
|
||||
|
||||
The installed packages were then upgraded using:
|
||||
|
||||
\begin{minted}{bash}
|
||||
apt upgrade -y
|
||||
\end{minted}
|
||||
|
||||
\section{Install and Verify Docker}
|
||||
|
||||
Docker was installed directly on the DigitalOcean Ubuntu Droplet. The
|
||||
following command was used:
|
||||
|
||||
\begin{minted}{bash}
|
||||
apt install docker.io -y
|
||||
\end{minted}
|
||||
|
||||
Docker was then configured to start automatically when the server starts:
|
||||
|
||||
\begin{minted}{bash}
|
||||
systemctl enable docker
|
||||
\end{minted}
|
||||
|
||||
The Docker service was started with:
|
||||
|
||||
\begin{minted}{bash}
|
||||
systemctl start docker
|
||||
\end{minted}
|
||||
|
||||
The Docker installation was verified using:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker --version
|
||||
\end{minted}
|
||||
|
||||
The Docker service status was also checked using:
|
||||
|
||||
\begin{minted}{bash}
|
||||
systemctl status docker
|
||||
\end{minted}
|
||||
|
||||
\section{Transfer the Website to the Droplet}
|
||||
|
||||
The website source code was transferred to the DigitalOcean Droplet. The
|
||||
application contained the Dockerfile and the source files required to build
|
||||
and run the website.
|
||||
|
||||
The project directory on the Droplet contained the Dockerfile used to create
|
||||
the Docker image.
|
||||
|
||||
The project was then accessed from the terminal using:
|
||||
|
||||
\begin{minted}{bash}
|
||||
cd digital-ocean-docker
|
||||
\end{minted}
|
||||
|
||||
\section{Build the Docker Image}
|
||||
|
||||
After entering the project directory, a Docker image was created using the
|
||||
following command:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker build -t digital-ocean-docker .
|
||||
\end{minted}
|
||||
|
||||
The \texttt{-t} option assigns the image the name
|
||||
\texttt{digital-ocean-docker}. The period at the end of the command specifies that the
|
||||
current directory is used as the Docker build context.
|
||||
|
||||
The resulting Docker image was verified with:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker images
|
||||
\end{minted}
|
||||
|
||||
\section{Run the Docker Container}
|
||||
|
||||
The Docker container was started using the following command:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker run -d \
|
||||
--restart unless-stopped \
|
||||
-p 80:3000 \
|
||||
--name digital-ocean-docker \
|
||||
digital-ocean-docker
|
||||
\end{minted}
|
||||
|
||||
The port mapping was configured as:
|
||||
|
||||
\begin{center}
|
||||
\texttt{80:3000}
|
||||
\end{center}
|
||||
|
||||
This maps port 80 on the DigitalOcean Droplet to port 3000 inside the
|
||||
Docker container. Since the Express application runs on port 3000, requests
|
||||
received by the Droplet on port 80 are forwarded to the application inside
|
||||
the Docker container.
|
||||
|
||||
The \texttt{docker ps} command was used to verify that the container was
|
||||
running:
|
||||
|
||||
\begin{minted}{bash}
|
||||
docker ps
|
||||
\end{minted}
|
||||
|
||||
The expected port mapping appeared similar to:
|
||||
|
||||
\begin{minted}{text}
|
||||
0.0.0.0:80->3000/tcp
|
||||
\end{minted}
|
||||
|
||||
This confirmed that the website was exposed through port 80 of the
|
||||
DigitalOcean Droplet.
|
||||
|
||||
\section{Configure the Firewall}
|
||||
|
||||
The Ubuntu firewall was configured to allow SSH, HTTP, and HTTPS traffic.
|
||||
OpenSSH uses port 22 for the SSH connection to the server.
|
||||
|
||||
The following commands were used:
|
||||
|
||||
\begin{minted}{bash}
|
||||
ufw allow OpenSSH
|
||||
ufw allow 80/tcp
|
||||
ufw allow 443/tcp
|
||||
\end{minted}
|
||||
|
||||
The firewall was then enabled:
|
||||
|
||||
\begin{minted}{bash}
|
||||
ufw enable
|
||||
\end{minted}
|
||||
|
||||
The firewall configuration was verified with:
|
||||
|
||||
\begin{minted}{bash}
|
||||
ufw status
|
||||
\end{minted}
|
||||
|
||||
The firewall configuration allowed the following traffic:
|
||||
|
||||
\begin{itemize}
|
||||
\item Port 22 -- SSH/OpenSSH access to the Droplet.
|
||||
\item Port 80 -- HTTP access to the deployed website.
|
||||
\item Port 443 -- HTTPS access for secure web traffic.
|
||||
\end{itemize}
|
||||
|
||||
Port 22 was allowed before enabling the firewall so that the existing SSH
|
||||
connection to the Droplet would remain accessible.
|
||||
|
||||
\section{Access the Deployed Website}
|
||||
|
||||
After the Docker container was started and port 80 was exposed, the deployed
|
||||
website was accessed through the public IPv4 address assigned to the
|
||||
DigitalOcean Droplet.
|
||||
|
||||
The website can be accessed at:
|
||||
|
||||
\begin{center}
|
||||
\url{http://137.184.211.98}
|
||||
\end{center}
|
||||
|
||||
The public website link is also provided below:
|
||||
|
||||
\begin{center}
|
||||
\href{http://137.184.211.98}{\textbf{DigitalOcean Deployed Website}}
|
||||
\end{center}
|
||||
|
||||
The browser request is sent to the Droplet on port 80 and is forwarded to
|
||||
port 3000 inside the Docker container.
|
||||