-
Notifications
You must be signed in to change notification settings - Fork 2
fix(infra): production audit sweep β VPS, runners, CHIT, CI #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b11b20c
6aa4193
6c4ab8c
b94e411
7ba5a81
6277725
553c071
1248aef
bb6299f
28b201b
66d655b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "run": [ | ||
| { | ||
| "method": "shell.run", | ||
| "params": { | ||
| "message": [ | ||
| "echo 'Deploying KVM2 (Exit Node) via Tailscale SSH...'", | ||
| "echo 'NOTE: SSH as root β key-only auth enforced (PasswordAuthentication no)'", | ||
| "ssh root@pmoves-kvm2 'cd /opt/pmoves && git pull --ff-only origin main && cd pmoves && docker compose -f docker-compose.yml -f docker-compose.vps.override.yml pull nginx && docker compose -f docker-compose.yml -f docker-compose.vps.override.yml up -d nginx'", | ||
| "echo 'Verifying exit node...'", | ||
| "ssh root@pmoves-kvm2 'tailscale status | head -5'", | ||
| "echo 'KVM2 deployment complete.'" | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "run": [ | ||
| { | ||
| "method": "shell.run", | ||
| "params": { | ||
| "message": [ | ||
| "echo 'Deploying KVM4-1 (API Gateway) via Tailscale SSH...'", | ||
| "echo 'NOTE: SSH as root β key-only auth enforced (PasswordAuthentication no)'", | ||
| "ssh root@pmoves-kvm4-1 'cd /opt/pmoves && git pull --ff-only origin main && cd pmoves && docker compose -f docker-compose.yml -f docker-compose.vps.override.yml pull tensorzero-gateway agent-zero hi-rag-gateway-v2 archon-server mesh-agent gateway-agent extract-worker && docker compose -f docker-compose.yml -f docker-compose.vps.override.yml up -d tensorzero-gateway agent-zero hi-rag-gateway-v2 archon-server mesh-agent gateway-agent extract-worker'", | ||
| "echo 'Verifying health...'", | ||
| "ssh root@pmoves-kvm4-1 'curl -sf http://localhost:8080/healthz && echo \" Agent Zero: OK\" || echo \" Agent Zero: FAIL\"'", | ||
| "ssh root@pmoves-kvm4-1 'curl -sf http://localhost:3030/healthz && echo \" TensorZero: OK\" || echo \" TensorZero: FAIL\"'", | ||
| "echo 'KVM4-1 deployment complete.'" | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "run": [ | ||
| { | ||
| "method": "shell.run", | ||
| "params": { | ||
| "message": [ | ||
| "echo 'Deploying KVM4-2 (Data Services) via Tailscale SSH...'", | ||
| "echo 'NOTE: SSH as root β key-only auth enforced (PasswordAuthentication no)'", | ||
| "ssh root@pmoves-kvm4-2 'cd /opt/pmoves && git pull --ff-only origin main && cd pmoves && docker compose -f docker-compose.yml -f docker-compose.vps.override.yml pull supabase-db supabase-rest qdrant neo4j meilisearch nats prometheus grafana loki minio && docker compose -f docker-compose.yml -f docker-compose.vps.override.yml up -d supabase-db supabase-rest qdrant neo4j meilisearch nats prometheus grafana loki minio'", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π§© Analysis chainπ Script executed: #!/bin/bash
# Check if prometheus, grafana, loki, minio are defined in base compose
echo "=== Checking for observability services in base compose ==="
rg -n "^\s*(prometheus|grafana|loki|minio):" pmoves/docker-compose.yml
echo ""
echo "=== Checking VPS override for these services ==="
rg -n "^\s*(prometheus|grafana|loki|minio):" pmoves/docker-compose.vps.override.ymlRepository: POWERFULMOVES/PMOVES.AI Length of output: 297 π Script executed: #!/bin/bash
# Search more broadly for these services - they might be defined differently
echo "=== Looking for service definitions more broadly ==="
echo "Base compose file grep for all service keys:"
rg -n "^\s+[a-z_-]+:\s*$" pmoves/docker-compose.yml | head -50
echo ""
echo "=== Checking full line context for minio definition ==="
rg -B2 -A10 "^\s*minio:\s*$" pmoves/docker-compose.yml | head -40
echo ""
echo "=== Checking if prometheus, grafana, loki exist anywhere ==="
rg -i "prometheus|grafana|loki" pmoves/docker-compose.yml | head -20Repository: POWERFULMOVES/PMOVES.AI Length of output: 2715 π Script executed: #!/bin/bash
# Look specifically for top-level services (two spaces, followed by service name, colon at end of line)
echo "=== All services defined in base compose ==="
rg -n "^ [a-z_-]+:\s*$" pmoves/docker-compose.yml
echo ""
echo "=== All services defined in VPS override ==="
rg -n "^ [a-z_-]+:\s*$" pmoves/docker-compose.vps.override.ymlRepository: POWERFULMOVES/PMOVES.AI Length of output: 3919 π Script executed: #!/bin/bash
# Check if prometheus, grafana, loki are referenced as services anywhere or if they're part of pmoves_monitoring
echo "=== Checking pmoves_monitoring service definition ==="
rg -A30 "^\s+pmoves_monitoring:\s*$" pmoves/docker-compose.yml
echo ""
echo "=== Double-check: can we find prometheus, grafana, loki as service definitions? ==="
grep -n "^ prometheus:" pmoves/docker-compose.yml || echo "prometheus: NOT FOUND"
grep -n "^ grafana:" pmoves/docker-compose.yml || echo "grafana: NOT FOUND"
grep -n "^ loki:" pmoves/docker-compose.yml || echo "loki: NOT FOUND"
echo ""
echo "=== Check if these services are in VPS override ==="
grep -n "prometheus\|grafana\|loki" pmoves/docker-compose.vps.override.yml || echo "NONE FOUND"Repository: POWERFULMOVES/PMOVES.AI Length of output: 1060 π Script executed: #!/bin/bash
# Let's look at the actual deployment script to confirm what's being deployed
echo "=== Viewing the deployment script file ==="
cat -n pbnj/pinokio/api/pmoves-pbnj/kvm4-2-deploy.json | head -20
echo ""
echo "=== Checking if neo4j is defined ==="
grep -n "^ neo4j:" pmoves/docker-compose.yml || echo "neo4j: NOT FOUND"Repository: POWERFULMOVES/PMOVES.AI Length of output: 1381 Deployment command references non-existent services: The deployment command on line 9 attempts to pull and start Either:
Confirm whether these observability services should be deployed on KVM4-2. π€ Prompt for AI Agents |
||
| "echo 'Verifying health...'", | ||
| "ssh root@pmoves-kvm4-2 'curl -sf http://localhost:9090/api/v1/targets > /dev/null && echo \" Prometheus: OK\" || echo \" Prometheus: FAIL\"'", | ||
| "ssh root@pmoves-kvm4-2 'curl -sf http://localhost:6333/healthz > /dev/null && echo \" Qdrant: OK\" || echo \" Qdrant: FAIL\"'", | ||
| "echo 'KVM4-2 deployment complete.'" | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,12 @@ module.exports = { | |
| { text: "Local Dev (Docker) - Down",href: "local-down.json" }, | ||
| { text: "Local Dev (Docker) Logs", href: "local-logs.json" }, | ||
|
|
||
| { text: "Cluster Status (AI Lab)", href: "status.json" } | ||
| { text: "Cluster Status (AI Lab)", href: "status.json" }, | ||
|
|
||
| { text: "βββ VPS Fleet βββ", href: "" }, | ||
| { text: "Deploy KVM4-1 (API Gateway)", href: "kvm4-1-deploy.json" }, | ||
| { text: "Deploy KVM4-2 (Data Services)",href: "kvm4-2-deploy.json" }, | ||
| { text: "Deploy KVM2 (Exit Node)", href: "kvm2-deploy.json" }, | ||
| { text: "VPS Fleet Status", href: "vps-status.json" } | ||
|
Comment on lines
+17
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion | π Major π§© Analysis chainπ Script executed: find . -name pinokio.js -path "*/pmoves-pbnj/*" -type fRepository: POWERFULMOVES/PMOVES.AI Length of output: 108 π Script executed: cat -n pbnj/pinokio/api/pmoves-pbnj/pinokio.js | head -50Repository: POWERFULMOVES/PMOVES.AI Length of output: 1327 π Script executed: # Check the full file to understand menu structure
wc -l pbnj/pinokio/api/pmoves-pbnj/pinokio.jsRepository: POWERFULMOVES/PMOVES.AI Length of output: 109 π Script executed: # Check if the referenced JSON files exist
ls -la pbnj/pinokio/api/pmoves-pbnj/*.json 2>/dev/null | head -20Repository: POWERFULMOVES/PMOVES.AI Length of output: 1185 π Script executed: # Search for usage of info.exists, info.running, info.local in all pinokio.js files
rg "info\.(exists|running|local)" --type js -B2 -A2Repository: POWERFULMOVES/PMOVES.AI Length of output: 2745 π Script executed: # Find all pinokio.js files to understand the pattern
fd pinokio.js -type fRepository: POWERFULMOVES/PMOVES.AI Length of output: 237 π Script executed: # Fix the fd command to list all pinokio.js files
fd pinokio\.jsRepository: POWERFULMOVES/PMOVES.AI Length of output: 246 π Script executed: # Get more context on the pattern - check if the async menu pattern is standard
grep -r "menu: async" --include="pinokio.js" | head -10Repository: POWERFULMOVES/PMOVES.AI Length of output: 231 π Script executed: # Check the full structure of one of the example files to understand the pattern better
cat -n pmoves/docs/ARTSTUFF/realtime/pinokio.js | head -60Repository: POWERFULMOVES/PMOVES.AI Length of output: 2142 π Script executed: # Verify if the pbnj file should also have async menu like the others
grep -A 5 "menu:" pbnj/pinokio/api/pmoves-pbnj/pinokio.jsRepository: POWERFULMOVES/PMOVES.AI Length of output: 335 Convert the menu from a static array to an async function that uses Pinokio state functions to determine which items to display. The entire menu is currently hardcoded as a static array, which exposes actions that may not be valid for the current state. Other
This pattern ensures the launcher only exposes valid actions for the current application state. π€ Prompt for AI Agents |
||
| ] | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "run": [ | ||
| { | ||
| "method": "shell.run", | ||
| "params": { | ||
| "message": [ | ||
| "echo '=== PMOVES.AI VPS Fleet Status ==='", | ||
| "echo ''", | ||
| "echo 'KVM4-1 (API Gateway):'", | ||
| "tailscale ping --timeout 3s pmoves-kvm4-1 > /dev/null 2>&1 && echo ' Status: ONLINE' || echo ' Status: OFFLINE'", | ||
| "echo ''", | ||
| "echo 'KVM4-2 (Data Services):'", | ||
| "tailscale ping --timeout 3s pmoves-kvm4-2 > /dev/null 2>&1 && echo ' Status: ONLINE' || echo ' Status: OFFLINE'", | ||
| "echo ''", | ||
| "echo 'KVM2 (Exit Node):'", | ||
| "tailscale ping --timeout 3s pmoves-kvm2 > /dev/null 2>&1 && echo ' Status: ONLINE' || echo ' Status: OFFLINE'", | ||
| "echo ''", | ||
| "echo 'GitHub Actions Runners:'", | ||
| "gh api repos/POWERFULMOVES/PMOVES.AI/actions/runners --jq '.runners[] | \" \\(.name): \\(.status)\"' 2>/dev/null || echo ' (unable to fetch)'", | ||
| "echo ''", | ||
| "echo 'Tailscale Mesh:'", | ||
| "tailscale status 2>/dev/null | head -10 || echo ' Tailscale not connected'" | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 4403
Remove the
kvm4label fromkvm4-2instances to prevent unintended job routing.Workflows in
.github/workflows/self-hosted-builds.yml:270and.github/workflows/self-hosted-builds-hardened.yml:381targetruns-on: [self-hosted, kvm4, production]. Bothkvm4-1andkvm4-2currently emit thekvm4label, making the data-services node (kvm4-2) eligible for these legacy jobs. Keep thekvm4alias onkvm4-1only.Fix required in two files:
kvm4,from the kvm4-2 label emission..claude/scripts/setup-runner.sh, line 25**: UpdateHOST_LABELS["kvm4-2"]to remove thekvm4` label.After these changes:
kvm4-1β emitskvm4(eligible for legacy workflows)kvm4-2β does NOT emitkvm4(not eligible for legacy workflows)π€ Prompt for AI Agents