TExcelTAD
Home › DevOps Capstone: Ship a Production Service › Publishing It as a Portfolio Piece

Publishing It as a Portfolio Piece

A hiring manager or senior engineer will give your repository a few minutes. In that time they want to answer three questions: Does it work? Did this person make sensible decisions? Can they explain them? A capstone that ships but can't be understood in five minutes undersells the work. This lesson turns the three repositories into something a reviewer can read quickly, and makes sure you publish nothing you shouldn't.

What reviewers look for

They check Show it with
it actually runs a green CI badge, a 2-minute screen recording (create a link, follow it, the dashboard moving, an Argo CD sync), and "run it locally" instructions that work
you understand the trade-offs short Architecture Decision Records: what you chose, what you rejected, why
operations, not just deployment the SLO, the alert tests, the runbook, a rollback you practised
security hygiene non-root distroless image, scans in CI, no secrets in history, least-privilege workflow permissions
clean history small commits with messages that explain why; the per-lesson commits from this course
honesty what is simplified or missing, and what you would do next

The last row matters more than it looks: "I used a single NAT gateway to save cost; production would use one per zone" reads as judgement. Hiding the shortcut reads as not knowing.

The README

Keep it to one screen above the fold. A structure that works:

md
# linkly: a link shortener, shipped end to end

Go service + PostgreSQL + Redis, delivered with GitHub Actions, Helm and Argo CD to Kubernetes
(kind locally, EKS optionally), observed with Prometheus, Loki and OpenTelemetry.

[architecture diagram]   [CI badge]   [2-minute demo video]

## What it shows
- Read-through cache that degrades instead of failing (tests: TestRedisDownFallsBackToDatabase)
- Graceful shutdown tuned to Kubernetes (preStop, SHUTDOWN_GRACE, PodDisruptionBudget)
- Image built distroless and static, scanned, signed; deployed by digest via GitOps
- 99.9% availability SLO with tested burn-rate alerts and a runbook

## Run it locally (5 minutes)
...

## Repositories
linkly (this) · linkly-deploy (GitOps) · linkly-infra (OpenTofu)

## Decisions
docs/adr/: 0001 Go and distroless · 0002 the cache is optional · 0003 GitOps over CI deploys

## Limitations and next steps
...

Assemble it, then check it for secrets

The session builds the documentation skeleton with two ADRs, and then does what you should do before making any repository public: scan the working tree and the Git history for secrets. A local environment file with a real-looking GitHub token was committed by mistake along the way:

bash · try it yourself
git init -q linkly && cd linkly && mkdir -p docs/adr
cat > README.md <<'X'
# linkly: a link shortener, shipped end to end

Go service + PostgreSQL + Redis, delivered with GitHub Actions, Helm and Argo CD to Kubernetes.
See docs/architecture.md, docs/runbook.md and docs/adr/.
X
cat > docs/adr/0001-go-and-distroless.md <<'X'
# 1. Go, built static, on distroless

Status: accepted

## Context
The service is small and I/O-bound; the image should be minimal and have no shell.

## Decision
Go with CGO_ENABLED=0, copied into gcr.io/distroless/static-debian12:nonroot.

## Consequences
About 20 MB images, nothing to patch in the base but CA certificates and tzdata.
No shell for debugging: use kubectl debug with an ephemeral container.
Rejected: Alpine (musl and a shell we don't need), scratch (no CA certificates or passwd entry).
X
cat > docs/adr/0002-cache-is-optional.md <<'X'
# 2. Redis is an optimisation, not a dependency

Status: accepted

## Decision
Redis errors are logged and counted, and the request falls through to PostgreSQL.
/readyz does not fail without Redis. The cache alert is a ticket, not a page.

## Consequences
A Redis outage raises latency and database load but causes no errors.
PostgreSQL must be sized to survive a cold cache: load-test with Redis stopped.
X
git add . && git commit -qm "Docs: README and first ADRs"
printf 'DATABASE_URL=postgres://linkly:linkly@localhost:5432/linkly\nGITHUB_TOKEN=ghp_R2D2C3POa1b2c3d4e5f6g7h8i9j0k1l2m3n4\n' > local.env
git add local.env && git commit -qm "Local settings"
git rm -q local.env && git commit -qm "Remove local settings"
secrets() { trivy fs -q --scanners secret -f json "$1" | jq -r '.Results[]? | .Target as $t | .Secrets[]? | "  \(.Severity) \(.RuleID) \($t):\(.StartLine)"'; }
echo "== working tree:"; secrets .
echo "== every commit:"
for c in $(git rev-list HEAD); do
  rm -rf ../snap && mkdir ../snap && git archive "$c" | tar -x -C ../snap
  found=$(secrets ../snap)
  [ -n "$found" ] && echo "$(git log --format='%h %s' -1 "$c")" && echo "$found"
done
echo "== history of local.env:"
git log --oneline --all -- local.env
== working tree:
== every commit:
770b03e Local settings
  CRITICAL github-pat local.env:2
== history of local.env:
af56d1c Remove local settings
770b03e Local settings

The working tree is clean, because the file was deleted. The history is not: the commit "Local settings" still contains the token, and anyone who clones the repository gets it. The order of operations when this happens:

  1. Revoke the token first, right now, at the provider. Assume it was copied the moment it was pushed; bots scan public GitHub continuously.
  2. Then remove it from history (git filter-repo --path local.env --invert-paths, or BFG) and force-push, if the repository is not public yet or you control every clone. Rewriting history doesn't un-leak a secret, which is why step 1 comes first.
  3. Prevent the repeat: *.env in .gitignore, a pre-commit secret scanner (gitleaks or Trivy), and GitHub's push protection, which blocks pushes containing known token formats.

The loop over git rev-list is a minimal history scan; dedicated tools scan history directly (gitleaks git ., TruffleHog), as the Secret Scanning lesson shows.

Before you make it public

  • Secret scan of the full history is clean; any token that ever appeared is revoked.
  • No real account IDs, domain names you don't own, internal hostnames or personal data in configs and screenshots (replace with example.com, 111122223333).
  • The README's "run it locally" works on a fresh clone (ask a friend, or use a clean VM).
  • CI is green on main; the badge links to it.
  • Cloud resources from the cloud track are destroyed, and the screenshots of them are kept in docs/.
  • A licence file (MIT or Apache-2.0 are common for portfolio code).
  • Pinned on your GitHub profile, with a one-line description and topics (kubernetes, gitops, opentelemetry, …).

Talking about it

Prepare three stories of two minutes each, because interviews ask for them in some form:

  1. A decision with a trade-off: the optional cache, CPU limits, single NAT on the cloud track.
  2. Something that went wrong and how you found it: the static-binary failure, the PDB that blocked a drain, the alert that never fired until the rule test caught it.
  3. What you would do next: the migration Job, authentication for POST /links, multi-region, cost reporting.

Platform Engineering, a planned course, builds the next layer on this project: templates and self-service, so the next service gets all of this on day one.

Test yourself

A token was committed and then deleted in the next commit. What is the first thing to do?

  1. Rewrite history with git filter-repo
  2. Revoke the token at the provider
  3. Make the repository private
  4. Nothing; it was deleted

Why did the working-tree scan find nothing while the history scan found the token?

  1. Trivy ignores .env files
  2. The file was removed from the latest commit but still exists in an earlier commit's tree
  3. The token format is not supported
  4. jq filtered it

What makes an ADR useful to a reviewer?

  1. Its length
  2. It records the context, the decision, its consequences and the rejected alternatives
  3. It lists every library version
  4. It is written before any code