feat: add cluster auditing, management, and upgrade scripts

This commit is contained in:
2026-11-04 17:58:07 -05:00
parent 8117326b14
commit 1b378b29f3
128 changed files with 4744 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('140.44.4.41', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
py_script = """python3 -c '
# Simple BoltDB reader without external dependencies
# Or let us inspect with strings or hexdump
import os
print("BoltDB file size:", os.path.getsize("/var/lib/semaphore/database.boltdb"))
'"""
# In the pod, let us see if boltdb has project records
cmd = """kubectl exec -n infrastructure deployment/semaphore -c semaphore -- /bin/sh -c '
strings /var/lib/semaphore/database.boltdb | grep -E "name|title|playbook|project" | head -n 40
'"""
_, out, err = ssh.exec_command(cmd)
print("Strings from Semaphore BoltDB:")
print(out.read().decode())
ssh.close()