feat: add various infrastructure check and automation scripts
This commit is contained in:
25
scripts/final_health_check.py
Normal file
25
scripts/final_health_check.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import paramiko
|
||||
import sys
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
# 1. Spacedock
|
||||
c_sd = paramiko.SSHClient()
|
||||
c_sd.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c_sd.connect('140.44.4.90', username='rancher', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
_, o, _ = c_sd.exec_command("kubectl get pods -A | grep -E 'glm|vllm|qdrant|triton'")
|
||||
print("Spacedock Pods:\n", o.read().decode().strip())
|
||||
_, o, _ = c_sd.exec_command("kubectl get pvc -A | grep -E 'glm|vllm|qdrant|triton'")
|
||||
print("\nSpacedock PVCs:\n", o.read().decode().strip())
|
||||
c_sd.close()
|
||||
|
||||
# 2. Heimdall
|
||||
c_h = paramiko.SSHClient()
|
||||
c_h.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c_h.connect('140.44.4.71', username='snarf', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
_, o, _ = c_h.exec_command("echo 'Katzir476!' | sudo -S sqlite3 /var/lib/docker-data/heimdall/config/www/app.sqlite 'SELECT id, username, public_front FROM users;'")
|
||||
print("\nHeimdall Users:\n", o.read().decode().strip())
|
||||
_, o, _ = c_h.exec_command("echo 'Katzir476!' | sudo -S sqlite3 /var/lib/docker-data/heimdall/config/www/app.sqlite 'SELECT count(*) FROM items WHERE pinned=1;'")
|
||||
print("Heimdall Pinned Items Count:\n", o.read().decode().strip())
|
||||
c_h.close()
|
||||
|
||||
Reference in New Issue
Block a user