demo-cnpg-local-web-ng
Skill934 starsChanged 2 days agoApache-2.0View on GitHub
Run ServiceRadar web-ng locally against the live Kubernetes `demo` CNPG database for dashboard, SRQL, services, and UI testing. Use when a task asks to test with live demo data, run local Phoenix against demo CNPG, validate dashboard authoring with Playwright, or avoid fragile kubectl port-forward database access.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- openspec/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- daisyuiSkill
- demo-local-rolloutSkill
- demo-web-ng-fastpathSkill
- fieldsurvey-local-web-ngSkill
- playwright-cliSkill
- release-cut-and-demo-rollSkill
- serviceradar-bazel-guardrailsSkill
- serviceradar-build-testSkill
- serviceradar-dependenciesSkill
- serviceradar-elixirSkill
- serviceradar-openspecSkill
- serviceradar-operationsSkill
- srql-fixtures-db-testsSkill
- web-ng-docker-loopSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when local elixir/web-ng must run against the live demo namespace CNPG database instead of Docker Compose or srql-fixtures.
- Very specific: line 48
If 192.168.6.82:5432 fails but the NodePort path works, treat it as a routing/L2 issue, not a web-ng or CNPG issue.
- Very specific: line 53
Use the playwright-cli skill for screenshots and smoke tests:
- Very specific: line 66
Keep screenshots under tmp/ or .playwright-cli/.
- Very specific: line 70
Prefer this skill over kubectl port-forward for web-ng testing against demo.
- Very specific: line 72
Use CNPG_HOST_OVERRIDE and CNPG_PORT_OVERRIDE only when explicitly testing a specific route.
- Very specific: line 73
Stop stale local Phoenix servers before starting a new one if port 4000 is already occupied.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Demo CNPG Local Web-NG
Use this skill when local elixir/web-ng must run against the live demo
namespace CNPG database instead of Docker Compose or srql-fixtures.
Quick Start
From the ServiceRadar repo root:
.agents/skills/demo-cnpg-local-web-ng/scripts/start-local-web-ng.shThe script:
- reads current
demo/serviceradar-db-credentialswithout printing the password; - tries the GitOps-managed internal LoadBalancer VIP
192.168.6.82:5432; - falls back to the current CNPG primary node's NodePort paths, including
cnpg-rw-internal-lbandcnpg-local-dev; - validates TCP reachability before starting Phoenix;
- starts
mix phx.serverinelixir/web-ngwith small DB pools and long queue windows for WAN/LAN testing.
To only verify the live DB route without starting Phoenix:
.agents/skills/demo-cnpg-local-web-ng/scripts/start-local-web-ng.sh --checkThen use $playwright-cli against http://localhost:4000.
Known Access Paths
Permanent GitOps-managed objects:
- Service:
demo/cnpg-rw-internal-lb - Intended VIP:
192.168.6.82:5432 - NetworkPolicy:
demo/cnpg-allow-oracle-test-postgres
Current known-good fallback from 192.168.2.134:
10.0.2.11:32040viademo/cnpg-rw-internal-lb10.0.2.11:30455viademo/cnpg-local-dev
If 192.168.6.82:5432 fails but the NodePort path works, treat it as a
routing/L2 issue, not a web-ng or CNPG issue.
Browser Validation
Use the playwright-cli skill for screenshots and smoke tests:
playwright-cli open http://localhost:4000/dashboards
playwright-cli screenshot --filename=tmp/demo-cnpg-dashboard-library.pngFor dashboard authoring matrix checks:
playwright-cli run-code --filename elixir/web-ng/test/playwright/dashboard_authoring_matrix.playwright.jsKeep screenshots under tmp/ or .playwright-cli/; do not commit them.
Notes
- Prefer this skill over
kubectl port-forwardfor web-ng testing againstdemo; port-forward is fragile under Phoenix startup connection churn. - Re-read Kubernetes secrets each run. Demo credentials can rotate during releases.
- Use
CNPG_HOST_OVERRIDEandCNPG_PORT_OVERRIDEonly when explicitly testing a specific route. - Stop stale local Phoenix servers before starting a new one if port
4000is already occupied.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

