rapp-playwright/Makefile
tegwick 1557742779 Wave-2 sizing: playwright request 65m/336Mi, CPU limit 2 (RPF-WP-0063-T01)
7d p95/peak 41.5/62.7m, 23.8% CFS throttled at the 1-core limit; the limit
doubles (rule: max(2x current, 1000m)). Deploy targets now use the live
server-side field manager rapp-playwright, which the default manager
conflicted with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 276069@bnt-lap001
Assistant-Session: 2e192b3d-b3e8-4403-94d4-d55a2c8b476c
2026-10-22 00:04:57 +02:00

35 lines
1.9 KiB
Makefile

SHELL := /bin/bash
IMAGE_REPOSITORY := forgejo.coulomb.social/coulomb/rapp-playwright
TAG ?= 0.1.0
IMAGE_REFERENCE ?=
TARGET ?= railiance01
TRIAL_OUT ?= .local/live-trial
.PHONY: install check test test-integration build render bootstrap-namespace server-dry-run deploy verify-live rollback
install:
npm ci --ignore-scripts
check:
npm run check
python3 -m py_compile client/rapp_playwright.py tools/render.py tools/verify_consumer.py tools/verify_crash_recovery.py tools/verify_managed_recovery.py
test: check
npm test
test-integration:
docker run --rm --init --user 1000:1000 --read-only --tmpfs /tmp:rw,size=512m --shm-size=256m --memory=1g --cpus=1 --cap-drop ALL --security-opt no-new-privileges --mount type=bind,src=$(CURDIR),dst=/app,readonly -w /app mcr.microsoft.com/playwright:v1.64.0-noble@sha256:06a9939e57531807f8d5fd76ce44b53165ffb7d7501d87ab10e285c20b1e971f node --test tests/integration.mjs
build:
docker build -t $(IMAGE_REPOSITORY):$(TAG) .
render:
IMAGE_REFERENCE='$(IMAGE_REFERENCE)' python3 tools/render.py
bootstrap-namespace: render
ssh $(TARGET) 'kubectl apply --server-side --dry-run=server -f -' < .rendered/namespace.yaml
ssh $(TARGET) 'kubectl diff -f -; result=$$?; test $$result -le 1' < .rendered/namespace.yaml
ssh $(TARGET) 'kubectl apply --server-side -f -' < .rendered/namespace.yaml
server-dry-run: render
ssh $(TARGET) 'kubectl apply --server-side --field-manager=rapp-playwright --dry-run=server -f -' < .rendered/workload.yaml
deploy: server-dry-run
ssh $(TARGET) 'kubectl diff --server-side --field-manager=rapp-playwright -f -; result=$$?; test $$result -le 1' < .rendered/workload.yaml
ssh $(TARGET) 'kubectl apply --server-side --field-manager=rapp-playwright -f -' < .rendered/workload.yaml
ssh $(TARGET) 'kubectl -n playwright rollout status deployment/playwright --timeout=180s'
verify-live:
python3 client/rapp_playwright.py preflight
python3 client/rapp_playwright.py trial --out '$(TRIAL_OUT)'
rollback: deploy