\documentclass[11pt,letterpaper]{report} \usepackage[margin=1in]{geometry} \usepackage[T1]{fontenc} \usepackage{graphicx,float,booktabs,longtable,tabularx,array,xcolor,listings,makeidx,fancyhdr,caption,enumitem} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta,fit,backgrounds} \usepackage[colorlinks=true,linkcolor=blue!50!black,urlcolor=blue!60!black,citecolor=blue!50!black]{hyperref} \makeindex \setlength{\parskip}{4pt}\setlength{\parindent}{0pt} \captionsetup{font=small,labelfont=bf} \pagestyle{fancy}\fancyhf{} \fancyhead[L]{SSW 590 DevOps IT Manual}\fancyhead[R]{Version 1.3}\fancyfoot[C]{\thepage}\fancyfoot[R]{\small Stevens Institute of Technology} \lstset{basicstyle=\ttfamily\footnotesize,breaklines=true,frame=single,backgroundcolor=\color{black!4},columns=fullflexible,keepspaces=true,showstringspaces=false} \newcommand{\vok}{\textcolor{green!45!black}{\textbf{VERIFIED}}} \newcommand{\vpart}{\textcolor{orange!85!black}{\textbf{PARTIAL}}} \newcommand{\vpend}{\textcolor{red!70!black}{\textbf{PENDING}}} \newcommand{\shot}[3]{\begin{figure}[H]\centering\includegraphics[width=\linewidth]{img/#1.jpg}\caption{#2}\label{#3}\end{figure}} \newcolumntype{Y}{>{\raggedright\arraybackslash}X} \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} \newcommand{\BuildIdentifier}{Local preview (not an Actions build)} \newcommand{\BuildCommit}{Not available} \newcommand{\BuildRun}{Not available} \newcommand{\BuildAttempt}{Not available} \IfFileExists{build_metadata.tex}{\input{build_metadata.tex}}{} \begin{document} \begin{titlepage} \centering\vspace*{2cm} {\Large SSW 590 --- DevOps\par}\vspace{1cm} {\Huge\bfseries DevOps IT Manual\par}\vspace{.4cm} {\LARGE Startup Foundation with Gitea\par}\vspace{1.2cm} {\large Version 1.3\par}{\large Student Edition\par}\vspace{1.5cm} {\large Nageshwaran Manikumar and Shiv Patel\par}\vspace{.6cm} Instructor: Darian Muresan\par Stevens Institute of Technology\par\vspace{.6cm} October 9, 2026\par\vspace{1.5cm} \textbf{Gitea:} \url{https://git.nageshwaran.dev}\par \textbf{Product repository:} \url{https://git.nageshwaran.dev/SSW590-Startup/startup-product}\par \textbf{Build identifier:} \BuildIdentifier\par \textbf{Triggering commit:} \texttt{\BuildCommit}\par \textbf{Workflow run:} \BuildRun\ (attempt \BuildAttempt) \vfill \small Status legend used throughout: \vok{} = evidence in this PDF; \vpart{} = partly evidenced; \vpend{} = not yet evidenced (no claim made). \end{titlepage} \chapter*{Document History} \addcontentsline{toc}{chapter}{Document History} Newest entry first. Entries 1.0 and 1.1 are reconstructed from the timestamps on the captured evidence. \begin{center}\small \begin{tabularx}{\linewidth}{@{}p{1.9cm}p{1.1cm}p{1.5cm}Y p{2.4cm}@{}} \toprule Date / Ver. & Author & Change & Details & Changed at\\\midrule Oct 9, 2026 / 1.3 & NM, SP & Gitea Actions automation & Added external Mac runner, pinned TeX Live/Node image, build metadata, PDF artifact, two successful source changes and failure/repair evidence. \textbf{Hosts and Passwords tables updated} with runner and secret-handling information. & Ch.~1, Ch.~3 \\\addlinespace Oct 2, 2026 / 1.2 & NM, SP & Gitea chapter completed & Added all eight Gitea subsections; SSH restricted to one approved source IP in the Cloud Firewall; organization, repository, five issues and two reviewed/merged pull requests documented. \textbf{Hosts table and Passwords table updated} (firewall rule, Gitea accounts, 2FA status). & Ch.~1, Ch.~2 \\\addlinespace Sep 30, 2026 / 1.1 & NM & Gitea first deployment & Gitea 1.27.3-rootless and Caddy 2.10.2 deployed with Docker Compose; hostname \texttt{git.nageshwaran.dev}; Let's Encrypt certificate; persistence test. \textbf{Hosts table updated.} & Ch.~1, \S\ref{sec:deploy}--\ref{sec:https} \\\addlinespace Sep 24, 2026 / 1.0 & NM & Initial setup & DigitalOcean Droplet provisioned (Ubuntu 24.04, Docker 29.1.3). \textbf{Hosts table and Passwords table created.} & Ch.~1 \\ \bottomrule\end{tabularx}\end{center} \tableofcontents %========================================================== \chapter{Operational Registers} \section{Hosts Table}\index{Hosts table} \begin{center}\scriptsize \begin{tabularx}{\linewidth}{@{}L{2.7cm}L{1.7cm}L{2.5cm}Y L{0.9cm}L{2.1cm}L{1.5cm}@{}} \toprule Hostname & Role / env. & Provider / address & Exposed ports & Owner & HTTPS URL & Backup / monitoring\\\midrule \texttt{git.\allowbreak nageshwaran.dev} & Gitea work hub, production (class) & DigitalOcean NYC1; A record $\rightarrow$ 143.244.173.110 & 443/tcp public; 80/tcp public (redirect + ACME HTTP-01 only) & NM & \url{https://git.nageshwaran.dev} & None (no backup); no monitoring\\\addlinespace \texttt{ubuntu-s-1vcpu-\allowbreak512mb-\allowbreak10gb-nyc1} (Droplet) & Docker host, admin & DigitalOcean; public 143.244.173.110, private 10.10.0.5; 1 vCPU / 512 MB / 10 GB; Ubuntu 24.04.4 & 22/tcp only from 174.167.120.67/32 (Cloud Firewall \texttt{ssw590-gitea-firewall}) & NM & n/a & DO Droplet backups not enabled (not evidenced)\\\addlinespace \texttt{gitea}, \texttt{caddy} (containers) & Internal services & Docker network \texttt{gitea\_internal} & None published except Caddy 80/443; Gitea 3000 and 2222 internal only & NM & n/a & n/a\\ \addlinespace \texttt{macbook-latex-runner} & Repository-scoped Actions runner & Team Mac, Apple Silicon, Colima Docker engine & No inbound public runner port; outbound HTTPS to Gitea & NM & \url{https://git.nageshwaran.dev} & Local runner, availability depends on Mac \\ \bottomrule\end{tabularx}\end{center} \section{Passwords Table (hints only)}\index{Passwords table} No secret, recovery code, token or private key appears in this manual. Real credentials are kept outside the report and repository. \begin{center}\scriptsize \begin{tabularx}{\linewidth}{@{}L{3.0cm}L{1.0cm}Y L{2.0cm}L{2.6cm}@{}} \toprule Service / account & Owner & Non-revealing hint / location & Privilege & MFA / rotation\\\midrule Droplet SSH (\texttt{root}) & NM & Key-based login using key pair \texttt{ssw590\_digitalocean}; private key only on NM's laptop. & root & No password login evidenced; key never rotated\\ Gitea \texttt{nageshwaran\_\allowbreak manikumar} & NM & Unique password, stored in owner's password manager; not reused from other services. & Org owner, site admin & 2FA \textbf{off} (Fig.~\ref{fig:members}); not yet rotated\\ Gitea \texttt{shiv} & SP & Unique password held by SP. & Org member & 2FA \textbf{off} (Fig.~\ref{fig:members})\\ DigitalOcean account & NM & Account password in owner's password manager. & Account owner & MFA status not evidenced\\ Domain registrar account & NM & Account password in owner's password manager. & Domain owner & MFA status not evidenced\\ Let's Encrypt / Caddy ACME account & NM & No human password; account key stored in \texttt{caddy\_data} volume on the Droplet. & n/a & Managed by Caddy\\ \addlinespace Gitea runner registration & NM & Token and runner credential file stored outside repository; local \texttt{\string~/gitea-runner/.runner} has restricted permissions & Repository runner & Rotate token if exposed; never print credentials \\ \bottomrule\end{tabularx}\end{center} %========================================================== \chapter{Startup Foundation with Gitea} \section*{Verification Summary} \begin{center}\small \begin{tabularx}{\linewidth}{@{}lYl@{}} \toprule \S & Rubric item & Status\\\midrule \ref{sec:domain} & Student Pack domain and DNS & \vpart{} (DNS shown; offer, cost, expiry must be filled in)\\ \ref{sec:deploy} & Pinned Gitea deployment & \vpart{} (versions and mounts shown; repo link to deployment files pending)\\ \ref{sec:db} & Database and persistence & \vpart{} (repository survived replacement; issue/UI check not captured)\\ \ref{sec:https} & HTTPS and renewal & \vpart{} (cert, redirect, auto-renewal shown; no dry run exists for Caddy)\\ \ref{sec:fw} & Firewall and external exposure & \vpart{} (3000 blocked; SSH restriction not yet tested from a foreign IP)\\ \ref{sec:team} & Startup team workflow & \vpart{} (two PRs complete; titles of issues 3--5 to be added)\\ \ref{sec:arch} & Architecture and operation & \vok\\ \ref{sec:quality} & Manual quality and controls & \vok{} (open items listed)\\ \bottomrule\end{tabularx}\end{center} %---------------------------------------------------------- \section{Student Pack Domain and DNS}\label{sec:domain}\index{DNS}\index{domain} \subsection*{Domain offer} \begin{tabularx}{\linewidth}{@{}lY@{}} \toprule Field & Value\\\midrule Chosen hostname & \url{https://git.nageshwaran.dev} (registered domain \texttt{nageshwaran.dev}, subdomain \texttt{git})\\ Offer / registrar & \vpend{} \textit{Name the GitHub Student Developer Pack offer and registrar used~\cite{ghpack}.}\\ Eligibility proof & \vpend{} \textit{Student Pack approval date.}\\ First-year cost / renewal cost & \vpend{} \textit{Enter from the registrar order page; verify current terms, do not assume free renewal.}\\ Expiration date & \vpend{} \textit{Enter from registrar.}\\ \bottomrule\end{tabularx} \textbf{Renewal tracking.} The expiry date goes into the team calendar with a reminder 60 days before; the registrar account owner is NM (Passwords table). If the domain lapses, the hostname, the Let's Encrypt certificate and every Gitea clone URL stop working. Note that \texttt{.dev} is HSTS-preloaded: browsers refuse plain HTTP to it, so a working certificate is mandatory, not optional. \subsection*{DNS evidence} The A record points \texttt{git.nageshwaran.dev} at the Droplet. The lookup in Figure~\ref{fig:dig} returned 143.244.173.110, which equals the Droplet's public IPv4 (Fig.~\ref{fig:split}). \vok{} The lookup was run on the Droplet itself; an additional lookup from a different network (\texttt{dig +short git.nageshwaran.dev @1.1.1.1} on the laptop) is listed as an open item in \S\ref{sec:quality}. \shot{dig}{\texttt{docker compose ps} and \texttt{dig +short git.nageshwaran.dev} $\rightarrow$ 143.244.173.110 (Droplet, Sep 30, 2026).}{fig:dig} %---------------------------------------------------------- \section{Pinned Gitea Deployment}\label{sec:deploy}\index{Gitea}\index{Docker Compose} \begin{tabularx}{\linewidth}{@{}lY@{}} \toprule Item & Value (source)\\\midrule Droplet & \texttt{ubuntu-s-1vcpu-512mb-10gb-nyc1}, NYC1, Ubuntu 24.04.4 LTS, kernel 6.8.0-142, 1 vCPU / 512 MB RAM / 10 GB disk (Fig.~\ref{fig:split}); 61\% memory and 19\% swap in use, 46.3\% of 8.65 GB disk used on Oct 2, 2026\\ Docker & Docker Engine 29.1.3 (Fig.~\ref{fig:docker})\\ Gitea image & \texttt{docker.gitea.com/gitea:1.27.3-rootless}, image ID \texttt{1c17ecaead42}, 68.2 MB (official Gitea registry)\\ Proxy image & \texttt{caddy:2.10.2-alpine}, image ID \texttt{4c6e91c6ed0e}, 22.5 MB\\ Deploy directory & \texttt{/opt/gitea}: \texttt{docker-compose.yml}, \texttt{Caddyfile}, \texttt{data/}, \texttt{config/}, \texttt{caddy\_data/}, \texttt{caddy\_config/}\\ Restart policy & \texttt{unless-stopped} on both services\\ Persistent mounts & \texttt{/opt/gitea/data}$\rightarrow$\texttt{/var/lib/gitea}; \texttt{/opt/gitea/config}$\rightarrow$\texttt{/etc/gitea}; \texttt{/opt/gitea/caddy\_data}$\rightarrow$\texttt{/data}; \texttt{/opt/gitea/caddy\_config}$\rightarrow$\texttt{/config}; \texttt{/opt/gitea/Caddyfile}$\rightarrow$\texttt{/etc/caddy/Caddyfile} (read-only) (Fig.~\ref{fig:compose})\\ Network & user-defined bridge \texttt{gitea\_internal}; Caddy reaches Gitea as \texttt{gitea:3000}\\ Public base URL & \texttt{GITEA\_\_server\_\_ROOT\_URL=https://git.nageshwaran.dev/}\\ \bottomrule\end{tabularx} \textbf{Compose excerpt} (reconstructed from the terminal evidence in Fig.~\ref{fig:compose}; contains no secrets, other environment keys omitted): \begin{lstlisting} services: gitea: image: docker.gitea.com/gitea:1.27.3-rootless container_name: gitea restart: unless-stopped environment: - GITEA__server__ROOT_URL=https://git.nageshwaran.dev/ volumes: - ./data:/var/lib/gitea - ./config:/etc/gitea networks: [gitea_internal] # no "ports:" -> not published caddy: image: caddy:2.10.2-alpine container_name: caddy restart: unless-stopped ports: ["80:80", "443:443"] volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - ./caddy_data:/data - ./caddy_config:/config networks: [gitea_internal] networks: gitea_internal: {driver: bridge} \end{lstlisting} \textbf{Versioned deployment files:} \vpend{} commit \texttt{docker-compose.yml} and \texttt{Caddyfile} (no secrets) to the product repository and link them here: \url{https://git.nageshwaran.dev/SSW590-Startup/startup-product}. \textbf{Repeating the installation.} (1) Create an Ubuntu 24.04 Droplet and install Docker (\texttt{apt install docker.io}; Fig.~\ref{fig:docker}). (2) Create the DNS A record. (3) Create \texttt{/opt/gitea} with the files above. (4) Run \texttt{docker compose up -d}; Caddy obtains the certificate on first request. (5) Open the site and complete Gitea's first-run page; create the admin account. (6) Apply the firewall of \S\ref{sec:fw}. Image tags are pinned, so the same versions are pulled on a rebuild~\cite{giteadocker}. \shot{docker_install}{Docker installed on the Droplet; \texttt{docker --version} = 29.1.3; Docker service active (Sep 24, 2026).}{fig:docker} \shot{compose_ss}{Compose tail, \texttt{ROOT\_URL} checks, \texttt{ss -lntp} listing only ports 80, 22, 443, \texttt{docker compose ps}, mounts and pinned image IDs (Oct 2, 2026).}{fig:compose} %---------------------------------------------------------- \section{Database and Persistence}\label{sec:db}\index{database}\index{SQLite} \textbf{Choice: SQLite} (Gitea's built-in database). \texttt{docker compose config --services} lists only \texttt{caddy} and \texttt{gitea} (Fig.~\ref{fig:compose}), so no database service exists and no database port is exposed or needed. The SQLite file lives under the Gitea data volume (\texttt{/opt/gitea/data} on the host, \texttt{/var/lib/gitea} in the container), outside the disposable container layer; the exact file path \vpend{} is to be confirmed with \texttt{docker compose exec gitea find /var/lib/gitea -name gitea.db}. No database credential exists, so there is no secret to handle. Trade-off: SQLite is adequate for a two-person team but its single-writer behaviour does not suit high concurrency~\cite{giteadb}. \subsection*{Container-replacement test (Sep 30, 2026)} Test repository: \texttt{nageshwaran\_manikumar/persistence-test.git}, 156.0K on disk. Commands (Fig.~\ref{fig:persist}), run in \texttt{/opt/gitea}: \begin{lstlisting} docker compose exec gitea sh -c 'du -sh /var/lib/gitea/git/repositories/nageshwaran_manikumar/persistence-test.git' # 156.0K docker compose stop gitea docker compose rm gitea # container removed, volumes untouched docker compose ps -a # empty: container really gone docker compose up -d # new container created docker compose exec gitea sh -c 'ls -la /var/lib/gitea/git/repositories/nageshwaran_manikumar/' \end{lstlisting} \textbf{Before:} the directory listing shows \texttt{persistence-test.git}. \textbf{After:} the new container (created ``10 seconds ago'') shows the same directory with the same 23:30 timestamp. \textbf{Conclusion:} repository data lives in the bind-mounted volume and survives replacement. \vok{} for repository data. \textbf{Gap (\vpend):} the screenshot proves the repository directory, not that a Gitea \emph{issue} (stored in the SQLite database) survived. Repeat once: create an issue in \texttt{persistence-test}, record its number, run the replace sequence above, reload the issue page, and add the before/after screenshot. This test is a persistence check, \textbf{not} a backup or restore test; no backup exists. \shot{persist}{Container replacement test; repository directory present before and after \texttt{docker compose rm} / \texttt{up -d} (Sep 30, 2026).}{fig:persist} %---------------------------------------------------------- \section{HTTPS and Certificate Renewal}\label{sec:https}\index{HTTPS}\index{Caddy}\index{Let's Encrypt} \subsection*{Options compared} \begin{tabularx}{\linewidth}{@{}lYY@{}} \toprule & Let's Encrypt (selected) & ZeroSSL\\\midrule Cost & Free & Free tier, account required\\ Protocol & ACME, automated & ACME, automated\\ Lifetime & 90 days (this cert: Sep 30 $\rightarrow$ Dec 29, 2026) & 90 days\\ Caddy support & Default issuer (module \texttt{tls.issuance.acme}) & Built-in (\texttt{tls.issuance.zerossl}, Fig.~\ref{fig:caddy}), used as fallback\\ \bottomrule\end{tabularx} \textbf{Justification.} Let's Encrypt needs no extra account, is Caddy's default, and is trusted by all browsers~\cite{le}. \textbf{Challenge:} HTTP-01 on port 80, which is why port 80 stays open; DNS-01 would allow closing 80 but needs a DNS API credential, extra secret and extra risk~\cite{lechallenge}. \textbf{TLS termination.} TLS terminates at the Caddy container. Caddy forwards plain HTTP to \texttt{gitea:3000} over the private \texttt{gitea\_internal} network; that hop never leaves the Droplet. \textbf{Proxy configuration} (\texttt{/opt/gitea/Caddyfile}, Fig.~\ref{fig:caddy}): \begin{lstlisting} git.nageshwaran.dev { reverse_proxy gitea:3000 } \end{lstlisting} \texttt{caddy validate} reported ``Valid configuration'' and noted that automatic HTTP$\rightarrow$HTTPS redirects are enabled~\cite{caddyauto,caddyproxy}. \subsection*{Evidence} \begin{tabularx}{\linewidth}{@{}p{3.3cm}Yl@{}} \toprule Check & Result (UTC) & Status\\\midrule Certificate & \texttt{subject=CN=git.nageshwaran.dev}, issuer Let's Encrypt \texttt{CN=YE2}, notBefore Sep 30 23:05:39 2026, notAfter Dec 29 23:05:38 2026 (Fig.~\ref{fig:tls1}) & \vok\\ HTTP$\rightarrow$HTTPS & \texttt{curl -i http://git.nageshwaran.dev} $\rightarrow$ \texttt{308 Permanent Redirect}, \texttt{Location: https://git.nageshwaran.dev/}, Server: Caddy, Oct 1 00:09:08 and 00:40:30 & \vok\\ HTTPS response & \texttt{curl -I https://git.nageshwaran.dev} $\rightarrow$ \texttt{HTTP/2 200}, Oct 1 00:39:11 & \vok\\ Issuance log & \texttt{certificate obtained successfully}, identifier \texttt{git.nageshwaran.dev}, issuer \texttt{acme-v02.api.letsencrypt.org} (Fig.~\ref{fig:split}) & \vok\\ Renewal automation & Caddy's built-in ACME manager renews unattended. Its log shows \texttt{got renewal info} with a CA-suggested renewal window of Nov 29 01:49 -- Nov 30 21:00 UTC 2026, selected time Nov 30 10:59 UTC, well before the Dec 29 expiry (Fig.~\ref{fig:split}) & \vok\\ Renewal dry run & \textbf{Not performed.} Caddy has no dry-run command; the renewal schedule above is the evidence. No successful renewal has happened yet (first one is due late Nov 2026). & \vpart\\ \bottomrule\end{tabularx} \textbf{Dependencies of renewal:} port 80 or 443 reachable from the internet, DNS still pointing at the Droplet, and \texttt{caddy\_data} persisted (it holds the account and certificate). Deleting that directory forces re-issuance and risks Let's Encrypt rate limits. \shot{tls1}{Redirect (308), certificate subject/issuer/dates, and HTTP/2 200 (Oct 1, 2026 UTC).}{fig:tls1} \shot{tls2}{Repeat of redirect check, then \texttt{nc} to port 3000 (timed out) and port 22 (succeeded) from the team laptop.}{fig:tls2} \shot{caddy}{Caddyfile, \texttt{caddy validate}, certificate dates, and issuer modules (\texttt{tls.issuance.acme}, \texttt{zerossl}).}{fig:caddy} \shot{split}{Left: Gitea PR page. Right: Caddy issuance and renewal-info log lines, \texttt{ss -lntp}, public IP and image list (Oct 2, 2026).}{fig:split} %---------------------------------------------------------- \section{Firewall and External Exposure}\label{sec:fw}\index{firewall} \textbf{Cloud Firewall:} \texttt{ssw590-gitea-firewall}, attached to 1 Droplet (\texttt{ubuntu-s-1vcpu-512mb-10gb-nyc1}). DigitalOcean Cloud Firewalls are stateful and drop all inbound traffic not matched by a rule~\cite{dofw}. Host \texttt{ufw} is not relied on, because Docker-published ports can bypass it~\cite{dockerfw}. \subsection*{Inbound rules} \begin{tabularx}{\linewidth}{@{}llllY@{}} \toprule Type & Port & Source (IPv4) & Source (IPv6) & Purpose\\\midrule HTTPS & 443/tcp & All & All & Gitea through Caddy\\ HTTP & 80/tcp & All & All & Redirect and ACME HTTP-01 only\\ SSH & 22/tcp & \textbf{174.167.120.67/32} & none & Admin; was ``All IPv4/All IPv6'' until Oct 2, 2026 (Fig.~\ref{fig:fwb}) and is now restricted (Fig.~\ref{fig:fwa})\\ \bottomrule\end{tabularx} Gitea backend (3000/tcp) and Git-over-SSH (2222/tcp) have \textbf{no} rule and no host mapping. PostgreSQL does not exist (SQLite). The Droplet's capture shows only an IPv4 address on \texttt{eth0}, so IPv6 is presumed disabled; the 80/443 IPv6 rules are harmless either way and SSH has no IPv6 source. Outbound: the firewall has 3 outbound rules (6 total); only the ICMP row is visible in the capture, and outbound is not blocked wholesale (package, image, DNS and ACME access still work, proven by the successful issuance). \textbf{Lockout risk:} the /32 rule breaks if the home IP changes; recovery is the DigitalOcean web console, or editing the rule in the control panel. No overlapping Cloud Firewall is attached (``1 Droplets'', single firewall shown). \subsection*{Host and Compose exposure} \texttt{ss -lntp} on the Droplet (Fig.~\ref{fig:compose}) shows listeners only on 80 and 443 (\texttt{docker-proxy}) and 22 (\texttt{sshd}), plus \texttt{containerd} on 127.0.0.1 only. \texttt{docker compose ps} shows Caddy publishing \texttt{0.0.0.0:80}, \texttt{0.0.0.0:443} (and IPv6) and Gitea with unpublished \texttt{2222/tcp, 3000/tcp}. A scan on the Droplet itself does not prove public exposure, hence the external tests below. \subsection*{External tests} Source: team laptop (macOS) on an external network, not the Droplet. \begin{center}\small \begin{tabularx}{\linewidth}{@{}p{1.9cm}p{2.5cm}p{1.9cm}YYl@{}} \toprule Target & Command & Time (UTC) & Expected & Actual & Status\\\midrule 443 & \texttt{curl -I https://git...} & Oct 1 00:39 & Reachable & HTTP/2 200 & \vok\\ 80 & \texttt{curl -I http://git...} & Oct 1 00:40 & Redirect only & 308 to HTTPS & \vok\\ 3000 (backend) & \texttt{nc -vz -G 5 143.244.173.110 3000} & Oct 1, after 00:40 & Blocked & ``Operation timed out'' & \vok\\ 22 (SSH), approved IP & \texttt{nc -vz -G 5 \ldots 22} & Oct 1, after 00:40 & Open to approved IP & Succeeded (rule was still ``All'' then) & \vpart\\ 22 (SSH), non-approved IP & same, from phone hotspot & --- & Timeout & not run & \vpend\\ 2222 (Git SSH) & \texttt{nc -vz -G 5 \ldots 2222} & --- & Timeout & not run & \vpend\\ 5432 (database) & --- & --- & n/a & SQLite, no DB port & n/a\\ \bottomrule\end{tabularx}\end{center} \textbf{Why HTTPS does not replace a firewall:} TLS only encrypts and authenticates the 443 connection. It does nothing about SSH on 22, a stray published port, or a database listener; those are only closed by network rules. The 3000 timeout in the table is the firewall working, not TLS. \begin{figure}[H]\centering \begin{tikzpicture}[font=\small,node distance=8mm, box/.style={draw,rounded corners,minimum height=9mm,align=center,fill=white}, pub/.style={box,fill=green!12},priv/.style={box,fill=red!8}] \node[box](br){Team browser}; \node[box,below=of br](adm){Admin\\174.167.120.67}; \node[box,right=22mm of br,minimum height=22mm,fill=orange!15](fw){DO Cloud Firewall\\443 any, 80 any\\22 only /32}; \node[pub,right=22mm of fw,yshift=9mm](cad){Caddy\\publishes 80, 443\\TLS ends here}; \node[priv,right=26mm of cad](git){Gitea :3000\\(not published)}; \node[priv,below=10mm of git](vol){./data volume\\SQLite + repos}; \node[box,below=of cad,fill=white](ssh){sshd :22 (host)}; \node[draw,dashed,fit=(cad)(git)(vol)(ssh),inner sep=4mm,label={[font=\scriptsize]above:Droplet 143.244.173.110}]{}; \draw[->](br)--node[above,font=\scriptsize]{443/80}(fw); \draw[->](adm)--node[below,font=\scriptsize]{22}(fw); \draw[->](fw)--(cad);\draw[->](fw)|-(ssh); \draw[->](cad)--node[above,font=\scriptsize]{gitea\_internal}(git); \draw[->](git)--(vol); \node[red!70!black,font=\scriptsize,below=8mm of vol]{3000, 2222: no rule, no mapping}; \end{tikzpicture} \caption{Network exposure. Only Caddy publishes web ports; Gitea and its SQLite data are private. Based on Figs.~\ref{fig:fwa} and~\ref{fig:compose}.}\label{fig:net} \end{figure} \shot{fw_before}{Cloud Firewall before restriction: SSH open to all IPv4/IPv6 (Oct 2, 2026, 10:03 PM local).}{fig:fwb} \shot{fw_after}{Cloud Firewall after restriction: SSH only from 174.167.120.67/32 (Oct 2, 2026, 10:26 PM local).}{fig:fwa} %---------------------------------------------------------- \section{Startup Team Workflow}\label{sec:team}\index{pull request}\index{issues} \textbf{Organization:} \texttt{SSW590-Startup}. \textbf{Repository:} \url{https://git.nageshwaran.dev/SSW590-Startup/startup-product} (1 repository in the organization). \textbf{Members} (Fig.~\ref{fig:members}): \begin{center}\begin{tabular}{@{}lll@{}}\toprule User & Role & 2FA\\\midrule \texttt{nageshwaran\_manikumar} & Owner & off\\ \texttt{shiv} & Member & off\\\bottomrule\end{tabular}\end{center} README: \vpend{} confirm \texttt{README.md} exists on \texttt{main} and add a screenshot. \subsection*{Issues} Five issues existed when PR \#6 was open (Issues counter = 5, Fig.~\ref{fig:pr6o}); the counter fell to 4 and 3 as the issues were closed by merges. \begin{center}\small\begin{tabularx}{\linewidth}{@{}lYll@{}}\toprule \# & Title / type & State & Evidence\\\midrule 1 & Product landing-page documentation (product) & Closed by PR \#6 & Figs.~\ref{fig:pr6o},~\ref{fig:pr6m}\\ 2 & Application health-check documentation (operations) & Closed by PR \#7 & Figs.~\ref{fig:pr7o},~\ref{fig:pr7m}\\ 3 & \vpend{} \textit{title, type} & Open & Issues counter = 3\\ 4 & \vpend{} \textit{title, type} & Open & ''\\ 5 & \vpend{} \textit{title, type} & Open & ''\\ \bottomrule\end{tabularx}\end{center} The three open issue titles must be added; the assignment requires five actionable issues including both product and operations work. \subsection*{Issue $\rightarrow$ branch $\rightarrow$ PR $\rightarrow$ review $\rightarrow$ merge $\rightarrow$ close} \begin{center}\small\begin{tabularx}{\linewidth}{@{}p{2.0cm}YY@{}}\toprule & Workflow 1 & Workflow 2\\\midrule Issue & \#1, product landing page & \#2, health check\\ Branch & \texttt{feature/1-product-landing-page} & \texttt{feature/2-health-check}\\ Commit & \texttt{f40173cc7a} & \texttt{7e08ef0924}\\ Change & adds \texttt{docs/product.md} (+24 lines) & adds \texttt{docs/health-check.md} (+21 lines)\\ Pull request & \#6, body ``Closes \#1'' & \#7, body ``Closes \#2''\\ Review & \texttt{shiv} (Member) comment: documentation reviewed & \texttt{shiv} comment: documentation reviewed\\ Merge & by \texttt{nageshwaran\_manikumar}, merge commit \texttt{74d1785704} into \texttt{main} & merge commit \texttt{75e3534717} into \texttt{main}\\ Closure & Issue \#1 closed (counter 5$\rightarrow$4) & Issue \#2 closed (4$\rightarrow$3)\\ \bottomrule\end{tabularx}\end{center} \textbf{Honest limits.} The authorship is split correctly (author NM, reviewer SP), but SP's reviews are plain comments, not Gitea ``Approve'' reviews, and no branch protection was enforced on \texttt{main} at this point; PR \#7 also showed ``branch is out-of-date'' and was merged anyway with a merge commit (Fig.~\ref{fig:pr7f}). Branch protection with required approval and the Jenkins status check belongs to the CI chapter. \shot{members}{Organization members: NM (Owner) and \texttt{shiv} (Member); 2FA off for both.}{fig:members} \shot{pr6open}{PR \#6 open: issue \#1, commit \texttt{f40173cc7a}, review comment from \texttt{shiv}.}{fig:pr6o} \shot{pr6merged}{PR \#6 merged into \texttt{main}, merge commit \texttt{74d1785704}.}{fig:pr6m} \shot{pr7open}{PR \#7 open: issue \#2, commit \texttt{7e08ef0924}, review comment.}{fig:pr7o} \shot{pr7form}{PR \#7 merge dialog with out-of-date warning (``Create merge commit'').}{fig:pr7f} \shot{pr7merged}{PR \#7 merged into \texttt{main}, merge commit \texttt{75e3534717}; issue counter now 3.}{fig:pr7m} %---------------------------------------------------------- \section{Architecture and Operation}\label{sec:arch}\index{architecture} \begin{figure}[H]\centering \begin{tikzpicture}[font=\small,node distance=9mm,box/.style={draw,rounded corners,align=center,minimum height=9mm,fill=white}] \node[box](b){Browser / git client}; \node[box,right=20mm of b](c){Caddy\\TLS termination}; \node[box,right=20mm of c](g){Gitea\\rootless 1.27.3}; \node[box,below=of g](d){SQLite DB\\+ repositories\\\texttt{/opt/gitea/data}}; \node[box,below=of c](cd){\texttt{caddy\_data}\\certs + ACME account}; \node[box,above=of g,fill=black!5](cf){\texttt{/opt/gitea/config}\\app.ini}; \draw[->](b)--node[above,font=\scriptsize]{HTTPS 443}(c); \draw[->](c)--node[above,font=\scriptsize]{HTTP :3000}(g); \draw[->](g)--(d);\draw[->](c)--(cd);\draw[->](g)--(cf); \end{tikzpicture} \caption{Request and data paths. Public: Caddy 443/80. Private: Gitea, SQLite file, repositories, config, certificates.}\label{fig:arch} \end{figure} \textbf{Data placement.} Issues, users, PR metadata and settings: SQLite file in \texttt{data/}. Repositories: \texttt{data/git/repositories}. Gitea settings: \texttt{config/app.ini}. Certificates and ACME account: \texttt{caddy\_data/}. \textbf{Public:} 443, 80 (redirect/ACME), 22 (one IP). \textbf{Private:} 3000, 2222, SQLite. \textbf{Operate and troubleshoot} (from \texttt{/opt/gitea}): \begin{lstlisting} docker compose ps # both services Up? docker compose logs --tail 100 caddy gitea docker compose restart gitea # app only docker compose pull && docker compose up -d # only after changing pinned tags docker exec caddy caddy validate --config /etc/caddy/Caddyfile ss -lntp | grep -E ':22|:80|:443|:3000' # expect no :3000 \end{lstlisting} Symptoms: browser certificate error $\rightarrow$ check DNS A record and Caddy log; 502 from Caddy $\rightarrow$ Gitea down or wrong service name; SSH timeout $\rightarrow$ your IP changed, use the DigitalOcean console and edit the firewall; wrong clone URLs $\rightarrow$ \texttt{ROOT\_URL} in \texttt{app.ini}. \textbf{Persistence test $\neq$ backup.} Section~\ref{sec:db} proves data survives a container being replaced. It does not protect against disk loss, deletion of \texttt{/opt/gitea}, or corruption. No backup or restore test has been done; the optional extra credit is not claimed. \textbf{Cost and cleanup.} DigitalOcean 512 MB Droplet is billed monthly (verify current price; the account shows a \$3.00 signup credit) and the domain renews yearly (see \S\ref{sec:domain}). Shutdown: export anything needed, destroy the Droplet, delete the Cloud Firewall, remove the DNS record, and let or cancel the domain renewal. %---------------------------------------------------------- \section{Manual Quality and Controls}\label{sec:quality}\index{controls} Version raised to 1.2 with dated history entries for the initial setup (1.0, 1.1) and this update (1.2), each naming the Hosts/Passwords changes (Document History, Chapter~1). Evidence is dated and captioned; secrets are absent. \subsection*{Failed attempts and corrective actions} \begin{center}\small\begin{tabularx}{\linewidth}{@{}p{3.6cm}YY@{}}\toprule Problem & Evidence & Correction\\\midrule First Gitea install used \texttt{ROOT\_URL=http://143.244.173.110:3000/} and published port 3000 & Gitea log, Sep 30 23:07 (Fig.~\ref{fig:persist} era logs) & Moved behind Caddy on \texttt{git.nageshwaran.dev}; port 3000 now unpublished and blocked (Fig.~\ref{fig:tls2})\\ \texttt{ROOT\_URL} had to be corrected to a plain HTTPS URL & Several \texttt{sed}/\texttt{grep} attempts in Fig.~\ref{fig:compose}: first against a host path that does not exist, one using \texttt{python3}, absent in the Gitea image & Final \texttt{sed} inside the container; both Compose and \texttt{app.ini} now read \texttt{https://git.nageshwaran.dev/}\\ SSH was open to the whole internet & Fig.~\ref{fig:fwb} & Restricted to one /32 (Fig.~\ref{fig:fwa}); lockout recovery documented\\ Two admin accounts without 2FA & Fig.~\ref{fig:members} & Open: enable TOTP for both accounts\\ Gitea sign-up page publicly reachable at install time & Gitea log \texttt{GET /user/sign\_up 200} & Open: set \texttt{DISABLE\_REGISTRATION=true} now that both users exist\\ \bottomrule\end{tabularx}\end{center} \subsection*{Open items before final submission} \begin{enumerate}[nosep] \item Domain offer, eligibility, first-year and renewal cost, expiry (\S\ref{sec:domain}). \item External \texttt{dig} lookup from another network (\S\ref{sec:domain}). \item Commit \texttt{docker-compose.yml} and \texttt{Caddyfile} to the product repository and link (\S\ref{sec:deploy}). \item Confirm SQLite file path; add the issue-survives-replacement test (\S\ref{sec:db}). \item Run SSH (non-approved IP) and 2222 external tests (\S\ref{sec:fw}). \item Titles/types of issues \#3--\#5; README screenshot (\S\ref{sec:team}). \item Enable 2FA; disable open registration; update Passwords table and history. \end{enumerate} %========================================================== \chapter{Automated LaTeX Manual Builds with Gitea Actions} \section{Source and Trigger} The source-of-truth repository is \url{https://git.nageshwaran.dev/SSW590-Startup/startup-product}. The manual source is maintained in \texttt{manual/}, and the workflow is \texttt{.gitea/workflows/manual-build.yml}. A push to \texttt{main} triggers the build; maintainers may also use manual dispatch. Git clients reach Gitea over HTTPS port 443 through Caddy. The runner connects outbound to Gitea, without exposing a public runner port. \section{Runner Setup} The repository-scoped runner \texttt{macbook-latex-runner} runs on a team Apple Silicon Mac using Gitea runner v5.0.0, Colima, and Docker. The job label is \texttt{latex-build}, mapped to the local \texttt{ssw590-texlive-node:1.0} container image. The Droplet is intentionally not used for TeX compilation because of its limited memory. The runner is started with \texttt{gitea-runner daemon --config ./config.yaml}; it must be online to accept queued jobs. The runner has capacity one. \section{Reproducible Compilation} The Dockerfile uses the TeX Live base image at digest \texttt{sha256:c06416ebbc69c8e90e07d1f1a6f7a3f9b334e773daa3543ce879ea533317c3a7}, with Node.js and npm installed for checkout and artifact actions. The observed versions were Node 24.18.1, npm 11.12.1 and latexmk 4.88. The TeX Live base is digest-pinned; Alpine package installation is not individually version-pinned, so complete rebuild bit-for-bit reproducibility is not claimed. The ARM64 Mac runs the AMD64 image through Docker emulation. Compilation uses: \begin{lstlisting} cd manual latexmk -pdf -interaction=nonstopmode \ -halt-on-error -file-line-error main.tex test -s main.pdf \end{lstlisting} A LaTeX error stops the job. The job copies the PDF to \texttt{manual/dist/SSW590-DevOps-IT-Manual.pdf} before artifact upload. TeX compilation takes place in a job container on the Mac, not inside the Gitea application container. \section{PDF Version Traceability} The document's human-maintained version is \textbf{1.3}. A generated, uncommitted \texttt{build\_metadata.tex} supplies the triggering Git commit, Gitea run number and attempt. The PDF title page displays the build identifier \texttt{v1.3+build..}. This compilation identifies itself as \textbf{\BuildIdentifier}. Triggering commit: \texttt{\BuildCommit}. Run: \BuildRun, attempt: \BuildAttempt. Generated metadata is not pushed, avoiding an automatic commit/build loop. \section{Downloadable Artifact} The workflow uses \texttt{actions/upload-artifact@v4} with the artifact name \texttt{SSW590-DevOps-IT-Manual}, checks that the PDF exists, and configures a 14-day retention period. The PDF must be downloaded from the final successful Gitea Actions run, not submitted from a local preview. The artifact is temporary and does not replace a backup. \section{Change, Failure, and Repair} \begin{center}\small \begin{tabularx}{\linewidth}{@{}p{2.65cm}p{1.65cm}p{2.65cm}Y@{}}\toprule Test & Commit & Run / build & Observed result\\\midrule Successful push 1 & \texttt{7be302d} & Run 3; build 3 & Passed, 21 s; PDF artifact\\ Successful push 2 & \texttt{74756c8} & Run 4; build 4 & Passed, 21 s; PDF artifact\\ Controlled TeX failure & \texttt{0b38b75} & Run 5 & Failed as intended; no PDF artifact\\ Repair push & \texttt{e3a9688} & Run 6; build 6 & Passed, 21 s; PDF artifact\\\bottomrule \end{tabularx}\end{center} \noindent\textbf{Gitea run links:} \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/actions/runs/3}{Run 3}, \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/actions/runs/4}{Run 4}, \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/actions/runs/5}{Run 5}, and \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/actions/runs/6}{Run 6}. The successful build identifiers were \texttt{v1.3+build.3.7be302d}, \texttt{v1.3+build.4.74756c8}, and \texttt{v1.3+build.6.e3a9688}. Run 5 failed with an undefined LaTeX control sequence in \texttt{chapter3.tex} (line 382, exit code 12). Run 6 corrected the source and restored the passing build. These are recorded execution results, not a proposed test plan. \section{Runner and Secret Boundary} The runner credential file remains on the Mac outside Git and has restricted permissions. The runner is repository-scoped; only trusted maintainers should modify executable workflow definitions. Runner configuration uses \texttt{container.docker\_host: "-"} so the Docker socket is not mounted into the job container; privileged containers are not required. Do not commit tokens, \texttt{.runner}, credential files, or secrets. A malicious workflow still has potential access to its runner environment, so restrict repository write access and use a dedicated runner where possible. \section{Manual Quality and Controls} The earlier Gitea deployment and screenshot evidence remain in Chapters 1--2. Chapter 3 documents the runner, compilation, version traceability, artifact and controlled failure/repair. The latest document history entry explicitly records the Hosts and Passwords table changes. Evidence links are provided above; dated screenshots of the runner page, run logs, artifact listing and final PDF cover should be added before final submission. The final submission must be the artifact from the final successful Actions run, and the title-page run identity must match that run. \appendix \chapter{Glossary} \begin{description}[nosep] \item[ACME] Protocol for automatic certificate issuance and renewal. \item[Cloud Firewall] DigitalOcean network-level stateful firewall applied to Droplets. \item[HTTP-01] ACME challenge proven over port 80. \item[Reverse proxy] Service that receives public requests and forwards them to internal services; here Caddy. \item[SQLite] Embedded single-file database used by Gitea in this deployment. \item[TLS termination] Point where encrypted HTTPS is decrypted; here the Caddy container. \end{description} \begin{thebibliography}{99}\small \bibitem{caddyauto} Caddy. Automatic HTTPS. \url{https://caddyserver.com/docs/automatic-https} \bibitem{caddyproxy} Caddy. Reverse proxy quick-start. \url{https://caddyserver.com/docs/quick-starts/reverse-proxy} \bibitem{dofw} DigitalOcean. How to configure firewall rules. \url{https://docs.digitalocean.com/products/networking/firewalls/how-to/configure-rules/} \bibitem{dockerfw} Docker. Packet filtering and firewalls. \url{https://docs.docker.com/engine/network/packet-filtering-firewalls/} \bibitem{giteadocker} Gitea. Installation with Docker. \url{https://docs.gitea.com/installation/install-with-docker/} \bibitem{giteadb} Gitea. Database preparation. \url{https://docs.gitea.com/installation/database-prep/} \bibitem{ghpack} GitHub Education. Student Developer Pack: Domain offers. \url{https://education.github.com/pack?sort=az&tag=Domains} \bibitem{lechallenge} Let's Encrypt. Challenge types. \url{https://letsencrypt.org/docs/challenge-types/} \bibitem{le} Let's Encrypt. Free TLS certificates. \url{https://letsencrypt.org/} \end{thebibliography} \chapter*{AI Assistance Record} AI (Anthropic Claude) was used on Oct 2, 2026 to organize this manual and draft text from the team's own terminal and browser screenshots. The team must verify every statement against the live system before submitting. No credentials were supplied or included. \printindex \end{document}