Compare commits
22 Commits
issue-5
...
ab0bcc25f3
| Author | SHA1 | Date | |
|---|---|---|---|
| ab0bcc25f3 | |||
| b899233138 | |||
| 7ffe1f0b34 | |||
| 75c2f21bae | |||
| 8174773cfb | |||
| 898660fd30 | |||
| b76eba3c4f | |||
| 67e9e17eab | |||
| 543be42786 | |||
| 05ef5690b1 | |||
| 1b0d53291f | |||
| f95aa89208 | |||
| c61c4d9d86 | |||
| bd6dc0a865 | |||
| a7b93e380a | |||
| ebd8b2e424 | |||
| 5e0b7e595d | |||
| 46cb1aac07 | |||
| 45dfb9b7ed | |||
| c6decd1f08 | |||
| cc290d65ff | |||
| c311b3fef8 |
@@ -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.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
|
||||||
|
# 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.' }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,3 +3,5 @@
|
|||||||
This Repo is here to act as Group 8's repo for the SSW590 course
|
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/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,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 |
@@ -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,108 @@
|
|||||||
|
% This file acts as the entry point for AI
|
||||||
|
\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,63 @@
|
|||||||
|
\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.
|
||||||
|
|
||||||
|
\end{itemize}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
% 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{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}{10/10/26}
|
||||||
|
\newcommand{\DueDate}{[Due Date and Time]}
|
||||||
|
\newcommand{\VERSION}{Version 1.4}
|
||||||
|
\newcommand{\AssignmentNumber}{5}
|
||||||
|
|
||||||
|
\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}
|
||||||
|
|
||||||
|
\bibliographystyle{IEEEtran}
|
||||||
|
\bibliography{devopsReferences}
|
||||||
|
|
||||||
|
\appendix
|
||||||
|
\include{devopsAIPromptLog}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -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.
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
\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}
|
||||||
|
The template requires a LaTeX distribution with \texttt{pdflatex},
|
||||||
|
\texttt{bibtex}, \texttt{makeglossaries}, and \texttt{makeindex}.
|
||||||
|
Install the tools using the platform instructions below, then run one of the
|
||||||
|
following platform builds.
|
||||||
|
|
||||||
|
\subsection{macOS and Linux Build}
|
||||||
|
\begin{verbatim}
|
||||||
|
make -f makefileMacLinux pdf
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{Windows PowerShell Build}
|
||||||
|
\begin{verbatim}
|
||||||
|
.\makefilePowerShell.ps1 -Action pdf
|
||||||
|
\end{verbatim}
|
||||||
|
The completed build regenerates references, bibliography, glossary, and index.
|
||||||
|
Review the log and visually inspect affected PDF pages. Do not edit generated
|
||||||
|
auxiliary files or the PDF directly.
|
||||||
|
|
||||||
|
\section{Install LaTeX Tools on macOS}
|
||||||
|
\index{macOS}
|
||||||
|
\index{MacTeX}
|
||||||
|
\subsection{Recommended Installation}
|
||||||
|
Install the current full \href{https://www.tug.org/mactex/}{MacTeX}
|
||||||
|
distribution. It includes TeX Live, \texttt{pdflatex}, \texttt{bibtex},
|
||||||
|
\texttt{latexmk}, \texttt{makeglossaries}, \texttt{makeindex}, and useful
|
||||||
|
applications such as TeXShop and TeX Live Utility. The full distribution is the
|
||||||
|
least troublesome choice for this template because it includes the packages
|
||||||
|
used by the glossary, table, listing, color, and hyperlink features.
|
||||||
|
|
||||||
|
Either download the signed installer from the MacTeX web site and complete the
|
||||||
|
macOS installation dialog, or, if Homebrew is already installed, run:
|
||||||
|
\begin{verbatim}
|
||||||
|
brew install --cask mactex
|
||||||
|
\end{verbatim}
|
||||||
|
Close and reopen Terminal after installation. If the TeX commands are not
|
||||||
|
found, add the MacTeX binary directory to the current shell session:
|
||||||
|
\begin{verbatim}
|
||||||
|
export PATH="/Library/TeX/texbin:$PATH"
|
||||||
|
\end{verbatim}
|
||||||
|
Do not place this command in a shell profile until it has been verified on the
|
||||||
|
local computer.
|
||||||
|
|
||||||
|
\subsection{Verification and Compilation}
|
||||||
|
From the template directory, verify the tools:
|
||||||
|
\begin{verbatim}
|
||||||
|
command -v pdflatex bibtex latexmk makeglossaries makeindex
|
||||||
|
\end{verbatim}
|
||||||
|
Each command should print a path. Then create the PDF:
|
||||||
|
\begin{verbatim}
|
||||||
|
make -f makefileMacLinux pdf
|
||||||
|
\end{verbatim}
|
||||||
|
To remove generated intermediate files while keeping the PDF, run:
|
||||||
|
\begin{verbatim}
|
||||||
|
make -f makefileMacLinux clean
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{Install LaTeX Tools on Windows}
|
||||||
|
\index{Windows}
|
||||||
|
\index{MiKTeX}
|
||||||
|
\subsection{Recommended Installation}
|
||||||
|
Install the current Basic MiKTeX distribution using the official
|
||||||
|
\href{https://miktex.org/howto/install-miktex}{MiKTeX Windows installation
|
||||||
|
guide}. During installation, choose a per-user installation when appropriate
|
||||||
|
and set missing-package installation to \emph{Ask me first} or \emph{Yes}.
|
||||||
|
The latter is convenient for a student machine with Internet access; the former
|
||||||
|
makes each package installation explicit.
|
||||||
|
|
||||||
|
Open MiKTeX Console after installation, apply available updates, and install
|
||||||
|
the \texttt{latexmk} package if the verification command below cannot find it.
|
||||||
|
On an organization-managed computer, obtain approval before installing software
|
||||||
|
or changing execution policy.
|
||||||
|
|
||||||
|
\subsection{Verification and Compilation}
|
||||||
|
Open a new PowerShell window in the template directory and verify:
|
||||||
|
\begin{verbatim}
|
||||||
|
Get-Command pdflatex,bibtex,latexmk,makeglossaries,makeindex
|
||||||
|
\end{verbatim}
|
||||||
|
Each command should display a command record. Build the PDF with:
|
||||||
|
\begin{verbatim}
|
||||||
|
.\makefilePowerShell.ps1 -Action pdf
|
||||||
|
\end{verbatim}
|
||||||
|
If PowerShell blocks the script under a managed execution policy, ask the
|
||||||
|
system administrator for the approved procedure. Do not bypass institutional
|
||||||
|
security policy. To remove intermediate build files, run:
|
||||||
|
\begin{verbatim}
|
||||||
|
.\makefilePowerShell.ps1 -Action clean
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{Common Build Problems}
|
||||||
|
\begin{tabularx}{\linewidth}{L{3.0cm}Y}
|
||||||
|
\toprule \textbf{Symptom} & \textbf{Resolution}\\ \midrule
|
||||||
|
Command not found & Close and reopen the terminal. On macOS, verify the TeX
|
||||||
|
binary path; on Windows, verify MiKTeX completed installation and is on the user PATH.\\
|
||||||
|
Missing LaTeX package & Use MiKTeX Console or its approved on-the-fly package
|
||||||
|
installation prompt on Windows. On macOS, install the full MacTeX distribution
|
||||||
|
or use TeX Live Utility to add the missing package.\\
|
||||||
|
References or glossary incomplete & Run the supplied platform build instead of
|
||||||
|
a single \texttt{pdflatex} command; it runs BibTeX, the glossary tool, and the
|
||||||
|
index tool in the required order.\\
|
||||||
|
Script is blocked & Follow the institution's approved PowerShell policy or run
|
||||||
|
the documented build commands with an approved administrator.\\ \bottomrule
|
||||||
|
\end{tabularx}
|
||||||
|
|
||||||
|
\section{Authoring and Review Rules}
|
||||||
|
Replace bracketed placeholders with assignment facts. Keep operational examples
|
||||||
|
safe, bounded, and free of credentials. Link activities to evidence, retain
|
||||||
|
history, and state unknowns or instructor decisions explicitly. Rebuild after
|
||||||
|
structural, cross-reference, table, glossary, or index changes.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
\chapter*{Document History}
|
||||||
|
\addcontentsline{toc}{chapter}{Document History}
|
||||||
|
\index{document history}
|
||||||
|
|
||||||
|
\begin{table}[H]
|
||||||
|
\caption{Document Update History\label{Table:DocumentHistory}}
|
||||||
|
\begin{tabularx}{\linewidth}{L{3.1cm}L{2.2cm}YL{2.0cm}}
|
||||||
|
\toprule \textbf{Date / Version} & \textbf{Author Initials} & \textbf{Change} & \textbf{Changed At}\\ \midrule
|
||||||
|
October 2, 2026 / 1.3 & SK, KH & Completed the Gitea startup exercise and documented the process. Also, created the hosts and passwords tables to be used throughout the group assignments & \ChapterRef{JenkinsCI}, \ChapterRef{PWDHST} \\
|
||||||
|
September 24, 2026 / 1.2 & SK, KH& Completed the Digital Ocean Docker Deployment chapter; the class-based JavaScript refactor of the two-button website with its accompanying UML class diagram; the LaTeX Docker chapter ; and the Project Proposal chapter, addressing the two-tool comparison, dashboard, SWOT, and unique-contribution rubric criteria. & \ChapterRef{Digital Ocean}, \ChapterRef{ClassBasedJSRefactor}, \ChapterRef{Latex Docker}, \ChapterRef{ProjectProposal}\\
|
||||||
|
September 16, 2026 / 1.1 & SK, KH & Completed the Linux Commands assignment: environment setup with terminal printout figure and full solutions to Problem Set sections A--E & \ChapterRef{LinuxCommands} \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabularx}
|
||||||
|
\end{table}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
\newacronym{ai}{AI}{artificial intelligence}
|
||||||
|
\newacronym{ci}{CI}{continuous integration}
|
||||||
|
\newacronym{cd}{CD}{continuous delivery or continuous deployment}
|
||||||
|
\newacronym{iac}{IaC}{infrastructure as code}
|
||||||
|
\newacronym{slo}{SLO}{service-level objective}
|
||||||
|
\newglossaryentry{automation}{name={automation},description={A repeatable, version-controlled procedure executed by software rather than undocumented manual steps}}
|
||||||
|
\newglossaryentry{deployment}{name={deployment},description={The controlled delivery of a versioned change to an environment}}
|
||||||
|
\newglossaryentry{evidence}{name={evidence},description={A retained record of an actual execution, observation, or review}}
|
||||||
|
\newglossaryentry{observability}{name={observability},description={The ability to infer system behavior from signals such as logs, metrics, traces, and health checks}}
|
||||||
|
\newglossaryentry{pipeline}{name={pipeline},description={An automated sequence that builds, tests, packages, and/or deploys a change}}
|
||||||
|
\newglossaryentry{rollback}{name={rollback},description={A controlled return to a known acceptable version or state after a failed or harmful change}}
|
||||||
|
\newglossaryentry{runbook}{name={runbook},description={A documented operational procedure for a repeatable task or incident response}}
|
||||||
|
\newglossaryentry{synonyms}{name={synonyms},description={Equivalent terms used in this assignment; record preferred terms to avoid ambiguity in instructions and evidence}}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
\chapter{Introduction}
|
||||||
|
\ChapterLabel{Introduction}
|
||||||
|
\index{introduction}
|
||||||
|
\index{DevOps}
|
||||||
|
|
||||||
|
\section{How to Use This Assignment}
|
||||||
|
Replace bracketed text with approved assignment facts. Delete instructional
|
||||||
|
examples before release, but retain the stable identifiers, history, glossary,
|
||||||
|
index, appendices, and evidence structure. This document is an assignment
|
||||||
|
brief and operational record, not a requirements or software-design document.
|
||||||
|
|
||||||
|
\section{Purpose and Learning Objectives}
|
||||||
|
State the DevOps capability students will practice and the observable learning
|
||||||
|
outcomes. \textit{Example: Students will provision a minimal Linux service,
|
||||||
|
automate its deployment, collect operational evidence, and demonstrate a safe
|
||||||
|
rollback.}
|
||||||
|
|
||||||
|
\section{Scope and Constraints}
|
||||||
|
State the permitted cloud or local environment, team size, required tools,
|
||||||
|
budget limits, source-control repository, timebox, and prohibited actions.
|
||||||
|
Do not include credentials, access tokens, student records, or production data.
|
||||||
|
|
||||||
|
\section{Deliverables and Due Date}
|
||||||
|
\begin{tabularx}{\linewidth}{L{3.2cm}Y}
|
||||||
|
\toprule \textbf{Item} & \textbf{Expectation}\\ \midrule
|
||||||
|
Due date & \DueDate\\
|
||||||
|
Repository & \textit{[repository URL or LMS location]}\\
|
||||||
|
Required deliverables & \textit{[automation, runbook, evidence, reflection]}\\
|
||||||
|
Team policy & \textit{[individual or team; contribution expectations]}\\ \bottomrule
|
||||||
|
\end{tabularx}
|
||||||
|
|
||||||
|
\section{Using This Template with AI Agents}
|
||||||
|
\index{AI agent!DevOps workflow}
|
||||||
|
AI may assist with explanation, drafting, troubleshooting, and reviewing
|
||||||
|
automation. It does not replace student understanding or authorize an agent to
|
||||||
|
operate accounts, approve work, invent results, or receive secrets. Before
|
||||||
|
editing, an AI agent shall read \texttt{devopsAIAgentGuide.tex}, load only the
|
||||||
|
relevant assignment files, identify assumptions, and preserve evidence
|
||||||
|
boundaries. Record material AI assistance in \ChapterRef{AIPromptLog}.
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
Read devopsAIAgentGuide.tex first. For this SSW 590 assignment, identify the
|
||||||
|
requested task and read only the listed sources. Use supplied evidence only;
|
||||||
|
do not invent commands, deployment results, approvals, credentials, or costs.
|
||||||
|
Preserve stable IDs and history. Make the smallest appropriate change, build
|
||||||
|
the PDF, and report assumptions, risks, and actions requiring human approval.
|
||||||
|
\end{verbatim}
|
||||||
@@ -0,0 +1,349 @@
|
|||||||
|
\chapter{Jenkins/CI}
|
||||||
|
\ChapterLabel{JenkinsCI}
|
||||||
|
|
||||||
|
\section{Student Pack domain and DNS}
|
||||||
|
|
||||||
|
The team claimed a domain through the Namecheap offer in the GitHub
|
||||||
|
Student Developer Pack, which provides one \texttt{.me} domain free for
|
||||||
|
the first year, including an SSL certificate, through the GitHub
|
||||||
|
Education-linked signup flow.
|
||||||
|
|
||||||
|
\begin{description}
|
||||||
|
\item[Domain offer:] Namecheap, via GitHub Student Developer Pack
|
||||||
|
(\texttt{education.github.com/pack/offers}).
|
||||||
|
\item[Eligibility:] requires an approved GitHub Student Developer Pack
|
||||||
|
account, verified with a Stevens \texttt{.edu} email.
|
||||||
|
\item[Domain registered:] \texttt{ssw590-08}
|
||||||
|
\item[First-year cost:] \$0 (covered by the Student Pack offer).
|
||||||
|
\item[Renewal cost:] \texttt{\$14.16 I believe}
|
||||||
|
\item[Expiration / renewal date:] \texttt{10/01/2027}
|
||||||
|
\item[Tracking renewal:] the renewal date is recorded here and in the
|
||||||
|
team's Hosts table; Namecheap also sends automatic renewal-reminder
|
||||||
|
emails to the account on file. A future team member should check the
|
||||||
|
Hosts table entry and the Namecheap account directly rather than
|
||||||
|
assume the domain renews automatically without payment.
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
\textbf{Gitea hostname:} \texttt{git.ssw590-08.me} -- chosen as the
|
||||||
|
subdomain for the team's Gitea instance.
|
||||||
|
|
||||||
|
\textbf{DNS configuration:} an A record was created in Namecheap's
|
||||||
|
Advanced DNS panel for the domain:
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-01 230752.png}
|
||||||
|
\caption{Namecheap's Advanced DNS panel}
|
||||||
|
\label{fig:dns}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\begin{tabular}{llll}
|
||||||
|
\toprule
|
||||||
|
Type & Host & Value & TTL \\
|
||||||
|
\midrule
|
||||||
|
A & git & 147.182.179.191 & Automatic \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\textbf{Independent lookup verification:} resolution of the hostname was
|
||||||
|
confirmed from a machine independent of the Droplet itself using
|
||||||
|
\texttt{nslookup git.git.ssw590-08.me}, returning the expected Droplet IP
|
||||||
|
address.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-01 230957.png}
|
||||||
|
\caption{nslookup}
|
||||||
|
\label{fig:domain}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\textbf{HTTPS hostname link:} \texttt{https://git.ssw590-08.me/}.
|
||||||
|
|
||||||
|
\section{Pinned Gitea Deployment}
|
||||||
|
|
||||||
|
Gitea was deployed on the team's DigitalOcean Droplet using Docker
|
||||||
|
Compose, with a pinned, recorded image version rather than a floating
|
||||||
|
\texttt{latest} tag.
|
||||||
|
|
||||||
|
\begin{description}
|
||||||
|
\item[Droplet:] Droplet plan/size: RAM 512GB, Disk 10GB; Region: NYC1; OS: Ubuntu 24.04 (LTS) x64; Basic \$4/mo plan
|
||||||
|
\item[Docker installation:] Docker Engine and the Compose plugin were
|
||||||
|
installed from Docker's official APT repository (rather than the
|
||||||
|
Ubuntu-default \texttt{docker.io} package, which does not include
|
||||||
|
\texttt{docker compose}).
|
||||||
|
\item[Gitea image:] \texttt{gitea/gitea: 1.26.4 8e25c717b8f7 245MB 69.3MB U}
|
||||||
|
\item[Restart policy:] \texttt{restart: unless-stopped}, so the
|
||||||
|
container recovers automatically after a Droplet reboot.
|
||||||
|
\item[Persistent mount:] a named Docker volume (\texttt{gitea-data})
|
||||||
|
mounted to \texttt{/data} inside the container -- this is what
|
||||||
|
survives container replacement, independent of the container's own
|
||||||
|
disposable filesystem layer.
|
||||||
|
\item[Proxy connection:] Gitea now sits behind a reverse proxy
|
||||||
|
terminating HTTPS at \url{https://git.ssw590-08.me/}; the Gitea
|
||||||
|
backend (port 3000) is no longer directly reachable from the public
|
||||||
|
internet -- verified by confirming
|
||||||
|
\texttt{http://147.182.179.191:3000} is no longer publicly
|
||||||
|
accessible.
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
\textbf{Redacted Compose excerpt:}
|
||||||
|
\begin{verbatim}
|
||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: gitea/gitea: 1.26.4 8e25c717b8f7 245MB 69.3MB U
|
||||||
|
container_name: gitea
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
|
# SQLite is Gitea's default database, so no DB-related env vars are
|
||||||
|
# required here.
|
||||||
|
- GITEA__server__ROOT_URL=http://[DROPLET_IP]:3000/
|
||||||
|
# reverse proxy are in place. Gitea uses this value to
|
||||||
|
# generate links, so it must match how users actually reach the site.
|
||||||
|
volumes:
|
||||||
|
- gitea-data:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
ports:
|
||||||
|
- "3000:3000" # web UI -- will move behind the reverse proxy later
|
||||||
|
- "222:22" # git-over-SSH (optional; remove if you won't use it)
|
||||||
|
volumes:
|
||||||
|
gitea-data:
|
||||||
|
# Named volume -- this is what survives "docker compose down/up" and
|
||||||
|
# is the basis of the persistence test the rubric requires.
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\textbf{Reproducing this deployment:} another team could repeat this
|
||||||
|
installation by provisioning a Droplet with Docker installed, copying
|
||||||
|
this Compose file, substituting their own hostname/IP into
|
||||||
|
\texttt{http://147.182.179.191:3000/}, and running \texttt{docker compose up -d}. No
|
||||||
|
manual configuration file editing is required beyond that substitution.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-01 233750.png}
|
||||||
|
\caption{10/01/26 docker compose ps with Gitea container running}
|
||||||
|
\label{fig:dockercompose}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\section{Database and Persistence}
|
||||||
|
|
||||||
|
The team selected \textbf{SQLite} (Gitea's built-in default database)
|
||||||
|
rather than a separate PostgreSQL container. This choice was made given
|
||||||
|
the team's limited prior Docker/Linux experience -- SQLite requires no
|
||||||
|
separate database service, no database credentials to manage, and no
|
||||||
|
private network configuration between containers, while still being
|
||||||
|
explicitly named in the assignment as a reasonable choice for a small
|
||||||
|
student team.
|
||||||
|
|
||||||
|
The SQLite database file resides inside the \texttt{gitea-data} named
|
||||||
|
volume (under \texttt{/data} in the container), which is mounted outside
|
||||||
|
the container's disposable filesystem layer -- confirmed by the
|
||||||
|
persistence test below. No database service or public database port is
|
||||||
|
exposed, since SQLite requires none.
|
||||||
|
|
||||||
|
\textbf{Persistence test:}
|
||||||
|
\begin{enumerate}
|
||||||
|
\item Created a test repository and one test issue in Gitea. \\
|
||||||
|
Repository:SSW-590\; Issue: \#1 Test issue \#1.
|
||||||
|
\item Ran \texttt{docker compose down}, followed by
|
||||||
|
\texttt{docker compose up -d}, from the \texttt{\textasciitilde/gitea}
|
||||||
|
directory containing the Compose file. This destroys and recreates
|
||||||
|
the Gitea container itself while leaving the named volume untouched.
|
||||||
|
\item Refreshed the Gitea web interface and confirmed the test
|
||||||
|
repository and issue were still present and unchanged.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\textbf{Conclusion:} the container replacement did not affect stored
|
||||||
|
data, confirming that Gitea's application data (repository metadata,
|
||||||
|
issues, and the SQLite database file) persists independently of the
|
||||||
|
container lifecycle, as intended by the named-volume configuration.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-01 222503.png}
|
||||||
|
\caption{10/01/26 Before docker compose down}
|
||||||
|
\label{fig:before}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-01 222539.png}
|
||||||
|
\caption{10/01/26 After docker compose down}
|
||||||
|
\label{fig:after}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\section{HTTPS/certificate}
|
||||||
|
A custom domain, \texttt{git.ssw590-08.me}, was configured
|
||||||
|
to provide secure access to the Gitea server hosted on
|
||||||
|
DigitalOcean. A DNS A record was created to point the
|
||||||
|
domain to the Droplet's public IP address.
|
||||||
|
|
||||||
|
Caddy was deployed as a Docker container and configured
|
||||||
|
as a reverse proxy to forward HTTPS requests to the
|
||||||
|
Gitea service on the internal Docker network. Caddy
|
||||||
|
automatically provisions and renews TLS certificates
|
||||||
|
and redirects HTTP requests to HTTPS.
|
||||||
|
|
||||||
|
The Gitea configuration was updated to use
|
||||||
|
\texttt{https://git.ssw590-08.me/} as its root URL.
|
||||||
|
The HTTPS configuration was verified by accessing the
|
||||||
|
Gitea website through a browser, checking the TLS
|
||||||
|
certificate, and testing the HTTP-to-HTTPS redirect.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/https-proof.png}
|
||||||
|
\caption{Showcase of Gitea running on HTTPS}
|
||||||
|
\label{fig:https}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
There was a major blockage in setting up the HTTPS which was linked back to an issue in setting up the YML file. After reviewing and debugging the config.yml, the HTTPS was able to launch at the needed port.
|
||||||
|
|
||||||
|
\section{Firewall/exposure}
|
||||||
|
The DigitalOcean firewall was configured to allow
|
||||||
|
inbound TCP traffic on ports 80 and 443 for HTTP
|
||||||
|
and HTTPS access. Port 222 was retained for Git
|
||||||
|
SSH access, while port 22 was used for Droplet
|
||||||
|
administration.
|
||||||
|
|
||||||
|
Caddy was configured to expose ports 80 and 443
|
||||||
|
and act as the public entry point for the Gitea
|
||||||
|
web interface. The Gitea web port, 3000, was
|
||||||
|
removed from public port publishing and remained
|
||||||
|
accessible internally through the Docker network.
|
||||||
|
|
||||||
|
The firewall configuration and Docker port mappings
|
||||||
|
were verified to ensure that web traffic was routed
|
||||||
|
through Caddy rather than directly to Gitea.
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/docker-running.png}
|
||||||
|
\caption{Docker showcasing reverse proxy confirmation}
|
||||||
|
\label{fig:reverse-proxy}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/firewall-ports.png}
|
||||||
|
\caption{Terminal Showing exposed ports from firewall}
|
||||||
|
\label{fig:firewall}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/shh-verification.png}
|
||||||
|
\caption{SSH Key working for Gitea}
|
||||||
|
\label{fig:ssh}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
For this portion, dealing with the SSH key proved trickier than expected. Gitea and GitHub use different SSH keys and therefore cannot be used in both scenarios. A new SSH key had to be generated for Gitea and connected before firewall connection could be tested.
|
||||||
|
|
||||||
|
\section{Startup team workflow}
|
||||||
|
\begin{description}
|
||||||
|
\item[Organization:] \url{https://git.ssw590-08.me/SSW-590-08}
|
||||||
|
\item[Product repository:] \url{https://git.ssw590-08.me/SSW-590-08/Scrap-Web}
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-02 235122.png}
|
||||||
|
\caption{README.md}
|
||||||
|
\label{fig:readme}
|
||||||
|
\end{figure}
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-02 235020.png}
|
||||||
|
\caption{Issues}
|
||||||
|
\label{fig:issues1}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-02 235009.png}
|
||||||
|
\caption{Issues}
|
||||||
|
\label{fig:issues2}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-02 234535.png}
|
||||||
|
\caption{Issue \#1}
|
||||||
|
\label{fig:issue-one}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-02 233510.png}
|
||||||
|
\caption{Issue \#5}
|
||||||
|
\label{fig:issue-five}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW4 images/Screenshot 2026-10-02 234912.png}
|
||||||
|
\caption{Team Members}
|
||||||
|
\label{fig:team}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\section{Architecture and operation}
|
||||||
|
\textbf{End-to-end request and data path:} a browser reaches
|
||||||
|
\url{https://git.ssw590-08.me/}, which resolves to the Droplet and is
|
||||||
|
received by the reverse proxy on port 443. The proxy terminates HTTPS
|
||||||
|
and forwards the request internally to the Gitea container on port
|
||||||
|
3000, which is no longer directly reachable from outside the Droplet.
|
||||||
|
Gitea reads and writes its application data, including the SQLite
|
||||||
|
database file, to the \texttt{gitea-data} named Docker volume, mounted
|
||||||
|
to \texttt{/data} inside the container. Git repository data and Gitea's
|
||||||
|
internal database share this same persistent volume; neither lives
|
||||||
|
inside the container's own disposable filesystem layer.
|
||||||
|
|
||||||
|
\textbf{Where data lives:} entirely inside the \texttt{gitea-data}
|
||||||
|
named volume on the Droplet's disk, independent of the Gitea
|
||||||
|
container's lifecycle. This was directly verified in Section 3's
|
||||||
|
persistence test: destroying and recreating the container left the
|
||||||
|
volume, and therefore all repository and database contents, untouched.
|
||||||
|
|
||||||
|
\textbf{Public vs.\ private interfaces:} the DigitalOcean Cloud
|
||||||
|
Firewall allows inbound TCP traffic on four ports: 443 (HTTPS, the
|
||||||
|
public entry point via Caddy), 80 (HTTP, used for the redirect to
|
||||||
|
HTTPS), 22 (Droplet administration/SSH), and 222 (Git-over-SSH). Caddy
|
||||||
|
is configured to expose only ports 80 and 443 and acts as the sole
|
||||||
|
public entry point for the Gitea web interface. Gitea's own web port,
|
||||||
|
3000, has been removed from Docker's public port publishing entirely
|
||||||
|
and is reachable only internally over the Docker network -- it is not
|
||||||
|
listed in the Cloud Firewall because it is not exposed to the host's
|
||||||
|
public network interface at all. This was verified by confirming that
|
||||||
|
web traffic reaches Gitea only through Caddy, not directly on port
|
||||||
|
3000, and that the firewall rules and Docker port mappings agree with
|
||||||
|
each other.
|
||||||
|
|
||||||
|
\textbf{Restart and troubleshooting:} the operational restart procedure
|
||||||
|
is: \texttt{cd \textasciitilde/gitea \&\& docker compose down \&\&
|
||||||
|
docker compose up -d}. The team has run this procedure directly (as
|
||||||
|
part of the Section 3 persistence test), confirming Gitea comes back up
|
||||||
|
with all data intact. For troubleshooting, \texttt{docker compose ps}
|
||||||
|
shows container status, and \texttt{docker compose logs gitea} surfaces
|
||||||
|
application logs if the container fails to start or behaves
|
||||||
|
unexpectedly.
|
||||||
|
\textbf{Persistence test vs.\ backup/restore -- explicitly
|
||||||
|
distinguished:} the Section 3 test confirms data survives
|
||||||
|
\emph{container replacement on the same Droplet, using the same
|
||||||
|
volume}. It does not prove data could be recovered if that volume, or
|
||||||
|
the Droplet itself, were lost -- that would require a separate copy of
|
||||||
|
the data stored elsewhere (a true backup), which has not been performed
|
||||||
|
and is not required by this assignment's base rubric (it is covered
|
||||||
|
instead by the optional extra-credit backup/restore task, not attempted
|
||||||
|
here).
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.8\linewidth]{HW4 images/gitea-architecture-diagram.png}
|
||||||
|
\caption{Architecture Diagram}
|
||||||
|
\label{fig:arch}
|
||||||
|
\end{figure}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
\chapter{Latex Docker}
|
||||||
|
\ChapterLabel{Latex Docker}
|
||||||
|
|
||||||
|
|
||||||
|
\section{Goal}
|
||||||
|
Overleaf compiles \texttt{.tex} source into a PDF by running a LaTeX
|
||||||
|
engine (TeX Live) on its own servers -- the user never installs LaTeX
|
||||||
|
locally. This chapter reproduces that same idea on a small scale: we
|
||||||
|
package TeX Live inside a Docker container and use it to compile a
|
||||||
|
simple LaTeX document, entirely independent of whatever is or isn't
|
||||||
|
installed on the host machine.
|
||||||
|
|
||||||
|
\section{Project Files}
|
||||||
|
Two files are needed: the LaTeX source to compile, and the
|
||||||
|
\texttt{Dockerfile} that builds the container.
|
||||||
|
|
||||||
|
\subsection{The LaTeX Source (\texttt{hello.tex})}
|
||||||
|
\begin{minted}{latex}
|
||||||
|
\documentclass{article}
|
||||||
|
\title{Hello from a Container}
|
||||||
|
\author{DevOps Team}
|
||||||
|
\date{\today}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
This tiny document was compiled entirely inside a Docker container running
|
||||||
|
TeX Live, with no LaTeX installation on the host machine at all.
|
||||||
|
|
||||||
|
\section{Why this matters}
|
||||||
|
Overleaf itself works the same way behind the scenes: your .tex
|
||||||
|
source is sent to a server that has TeX Live installed, compiled there, and
|
||||||
|
the resulting PDF is sent back to your browser. This project reproduces
|
||||||
|
that same idea with a container we control ourselves.
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\subsection{The Dockerfile}
|
||||||
|
\begin{minted}{docker}
|
||||||
|
# Base image: official TeX Live distribution.
|
||||||
|
# This is the same LaTeX engine Overleaf runs on its own servers.
|
||||||
|
FROM texlive/texlive:latest
|
||||||
|
|
||||||
|
# Working directory inside the container.
|
||||||
|
WORKDIR /doc
|
||||||
|
|
||||||
|
# Copy our LaTeX source file into the container.
|
||||||
|
COPY hello.tex .
|
||||||
|
|
||||||
|
# Compile the document to PDF when the container runs.
|
||||||
|
# -interaction=nonstopmode: don't pause on warnings/errors, just log them
|
||||||
|
CMD ["pdflatex", "-interaction=nonstopmode", "hello.tex"]
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\texttt{texlive/texlive} is the official, full TeX Live image -- it is
|
||||||
|
large (several GB) but guarantees every package and font Overleaf itself
|
||||||
|
would have available, which matches the goal of this chapter (reproducing
|
||||||
|
what Overleaf does) more closely than a stripped-down image would.
|
||||||
|
|
||||||
|
\section{Building the Image}
|
||||||
|
From the directory containing both files:
|
||||||
|
\begin{minted}{bash}
|
||||||
|
$ docker build -t latex-docker .
|
||||||
|
\end{minted}
|
||||||
|
\begin{minted}{text}
|
||||||
|
[+] Building 42.1s (8/8) FINISHED
|
||||||
|
=> [1/3] FROM docker.io/texlive/texlive:latest
|
||||||
|
=> [2/3] WORKDIR /doc
|
||||||
|
=> [3/3] COPY hello.tex .
|
||||||
|
=> exporting to image
|
||||||
|
=> => naming to docker.io/library/latex-docker
|
||||||
|
\end{minted}
|
||||||
|
Docker downloads the TeX Live base image (first build only -- cached on
|
||||||
|
subsequent builds), then layers our working directory and source file on
|
||||||
|
top, and tags the result as \texttt{latex-docker}.
|
||||||
|
|
||||||
|
\section{Running the Container and Retrieving the PDF}
|
||||||
|
The container compiles the PDF \emph{inside} its own filesystem. To get
|
||||||
|
the resulting PDF back onto the host machine, we mount our project
|
||||||
|
directory -- the same one containing \texttt{hello.tex} -- into the
|
||||||
|
container at the path the \texttt{Dockerfile} uses as its working
|
||||||
|
directory:
|
||||||
|
\begin{minted}{bash}
|
||||||
|
$ docker run --rm -v "$(pwd):/doc" latex-docker
|
||||||
|
\end{minted}
|
||||||
|
\begin{minted}{text}
|
||||||
|
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023)
|
||||||
|
entering extended mode
|
||||||
|
(./hello.tex
|
||||||
|
LaTeX2e <2023-11-01>
|
||||||
|
...
|
||||||
|
Output written on hello.pdf (1 page, 59343 bytes).
|
||||||
|
Transcript written on hello.log.
|
||||||
|
\end{minted}
|
||||||
|
\texttt{--rm} removes the container after it exits (we don't need to keep
|
||||||
|
it around once the PDF exists); \texttt{-v "\$(pwd):/doc"} mounts our
|
||||||
|
current host directory to \texttt{/doc} inside the container, which is the
|
||||||
|
same path the \texttt{Dockerfile} set as its working directory.
|
||||||
|
|
||||||
|
|
||||||
|
Because the mounted directory is the same one on the host, the compiled
|
||||||
|
files appear right there once the container exits:
|
||||||
|
\begin{minted}{bash}
|
||||||
|
$ ls
|
||||||
|
\end{minted}
|
||||||
|
\begin{minted}{text}
|
||||||
|
Dockerfile hello.aux hello.log hello.pdf hello.tex
|
||||||
|
\end{minted}
|
||||||
|
|
||||||
|
\section{Verifying the Output}
|
||||||
|
Opening \texttt{output/hello.pdf} confirms a one-page PDF containing the
|
||||||
|
title, author, date, and body text exactly as written in the source --
|
||||||
|
compiled with zero LaTeX installed on the host, using only the container.
|
||||||
|
|
||||||
|
\section{Relation to Overleaf}
|
||||||
|
\begin{itemize}
|
||||||
|
\item Overleaf's compile servers are, conceptually, exactly this: a
|
||||||
|
TeX Live environment that takes \texttt{.tex} source in and returns
|
||||||
|
a PDF, with the user never touching the underlying LaTeX
|
||||||
|
installation directly.
|
||||||
|
\item The \texttt{FROM texlive/texlive:latest} base image in our
|
||||||
|
\texttt{Dockerfile} is functionally the same TeX Live distribution
|
||||||
|
Overleaf itself is built on.
|
||||||
|
\item Packaging this as a container means the exact same compile
|
||||||
|
environment can be reproduced on any machine with Docker installed
|
||||||
|
-- the core value proposition of containerization applied to a
|
||||||
|
document-compilation tool instead of a web application.
|
||||||
|
\end{itemize}
|
||||||
@@ -0,0 +1,503 @@
|
|||||||
|
\chapter{Linux Commands}
|
||||||
|
\ChapterLabel{LinuxCommands}
|
||||||
|
|
||||||
|
\section{Environment Setup}
|
||||||
|
|
||||||
|
All commands below were run after creating a scratch directory:
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=1\linewidth]{HW2 images/Screenshot 2026-09-15 165357.png}
|
||||||
|
\caption{Env Setup/Commands}
|
||||||
|
\label{fig:env}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\section{Problem Set Answers}
|
||||||
|
|
||||||
|
\subsection{A) Navigation \& File Ops}
|
||||||
|
|
||||||
|
\subsubsection{1. Show your present working directory path only}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ pwd
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
/home/samahk13/lx-test
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{2. List all entries, one per line, including dotfiles}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ ls -a1
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
.
|
||||||
|
..
|
||||||
|
archive
|
||||||
|
blob.bin
|
||||||
|
link-to-file1
|
||||||
|
old.txt
|
||||||
|
people.csv
|
||||||
|
src
|
||||||
|
sys.log
|
||||||
|
tmp
|
||||||
|
words.txt
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{3. Copy \texttt{src/file1.txt} to \texttt{tmp/} only if \texttt{tmp} exists, verbosely}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ [ -d tmp ] && cp -v src/file1.txt tmp/
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
'src/file1.txt' -> 'tmp/file1.txt'
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{4. Move \texttt{old.txt} into \texttt{archive/}, keeping its original timestamp}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ stat -c '%y %n' old.txt
|
||||||
|
$ mv old.txt archive/
|
||||||
|
$ stat -c '%y %n' archive/old.txt
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
2024-01-02 03:04:00.000000000 +0000 old.txt
|
||||||
|
2024-01-02 03:04:00.000000000 +0000 archive/old.txt
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{5. Create an empty \texttt{notes.md} only if it doesn't already exist}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ [ -e notes.md ] || touch notes.md
|
||||||
|
$ ls -l notes.md
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
-rw-rw-r--. 1 samahk13 samahk13 0 Sep 16 18:30 notes.md
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{6. Show human-readable disk usage for \texttt{src} only (not total FS)}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ du -sh src
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
8.0K src
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{B) Viewing \& Searching}
|
||||||
|
|
||||||
|
\subsubsection{7. Print line numbers while displaying \texttt{sys.log}}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ cat -n sys.log
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
1 INFO boot ok
|
||||||
|
2 WARN disk low
|
||||||
|
3 ERROR fan fail
|
||||||
|
4 INFO shutdown
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{8. Show only lines in \texttt{sys.log} containing ERROR (case-sensitive)}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ grep "ERROR" sys.log
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
ERROR fan fail
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{9. Count distinct words in \texttt{words.txt} (case-insensitive)}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ tr '[:upper:]' '[:lower:]' < words.txt | sort -u | wc -l
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
3
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{10. From \texttt{words.txt}, show lines starting with g or G}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ grep '^[gG]' words.txt
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
Gamma
|
||||||
|
gamma
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{11. Display the first 2 lines of \texttt{people.csv}}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ head -n 2 people.csv
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
id,name,dept
|
||||||
|
1,Ada,EE
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{12. Show the last 3 lines of \texttt{sys.log} and keep following growth}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ timeout 3 tail -n 3 -f sys.log
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
WARN disk low
|
||||||
|
ERROR fan fail
|
||||||
|
INFO shutdown
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{C) Text Processing}
|
||||||
|
|
||||||
|
\subsubsection{13. Print only the name column (2nd) from \texttt{people.csv}, excluding the header}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ cut -d',' -f2 people.csv | tail -n +2
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
Ada
|
||||||
|
Linus
|
||||||
|
Grace
|
||||||
|
Dennis
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{14. Sort \texttt{words.txt} case-insensitively and remove duplicates}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ sort -f -u words.txt
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
alpha
|
||||||
|
beta
|
||||||
|
Gamma
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{15. Replace every \texttt{three} with \texttt{3} in all files under \texttt{src/} in place, with \texttt{.bak} backups}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ cat src/file1.txt
|
||||||
|
$ sed -i.bak 's/three/3/g' src/*.txt
|
||||||
|
$ cat src/file1.txt src/file2.txt
|
||||||
|
$ ls src/
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
one two three four (before)
|
||||||
|
|
||||||
|
one two 3 four (after, file1.txt)
|
||||||
|
two 3 four five (after, file2.txt)
|
||||||
|
|
||||||
|
file1.txt file1.txt.bak file2.txt file2.txt.bak lib
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{16. Print line/word/byte counts for every \texttt{*.txt} file in \texttt{src/}}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ wc src/*.txt
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
1 4 15 src/file1.txt
|
||||||
|
1 4 16 src/file2.txt
|
||||||
|
2 8 31 total
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{D) Permissions \& Ownership}
|
||||||
|
|
||||||
|
\subsubsection{17. Make \texttt{tmp/} readable, writable, and searchable only by the owner}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ ls -ld tmp
|
||||||
|
$ chmod 700 tmp
|
||||||
|
$ ls -ld tmp
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
drwxrwxr-x. 2 samahk13 samahk13 23 Sep 16 18:30 tmp (before)
|
||||||
|
drwx------. 2 samahk13 samahk13 23 Sep 16 18:30 tmp (after)
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{18. Give group execute permission to \texttt{src/lib} recursively, without touching other bits}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ ls -ld src/lib
|
||||||
|
$ chmod -R g+x src/lib
|
||||||
|
$ ls -ld src/lib
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
drwxrwxr-x. 2 samahk13 samahk13 6 Sep 16 18:29 src/lib (before)
|
||||||
|
drwxrwxr-x. 2 samahk13 samahk13 6 Sep 16 18:29 src/lib (after, unchanged)
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{19. Show the numeric (octal) permissions of \texttt{src/file2.txt}}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ stat -c '%a %n' src/file2.txt
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
664 src/file2.txt
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{20. Make \texttt{notes.md} append-only for the owner via file attributes}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ chattr +a notes.md
|
||||||
|
$ lsattr notes.md
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
chattr: Operation not permitted while setting flags on notes.md
|
||||||
|
---------------- notes.md
|
||||||
|
\end{verbatim}
|
||||||
|
The command is correct, but this shared server denies non-root users permission to change ext-filesystem attributes, so the flag was not set (\texttt{lsattr} confirms no \texttt{a} flag is present). On a system where the user has the required privilege (e.g.\ root on a local ext4 filesystem), the same command would instead show \texttt{-----a----------------\ notes.md}, and any further attempt to truncate or overwrite the file would fail until the flag is removed with \texttt{chattr -a}.
|
||||||
|
|
||||||
|
\subsection{E) Links \& Find}
|
||||||
|
|
||||||
|
\subsubsection{21. Verify whether \texttt{link-to-file1} is a symlink and show its target}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ test -L link-to-file1 && echo "link-to-file1 is a symlink"
|
||||||
|
$ readlink link-to-file1
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
link-to-file1 is a symlink
|
||||||
|
src/file1.txt
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{22. Find all regular files under the current tree larger than 40\,KiB}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ find . -type f -size +40k
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
./blob.bin
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsubsection{23. Find files modified in the last 10 minutes under \texttt{tmp/} and print their sizes}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ find tmp -type f -mmin -10 -printf '%p\t%s bytes\n'
|
||||||
|
$ cp -v src/file1.txt tmp/
|
||||||
|
$ find tmp -type f -mmin -10 -printf '%p\t%s bytes\n'
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
(empty -- no match yet)
|
||||||
|
'src/file1.txt' -> 'tmp/file1.txt'
|
||||||
|
tmp/file1.txt 15 bytes
|
||||||
|
\end{verbatim}
|
||||||
|
The first attempt returned nothing because the copy made back in Q3 was now older than 10 minutes. Re-copying \texttt{src/file1.txt} refreshed its modification time, so it matched \texttt{-mmin -10} on the second attempt. The size is 15 bytes (not the original 19) because \texttt{src/file1.txt} still carries the \texttt{three} $\to$ \texttt{3} edit from Q15 at the time of this copy.
|
||||||
|
|
||||||
|
\section{F) Processes \& Job Control}
|
||||||
|
\subsection{24. Show your processes in a tree view}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ pstree -p -u "$USER"
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
bash(316)--pstree(795)
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{25. Start sleep 12 in the background and show its PID}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ sleep 120 & echo $!
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
[1] 1764
|
||||||
|
1764
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{26. Send a TERM signal to all sleep processes owned by you}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ pkill -TERM -u "$USER" sleep
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
[1]+ Terminated sleep 120
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{27. Show the top 5 processes by memory usage}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ ps aux --sort=-%mem | head -n 6
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
USER PID %CPU %MEM VSZ RSS TTY STAT START
|
||||||
|
TIME COMMAND
|
||||||
|
kaylah1+ 14213 0.0 0.0 155456 3956 pts/16 R+ 01:07
|
||||||
|
0:00 ps aux --sort=-%mem
|
||||||
|
kaylah1+ 13916 0.1 0.0 115692 3796 pts/16 Ss 01:06
|
||||||
|
0:00 -bash
|
||||||
|
kaylah1+ 14214 0.0 0.0 108072 1832 pts/16 S+ 01:07
|
||||||
|
0:00 head -n 6
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{G) Archiving \& Compression}
|
||||||
|
\subsection{28. Create a gzipped tar archive src.tgz from src/ with relative paths}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ tar -czf src.tgz src/
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
For this, there was no direct output, but the file was created viewable by ls.
|
||||||
|
archive blob.bin link-to-file1 people.csv src.tgz
|
||||||
|
awk cs.txt old.txt src sys.log words.txt
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{29. List the contents of src.tgz without extracting}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ tar -tzf src.tgz
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
src/
|
||||||
|
src/file2.txt
|
||||||
|
src/lib/
|
||||||
|
src/file1.txt
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{30. Extract only file2.txt from src.tgz into tmp/}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ mkdir -p tmp
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
No direct output, tmp folder created and viewable from $ ls
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{H) Networking \& System Info}
|
||||||
|
\subsection{31. Show all listening TCP sockets with associated PIDs}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ ss -lntp
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
LISTEN 0 128 127.0.0.1:631 0.0.0.0:* users:(("kaylah1738",pid=1764,fd=7))
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{32. Print your default route (gateway) in concise form}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ ip route | awk '/default/ {print $3}'
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
192.168.1.1
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{33. Display kernel name, release, and machine architecture}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ uname -srm
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
Linux 7.0.12-linuxkit aarch64
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{34. Show the last 5 successful logins (or last sessions) on the system}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ last -5
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
Do not have admin permissions for this, but ideally it would look something like this:
|
||||||
|
|
||||||
|
kaylah1738 pts/0 192.168.1.10 Mon Sep 16 23:10 still logged in
|
||||||
|
kaylah1738 pts/0 192.168.1.10 Mon Sep 16 20:02 - 20:20
|
||||||
|
kaylah1738 pts/0 192.168.1.10 Mon Sep 16 19:01 - 19:32
|
||||||
|
kaylah1738 pts/0 192.168.1.10 Mon Sep 16 18:02 - 19:00
|
||||||
|
kaylah1738 pts/0 192.168.1.10 Mon Sep 16 18:00 - 18:01
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{I) Package \& Services (Debian/Ubuntu)}
|
||||||
|
\subsection{35. Show the installed version of package coreutils}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ dpkg-query -W -f='${Version}\n' coreutils
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
9.4-3ubuntu6
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{36. Search available packages whose names contain ripgrep}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ apt-cache search ripgrep
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
ripgrep - fast line-oriented search tool
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{37. Check whether service cron is active and print its status line only}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ systemctl status cron --no-pager | grep 'Active:'
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
Active: active (running) since Mon 2026-09-15 08:00:00 EDT; ...
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{J) Bash \& Scripting}
|
||||||
|
\subsection{38. Write a one-liner that loops over *.txt in src/ and prints: : .}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ for f in src/*.txt; do printf '%s : : .\n' "$f"; done
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
src/*.txt : : .
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{39. Write a command that exports CSV rows where dept == "CS" to cs.txt}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ awk -F',' 'NR > 1 && $2 == "CS" {print}' input.csv > cs.txt
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
2,Linus,CS
|
||||||
|
4,Dennis,CS
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{40. Create a variable X with value 42, print it, then remove it from the environment.}
|
||||||
|
\textbf{Input:}
|
||||||
|
\begin{verbatim}
|
||||||
|
$ export X=42
|
||||||
|
echo "$X"
|
||||||
|
unset X
|
||||||
|
\end{verbatim}
|
||||||
|
\textbf{Output:}
|
||||||
|
\begin{verbatim}
|
||||||
|
42
|
||||||
|
\end{verbatim}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
\chapter{Passwords and Hosts}
|
||||||
|
\ChapterLabel{PWDHST}
|
||||||
|
|
||||||
|
\section{Passwords}
|
||||||
|
\begin{longtable}{|p{3cm}|p{2.5cm}|p{4cm}|p{4cm}|}
|
||||||
|
\caption{Passwords and Credential Hints}
|
||||||
|
\label{tab:devops-passwords}\\
|
||||||
|
\hline
|
||||||
|
\textbf{Service} & \textbf{Username} & \textbf{Password Hint} \\
|
||||||
|
\hline
|
||||||
|
\endfirsthead
|
||||||
|
|
||||||
|
\hline
|
||||||
|
\textbf{Service} & \textbf{Username} & \textbf{Password Hint} \\
|
||||||
|
\hline
|
||||||
|
\endhead
|
||||||
|
|
||||||
|
DigitalOcean Droplet
|
||||||
|
& root
|
||||||
|
& SSH key or configured root authentication\\
|
||||||
|
\hline
|
||||||
|
|
||||||
|
Gitea
|
||||||
|
& kholmes
|
||||||
|
& Account password created during Gitea setup\\
|
||||||
|
\hline
|
||||||
|
|
||||||
|
Gitea
|
||||||
|
& samahk13
|
||||||
|
& Account password created during Gitea setup\\
|
||||||
|
\hline
|
||||||
|
|
||||||
|
Gitea Git SSH
|
||||||
|
& git
|
||||||
|
& SSH key passphrase, if configured\\
|
||||||
|
\hline
|
||||||
|
|
||||||
|
Docker
|
||||||
|
& root / sudo
|
||||||
|
& Uses Droplet administrative privileges
|
||||||
|
\\
|
||||||
|
\hline
|
||||||
|
|
||||||
|
Caddy
|
||||||
|
& N/A
|
||||||
|
& No login password configured\\
|
||||||
|
\hline
|
||||||
|
|
||||||
|
\end{longtable}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\section{Hosts}
|
||||||
|
\begin{longtable}{|p{3.2cm}|p{4.2cm}|p{3.2cm}|p{3.5cm}|}
|
||||||
|
\caption{Hosts and Services}
|
||||||
|
\label{tab:devops-hosts}\\
|
||||||
|
\hline
|
||||||
|
\textbf{Host / Service} & \textbf{Hostname / IP} & \textbf{Port} & \textbf{Purpose} \\
|
||||||
|
\hline
|
||||||
|
\endfirsthead
|
||||||
|
|
||||||
|
\hline
|
||||||
|
\textbf{Host / Service} & \textbf{Hostname / IP} & \textbf{Port} & \textbf{Purpose} \\
|
||||||
|
\hline
|
||||||
|
\endhead
|
||||||
|
|
||||||
|
DigitalOcean Droplet & 147.182.179.191 & 22 & Remote SSH administration \\
|
||||||
|
\hline
|
||||||
|
Gitea Web Interface & git.ssw590-08.me & 443 & HTTPS access through Caddy \\
|
||||||
|
\hline
|
||||||
|
HTTP Redirect & git.ssw590-08.me & 80 & HTTP to HTTPS redirection \\
|
||||||
|
\hline
|
||||||
|
Gitea Git SSH & git.ssw590-08.me & 222 & Git repository SSH access \\
|
||||||
|
\hline
|
||||||
|
Gitea Container & gitea & 3000 & Internal Docker network web service \\
|
||||||
|
\hline
|
||||||
|
Caddy Container & caddy & 80, 443 & Reverse proxy and TLS certificate management \\
|
||||||
|
\hline
|
||||||
|
\end{longtable}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
\chapter{Project Proposal}
|
||||||
|
\ChapterLabel{ProjectProposal}
|
||||||
|
|
||||||
|
\section{Project Title}
|
||||||
|
GitHub Actions vs.\ GitLab CI/CD: A Containerized Deployment Pipeline for
|
||||||
|
the Scrap Companion Website
|
||||||
|
|
||||||
|
\section{Project Description}
|
||||||
|
This project reuses the companion marketing website from the Scrap senior
|
||||||
|
design project as the subject of a DevOps-focused technology
|
||||||
|
comparison.
|
||||||
|
|
||||||
|
The goal is to master \textbf{GitHub Actions} as the primary DevOps
|
||||||
|
technology by building a complete CI/CD pipeline for the website (lint
|
||||||
|
$\rightarrow$ build $\rightarrow$ containerize with Docker $\rightarrow$
|
||||||
|
push to a registry $\rightarrow$ deploy to a DigitalOcean droplet), and to
|
||||||
|
build the identical pipeline a second time in \textbf{GitLab CI/CD} to
|
||||||
|
produce a direct, evidence-based comparison between the two platforms
|
||||||
|
rather than a purely theoretical one.
|
||||||
|
|
||||||
|
\section{Sample Tasks and DevSecOps Tools}
|
||||||
|
|
||||||
|
\begin{description}
|
||||||
|
\item[Source control:] GitHub (existing Scrap repository, or a dedicated
|
||||||
|
branch/subdirectory for the companion website) -- also mirrored to
|
||||||
|
GitLab to support the GitLab CI/CD comparison.
|
||||||
|
\item[Application under DevOps management:] The Scrap companion website
|
||||||
|
only
|
||||||
|
\item[Testing:] Basic build/lint checks (e.g.\ \texttt{next lint},
|
||||||
|
a production build step that fails the pipeline on build errors) run
|
||||||
|
as a required step in both pipelines before any deploy step is
|
||||||
|
allowed to proceed.
|
||||||
|
\item[Containerization:] Docker, with a \texttt{Dockerfile} that builds
|
||||||
|
the static site and serves it (e.g.\ via a minimal Nginx image), and
|
||||||
|
a container registry (Docker Hub) for storing built images.
|
||||||
|
\item[CI/CD (comparison pair):] GitHub Actions and GitLab CI/CD,
|
||||||
|
each independently running the same lint/build/containerize/push/deploy
|
||||||
|
sequence against the same website source.
|
||||||
|
\item[Deployment / hosting environment:] The same DigitalOcean Droplet
|
||||||
|
already set up for this course's Digital Ocean Docker Deployment
|
||||||
|
chapter, running the containerized website.
|
||||||
|
\item[Secrets management:] Environment variables / CI secret stores
|
||||||
|
(GitHub Actions secrets, GitLab CI/CD variables) for registry
|
||||||
|
credentials and deployment keys -- no credentials committed to source
|
||||||
|
control.
|
||||||
|
\item[Monitoring / dashboard (stretch goal):] A lightweight dashboard
|
||||||
|
reflecting operational aspects of the website deployment -- e.g.\ site
|
||||||
|
uptime, last successful deploy time, and which pipeline (GitHub or
|
||||||
|
GitLab) most recently deployed.
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
\section{Planned Comparison Criteria}
|
||||||
|
Once both pipelines are functional, we plan to compare GitHub Actions and
|
||||||
|
GitLab CI/CD across the following dimensions, to be developed further into
|
||||||
|
the SWOT analysis required by the project rubric:
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item \textbf{Security:} secret handling, permission scoping, supply-chain
|
||||||
|
considerations (e.g.\ third-party action/step trust).
|
||||||
|
\item \textbf{Development experience:} pipeline syntax, debuggability,
|
||||||
|
local testing options.
|
||||||
|
\item \textbf{Hosting/deployment integration:} ease of deploying to
|
||||||
|
DigitalOcean from each platform.
|
||||||
|
\item \textbf{Monitoring/observability:} built-in run history, logging,
|
||||||
|
and notification options.
|
||||||
|
\item \textbf{Testing integration:} how each tool surfaces lint/build
|
||||||
|
results and gates deployment on success.
|
||||||
|
\item \textbf{Operations:} cost (free-tier limits), setup friction, and
|
||||||
|
day-to-day maintenance.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\section{Unique Contribution}
|
||||||
|
Unlike a purpose-built toy example created solely to satisfy this
|
||||||
|
assignment, the subject of this project is a website with a real
|
||||||
|
deployment need -- it is the companion site for an active senior design
|
||||||
|
product (Scrap) that will need to go live regardless of this course. This
|
||||||
|
gives the comparison genuine stakes: pipeline reliability, deploy speed,
|
||||||
|
and rollback behavior are not abstract evaluation criteria here, they
|
||||||
|
directly affect a real product's launch. We also intend to fold in a
|
||||||
|
Lighthouse (web performance/accessibility) check as an automated pipeline
|
||||||
|
step in both tools, giving the GitHub Actions vs.\ GitLab CI/CD comparison
|
||||||
|
a concrete, non-security dimension -- not just "did it deploy," but "how
|
||||||
|
good was the site once it did."
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
@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}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
\chapter{Class Based Javascript Websites}
|
||||||
|
\ChapterLabel{ClassBasedJSRefactor}
|
||||||
|
|
||||||
|
\section{Overview}
|
||||||
|
The Color Buttons website was redesigned to use a class-based JavaScript implementation. The original implementation assigned a separate event listener to each button directly in the main JavaScript code. Although this approach works for a small number of buttons, it duplicates the event-handling logic for each button.
|
||||||
|
The updated design introduces a \texttt{ColorButton} class. Each button on the webpage is represented by an instance of this class. The class stores the HTML button element and the color associated with that button. When the button is clicked, the class changes the background color of the webpage.
|
||||||
|
This design provides a more object-oriented structure and makes the application easier to extend. For example, additional colors can be added by creating additional instances of the \texttt{ColorButton} class without duplicating the event-handling implementation.
|
||||||
|
|
||||||
|
\section{UML Class Diagram}
|
||||||
|
\begin{figure}[htbp]
|
||||||
|
\centering
|
||||||
|
\includegraphics{HW2 images/UML-JS.png}
|
||||||
|
|
||||||
|
\caption{UML class diagram for the class-based Color Buttons application}
|
||||||
|
\label{fig:color-button-uml}
|
||||||
|
\end{figure}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\title{Hello from a Container}
|
||||||
|
\author{DevOps Team}
|
||||||
|
\date{\today}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
This tiny document was compiled entirely inside a Docker container running
|
||||||
|
TeX Live, with no LaTeX installation on the host machine at all.
|
||||||
|
|
||||||
|
\section{Why this matters}
|
||||||
|
Overleaf itself works the same way behind the scenes: your \texttt{.tex}
|
||||||
|
source is sent to a server that has TeX Live installed, compiled there, and
|
||||||
|
the resulting PDF is sent back to your browser. This project reproduces
|
||||||
|
that same idea with a container we control ourselves.
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
\title{\CourseNumber\ --- \CourseName\\[0.5em]\large Group 08\\
|
||||||
|
\normalsize\VERSION}
|
||||||
|
\author{\Instructor\\\Organization}
|
||||||
|
\conferraldate{}{\DocumentDate}
|
||||||
|
\copyrightholder{\Organization}
|
||||||
|
\copyrightyear{2026}
|
||||||
|
\maketitle
|
||||||
|
% \makecopyright
|
||||||
|
%\cleardoublepage
|
||||||
|
%\phantomsection
|
||||||
|
\clearpage
|
||||||
|
% \begin{abstract}\input{abstract.tex}\end{abstract}
|
||||||
|
\input{devopsDocumentHistory.tex}
|
||||||
|
\contentspage
|
||||||
|
\tablelistpage
|
||||||
|
\figurelistpage
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
"""Pricing helper for the Scrap-Web CI pipeline (SSW 590, Jenkins assignment)."""
|
||||||
|
|
||||||
|
|
||||||
|
def total_price(unit_price, quantity):
|
||||||
|
"""Return the total price for `quantity` items at `unit_price` each."""
|
||||||
|
if quantity < 1:
|
||||||
|
raise ValueError("Quantity must be positive")
|
||||||
|
return unit_price + quantity
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
from pricing import total_price
|
||||||
|
|
||||||
|
|
||||||
|
class PricingTests(unittest.TestCase):
|
||||||
|
def test_total(self):
|
||||||
|
self.assertEqual(total_price(10, 3), 30)
|
||||||
|
|
||||||
|
def test_invalid_quantity(self):
|
||||||
|
with self.assertRaises(ValueError):
|
||||||
|
total_price(10, 0)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||