## Summary
Replace the cv (`cv.eblu.me`) and docs (`docs.eblu.me`) minikube Deployments with indri-native ansible roles. Caddy serves the extracted release tarballs directly via a new `kind: static` service-block — no daemon, no nginx pod, no ProxyGroup ingress on the request path. Mirrors the rationale of the recent devpi migration; part of the broader minikube wind-down.
## What's in this commit
- `ansible/roles/{cv,docs}` — sentinel-gated tarball download + extract into `~/{cv,docs}/content/`
- `ansible/roles/caddy/` — new `kind: static` branch in the Caddyfile template (encoded gzip, immutable cache headers for fingerprinted assets, optional `try_html` for Quartz-style clean URLs, optional per-path `download_paths` for the resume PDF's `Content-Disposition`)
- `ansible/playbooks/indri.yml` — wires `cv` and `docs` roles before `caddy`
- `service-versions.yaml` — both services flip to `type: ansible`. `docs.current-version` stays at `1.28.2` for this commit so `container-version-check` keeps passing while `containers/quartz/Dockerfile` still exists; it moves to the docs release tag in the cleanup commit
- `.forgejo/workflows/{cv-deploy,build-blumeops}.yaml` — deploy step now bumps `cv_version`/`docs_version` in the role defaults and pushes; running ansible + purging the Fly cache is manual from gilbert (matches devpi)
- Docs: `docs/how-to/operations/{cv,docs}-on-indri.md`, updated `docs/reference/services/{cv,docs}.md`, changelog fragment
## What is not in this commit
The dead artifacts. After PR review and successful cutover, a follow-up commit deletes:
- `argocd/apps/{cv,docs}.yaml` and `argocd/manifests/{cv,docs}/`
- `containers/cv/`, `containers/quartz/`
- `CONTAINER_TO_SERVICE['quartz']` mapping in `mise-tasks/container-version-check`
- bumps `docs.current-version` in `service-versions.yaml` to the release tag
## Cutover plan (manual, from gilbert, after review)
1. **Take down old:**
- Remove the cv and docs Applications: `argocd app delete cv --cascade && argocd app delete docs --cascade`
- Verify k8s namespaces gone: `kubectl --context=minikube-indri get ns | grep -E '^(cv|docs)\\b'` (should be empty)
- Verify tailnet MagicDNS no longer advertises the VIPs: `nslookup cv.tail8d86e.ts.net` and `nslookup docs.tail8d86e.ts.net` should both fail
2. **Bring up new:**
- `mise run provision-indri -- --tags cv,docs,caddy --check --diff` (already validated on branch)
- `mise run provision-indri -- --tags cv,docs,caddy`
- `fly ssh console -a blumeops-proxy -C "sh -c 'rm -rf /tmp/cache && nginx -s reload'"`
3. **Verify:** `mise run services-check` and the curl checks listed in `docs/how-to/operations/{cv,docs}-on-indri.md`
4. **Cleanup commit + merge.**
Total expected downtime: minutes (not the few-hour budget you authorized).
## Test plan
- [ ] `mise run provision-indri -- --tags cv,docs --check --diff` clean
- [ ] `mise run provision-indri -- --tags caddy --check --diff` shows only the cv + docs blocks changing as previewed in the PR thread
- [ ] After cutover: `cv.eblu.me`, `cv.ops.eblu.me`, `docs.eblu.me`, `docs.ops.eblu.me` all return 200
- [ ] `cv.eblu.me/resume.pdf` includes `Content-Disposition: attachment`
- [ ] A clean Quartz URL (e.g. `docs.eblu.me/explanation/agent-change-process`) resolves to the right page
- [ ] `mise run services-check` clean
- [ ] `mise run service-review --type ansible` shows cv and docs
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Reviewed-on: #342
109 lines
3.7 KiB
YAML
109 lines
3.7 KiB
YAML
# CV Deploy Workflow
|
|
#
|
|
# Bumps cv_version in ansible/roles/cv/defaults/main.yml and pushes the change.
|
|
# Deployment to indri is manual (runner has no SSH access to indri):
|
|
# mise run provision-indri -- --tags cv
|
|
#
|
|
# Usage:
|
|
# 1. Release a new CV package from the cv repo first
|
|
# 2. Go to Actions > Deploy CV > Run workflow
|
|
# 3. Enter the version to deploy, or leave as "latest"
|
|
# 4. Run the command above on gilbert to apply
|
|
|
|
name: Deploy CV
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'CV package version to deploy (e.g., v1.0.0, or "latest")'
|
|
required: true
|
|
default: 'latest'
|
|
type: string
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: k8s
|
|
steps:
|
|
- name: Resolve version
|
|
id: version
|
|
run: |
|
|
INPUT_VERSION="${{ inputs.version }}"
|
|
|
|
if [ "$INPUT_VERSION" = "latest" ]; then
|
|
echo "Resolving latest CV package version..."
|
|
VERSION=$(curl -s "https://forge.eblu.me/api/v1/packages/eblume?type=generic&q=cv" \
|
|
| jq -r '[.[] | select(.name == "cv")] | sort_by(.version) | last | .version // empty')
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
echo "Error: No CV packages found"
|
|
exit 1
|
|
fi
|
|
echo "Resolved latest version: $VERSION"
|
|
else
|
|
VERSION="$INPUT_VERSION"
|
|
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
echo "Error: Version must be in format vX.Y.Z (e.g., v1.0.0)"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Verify the package exists
|
|
TARBALL="cv-${VERSION}.tar.gz"
|
|
PACKAGE_URL="https://forge.eblu.me/api/packages/eblume/generic/cv/${VERSION}/${TARBALL}"
|
|
if ! curl -fsSL --head "$PACKAGE_URL" > /dev/null 2>&1; then
|
|
echo "Error: Package not found at $PACKAGE_URL"
|
|
echo "Run the 'Release CV' workflow in the cv repo first."
|
|
exit 1
|
|
fi
|
|
echo "Package verified: $PACKAGE_URL"
|
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Bump cv_version in ansible role
|
|
run: |
|
|
VERSION="${{ steps.version.outputs.version }}"
|
|
DEFAULTS_FILE="ansible/roles/cv/defaults/main.yml"
|
|
|
|
echo "Bumping cv_version in $DEFAULTS_FILE to ${VERSION}..."
|
|
yq -i ".cv_version = \"${VERSION}\"" "$DEFAULTS_FILE"
|
|
|
|
echo "Updated defaults:"
|
|
grep -E "^cv_version:" "$DEFAULTS_FILE"
|
|
|
|
- name: Commit release changes
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
VERSION="${{ steps.version.outputs.version }}"
|
|
|
|
git config user.name "Forgejo Actions"
|
|
git config user.email "actions@forge.ops.eblu.me"
|
|
|
|
git add ansible/roles/cv/defaults/main.yml
|
|
|
|
if git diff --cached --quiet; then
|
|
echo "No changes to commit (already at $VERSION)"
|
|
else
|
|
git commit -m "Update CV release to $VERSION
|
|
|
|
[skip ci]"
|
|
git push origin HEAD:main
|
|
echo "Changes committed and pushed"
|
|
fi
|
|
|
|
- name: Summary
|
|
run: |
|
|
VERSION="${{ steps.version.outputs.version }}"
|
|
echo "================================================"
|
|
echo "CV version bumped: $VERSION"
|
|
echo "================================================"
|
|
echo ""
|
|
echo "To deploy on indri, run from gilbert:"
|
|
echo " mise run provision-indri -- --tags cv"
|
|
echo ""
|
|
echo "Then purge the Fly.io proxy cache:"
|
|
echo " fly ssh console -a blumeops-proxy -C \\"
|
|
echo " \"sh -c 'rm -rf /tmp/cache && nginx -s reload'\""
|