Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f976f56765 | ||
|
|
9cc9ede5d8 | ||
|
|
d3cdee8f1f | ||
|
|
b0a3fb04da | ||
|
|
a160b84da6 | ||
|
|
177b0675a7 | ||
|
|
3f9d481750 | ||
|
|
39634fc404 | ||
|
|
bb395aed23 | ||
|
|
fca706c9bb | ||
|
|
e0c02eefe3 | ||
|
|
5c663fe237 | ||
|
|
3c56d87896 | ||
|
|
c81879f4f2 | ||
|
|
2c76722b04 | ||
|
|
c83174f2c2 | ||
|
|
0465bde401 | ||
|
|
c815e53fc2 | ||
|
|
615fcb396a | ||
|
|
d4c012560d |
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,8 @@ scrape_configs:
|
|||||||
- targets:
|
- targets:
|
||||||
- https://git.ssw590.abrdns.com/user/login
|
- https://git.ssw590.abrdns.com/user/login
|
||||||
- https://ci.ssw590.abrdns.com/login
|
- https://ci.ssw590.abrdns.com/login
|
||||||
|
- https://app.ssw590.abrdns.com/health
|
||||||
|
- https://support.ssw590.abrdns.com/
|
||||||
relabel_configs:
|
relabel_configs:
|
||||||
- source_labels: [__address__]
|
- source_labels: [__address__]
|
||||||
target_label: __param_target
|
target_label: __param_target
|
||||||
|
|||||||
Vendored
+50
-1
@@ -71,11 +71,16 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
env.COMMIT = sh(script: 'git rev-parse HEAD', returnStdout: true).trim()
|
env.COMMIT = sh(script: 'git rev-parse HEAD', returnStdout: true).trim()
|
||||||
env.STAGING_RESULT = 'not run'
|
env.STAGING_RESULT = 'not run'
|
||||||
|
def mm = readFile('pricing/VERSION').trim()
|
||||||
|
if (!(mm ==~ /^[0-9]+\.[0-9]+$/)) { error "pricing/VERSION must be major.minor, got '${mm}'" }
|
||||||
|
env.SEMVER = "${mm}.${env.BUILD_NUMBER}"
|
||||||
|
currentBuild.displayName = "#${env.BUILD_NUMBER} v${env.SEMVER}"
|
||||||
}
|
}
|
||||||
sh '''
|
sh '''
|
||||||
rm -rf reports && mkdir -p reports
|
rm -rf reports && mkdir -p reports
|
||||||
git log -1 --format='commit %H%nauthor %an%ndate %cI%nsubject %s' | tee reports/source.txt
|
git log -1 --format='commit %H%nauthor %an%ndate %cI%nsubject %s' | tee reports/source.txt
|
||||||
echo "branch ${BRANCH} mode ${MODE} build ${BUILD_URL}" | tee -a reports/source.txt
|
echo "branch ${BRANCH} mode ${MODE} build ${BUILD_URL}" | tee -a reports/source.txt
|
||||||
|
echo "version ${SEMVER}" | tee -a reports/source.txt
|
||||||
{ docker version --format 'docker client {{.Client.Version}} server {{.Server.Version}}'
|
{ docker version --format 'docker client {{.Client.Version}} server {{.Server.Version}}'
|
||||||
python3 --version; trivy --version | head -1; $PIPAUDIT --version
|
python3 --version; trivy --version | head -1; $PIPAUDIT --version
|
||||||
$ANSIBLE/ansible --version | head -1
|
$ANSIBLE/ansible --version | head -1
|
||||||
@@ -102,6 +107,21 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Docs: architecture + LaTeX') {
|
||||||
|
when { expression { params.MODE == 'release' } }
|
||||||
|
steps {
|
||||||
|
sh '''#!/bin/bash -e
|
||||||
|
set -o pipefail
|
||||||
|
cp reports/unittest.log pricing/docs/unittest.log
|
||||||
|
docker build -f pricing/docs/Dockerfile --target out --output type=local,dest=reports/docs \
|
||||||
|
--build-arg SEMVER="$SEMVER" --build-arg COMMIT="$COMMIT" --build-arg BRANCH="$BRANCH" \
|
||||||
|
--build-arg BUILD_URL="$BUILD_URL" --build-arg BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
||||||
|
pricing 2>&1 | tee reports/docs-build.log
|
||||||
|
rm -f pricing/docs/unittest.log
|
||||||
|
ls -l reports/docs
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Dependency audit') {
|
stage('Dependency audit') {
|
||||||
when { expression { params.MODE == 'release' } }
|
when { expression { params.MODE == 'release' } }
|
||||||
steps {
|
steps {
|
||||||
@@ -127,7 +147,9 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash -e
|
sh '''#!/bin/bash -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
docker build --build-arg APP_COMMIT="$COMMIT" -t "$IMAGE:$COMMIT" pricing/app 2>&1 | tee reports/docker-build.log
|
docker build --build-arg APP_COMMIT="$COMMIT" --build-arg APP_SEMVER="$SEMVER" \
|
||||||
|
--label org.opencontainers.image.version="$SEMVER" \
|
||||||
|
-t "$IMAGE:$COMMIT" -t "$IMAGE:$SEMVER" pricing/app 2>&1 | tee reports/docker-build.log
|
||||||
docker image inspect "$IMAGE:$COMMIT" --format 'local image id {{.Id}} arch {{.Architecture}}' | tee -a reports/docker-build.log
|
docker image inspect "$IMAGE:$COMMIT" --format 'local image id {{.Id}} arch {{.Architecture}}' | tee -a reports/docker-build.log
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
@@ -150,6 +172,24 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Package artifact') {
|
||||||
|
when { expression { params.MODE == 'release' } }
|
||||||
|
steps {
|
||||||
|
sh '''#!/bin/bash -e
|
||||||
|
set -o pipefail
|
||||||
|
PKG="pricing-$SEMVER"; rm -rf "build/$PKG" && mkdir -p "build/$PKG"
|
||||||
|
cp -r pricing/app/app.py pricing/app/requirements.txt pricing/app/Dockerfile pricing/ansible "build/$PKG/"
|
||||||
|
cp reports/docs/release-notes.pdf reports/docs/*.png "build/$PKG/"
|
||||||
|
docker image inspect "$IMAGE:$SEMVER" --format '{{.Id}}' > "build/$PKG/image-id.txt"
|
||||||
|
printf 'version=%s\ncommit=%s\nimage=%s:%s\nbuild=%s\n' "$SEMVER" "$COMMIT" "$IMAGE" "$SEMVER" "$BUILD_URL" > "build/$PKG/VERSION.txt"
|
||||||
|
(cd build && python3 -m zipfile -c "../reports/$PKG.zip" "$PKG")
|
||||||
|
python3 -m zipfile -l "reports/$PKG.zip" | tee reports/package-contents.txt
|
||||||
|
sha256sum "reports/$PKG.zip" | tee "reports/$PKG.zip.sha256"
|
||||||
|
rm -rf build
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------- release mode: publish (main only) ----------------
|
// ---------------- release mode: publish (main only) ----------------
|
||||||
stage('Publish image') {
|
stage('Publish image') {
|
||||||
when { allOf { expression { params.MODE == 'release' }; expression { params.BRANCH == 'main' } } }
|
when { allOf { expression { params.MODE == 'release' }; expression { params.BRANCH == 'main' } } }
|
||||||
@@ -160,7 +200,16 @@ pipeline {
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
export DOCKER_CONFIG="$WORKSPACE/.docker-publish"
|
export DOCKER_CONFIG="$WORKSPACE/.docker-publish"
|
||||||
printf '%s' "$REG_TOKEN" | docker login "$REGISTRY" -u "$REG_USER" --password-stdin
|
printf '%s' "$REG_TOKEN" | docker login "$REGISTRY" -u "$REG_USER" --password-stdin
|
||||||
|
# Releases are immutable: never overwrite an existing tag (see Chapter 6, rollback incident).
|
||||||
|
if docker manifest inspect "$IMAGE:$COMMIT" >/dev/null 2>&1; then
|
||||||
|
echo "ERROR: $IMAGE:$COMMIT is already published; releases are immutable. Use MODE=redeploy with the committed record." >&2
|
||||||
|
docker logout "$REGISTRY"; exit 1
|
||||||
|
fi
|
||||||
|
if docker manifest inspect "$IMAGE:$SEMVER" >/dev/null 2>&1; then
|
||||||
|
echo "ERROR: $IMAGE:$SEMVER is already published." >&2; docker logout "$REGISTRY"; exit 1
|
||||||
|
fi
|
||||||
docker push "$IMAGE:$COMMIT" 2>&1 | tee reports/docker-push.log
|
docker push "$IMAGE:$COMMIT" 2>&1 | tee reports/docker-push.log
|
||||||
|
docker push "$IMAGE:$SEMVER" 2>&1 | tee -a reports/docker-push.log
|
||||||
docker rmi "$IMAGE:$COMMIT"
|
docker rmi "$IMAGE:$COMMIT"
|
||||||
docker pull "$IMAGE:$COMMIT" 2>&1 | tee reports/docker-pull.log
|
docker pull "$IMAGE:$COMMIT" 2>&1 | tee reports/docker-pull.log
|
||||||
docker image inspect "$IMAGE:$COMMIT" --format '{{range .RepoDigests}}{{println .}}{{end}}' \
|
docker image inspect "$IMAGE:$COMMIT" --format '{{range .RepoDigests}}{{println .}}{{end}}' \
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
1.3
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
that:
|
that:
|
||||||
- target_env in ['staging', 'production']
|
- target_env in ['staging', 'production']
|
||||||
- "'@sha256:' in release_image"
|
- "'@sha256:' in release_image"
|
||||||
- expected_version in ['v1', 'v2']
|
- expected_version in ['v1', 'v2', 'v3']
|
||||||
- expected_total | int > 0
|
- expected_total | int > 0
|
||||||
- public_url.startswith('https://')
|
- public_url.startswith('https://')
|
||||||
- proxy_network | length > 0
|
- proxy_network | length > 0
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
FROM python:3.13-slim@sha256:e48f59cdba69a3cbd9ed2cf0f348d90d45a8d350d98134cf1070bc106ee9ed90
|
FROM python:3.13-slim@sha256:e48f59cdba69a3cbd9ed2cf0f348d90d45a8d350d98134cf1070bc106ee9ed90
|
||||||
# Security fix (Trivy, 2026-11-12): zlib1g fixed in the Debian 13 point update
|
# Security fix (Trivy, 2026-11-12): zlib1g fixed in the Debian 13 point update
|
||||||
# (CVE-2026-76844, CVE-2026-85091). Exact version, so the build stays reproducible.
|
# (CVE-2026-76844, CVE-2026-85091). Exact version, so the build stays reproducible.
|
||||||
|
# Security fix (Trivy, 2026-11-30, Jenkins #20): libzstd1 CVE-2026-124851 fixed in 1.5.7+dfsg-1+deb13u1
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends --only-upgrade 'zlib1g=1:1.3.dfsg+really1.3.1-1+deb13u1' \
|
&& apt-get install -y --no-install-recommends --only-upgrade 'zlib1g=1:1.3.dfsg+really1.3.1-1+deb13u1' 'libzstd1=1.5.7+dfsg-1+deb13u1' \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
ARG APP_COMMIT=development
|
ARG APP_COMMIT=development
|
||||||
ENV APP_COMMIT=$APP_COMMIT PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
ARG APP_SEMVER=development
|
||||||
|
ENV APP_COMMIT=$APP_COMMIT APP_SEMVER=$APP_SEMVER PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
||||||
LABEL org.opencontainers.image.source="https://git.ssw590.abrdns.com/StartupTeam/Strartup-product" \
|
LABEL org.opencontainers.image.source="https://git.ssw590.abrdns.com/StartupTeam/Strartup-product" \
|
||||||
org.opencontainers.image.revision=$APP_COMMIT
|
org.opencontainers.image.revision=$APP_COMMIT
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
+11
-5
@@ -2,25 +2,31 @@ import os
|
|||||||
from flask import Flask, jsonify, request
|
from flask import Flask, jsonify, request
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
VERSION = "v1"
|
VERSION = "v3"
|
||||||
UNIT_PRICE = 10
|
UNIT_PRICE = 12
|
||||||
|
BULK_MIN_QUANTITY = 10
|
||||||
|
BULK_DISCOUNT = 0.10
|
||||||
COMMIT = os.environ.get("APP_COMMIT", "development")
|
COMMIT = os.environ.get("APP_COMMIT", "development")
|
||||||
|
BUILD = os.environ.get("APP_SEMVER", "development")
|
||||||
|
|
||||||
|
|
||||||
def total_price(quantity):
|
def total_price(quantity):
|
||||||
if quantity < 1 or quantity > 1000:
|
if quantity < 1 or quantity > 1000:
|
||||||
raise ValueError("quantity must be between 1 and 1000")
|
raise ValueError("quantity must be between 1 and 1000")
|
||||||
return UNIT_PRICE * quantity
|
total = UNIT_PRICE * quantity
|
||||||
|
if quantity >= BULK_MIN_QUANTITY:
|
||||||
|
total = round(total * (1 - BULK_DISCOUNT), 2)
|
||||||
|
return total
|
||||||
|
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
def index():
|
def index():
|
||||||
return jsonify(service="Startup Pricing", version=VERSION, commit=COMMIT)
|
return jsonify(service="Startup Pricing", version=VERSION, build=BUILD, commit=COMMIT)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/health")
|
@app.get("/health")
|
||||||
def health():
|
def health():
|
||||||
return jsonify(status="ok", version=VERSION)
|
return jsonify(status="ok", version=VERSION, build=BUILD)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/price")
|
@app.get("/price")
|
||||||
|
|||||||
@@ -7,17 +7,23 @@ class PricingTests(unittest.TestCase):
|
|||||||
self.client = app.test_client()
|
self.client = app.test_client()
|
||||||
|
|
||||||
def test_price(self):
|
def test_price(self):
|
||||||
self.assertEqual(total_price(3), 30)
|
self.assertEqual(total_price(3), 36)
|
||||||
response = self.client.get("/price?quantity=3")
|
response = self.client.get("/price?quantity=3")
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertEqual(response.json["total"], 30)
|
self.assertEqual(response.json["total"], 36)
|
||||||
|
|
||||||
|
def test_bulk_discount(self):
|
||||||
|
self.assertEqual(total_price(9), 108)
|
||||||
|
self.assertEqual(total_price(10), 108.0)
|
||||||
|
r = self.client.get("/price?quantity=12")
|
||||||
|
self.assertEqual(r.json["total"], 129.6)
|
||||||
|
|
||||||
def test_invalid_quantity(self):
|
def test_invalid_quantity(self):
|
||||||
for value in ["0", "-1", "1001", "abc", "1.5"]:
|
for value in ["0", "-1", "1001", "abc", "1.5"]:
|
||||||
self.assertEqual(self.client.get("/price?quantity=" + value).status_code, 400)
|
self.assertEqual(self.client.get("/price?quantity=" + value).status_code, 400)
|
||||||
|
|
||||||
def test_release_identity(self):
|
def test_release_identity(self):
|
||||||
self.assertEqual(self.client.get("/").json["version"], "v1")
|
self.assertEqual(self.client.get("/").json["version"], "v3")
|
||||||
self.assertEqual(self.client.get("/health").json["status"], "ok")
|
self.assertEqual(self.client.get("/health").json["status"], "ok")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# Builds the per-release documentation without touching the host:
|
||||||
|
# 1) Pyreverse (Pylint) + Graphviz draw class and module diagrams from the source code
|
||||||
|
# 2) pdflatex compiles release-notes.tex with the version, commit, test log, and diagrams
|
||||||
|
# 3) the "out" stage holds only the results; Jenkins exports it with --output type=local
|
||||||
|
# Context: pricing/ Usage: see the "Docs: architecture + LaTeX" stage in pricing/Jenkinsfile
|
||||||
|
FROM python:3.13-slim@sha256:e48f59cdba69a3cbd9ed2cf0f348d90d45a8d350d98134cf1070bc106ee9ed90 AS uml
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends graphviz \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* && pip install --no-cache-dir pylint==3.3.7
|
||||||
|
WORKDIR /src
|
||||||
|
COPY app/app.py app/test_app.py ./app/
|
||||||
|
RUN mkdir -p /out && pyreverse -o png -p pricing -d /out app/app.py app/test_app.py
|
||||||
|
|
||||||
|
FROM debian:trixie-slim AS tex
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
texlive-latex-base texlive-latex-recommended \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
WORKDIR /doc
|
||||||
|
ARG SEMVER=0.0.0 COMMIT=unknown BRANCH=unknown BUILD_URL=unknown BUILD_DATE=unknown
|
||||||
|
COPY docs/release-notes.tex docs/unittest.log ./
|
||||||
|
COPY --from=uml /out/ ./
|
||||||
|
RUN sed -i -e "s|@SEMVER@|${SEMVER}|g" -e "s|@COMMIT@|${COMMIT}|g" -e "s|@BRANCH@|${BRANCH}|g" \
|
||||||
|
-e "s|@BUILD_URL@|${BUILD_URL}|g" -e "s|@DATE@|${BUILD_DATE}|g" release-notes.tex \
|
||||||
|
&& pdflatex -interaction=nonstopmode -halt-on-error release-notes.tex >/dev/null \
|
||||||
|
&& pdflatex -interaction=nonstopmode -halt-on-error release-notes.tex | tail -2
|
||||||
|
|
||||||
|
FROM scratch AS out
|
||||||
|
COPY --from=tex /doc/release-notes.pdf /doc/classes_pricing.png /doc/packages_pricing.png /
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
*
|
||||||
|
!app/app.py
|
||||||
|
!app/test_app.py
|
||||||
|
!docs/release-notes.tex
|
||||||
|
!docs/unittest.log
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
% Release notes for one pipeline build. Placeholders @...@ are filled by docs/Dockerfile.
|
||||||
|
\documentclass[11pt]{article}
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\usepackage{verbatim}
|
||||||
|
\usepackage{hyperref}
|
||||||
|
\title{Startup Pricing Service --- Release Notes \\ \large Version @SEMVER@}
|
||||||
|
\author{SSW 590 StartupTeam (generated by Jenkins)}
|
||||||
|
\date{@DATE@}
|
||||||
|
\begin{document}
|
||||||
|
\maketitle
|
||||||
|
\section*{Build}
|
||||||
|
\begin{tabular}{ll}
|
||||||
|
\hline
|
||||||
|
Semantic version & \texttt{@SEMVER@} (major.minor.changelist; changelist = Jenkins build number) \\
|
||||||
|
Source commit & \texttt{@COMMIT@} \\
|
||||||
|
Branch & \texttt{@BRANCH@} \\
|
||||||
|
Jenkins build & \url{@BUILD_URL@} \\
|
||||||
|
Container image & \texttt{git.ssw590.abrdns.com/startupteam/pricing:@SEMVER@} \\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
\section*{Automated test results}
|
||||||
|
\small\verbatiminput{unittest.log}\normalsize
|
||||||
|
\section*{Architecture (generated from source by Pyreverse)}
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=0.6\linewidth,height=0.3\textheight,keepaspectratio]{classes_pricing.png}\\[1ex]
|
||||||
|
Class diagram of \texttt{app} and \texttt{test\_app}
|
||||||
|
\vspace{2ex}
|
||||||
|
|
||||||
|
\includegraphics[width=0.3\linewidth,keepaspectratio]{packages_pricing.png}\\[1ex]
|
||||||
|
Module (package) dependency diagram
|
||||||
|
\end{center}
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Release record: v1 production. Metadata only; no credentials.
|
||||||
|
# Corrected 2026-11-12: the original v1 image (sha256:3c0d12eb..., Jenkins #7) was overwritten in
|
||||||
|
# the registry when Jenkins #10 rebuilt the same commit and re-pushed the same tag. This digest is
|
||||||
|
# that rebuild of the same reviewed source commit; it passed every gate and the staging smoke test in #10.
|
||||||
|
target_env: production
|
||||||
|
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:d4d894df4634b088e6d52cbae2128510a05d0e4e1d972f4d64ba959423c07c97
|
||||||
|
expected_version: v1
|
||||||
|
expected_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
|
||||||
|
expected_total: 30
|
||||||
|
public_url: https://app.ssw590.abrdns.com
|
||||||
|
proxy_network: startup_private
|
||||||
|
config_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
|
||||||
|
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/10/
|
||||||
|
recorded_at: 2026-11-12, see Jenkins #10
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Release record: v1 staging. Metadata only; no credentials.
|
||||||
|
# Corrected 2026-11-12: the original v1 image (sha256:3c0d12eb..., Jenkins #7) was overwritten in
|
||||||
|
# the registry when Jenkins #10 rebuilt the same commit and re-pushed the same tag. This digest is
|
||||||
|
# that rebuild of the same reviewed source commit; it passed every gate and the staging smoke test in #10.
|
||||||
|
target_env: staging
|
||||||
|
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:d4d894df4634b088e6d52cbae2128510a05d0e4e1d972f4d64ba959423c07c97
|
||||||
|
expected_version: v1
|
||||||
|
expected_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
|
||||||
|
expected_total: 30
|
||||||
|
public_url: https://staging.ssw590.abrdns.com
|
||||||
|
proxy_network: startup_private
|
||||||
|
config_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
|
||||||
|
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/10/
|
||||||
|
recorded_at: 2026-11-12, see Jenkins #10
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Release record: v2 production. Metadata only; no credentials.
|
||||||
|
target_env: production
|
||||||
|
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:adf58a4abcb03be98cce394d5fde1794ae77525d2e1882a8be3c59c8c3556d92
|
||||||
|
expected_version: v2
|
||||||
|
expected_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
|
||||||
|
expected_total: 36
|
||||||
|
public_url: https://app.ssw590.abrdns.com
|
||||||
|
proxy_network: startup_private
|
||||||
|
config_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
|
||||||
|
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/11/
|
||||||
|
recorded_at: 2026-11-12, see Jenkins #11
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Release record: v2 staging. Metadata only; no credentials.
|
||||||
|
target_env: staging
|
||||||
|
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:adf58a4abcb03be98cce394d5fde1794ae77525d2e1882a8be3c59c8c3556d92
|
||||||
|
expected_version: v2
|
||||||
|
expected_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
|
||||||
|
expected_total: 36
|
||||||
|
public_url: https://staging.ssw590.abrdns.com
|
||||||
|
proxy_network: startup_private
|
||||||
|
config_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
|
||||||
|
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/11/
|
||||||
|
recorded_at: 2026-11-12, see Jenkins #11
|
||||||
@@ -44,3 +44,13 @@ vulnerabilities:
|
|||||||
- id: CVE-2026-9538
|
- id: CVE-2026-9538
|
||||||
statement: "perl Archive::Tar DoS (perl-base); Debian status fix_deferred; perl not used by the service"
|
statement: "perl Archive::Tar DoS (perl-base); Debian status fix_deferred; perl not used by the service"
|
||||||
expired_at: 2026-12-15
|
expired_at: 2026-12-15
|
||||||
|
# Triage: SB, 2026-11-30, from Jenkins pricing-delivery #20 (branch feature/zammad-support), Trivy 0.69.3.
|
||||||
|
# OpenSSL (libssl3t64, openssl, openssl-provider-legacy): QUIC-only denial-of-service bugs.
|
||||||
|
# Debian status fix_deferred (no fixed version). The service speaks plain HTTP/1.1 (gunicorn)
|
||||||
|
# on a private network behind Caddy and never opens a QUIC connection.
|
||||||
|
- id: CVE-2026-107494
|
||||||
|
statement: "OpenSSL QUIC unbounded frame queueing DoS; Debian fix_deferred, no fix; service does not use QUIC"
|
||||||
|
expired_at: 2026-12-15
|
||||||
|
- id: CVE-2026-124709
|
||||||
|
statement: "OpenSSL QUIC stream memory leak DoS; Debian fix_deferred, no fix; service does not use QUIC"
|
||||||
|
expired_at: 2026-12-15
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
support.ssw590.abrdns.com {
|
||||||
|
reverse_proxy zammad-nginx:8080
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Zammad support desk (Chapter 7)
|
||||||
|
|
||||||
|
Upstream: https://github.com/zammad/zammad-docker-compose at commit 67141451b6239190f7a616231bff20b8b0ccbd8a (detached).
|
||||||
|
Droplet path: /root/dos-support/zammad-docker-compose (Compose project `dos-support`).
|
||||||
|
Images: ghcr.io/zammad/zammad:7.3.0-0011, elasticsearch:9.5.7, postgres:17.12-alpine, redis:8.12-alpine, memcached:1.6.45-alpine.
|
||||||
|
Scenario: scenarios/add-external-network-to-nginx.yml; only zammad-nginx joins `startup_private`; no host ports published.
|
||||||
|
URL: https://support.ssw590.abrdns.com (Caddy route in Caddyfile.support; TLS by Caddy/Let's Encrypt).
|
||||||
|
|
||||||
|
## Files here
|
||||||
|
- env.example: the real .env with passwords replaced (real file: mode 600 on the droplet, never committed)
|
||||||
|
- Caddyfile.support: block appended to /opt/startup/Caddyfile
|
||||||
|
- sysctl-99-zammad.conf: /etc/sysctl.d/99-zammad.conf (Elasticsearch prerequisite)
|
||||||
|
|
||||||
|
## Operate (run in /root/dos-support/zammad-docker-compose)
|
||||||
|
- status: docker compose ps -a
|
||||||
|
- start / stop: docker compose up -d / docker compose stop
|
||||||
|
- restart web only: docker compose restart zammad-nginx
|
||||||
|
- NEVER: docker compose down -v (deletes the named volumes)
|
||||||
|
|
||||||
|
## Data and backups
|
||||||
|
Volumes: dos-support_postgresql-data, dos-support_elasticsearch-data, dos-support_redis-data, dos-support_zammad-storage, dos-support_zammad-backup.
|
||||||
|
zammad-backup writes <timestamp>_zammad_db.psql.gz and <timestamp>_zammad_files.tar.gz to the zammad-backup volume daily (BACKUP_TIME 03:00 container time, HOLD_DAYS 10).
|
||||||
|
One-off backup: docker compose run --rm --env BACKUP_ONCE=true zammad-backup
|
||||||
|
Restore: follow the Zammad "Backup & Restore (Docker)" guide for this release (copy the .gz files to /var/tmp/zammad/restore, start the stack, rebuild the search index). Backups stay on the droplet; they are not off-site.
|
||||||
|
|
||||||
|
## Monitoring
|
||||||
|
https://support.ssw590.abrdns.com/ is a target of the existing `https` blackbox job (monitoring/prometheus/prometheus.yml); panels 8-10 in monitoring/grafana/dashboards/ssw590-ops.json.
|
||||||
|
Tracking: issue #22, Zammad ticket #78003.
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
COMPOSE_PROJECT_NAME=dos-support
|
||||||
|
COMPOSE_FILE=docker-compose.yml:scenarios/add-external-network-to-nginx.yml
|
||||||
|
ZAMMAD_NGINX_EXTERNAL_NETWORK=startup_private
|
||||||
|
ZAMMAD_FQDN=support.ssw590.abrdns.com
|
||||||
|
ZAMMAD_HTTP_TYPE=https
|
||||||
|
NGINX_SERVER_SCHEME=https
|
||||||
|
RAILS_TRUSTED_PROXIES=172.18.0.6
|
||||||
|
VERSION=7.3.0-0011
|
||||||
|
ELASTICSEARCH_VERSION=9.5.7
|
||||||
|
MEMCACHE_VERSION=1.6.45-alpine
|
||||||
|
REDIS_VERSION=8.12-alpine
|
||||||
|
POSTGRES_VERSION=17.12-alpine
|
||||||
|
POSTGRES_PASS=CHANGE_ME_openssl_rand_hex_24
|
||||||
|
POSTGRES_SUPERUSER_PASS=CHANGE_ME_openssl_rand_hex_24
|
||||||
|
ELASTICSEARCH_PASS=CHANGE_ME_openssl_rand_hex_24
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
vm.max_map_count=262144
|
||||||
Reference in New Issue
Block a user