Author SHA1 Message Date
nageshwaran_manikumar 745049681b docs: finalize DevOps IT manual v1.7 with Chapters 7 and 8 refs #15
Build DevOps IT Manual / Compile LaTeX PDF (push) Successful in 5m41s
2026-11-30 21:46:45 -05:00
nageshwaran_manikumar 99fb0ad1fe ci: automate Python tests and clean release artifacts refs #15 2026-11-30 20:56:51 -05:00
nageshwaran_manikumar 6cee97faa6 test: verify missing database status refs #15
startup-product-gitea-ci/pipeline/head This commit looks good
2026-11-30 20:17:04 -05:00
nageshwaran_manikumar 570f024fa2 ci: add final project Jenkins pipeline refs #15
startup-product-gitea-ci/pipeline/head This commit looks good
2026-11-30 19:49:14 -05:00
shiv 6f7af27d04 Merge pull request 'docs: restore SRE chapter and integrate secure delivery chapter 6' (#13) from feature/chapter6-secure-delivery into main
startup-product-gitea-ci/pipeline/head This commit looks good
Build DevOps IT Manual / Compile LaTeX PDF (push) Canceled after 0s
Reviewed-on: #13
Reviewed-by: shiv <Shivpatel2002@gmail.com>
2026-11-26 09:14:35 +00:00
nageshwaran_manikumar 651acc63aa Finalize Chapter 6 manual with verified visual evidence
startup-product-gitea-ci/pipeline/pr-main This commit looks good
startup-product-gitea-ci/pipeline/head This commit looks good
2026-11-26 04:06:57 -05:00
nageshwaran_manikumar a96c88800f Document verified production rollback and staging configuration recovery
startup-product-gitea-ci/pipeline/pr-main This commit looks good
2026-11-26 03:27:28 -05:00
nageshwaran_manikumar 3174db92a2 Add staging Compose baseline and controlled port failure configuration
startup-product-gitea-ci/pipeline/pr-main This commit looks good
2026-11-26 03:16:02 -05:00
nageshwaran_manikumar 1e6842e83c Add protected Ansible recovery transaction and verified simulation evidence
startup-product-gitea-ci/pipeline/pr-main This commit looks good
2026-11-26 02:15:32 -05:00
nageshwaran_manikumar 799a377cc0 Prepare immutable release recovery automation and deployment safeguards 2026-11-26 02:05:13 -05:00
nageshwaran_manikumar 151c59564d Complete secure production delivery with restricted approvals and deployment evidence
startup-product-gitea-ci/pipeline/pr-main Build queued...
2026-11-26 00:46:18 -05:00
nageshwaran_manikumar 0b54615189 Document verified public GPG fingerprint false positive
startup-product-gitea-ci/pipeline/pr-main Something is wrong with the build of this commit
2026-11-24 20:34:04 -05:00
nageshwaran_manikumar ec08932d37 Integrate restricted staging verification into Chapter 6 delivery pipeline
startup-product-gitea-ci/pipeline/pr-main There was a failure building this commit
2026-11-24 20:23:59 -05:00
nageshwaran_manikumar 84c88e7c0a Chapter 6: harden production Docker image and dependencies
startup-product-gitea-ci/pipeline/pr-main This commit looks good
2026-11-23 04:47:41 -05:00
nageshwaran_manikumar dfbf5488d0 Chapter 6: add separate delivery pipeline with dependency audit and approval
startup-product-gitea-ci/pipeline/pr-main This commit looks good
2026-11-23 04:20:48 -05:00
nageshwaran_manikumar 47383f9f6c Chapter 6: add hash-pinned production dependency lockfile 2026-11-23 04:18:17 -05:00
nageshwaran_manikumar 98bc4f135d docs: restore SRE chapter and integrate secure delivery chapter 6
startup-product-gitea-ci/pipeline/head This commit looks good
startup-product-gitea-ci/pipeline/pr-main This commit looks good
2026-11-13 22:43:43 -05:00
shiv 73a66b87dd Merge pull request 'Chapter 6: Secure Delivery and Rollback' (#12) from feature/chapter6-secure-delivery into main
startup-product-gitea-ci/pipeline/head This commit looks good
Build DevOps IT Manual / Compile LaTeX PDF (push) Successful in 1m17s
Reviewed-on: #12
Reviewed-by: shiv <Shivpatel2002@gmail.com>
2026-11-14 02:39:02 +00:00
nageshwaran_manikumar 06f05638ce fix: correct Python indentation in Jenkins CI smoke tests
startup-product-gitea-ci/pipeline/pr-main This commit looks good
2026-11-13 21:25:51 -05:00
nageshwaran_manikumar 36cec81744 feat: complete secure pricing delivery and rollback documentation
startup-product-gitea-ci/pipeline/pr-main There was a failure building this commit
startup-product-gitea-ci/pipeline/head There was a failure building this commit
2026-11-13 21:07:53 -05:00
nageshwaran_manikumar c6a53349ee Merge pull request 'docs: add Jenkins CI chapter and update DevOps manual to v1.4' (#9) from docs/manual-v1.4 into main
startup-product-gitea-ci/pipeline/head This commit looks good
Build DevOps IT Manual / Compile LaTeX PDF (push) Successful in 49s
Reviewed-on: #9
Reviewed-by: shiv <Shivpatel2002@gmail.com>
2026-10-23 08:17:07 +00:00
196 changed files with 8916 additions and 6 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ on:
push:
branches:
- main
- feature/15-final-project
workflow_dispatch:
jobs:
@@ -21,7 +22,7 @@ jobs:
run: |
set -eu
SHORT_SHA="$(printf '%s' "$GITHUB_SHA" | cut -c1-7)"
BUILD_ID="v1.4+build.${GITHUB_RUN_NUMBER}.${SHORT_SHA}"
BUILD_ID="v1.7+build.${GITHUB_RUN_NUMBER}.${SHORT_SHA}"
cat > manual/build_metadata.tex <<EOF
\renewcommand{\BuildIdentifier}{${BUILD_ID}}
+12
View File
@@ -0,0 +1,12 @@
.DS_Store
.venv/
**/.venv/
__pycache__/
*.py[cod]
.pytest_cache/
.env
*.bak
*.before-*
manual_backup/
manual/build_metadata.tex
manual/dist/
+2
View File
@@ -0,0 +1,2 @@
# Public GPG fingerprint verified against original image
36cec81744274634645df40b6ac249c55615c80f:pricing-service/chapter6-evidence/05-ansible-deployment/staging-before-ansible.json:generic-api-key:170
Vendored
+30 -2
View File
@@ -1,9 +1,10 @@
pipeline {
agent any
options {
disableConcurrentBuilds()
timeout(time: 5, unit: 'MINUTES')
timeout(time: 10, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '5'))
}
@@ -36,12 +37,39 @@ pipeline {
}
}
}
stage('Verify Python') {
steps {
sh 'python3 --version'
}
}
stage('Staging Health Check') {
steps {
sh '''
set -eu
curl -fsS --max-time 10 http://startup-pricing-staging:5000/health -o /tmp/pricing-health.json
python3 -c 'import json; data=json.load(open("/tmp/pricing-health.json")); assert data["status"] == "healthy"; assert data["version"] == "v2"; print("Staging health check PASSED")'
'''
}
}
stage('Staging Pricing Smoke Test') {
steps {
sh '''
set -eu
curl -fsS --max-time 10 http://startup-pricing-staging:5000/pricing -o /tmp/pricing-response.json
python3 -c 'import json; data=json.load(open("/tmp/pricing-response.json")); assert data["version"] == "v2"; actual={p["name"]:p["price"] for p in data["plans"]}; assert actual == {"Starter":5,"Basic":12,"Pro":30,"Enterprise":60}; print("Pricing smoke test PASSED")'
'''
}
}
}
post {
success {
echo 'CI PASSED: All checks completed successfully.'
echo 'CI PASSED: Node.js tests and staging smoke tests completed.'
}
failure {
echo 'CI FAILED: Review the Jenkins console output.'
}
+195
View File
@@ -0,0 +1,195 @@
pipeline {
agent { label 'chapter6-mac-agent-secure' }
options {
disableConcurrentBuilds()
timeout(time: 60, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '5'))
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Secret Security Gate') {
steps {
sh '''
set -eu
export PATH=/opt/homebrew/bin:$PATH
gitleaks version
gitleaks git . --redact=100 --exit-code 42
'''
}
}
stage('Verify Node.js') {
steps {
sh 'node --version'
sh 'npm --version'
}
}
stage('Syntax Check') {
steps {
dir('app') {
sh 'npm run check'
}
}
}
stage('Automated Tests') {
steps {
dir('app') {
sh 'npm test'
}
}
}
stage('Verify Python') {
steps {
sh 'python3 --version'
}
}
stage('Dependency Security Audit') {
steps {
sh '''
set -eu
export PATH=/opt/homebrew/bin:$PATH
export UV_CACHE_DIR="$WORKSPACE/.uv-cache"
uv tool run --from pip-audit==2.10.1 pip-audit --disable-pip -r pricing-service/requirements-production.lock.txt > pip-audit-report.txt 2>&1 || {
cat pip-audit-report.txt
exit 1
}
cat pip-audit-report.txt
'''
}
post {
always {
archiveArtifacts artifacts: 'pip-audit-report.txt', allowEmptyArchive: false
}
}
}
stage('Container Security Gate') {
steps {
sh '''
set -eu
export PATH=/opt/homebrew/bin:$PATH
trivy image --platform linux/amd64 --scanners vuln --severity HIGH,CRITICAL --exit-code 1 --format table --output trivy-report.txt git.nageshwaran.dev/ssw590-startup/startup-pricing@sha256:14d520f6fbe60c9cc5e661551a03e944de3a2ad777a64c316ec397ee765db22d
'''
}
post {
always {
archiveArtifacts artifacts: 'trivy-report.txt', allowEmptyArchive: true
}
}
}
stage('Staging Verification and Smoke Tests') {
steps {
sh '''
set -eu
date -u
ssh -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o ConnectTimeout=10 -i "$HOME/.ssh/chapter6_deploy" chapter6deploy@git.nageshwaran.dev verify-staging > staging-verification.txt
cat staging-verification.txt
python3 -c 'import json; lines=open("staging-verification.txt").read().splitlines(); data=[json.loads(x) for x in lines if x.startswith("{")]; assert len(data)==2; assert data[0]["status"]=="healthy"; assert data[0]["version"]=="v2"; assert data[1]["version"]=="v2"; assert {p["name"]:p["price"] for p in data[1]["plans"]}=={"Starter":5,"Basic":12,"Pro":30,"Enterprise":60}; print("SUCCESS: All staging smoke tests passed")'
'''
}
post {
always {
archiveArtifacts artifacts: 'staging-verification.txt', allowEmptyArchive: true
}
}
}
stage('Production Approval') {
steps {
timeout(time: 30, unit: 'MINUTES') {
script {
def approver = input(
message: 'Approve Chapter 6 production promotion?',
ok: 'Approve Production',
submitter: 'chapter6-approver',
submitterParameter: 'APPROVED_BY'
)
if (approver != 'chapter6-approver') {
error('Production approval requires the designated approver')
}
echo "Production approved by: ${approver}"
}
}
}
}
stage('Server Authorization') {
steps {
timeout(time: 10, unit: 'MINUTES') {
input message: 'Administrator: confirm server-side authorization is ready',
ok: 'Authorization Ready',
submitter: 'chapter6-approver'
}
}
}
stage('Production Promotion') {
steps {
sh '''
set -eu
date -u > production-promotion.txt
ssh -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o ConnectTimeout=10 -i "$HOME/.ssh/chapter6_deploy" chapter6deploy@git.nageshwaran.dev promote-production >> production-promotion.txt 2>&1 || {
cat production-promotion.txt
exit 1
}
cat production-promotion.txt
date -u
'''
}
post {
always {
archiveArtifacts artifacts: 'production-promotion.txt', allowEmptyArchive: false
}
}
}
stage('Production HTTPS Verification') {
steps {
sh '''
set -eu
date -u > production-verification.txt
curl -fsS --max-time 10 https://pricing.nageshwaran.dev/health > production-health.json
curl -fsS --max-time 10 https://pricing.nageshwaran.dev/pricing > production-pricing.json
python3 -c 'import json; h=json.load(open("production-health.json")); p=json.load(open("production-pricing.json")); assert h["status"]=="healthy" and h["version"]=="v2"; assert p["version"]=="v2"; assert {x["name"]:x["price"] for x in p["plans"]}=={"Starter":5,"Basic":12,"Pro":30,"Enterprise":60}'
cat production-health.json production-pricing.json >> production-verification.txt
echo "SUCCESS: Production HTTPS smoke tests passed" >> production-verification.txt
cat production-verification.txt
'''
}
post {
always {
archiveArtifacts artifacts: 'production-verification.txt,production-health.json,production-pricing.json', allowEmptyArchive: true
}
}
}
}
post {
success {
echo 'DELIVERY PASSED: Security gates, approval, production promotion and HTTPS verification completed.'
}
failure {
echo 'CI FAILED: Review the Jenkins console output.'
}
}
}
+143
View File
@@ -0,0 +1,143 @@
pipeline {
agent any
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
timeout(time: 10, unit: 'MINUTES')
buildDiscarder(logRotator(
numToKeepStr: '5',
artifactNumToKeepStr: '3'
))
}
stages {
stage('Checkout') {
steps {
checkout scm
sh 'git log -1 --oneline'
}
}
stage('Verify Build Tools') {
steps {
sh '''
node --version
npm --version
python3 --version
'''
}
}
stage('JavaScript Validation') {
steps {
dir('app') {
sh 'npm run check'
}
}
}
stage('JavaScript Unit Tests') {
steps {
dir('app') {
sh 'npm test'
}
}
}
stage('Python Validation') {
steps {
dir('pricing-service') {
sh '''
python3 -m py_compile app.py test_app.py
echo "Python syntax validation PASSED"
'''
}
}
}
stage('Python Unit Tests') {
steps {
dir('pricing-service') {
sh '''
set -eu
export PYTHONPATH=/var/jenkins_home/final-project-python-deps
export PYTHONDONTWRITEBYTECODE=1
python3 -m unittest -v test_app
echo "Python unit tests PASSED"
'''
}
}
}
stage('Versioned Package') {
steps {
sh '''
set -eu
VERSION="1.0.${BUILD_NUMBER}"
rm -rf dist
mkdir -p dist
printf '%s\\n' "$VERSION" > dist/VERSION
git rev-parse HEAD > dist/COMMIT
python3 -m zipfile -c \
"dist/startup-product-${VERSION}.zip" \
app/package.json \
app/src \
app/test \
pricing-service/app.py \
pricing-service/test_app.py \
pricing-service/requirements.txt \
pricing-service/Dockerfile \
dist/VERSION \
dist/COMMIT
echo "Package version: $VERSION"
ls -lh dist/
'''
}
}
stage('Verify Package Integrity') {
steps {
sh '''
set -eu
python3 -m zipfile -t \
"dist/startup-product-1.0.${BUILD_NUMBER}.zip"
echo "Package integrity PASSED"
'''
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts(
artifacts: 'dist/*',
fingerprint: true,
onlyIfSuccessful: true
)
}
}
}
post {
success {
echo 'FINAL PROJECT BASELINE BUILD PASSED'
}
failure {
echo 'FINAL PROJECT BASELINE BUILD FAILED'
}
always {
echo "Build number: ${env.BUILD_NUMBER}"
echo "Build URL: ${env.BUILD_URL}"
}
}
}
+7
View File
@@ -15,3 +15,10 @@ test("reports unhealthy when database is disconnected", () => {
database: "disconnected"
});
});
test("reports unhealthy when database status is missing", () => {
assert.deepEqual(getHealthStatus(), {
status: "unhealthy",
database: "disconnected"
});
});
+34
View File
@@ -0,0 +1,34 @@
services:
gitea:
image: docker.gitea.com/gitea:1.27.3-rootless
container_name: gitea
restart: unless-stopped
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=sqlite3
- GITEA__server__ROOT_URL=https://git.nageshwaran.dev/
- GITEA__server__HTTP_PORT=3000
volumes:
- ./data:/var/lib/gitea
- ./config:/etc/gitea
networks:
- gitea_internal
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
+12
View File
@@ -0,0 +1,12 @@
*.aux
*.log
*.out
*.toc
*.idx
*.ilg
*.ind
*.fdb_latexmk
*.fls
*.synctex.gz
build_metadata.tex
main.pdf
+77
View File
@@ -0,0 +1,77 @@
\chapter{Introduction to SRE: Monitoring and Reliability}
\label{chap:sre}
\section{Purpose, Scope, and Deployment}
This chapter documents operational monitoring for the team's existing DigitalOcean Ubuntu 24.04 Droplet, Gitea source control, and Jenkins CI service. The monitoring stack uses Docker Compose with Prometheus v3.5.0, Grafana OSS v12.1.1, Blackbox Exporter v0.27.0, and Node Exporter v1.9.1. Caddy exposes Grafana over HTTPS at \url{https://monitor.nageshwaran.dev}. Exporter and Prometheus endpoints are addressed internally on the monitoring Docker network rather than deliberately exposed as public service ports. Persistent Docker storage is configured for monitoring services. The deployment was designed for a resource-constrained Droplet (approximately 512 MB RAM, 1 GB swap, and 10 GB nominal disk).
\section{Architecture and Monitoring Pipeline}
\begin{center}\small
\fbox{\begin{minipage}{0.91\linewidth}\centering
Gitea HTTPS / Jenkins HTTPS $\longrightarrow$ Blackbox Exporter\\[5pt]
Droplet CPU / RAM / filesystem $\longrightarrow$ Node Exporter\\[5pt]
Exporters $\longrightarrow$ Prometheus (30-second scrape)\\[5pt]
Prometheus $\longrightarrow$ Grafana dashboards and alert evaluation\\[5pt]
Grafana Alertmanager $\longrightarrow$ Discord contact point
\end{minipage}}
\end{center}
The monitored service URLs are \url{https://git.nageshwaran.dev} and \url{https://ci.nageshwaran.dev/login}. The blackbox HTTP module performs HTTPS checks, follows redirects, and validates successful responses. Prometheus uses the \texttt{https-probes} job, plus \texttt{node-exporter} and \texttt{prometheus} scrape jobs. The evaluation interval is 30 seconds.
\section{Grafana Dashboard and Metrics Evidence}
The \emph{SSW590 - SRE Monitoring Dashboard} contains six time-series panels: CPU usage, available RAM, available root filesystem percentage, Jenkins HTTPS availability, Gitea HTTPS availability, and combined HTTPS response time. The screenshots below show a six-hour window with recorded metrics rather than empty placeholder panels.
\begin{figure}[H]\centering\includegraphics[width=\linewidth]{img/grafana_https_availability_latency.png}\caption{HTTPS response-time series and Jenkins availability. Brief Jenkins availability drops reflect controlled incident testing.}\label{fig:sre-latency}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=\linewidth]{img/grafana_gitea_disk.png}\caption{Gitea HTTPS availability and root filesystem free-space percentage, approximately 18\% during the test.}\label{fig:sre-disk}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=\linewidth]{img/grafana_ram_cpu.png}\caption{Available RAM in bytes and Droplet CPU utilization percentage.}\label{fig:sre-host}\end{figure}
\begin{lstlisting}[caption={Representative Prometheus queries used by the dashboard}]
probe_success{job="https-probes"}
probe_duration_seconds{job="https-probes"}
node_memory_MemAvailable_bytes
100 * (1 - avg(rate(node_cpu_seconds_total{mode="idle"}[5m])))
100 * node_filesystem_avail_bytes{mountpoint="/",fstype!~"tmpfs|overlay"}
/ node_filesystem_size_bytes{mountpoint="/",fstype!~"tmpfs|overlay"}
\end{lstlisting}
\section{Service Level Indicators, Objectives, and Error Budget}
The service level indicator (SLI) is the fraction of successful HTTPS probes, independently calculated for Jenkins and Gitea. The proposed service level objective (SLO) is at least 99.9\% successful probes over a rolling 30-day period. The corresponding downtime budget is $30\times24\times60\times(1-0.999)=43.2$ minutes per 30 days. This is a \emph{target}, not a claim that 30 days of observations have been collected.
\begin{lstlisting}[caption={Rolling one-hour availability percentage per service}]
100 * avg_over_time(probe_success{job="https-probes"}[1h])
\end{lstlisting}
The captured instantaneous results of this rolling-window query showed 100\% for Jenkins and 100\% for Gitea. The historical graph also shows Jenkins' one-hour rolling SLI temporarily falling to approximately 91\% during earlier outage testing before returning to 100\%; Gitea stayed at 100\% in the captured view. A 100\% latest one-hour result does not establish compliance over 30 days. An hour with 99.9\% SLO has a theoretical downtime allowance of 3.6 seconds; a controlled multi-minute outage exceeds that hour's proportional budget. Probe-based SLI approximates availability at the scrape interval and is not exact user-request uptime.
\begin{figure}[H]\centering\includegraphics[width=\linewidth]{img/sli_slo_availability.png}\caption{Prometheus rolling one-hour HTTPS availability SLI query and two observed 100\% results, with earlier Jenkins degradation visible in the history.}\label{fig:sre-sli}\end{figure}
\section{Alert Rules and Discord Notification Routing}
Two Grafana-managed rules are grouped under \texttt{SSW590 - SRE Monitoring / SSW590-SRE-Alerts}, evaluated every 30 seconds. Both route to the \texttt{SSW590 Discord Alerts} contact point. The HTTPS service-down rule evaluates \texttt{probe\_success} and fires after a sustained failure of at least one minute. The disk rule evaluates available root filesystem percentage and fires if it stays below 15\% for five minutes. Both have zero keep-firing duration. Discord contact-point delivery was independently verified during the incident exercises.
\begin{center}\small\begin{tabularx}{\linewidth}{@{}L{3.0cm}Y L{2cm}L{2cm}@{}}\toprule Rule & Condition & Pending & Recovery delay\\\midrule
HTTPS Service Down & HTTPS probe failure for Jenkins or Gitea & 1 minute & 0 seconds\\
Low Disk Space & Root filesystem available $<15\%$ & 5 minutes & 0 seconds\\\bottomrule\end{tabularx}\end{center}
\section{Controlled Jenkins Outage and Recovery}
A controlled Jenkins outage was conducted by stopping the Jenkins container, while the monitoring stack and Gitea remained operational. Blackbox Exporter detected the HTTPS probe failure; Grafana transitioned the HTTPS service alert through Pending and Firing, and a Discord \textbf{FIRING} message was delivered. Jenkins was restarted with \texttt{docker start jenkins}; the container was subsequently running, and a local request to \texttt{/login} returned HTTP 200. Grafana then returned to Normal and Discord delivered a \textbf{RESOLVED} message. The Jenkins dashboard plot shows probe drops, while Gitea continued responding. This verifies detection and recovery signaling, not automatic self-healing. A post-recovery Jenkins pipeline run was also verified: the job checked out the configured Gitea branch, passed the JavaScript syntax check and both automated tests, reported zero failures, and ended with \texttt{Finished: SUCCESS}. No Jenkins build was executed during the outage, so outage-time build behavior is not claimed.
\section{Safe Disk Alert Simulation}
The actual root filesystem had approximately 18\% available capacity. To test alerting without consuming scarce disk space, the rule's threshold was temporarily raised from 15\% to 25\%, leaving the five-minute pending period unchanged. The rule became Pending, then Firing. Discord received the \textbf{FIRING} notification at approximately 10:59 PM on October 30, 2026, reporting about 17.98\% free space on \texttt{/dev/vda1}. The threshold was restored to the required 15\%; Discord subsequently delivered a \textbf{RESOLVED} notification at 11:19 PM, with the annotation \texttt{grafana\_state\_reason = Updated}. The recovery was therefore a controlled rule-configuration reset, not a claim that disk usage had been reduced. No large test files were written.
\section{Operations, Risk, and Follow-Up}
Operators should inspect Grafana alerts and Prometheus targets, check \texttt{docker ps}, examine container logs and Caddy routing, and verify service health after recovery. For low disk capacity, inspect \texttt{df -h} and \texttt{docker system df} before considering safe cleanup; do not blindly delete volumes, application data, or audit evidence. The small Droplet has limited headroom, and Grafana/Prometheus retention and resource usage require attention. Rotate the Discord webhook if it has been disclosed outside its intended secret store.
\section{Evidence Coverage and Outstanding Validation}
\begin{center}\small\begin{tabularx}{\linewidth}{@{}Y L{2.5cm}@{}}\toprule Requirement & Evidence status\\\midrule
Dashboard: CPU, RAM, disk, uptime, latency & Verified (Figures \ref{fig:sre-latency}--\ref{fig:sre-host})\\
HTTPS alert with Discord firing and resolved & Verified in incident account\\
Disk alert with Discord firing and resolved & Verified in notification text\\
One-hour SLI and proposed 99.9\% SLO & Verified / calculated\\
Grafana/Prometheus restart and historical data & Verified (restart and dashboard screenshots)\\
Jenkins post-recovery CI build & Verified (successful build; outage-time build not tested)\\
Two reliability-improvement Gitea issues & Verified (issues \#10 and \#11)\\\bottomrule\end{tabularx}\end{center}
The Discord screenshots are included below. The monitoring restart test was performed by restarting Grafana and Prometheus individually; both containers returned to the running state, the dashboard remained accessible, and historical time-series data remained visible. Docker volumes \texttt{monitoring\_grafana\_data} and \texttt{monitoring\_prometheus\_data} were present. This is a practical restart/persistence check, not a full Droplet reboot test. Jenkins build evidence is post-recovery only; no build was run during the outage.
\section{Additional Operational Verification Evidence}
The following captured evidence supplements the dashboard and SLI figures above. It records the Discord delivery of both alert transitions, the restart/persistence check, the successful post-recovery CI build, and the two follow-up reliability issues.
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_19.png}\caption{Discord: HTTPS service-down alert in FIRING state.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_20.png}\caption{Discord: HTTPS service-down alert RESOLVED after Jenkins recovery.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_21.png}\caption{Discord: low-disk-space alert FIRING during the safe threshold simulation.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_22.png}\caption{Discord: low-disk-space alert RESOLVED after restoring the 15\% threshold. The notification reports the state reason as Updated.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_17.png}\caption{Monitoring stack restart and container status verification.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_18.png}\caption{Grafana dashboard after the monitoring restart, with historical metrics still visible.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_13.png}\caption{Jenkins post-recovery pipeline execution evidence.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_15.png}\caption{Jenkins post-recovery build details and successful completion.}\end{figure}
\begin{figure}[H]\centering\includegraphics[width=0.96\linewidth]{img/sre_evidence/evidence_16.png}\caption{Gitea reliability follow-up issues, including issue numbers 10 and 11.}\end{figure}
+239
View File
@@ -0,0 +1,239 @@
\chapter{Secure Delivery and Rollback}
\label{chap:secure-delivery}
\newcommand{\sixrepo}{https://git.nageshwaran.dev/SSW590-Startup/startup-product}
\newcommand{\sixfile}[1]{\href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/#1}{\nolinkurl{#1}}}
\section{Scope and architecture}
This revision records the November 24--26, 2026 secure delivery exercise for the Startup Pricing Service. Staging and production are separate containers on the existing DigitalOcean host. They share the host failure domain; this is not high availability. Gitea, Jenkins, Caddy and the existing monitoring stack remain in service.
\begin{figure}[H]\centering
\begin{tikzpicture}[node distance=8mm, every node/.style={font=\small}, b/.style={draw,rounded corners,align=center,minimum height=9mm}]
\node[b](git){Gitea\\source and registry};
\node[b,right=of git](ci){Jenkins\\Mac agent};
\node[b,right=of ci](gate){Security gates\\human approval};
\node[b,below=of ci](stage){Staging\\Gunicorn :5000};
\node[b,right=of stage](prod){Production\\Gunicorn :5000};
\node[b,below=of stage](proxy){Caddy HTTPS};
\node[b,right=of proxy](mon){Blackbox /\\Prometheus / Grafana};
\draw[->](git)--(ci);\draw[->](ci)--(gate);\draw[->](ci)--(stage);\draw[->](gate)--(prod);\draw[->](proxy)--(stage);\draw[->](proxy)--(prod);\draw[->](mon)--(proxy);
\end{tikzpicture}
\caption{Logical delivery and observation paths; both application environments share one Droplet.}
\end{figure}
\section{Release integrity and locked inputs}
The registry repository is \nolinkurl{git.nageshwaran.dev/}\allowbreak\nolinkurl{ssw590-startup/startup-pricing}. Deployments select immutable registry references rather than mutable tags or local image identifiers alone.
\begin{description}
\item[V1 index digest]\leavevmode\par\nobreak {\footnotesize\nolinkurl{sha256:d0d0a2c2052b01a33ce12fd2b278e906552ea9797b5b918f44e5065f444d3027}}
\item[V1 amd64 manifest]\leavevmode\par\nobreak {\footnotesize\nolinkurl{sha256:be7e0a6d6bb82b78e68616ecb905c3232e59715490143e36d0bb71172da31a7c}}
\item[V2 index digest]\leavevmode\par\nobreak {\footnotesize\nolinkurl{sha256:14d520f6fbe60c9cc5e661551a03e944de3a2ad777a64c316ec397ee765db22d}}
\item[V2 amd64 manifest]\leavevmode\par\nobreak {\footnotesize\nolinkurl{sha256:158f8cd88eef9af7d057b8810651ae60b010ea3c598e8f04694926f0cac8ab5f}}
\item[Hardened V2 base]\leavevmode\par\nobreak {\footnotesize\nolinkurl{python:3.13-alpine@sha256:9ef1a599f863231c3d91e941389bfdc4a2d6070557243d54df1a4e57015b960e}}
\end{description}
Both releases were pulled by immutable reference. Index and platform manifest digests identify different registry objects. The hardened V2 uses hash-locked Python dependencies, including Flask 3.1.3 and Gunicorn 23.0.0. The production lock file is \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/requirements-production.lock.txt}{production dependency lock file}. Historical image-to-source commit provenance is not established; the recovery release records are reconstructed, not original reviewed release attestations.
\begin{center}\small\begin{tabularx}{\linewidth}{lYY}\toprule
& V1 & Hardened V2\\\midrule
Business response & Basic 10, Pro 25, Enterprise 50; total 85 & Starter 5, Basic 12, Pro 30, Enterprise 60; total 107\\
Health & Healthy; no version field & Healthy; version v2\\
Source commit & Unverified & Unverified\\
Recovery configuration & Reconstructed V1 record & Reconstructed V2 record; healthy staging Compose template\\
Delivery evidence & Live rollback journal & Jenkins delivery build 7; live restoration journal\\\bottomrule\end{tabularx}\end{center}
The observed totals are 85 and 107, not the course reference totals of 30 and 36. The application does not expose a source commit in its health response. These are outstanding rubric gaps, not verified equivalence.
\section{Container hardening and Ansible deployment}
The application runs as non-root \texttt{appuser}, with a read-only root filesystem, all capabilities dropped, no-new-privileges, 64 MiB memory, 128 MiB memory plus swap, half a CPU, 64 processes and a 16 MiB restricted temporary filesystem. Staging uses one Gunicorn worker; production uses two. Host mappings are loopback-only (5062 staging and 5061 production); Caddy provides HTTPS. Jenkins reaches staging through its internal Docker network.
\par Configuration and automation: \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/recovery/staging/compose.yml}{\nolinkurl{compose.yml}}, \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/ansible/staging-recovery.yml}{\nolinkurl{staging-recovery.yml}}, and \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/ansible/production-recovery-transaction.yml}{production recovery transaction}. The healthy staging Compose configuration checks the application on port 5000. The recovery transaction uses a shared production lock to exclude competing promotion operations.
\par The November 26 guarded unchanged staging run reported ok=9, changed=0, failed=0, skipped=8. Replacement was explicitly disabled for that run; it demonstrates verification without mutation, not unrestricted deployment idempotence. Production HTTPS remained healthy.
\section{Jenkins delivery and security gates}
The dedicated \href{https://ci.nageshwaran.dev/job/startup-product-chapter6-delivery/7/}{delivery build 7} completed successfully on November 26. Gitleaks reported no leaks, pip-audit reported no known vulnerabilities, and Trivy reported zero HIGH or CRITICAL findings for the configured scan of hardened V2. This does not establish absence of all vulnerabilities. Earlier image scans motivated the hardened rebuild. A narrowly scoped Gitleaks exception identifies a public Python signing fingerprint, not a secret.
\par Production approval was recorded as \texttt{chapter6-approver}. The developer was denied approval in build 6, which was subsequently aborted. The restricted deployment account uses a forced-command SSH gateway and narrowly scoped sudo helpers. A root-managed, time-limited, single-use authorization file is consumed before promotion. The authorization file is not cryptographically bound to a Jenkins build; privileged administrators and races within its validity window remain trust considerations.
\par Build 7 verified staging, promoted the immutable V2 release, retained the previous production container and independently verified production HTTPS. The promotion log recorded start at 06:18:42 UTC and completion at 06:19:01 UTC, with Jenkins HTTPS verification by 06:19:06. A transient 502 was observed; continuous downtime was not measured for this promotion.
\par The separate \href{https://ci.nageshwaran.dev/job/chapter6-synthetic-secret-test/3/}{synthetic-secret build 3} detected a generated test token, exited 42, skipped the delivery sentinel and finished FAILURE. This was an isolated negative-test job, not a negative run of the full production pipeline.
\par \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/pulls/13}{PR 13} had a successful Jenkins build 8 before the final recovery evidence commit. Final-head CI, independent review and merge must be verified separately.
\section{Production rollback and restoration}
On November 26 an authorized Ansible transaction ran on the host under systemd, independently of the initiating SSH connection. It acquired the promotion lock, verified V2, preserved the original container, deployed cached V1, verified its HTTPS health and business response, then restored the original V2 container and verified its identity and response. Emergency restoration was exercised in simulation before the live drill.
\begin{center}\small\begin{tabularx}{\linewidth}{lY}\toprule UTC & Observed event\\\midrule
07:50:37.935 & Lock acquired\\
07:50:42.066 & V2 verified\\
07:50:44.469 & Rollback decision\\
07:50:44.475 & Rollback started\\
07:50:58.351 & V1 recovery verified\\
07:51:08.370 & V2 restoration started\\
07:51:25.439 & Original V2 recovered\\
07:51:25.446 & Lock released\\\bottomrule\end{tabularx}\end{center}
Rollback took 13.877 seconds from recorded start to verification; restoration took 17.069 seconds. Independent HTTPS sampling recorded 21 failed probes among 45 drill-window samples. The two failure timestamp spans were 9.264 and 10.036 seconds; surrounding healthy-probe brackets were 11.272 and 14.121 seconds. These are sampled estimates, not exact continuous downtime. The original V2 container was restored and the transaction reported success. Host crash or forced process termination can still require manual recovery.
\section{Staging configuration failure and recovery}
A separate authorized drill used \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/recovery/staging/compose.failure.yml}{\nolinkurl{compose.failure.yml}} to override Gunicorn's bind port to 8001 while leaving the health check on 5000. No Docker daemon or proxy failure was induced. Compose wait returned 1 with an unhealthy container; the Ansible deployment gate failed with exit 2. Production health assertions passed before and after the operation.
\begin{center}\small\begin{tabularx}{\linewidth}{lY}\toprule UTC & Observed event\\\midrule
08:22:39 & Failure exercise started\\
08:23:01.334 & First failed staging probe\\
08:23:29.391 & Compose failure returned\\
08:24:21 & Restoration exercise started\\
08:24:34.262 & Healthy Compose deployment started\\
08:24:50.900 & First subsequent healthy staging probe\\
08:24:55.937 & Compose healthy, exit 0\\
08:25:02 & HTTPS health and pricing verification complete\\\bottomrule\end{tabularx}\end{center}
Restoration used the healthy template without the failure override. Ansible reported ok=12, changed=1, failed=0. Staging returned healthy V2 and all four expected plans; production returned healthy V2. Staging recorded 88 failed probes in 111 drill-window samples, a failure timestamp span of 108.437 seconds and first-failure-to-recovery interval of 109.566 seconds. Production recorded zero failures in 111 samples (100 percent sampled availability). These are not continuous availability guarantees. The Ansible gate rejection is verified; a Jenkins rejection during the staging outage is not evidenced.
\section{Monitoring and operational runbooks}
The existing Prometheus, Grafana and Blackbox stack monitors HTTPS availability and latency alongside host metrics. Production health is \url{https://pricing.nageshwaran.dev/health}; staging health is \url{https://staging-pricing.nageshwaran.dev/health}. PricingServiceDown uses probe failure for one minute; PricingServiceHighLatency uses duration above two seconds for two minutes. Configuration validation and rule loading were observed; alert firing during the drills is not established. The independent CSV probes provide the recovery measurements above.
\begin{description}
\item[Release] Developer opens a PR; reviewer checks source, locked inputs and tests. Require passing security gates, immutable registry identity and staging health/business checks. Authorized approver reviews the exact release before promotion. Verify production and retain evidence.
\item[Failure] Stop promotion on any failed scan, health check or identity mismatch. Record UTC time, build, digest and configuration; inspect scoped container logs and monitoring. Do not bypass gates or restart unrelated services.
\item[Rollback] Obtain authorization, confirm cached immutable release and matching configuration, verify capacity and acquire the shared lock through the recovery transaction. Verify health and business output after rollback and restoration. Escalate if emergency restoration fails.
\item[State compatibility] The observed pricing exercise does not demonstrate database or payment rollback. For future persistent state use expand-and-contract migrations, backward-compatible schemas and tested backups; do not reverse a destructive migration blindly or replay payments without idempotency controls.
\item[Cleanup] Preserve previous releases, logs, configuration backups and persistent service volumes. Inspect disk and memory before any operation. Remove only explicitly reviewed obsolete artifacts after backup and authorization; never use blanket prune or volume deletion on this shared host.
\end{description}
\section{Evidence and remaining limitations}
Recovery evidence is committed in \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/commit/a96c888}{commit a96c888}. The following paths identify the original evidence; raw logs and reports must be reviewed for sensitive content before publication.
\begin{itemize}
\item \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/chapter6-evidence/06-rollback-recovery/production-recovery-final-20261126-075316.log}{\nolinkurl{production-recovery-final-20261126-075316.log}}
\item \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/chapter6-evidence/06-rollback-recovery/production-downtime-analysis-20261126-075411.log}{\nolinkurl{production-downtime-analysis-20261126-075411.log}}
\item \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/chapter6-evidence/06-rollback-recovery/staging-failure-20261126-082239.log}{\nolinkurl{staging-failure-20261126-082239.log}}
\item \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/chapter6-evidence/06-rollback-recovery/staging-restoration-20261126-082421.log}{\nolinkurl{staging-restoration-20261126-082421.log}}
\item \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/chapter6-evidence/06-rollback-recovery/staging-downtime-analysis-20261126-082556.log}{\nolinkurl{staging-downtime-analysis-20261126-082556.log}}
\end{itemize}
Additional local evidence directories contain registry, Jenkins, dependency and monitoring reports; publication and grader access must be confirmed. Outstanding items include historical source provenance, reference pricing totals, Jenkins staging-outage rejection, independent final PR approval, and final-head CI verification. No credit is claimed for unobserved tests. ChatGPT assisted with recovery planning, evidence interpretation and drafting on November 26, 2026; the team is responsible for checking the report against actual execution records.
\clearpage
\section{Selected screenshot evidence}
These original captures supplement the execution records. Build 5 is historical gate evidence; build 7 records actual production delivery. Historical PR 12 is not the final PR 13 review.
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/build5-gitleaks.png}
\caption{Delivery build 5: Gitleaks scanned 23 commits and reported no leaks.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/build5-pip-audit.png}
\caption{Delivery build 5: dependency audit reported no known vulnerabilities.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/build5-trivy.png}
\caption{Delivery build 5: Trivy scan of the immutable V2 image, configured for HIGH and CRITICAL severity.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/build5-smoke.png}
\caption{Delivery build 5: staging digest verification and smoke tests before approval.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/restricted-ssh.png}
\caption{Restricted deployment account: authorized verification succeeded and an unauthorized command was denied.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/build6-denied.png}
\caption{Delivery build 6: unauthorized production approval rejection.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/step240-build7-designated-human-approval.png}
\caption{Delivery build 7: designated human approval.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/step241-build7-fullscreen-production-success.png}
\caption{Delivery build 7: successful production delivery.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/prometheus-alert-rules-validation-20261123.png}
\caption{Production monitoring: Prometheus alert configuration validation.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/step295A-unchanged-staging-check.png}
\caption{November 26 unchanged staging dry run: replacement not required, health and pricing checks passed, changed=0.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/grafana-pricing-availability.png}
\caption{November 23 Grafana dashboard: pricing HTTPS probe returned 1 (healthy), alongside Jenkins, Gitea and host metrics. This predates the recovery drills.}
\end{figure}
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.65\textheight,keepaspectratio]{img/chapter6-selected/historical-pr12.png}
\caption{Historical PR 12 reviewer approval and merge into main; not evidence of final PR 13 approval.}
\end{figure}
\clearpage
\section{Recovery and security execution evidence}
The following selected output is transcribed from the recorded execution results, not new screenshots or simulated tests. The complete recovery logs are linked in Section 6.8. All recovery timestamps are UTC on November 26, 2026.
\subsection*{Production rollback and restoration}
Selected transaction events, presented as a compact transcription of the journal timeline:
\begin{lstlisting}
07:50:37.934593 PRODUCTION_LOCK_ACQUIRED
07:50:44.468507 ROLLBACK_DECISION
07:50:44.474884 ROLLBACK_STARTED
07:50:58.351494 ROLLBACK_RECOVERED
07:51:08.369626 RESTORATION_STARTED
07:51:25.438908 RESTORATION_RECOVERED
07:51:25.444577 RECOVERY_TRANSACTION_SUCCESS
07:51:25.445828 PRODUCTION_LOCK_RELEASED
\end{lstlisting}
The production recovery journal reported successful restoration of the original V2 container. V1 returned the three expected plans (total 85); restored V2 returned four plans (total 107). See the full \href{https://git.nageshwaran.dev/SSW590-Startup/startup-product/src/commit/a96c888/pricing-service/chapter6-evidence/06-rollback-recovery/production-recovery-final-20261126-075316.log}{production recovery record}. Independent probes recorded two interruption spans, as described in Section 6.5.
\subsection*{Staging configuration failure}
Selected lines from the recorded Ansible failure output:
\begin{lstlisting}
container startup-pricing-staging is unhealthy
Compose deployment failed; delivery blocked
ANSIBLE_EXIT_CODE=2
Health=unhealthy Command=["gunicorn","--workers","1",
"--bind","0.0.0.0:8001","app:app"]
=== PRODUCTION HEALTH ===
{"status":"healthy","version":"v2"}
\end{lstlisting}
The Compose return code was 1. Ansible rejected the deployment. The Jenkins outage-specific failure was not captured; this is an Ansible gate result, not a Jenkins failure result.
\clearpage\subsection*{Healthy restoration and HTTPS verification}
Selected output from the recorded restoration run (08:24:21--08:25:02):
\begin{lstlisting}
Container startup-pricing-staging Healthy
PLAY RECAP
digitalocean : ok=12 changed=1 unreachable=0 failed=0
=== STAGING HTTPS HEALTH ===
{"status":"healthy","version":"v2"}
=== STAGING HTTPS PRICING ===
{"plans":[{"name":"Starter","price":5},
{"name":"Basic","price":12},{"name":"Pro","price":30},
{"name":"Enterprise","price":60}],
"service":"Startup Pricing Service","version":"v2"}
=== PRODUCTION HTTPS HEALTH ===
{"status":"healthy","version":"v2"}
\end{lstlisting}
Public endpoints: \href{https://staging-pricing.nageshwaran.dev/health}{staging health}, \href{https://staging-pricing.nageshwaran.dev/pricing}{staging pricing}, \href{https://pricing.nageshwaran.dev/health}{production health}, and \href{https://pricing.nageshwaran.dev/pricing}{production pricing}.
\subsection*{Independent availability measurements}
Selected output from the saved staging downtime analysis:
\begin{lstlisting}
=== STAGING ===
Drill window samples: 111
Failed samples: 88
Sampled availability: 20.72 %
Failure timestamp span: 108.436741 seconds
First failure to recovery: 109.565538 seconds
=== PRODUCTION ===
Drill window samples: 111
Failed samples: 0
Sampled availability: 100.0 %
\end{lstlisting}
The observation window is the staging drill only; these are sampled estimates, not long-term SLO compliance or exact continuous downtime.
\subsection*{Synthetic-secret negative test}
Recorded result summary (not raw console output): Jenkins \href{https://ci.nageshwaran.dev/job/chapter6-synthetic-secret-test/3/}{synthetic-secret build 3} detected a generated test token (rule \texttt{github-pat}); Gitleaks returned 42, the delivery sentinel was skipped, and the build finished FAILURE. This separate test job does not demonstrate a full production-pipeline negative run. The test token is deliberately not reproduced. The archived console and reports remain in the local evidence directory, \nolinkurl{04-jenkins-ci/synthetic-secret-build-3/}. See also \href{https://ci.nageshwaran.dev/job/startup-product-chapter6-delivery/7/consoleText}{delivery build 7 console} and \href{https://ci.nageshwaran.dev/job/startup-product-chapter6-delivery/7/artifact/}{build 7 artifacts} for the passing scan and promotion evidence. Access to these links must be confirmed by the team.
\clearpage
\section{Additional visual execution evidence}
The following authentic screenshots supplement the saved log transcriptions. The availability screenshot documents the production rollback drill, not the staging drill. Staging downtime is supported by the saved analysis in Section 6.6. The synthetic-secret test was an isolated Jenkins job.
\clearpage
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.80\textheight,keepaspectratio]{img/chapter6-selected/staging-restoration.png}
\caption{Saved Ansible restoration output: Compose healthy, zero failed tasks, staging and production HTTPS healthy at 08:25:02 UTC.}
\end{figure}
\clearpage
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.80\textheight,keepaspectratio]{img/chapter6-selected/live-https.png}
\caption{Live HTTPS verification at 08:59:26 UTC on November 26, 2026: both environments returned healthy V2 and matching pricing plans.}
\end{figure}
\clearpage
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.80\textheight,keepaspectratio]{img/chapter6-selected/production-downtime.png}
\caption{Saved production rollback availability analysis: two observed interruption groups; sampled estimates rather than exact continuous downtime.}
\end{figure}
\clearpage
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.80\textheight,keepaspectratio]{img/chapter6-selected/synthetic-secret-start.png}
\caption{Jenkins synthetic-secret test build 3: recorded job execution and environment validation.}
\end{figure}
\clearpage
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.80\textheight,keepaspectratio]{img/chapter6-selected/synthetic-secret-blocked.png}
\caption{Jenkins synthetic-secret test build 3: delivery sentinel skipped, exit code 42, final result FAILURE.}
\end{figure}
\clearpage
\begin{figure}[H]\centering
\includegraphics[width=\linewidth,height=0.80\textheight,keepaspectratio]{img/chapter6-selected/synthetic-secret-report.png}
\caption{Redacted archived report for synthetic-secret build 3: one github-pat finding, exit code 42, delivery sentinel skipped. The generated token is omitted.}
\end{figure}
+158
View File
@@ -0,0 +1,158 @@
\chapter{Customer Support and Incident Management}
\label{chap:customer-support}
\section{Purpose and Scope}
This chapter documents the customer support workflow
implemented using Zammad and its integration with
the existing Gitea engineering workflow.
A simulated pricing API incident was used to
demonstrate ticket management, engineering escalation,
technical investigation, access control, customer
communication, and incident closure.
\section{Support Platform}
Zammad was deployed using Docker Compose.
Deployment, configuration, and runtime verification
logs are maintained in the local dos-support
evidence directory.
\section{Customer Support Incident}
The simulated incident was recorded as Zammad
ticket 60002, titled Pricing API returns an error.
The ticket was assigned to the Student Agent
with high priority.
An engineering investigation was created in Gitea
as issue 14, referencing the corresponding
customer support ticket.
\section{Technical Investigation}
The recorded engineering investigation reported:
\begin{itemize}
\item Production HTTPS health: Healthy, V2.
\item Staging HTTPS health: Healthy, V2.
\item Production pricing endpoint successfully verified.
\item Starter pricing: \$5.
\item Basic pricing: \$12.
\item Pro pricing: \$30.
\item Enterprise pricing: \$60.
\item The reported error could not be reproduced.
\item No corrective deployment or infrastructure
changes were required.
\end{itemize}
\section{Public and Internal Message Visibility}
The ticket contained three public articles and
two internal notes. Article visibility was corrected
and verified using both customer and agent views.
The following figures document the correction
and role-specific visibility verification.
\newcommand{\supportfigure}[3]{%
\begin{figure}[!htbp]
\centering
\includegraphics[
width=\linewidth,
height=0.72\textheight,
keepaspectratio
]{img/chapter7-evidence/#1}
\caption{#2}
\label{fig:#3}
\end{figure}
\clearpage
}
\supportfigure
{06-visibility-correction-20261126.png}
{Backend article visibility correction and successful
verification with evidence checksum.}
{support-visibility-correction}
\supportfigure
{07-customer-visibility-verification-20261126.png}
{Customer view showing three public messages
without the two internal notes.}
{support-customer-view}
\supportfigure
{08-agent-visibility-verification-20261126.png}
{Agent view showing internal investigation notes
and public customer communication.}
{support-agent-view}
\section{Incident Resolution and Closure}
The investigation findings were communicated
to the customer through Zammad. The incident
was classified as unable to reproduce rather
than a repaired software defect.
The Zammad ticket and corresponding Gitea
engineering issue were subsequently closed.
\supportfigure
{09-ticket-closure-20261126.png}
{Zammad ticket 60002 showing closed status.}
{support-ticket-closure}
\supportfigure
{10-engineering-issue-open-20261126.png}
{Gitea engineering issue 14 referencing
Zammad ticket 60002.}
{support-engineering-issue}
\supportfigure
{11-engineering-investigation-results-20261126.png}
{Documented engineering investigation results
for production and staging environments.}
{support-investigation}
\supportfigure
{12a-engineering-final-resolution-20261126.png}
{Final engineering resolution documenting
the unable-to-reproduce outcome.}
{support-final-resolution}
\supportfigure
{12b-engineering-issue-closure-20261126.png}
{Closed Gitea engineering issue 14.}
{support-engineering-closure}
\section{Evidence Management}
The local evidence directory contains six
timestamped log files covering deployment
preparation, configuration, Zammad deployment,
runtime verification, engineering investigation,
and article visibility correction.
\supportfigure
{13-local-evidence-inventory-20261126.png}
{Local terminal evidence inventory showing
the six supporting log files.}
{support-evidence-inventory}
The screenshots demonstrate the recorded support
workflow. The original logs provide additional
technical evidence and should be retained with
the submission materials.
\section{Conclusion}
The simulated incident demonstrates the
customer support lifecycle from ticket
investigation and engineering escalation
through customer communication and closure.
Customer-facing communication was separated
from internal engineering notes, and both
support and engineering records were closed
without unnecessary infrastructure changes.
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

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