Files
vpn-dns-gateway/manual/latex/devopsHostsPasswords.tex
T
vsun1 ed0a862657
vpn-dns-gateway/pipeline/pr-main This commit looks good
Move CI runners to Droplet and enable application HTTPS
2026-11-15 12:49:06 -05:00

181 lines
12 KiB
TeX

\chapter{Hosts and Passwords}
\ChapterLabel{HostsPasswords}
\sloppy
\index{hosts table}
\index{passwords table}
These tables record the startup's current hosts and where each credential is
kept. The Passwords table holds \emph{hints only}: it never contains a
password, token, recovery code, or private key. Distinct services use distinct
credentials, which are stored outside this manual and outside every
repository. Both tables were created on 28 September 2026 for Assignment 4
(\ChapterRef{GiteaFoundation}). The local runner host and its identity hint
were added on October 7, 2026 for \ChapterRef{AutomatedManualBuild}. On
October 22--23, 2026 (\ChapterRef{JenkinsCI}) the droplet record was updated
for the 1\,GiB resize, the Jenkins service, and \texttt{ci.yebilly.me}; the
Color Buttons app was marked retired; and the Passwords table gained the
Jenkins administrators, the \texttt{jenkins-bot} Gitea account, and its token.
On October 28, 2026 (\ChapterRef{SREMonitoring}) the droplet record gained
the four monitoring containers, \texttt{metrics.yebilly.me}, the second swap
file, and real monitoring status; the Passwords table gained the Grafana
accounts, the monitoring secrets file, and the Discord webhook.
On November 14, 2026 (\ChapterRef{SecureDelivery}), Vincent resized the droplet
to 2\,GiB and updated host packages. The tables gained deployment access and a
trusted Jenkins agent. Later that evening the agent moved from the laptop to
The-Ocean to avoid campus SSH restrictions. Vincent then requested migrating
the original Actions runner too; both laptop daemons are now stopped, with
their protected fallback state retained. On November 15 Billy added the pricing
DNS records and Codex enabled Caddy HTTPS; certificates and redirects passed,
while the undeployed application backends return 502.
\section{Hosts}
\small
\begin{tabularx}{\linewidth}{@{}L{3.3cm}Y@{}}
\caption{Hosts\label{Table:Hosts}}\\
\toprule \textbf{Field} & \textbf{Droplet The-Ocean (git, ci, metrics .yebilly.me)}\\ \midrule
\endfirsthead
\toprule \textbf{Field} & \textbf{Droplet The-Ocean (git, ci, metrics .yebilly.me)}\\ \midrule
\endhead
\bottomrule \endlastfoot
Role & Gitea work hub (Gitea 1.27.3 behind Caddy 2.11.4 TLS proxy); since
22 Oct 2026 also the Jenkins 2.580.1 LTS controller, which runs the CI builds;
since 28 Oct 2026 also the monitoring stack (Prometheus 3.15.1, Grafana OSS
13.2.5, Node Exporter 1.12.1, Blackbox Exporter 0.29.1). The Assignment 3 Color Buttons app (29 Sep 2026) is retired: container
stopped with restart policy \texttt{no}; its Caddy route remains\\
Delivery agent & Legacy node \texttt{ssw590-vince-delivery}, label
\texttt{delivery-trusted}, one exclusive executor; image
\texttt{ssw590-delivery-agent:20261114}. RAM / RAM+swap: 512 / 768 MiB,
0.5 CPU; separate pinned BuildKit: 256 / 384 MiB, 0.5 CPU.
Private WebSocket to Jenkins and SSH through Docker host gateway with pinned
public-IP host-key alias. Docker socket control grants host administration.
Named identity/workspace and BuildKit cache volumes stay outside Git;
configuration under \path{/opt/ssw590-delivery-agent/}; restart unless stopped.
Prerequisite build 2 and bounded build/scan/smoke trial passed; campus browser
rehearsal and assessed delivery remain pending.\\
Environment & Course production (team use)\\
Provider & DigitalOcean, NYC1; Ubuntu 24.04 LTS; 1 vCPU; resized from
512\,MB to 1\,GiB in October, then to 2\,GiB on November 14, 2026
(1,967\,MiB reported, original 25\,GB plan disk retained); swap files \texttt{/swapfile} and \texttt{/swapfile2}, 1\,GiB
each (second added 28 Oct 2026); \texttt{multipathd}, \texttt{fwupd},
\texttt{udisks2}, and \texttt{ModemManager} disabled and masked\\
Public address / DNS & IPv4 \texttt{147.182.178.136}; \texttt{A} records
\texttt{git}, \texttt{ci}, \texttt{metrics}, \texttt{colors}, \texttt{staging}
and \texttt{app} \texttt{.yebilly.me}; public
IPv6 \texttt{2604:a880:400:d1:0:5:22d:6001} assigned but not published in DNS\\
Private services & Gitea \texttt{:3000} and Jenkins \texttt{:8080} (512\,MiB
RAM, 0.75 CPU cap; agent port disabled) on Docker network \texttt{gitea\_web},
no host ports; SQLite file in volume \texttt{gitea\_gitea-data}; Jenkins state
in volume \texttt{gitea\_jenkins-home}. Monitoring (Compose project
\texttt{monitoring}, no host ports): Prometheus \texttt{:9090} (128\,MiB),
Node Exporter \texttt{:9100} and Blackbox Exporter \texttt{:9115} (32\,MiB
each; Blackbox runs as \texttt{nobody}) on network \texttt{monitoring\_monitoring}; Grafana \texttt{:3000}
(192\,MiB) also on \texttt{gitea\_web}; Blackbox at \texttt{172.30.90.10} on
\texttt{gitea\_probe} (172.30.90.0/28); volumes
\texttt{monitoring\_prometheus\_data} (7\,d / 500\,MB) and
\texttt{monitoring\_grafana\_data}\\
Exposed ports & 443/TCP and 80/TCP to all; 22/TCP to approved team addresses only
(Cloud Firewall \texttt{gitea-fw}); \texttt{ci.yebilly.me} and
\texttt{metrics.yebilly.me} answer only Stevens 155.246.0.0/16 and team
addresses (Caddy allowlist; \texttt{ci} also the probe address), 403
otherwise; monitoring ports 9090, 9100, 9115 not reachable\\
Owner & BY (server administration); VS (review)\\
HTTPS URLs & \url{https://git.yebilly.me}, \url{https://ci.yebilly.me/login},
\url{https://metrics.yebilly.me/login}; \url{https://staging.yebilly.me} and
\url{https://app.yebilly.me} have trusted certificates but return 502 until
application deployment\\
Backup status & No scheduled backup job; manual Gitea SQLite and Jenkins-home
backups saved in a protected root directory before the November 14 delivery
bootstrap. Container-replacement persistence verified for
Gitea (\ChapterRef{GiteaFoundation}), restart persistence for Jenkins
(\ChapterRef{JenkinsCI}) and for Prometheus and Grafana
(\ChapterRef{SREMonitoring}); manual volume backup procedure in
\texttt{monitoring/README.md}\\
Monitoring status & Prometheus and Grafana: host CPU, memory, root disk, and
HTTPS probes of Gitea and Jenkins every 30\,s; alerts \emph{HTTPS service
down}, \emph{Root disk space low}, and \emph{Monitoring target down} to Discord \texttt{\#devops-alerts}.
Shares the droplet's failure domain; no external check yet (issue~\#20)\\
\end{tabularx}
\normalsize
\small
\begin{tabularx}{\linewidth}{@{}L{3.3cm}Y@{}}
\caption{Actions runner, added October 7 and migrated November 14, 2026\label{Table:HostsRunner}}\\
\toprule \textbf{Field} & \textbf{Actions runner on The-Ocean}\\ \midrule
\endfirsthead
\toprule \textbf{Field} & \textbf{Actions runner on The-Ocean}\\ \midrule
\endhead
\bottomrule \endlastfoot
Role & Repository-scoped Gitea Actions runner; temporary manual compiler containers;
historical registration name \texttt{ssw590-vince-local} retained\\
Environment & Docker on The-Ocean's Ubuntu 24.04 host; runner 2.3.0;
capacity one job; current container \texttt{ssw590-manual-runner}\\
Provider / owner & Existing DigitalOcean host; VS maintains runner and image;
BY retains server administration; no new instance or resize\\
Network path & Outbound HTTPS to \texttt{git.yebilly.me:443} and GitHub Actions sources; Caddy forwards to private Gitea \texttt{:3000}; no public runner or Docker daemon port\\
Execution label & \texttt{latex-local}; local image \texttt{ssw590-manual-ci:20261007}\\
Persistent state & Registration in Droplet volume \texttt{ssw590-local-runner-data},
mode 0600; same tested compiler image on the host. Stopped laptop copy retains
its original image and volume outside Git\\
Availability / limits & Restart unless stopped; daemon 192/256 MiB RAM/RAM+swap,
0.25 CPU; compiler job 512/768 MiB, 0.5 CPU. New jobs pause below 600 MiB
available host RAM or 3 GiB free disk. Run manual and delivery work sequentially\\
Laptop fallback & Both original daemons are stopped. Their helpers require
\texttt{-AllowLaptopFallback} after stopping the corresponding remote copy;
never run two copies of either identity. No active runner requires Docker Desktop\\
Monitoring / backup & Runner logs and Gitea Actions checked manually; no automatic backup of runner registration configured\\
\end{tabularx}
\normalsize
\clearpage
\section{Passwords (Hints Only)}
\small
\begin{tabularx}{\linewidth}{@{}L{3.2cm}L{1.3cm}YL{2.5cm}@{}}
\caption{Passwords (hints only)\label{Table:Passwords}}\\
\toprule \textbf{Service / account} & \textbf{Owner} & \textbf{Where it is kept (hint)} & \textbf{Privilege}\\ \midrule
\endfirsthead
\toprule \textbf{Service / account} & \textbf{Owner} & \textbf{Where it is kept (hint)} & \textbf{Privilege}\\ \midrule
\endhead
\bottomrule \endlastfoot
Gitea Actions runner identity & VS & Droplet Docker volume \texttt{ssw590-local-runner-data},
file \texttt{/data/.runner}, mode 0600; transferred over pinned SSH, no values in Git;
stopped laptop fallback retains its copy & Repository runner; Droplet Docker control\\
Jenkins delivery agent identity & VS & Protected Jenkins-generated identity and Droplet Docker volume
\texttt{ssw590-delivery-identity}; stopped laptop fallback retains its copy; outside Git & Trusted Droplet agent; host Docker control\\
Deployment SSH key & VS & Jenkins folder \texttt{secure-delivery}, credential
\texttt{delivery-deploy-ssh}; encrypted in Jenkins home & \texttt{deploy} SSH;
passwordless root sudo for Ansible\\
Pinned deployment host key & VS & Same folder, file credential
\texttt{delivery-known-hosts}; public key verified over existing pinned SSH &
Strict host verification\\
Package-write token & VS & Same folder, credential \texttt{delivery-registry-write};
distinct named token under Gitea \texttt{vsun1}; no value in report & Package write only\\
Package-read token & VS & Root Docker login configuration on The-Ocean;
distinct named token under Gitea \texttt{vsun1}; bootstrap metadata retains name & Package read only\\
Gitea \texttt{bill} & BY & BY's password manager & Site administrator\\
Gitea \texttt{vsun1} & VS & VS's password manager & Site administrator (verified November 15)\\
Gitea \texttt{jenkins-bot} (added 22 Oct 2026) & BY & BY's password manager; used only to create its token & Write collaborator on \texttt{vpn-dns-gateway}\\
\texttt{jenkins-bot} token \texttt{jenkins-ci} & BY & Jenkins credential ID \texttt{gitea-jenkins-bot} (System, Global), encrypted in volume \texttt{gitea\_jenkins-home}; revoke under the bot's Gitea Applications settings & Repository read/write; organization and user read\\
Jenkins \texttt{billy} & BY & BY's password manager & Administer (all)\\
Jenkins \texttt{vsun1} & VS & VS's password manager & Administer (all)\\
Jenkins initial admin password & --- & One-time setup secret in \texttt{/var/jenkins\_home/secrets/}; read once by BY, superseded by named accounts & Setup only\\
Grafana \texttt{billy} (added 28 Oct 2026) & BY & BY's password manager; the initial value set through the monitoring secrets file was replaced in Grafana on 28 Oct 2026 and removed from the file & Grafana Admin\\
Grafana \texttt{vsun1} (added 28 Oct 2026) & VS & VS's password manager; temporary password set by BY and sent privately, to be changed by VS at first login & Viewer\\
Monitoring secrets \texttt{.env.secret} & BY & \texttt{\textasciitilde/monitoring/.env.secret} on the droplet, mode 600, root; typed by BY; holds the Discord webhook URL (the initial Grafana admin password was removed after it was replaced); never in Git & n/a\\
Discord webhook \texttt{Grafana} & BY & BY's password manager and the monitoring secrets file; revoke under \texttt{\#devops-alerts} $\rightarrow$ Integrations $\rightarrow$ Webhooks & Post to \texttt{\#devops-alerts}\\
CI allowlist \texttt{.env} & BY & \texttt{\textasciitilde/gitea/.env} on the droplet, root-only; holds team and approved grader IP addresses (personal data, not a secret); grader entries are removed after grading & n/a\\
DigitalOcean team & BY, VS & Each member's own login, in their password manager & Team member\\
Namecheap (\texttt{yebilly.me}) & BY & BY's password manager & Domain owner\\
Droplet \texttt{root} SSH & BY & Key-based only; private key \texttt{digiOcean} on BY's laptop; no password login & Root\\
Let's Encrypt ACME account & --- & Account key generated by Caddy in volume \texttt{caddy-data}; no password & Certificate issuance\\
Gitea database (SQLite) & --- & No credential; file access limited to droplet \texttt{root} & n/a\\
\end{tabularx}
\normalsize
Multi-factor authentication: as reported by BY on 28 Oct 2026, his Discord
account (which owns the \texttt{\#devops-alerts} webhook) and his GitHub
account use MFA. MFA status for the other accounts, and rotation status for
all of them, has not yet been recorded. Some credentials also have local copies on members' devices;
moving them into the password managers is an open follow-up.
\fussy