feat: add boot staging configuration and automation utility scripts

This commit is contained in:
2026-11-02 14:09:13 -05:00
parent 08d085b95f
commit 90977592ab
26 changed files with 773 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import paramiko, time, sys
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('140.44.4.11', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
print("Monitoring sninfr2lnxwrk01 (140.44.4.21) first-boot progress...")
for attempt in range(1, 25):
# 1. Ping
stdin, stdout, stderr = ssh.exec_command('ping -c 1 -W 1 140.44.4.21 > /dev/null 2>&1 && echo ONLINE || echo OFFLINE')
ping_status = stdout.read().decode().strip()
# 2. Port 22
stdin, stdout, stderr = ssh.exec_command('nc -z -w 1 140.44.4.21 22 > /dev/null 2>&1 && echo OPEN || echo CLOSED')
ssh_port = stdout.read().decode().strip()
# 3. K3s node
stdin, stdout, stderr = ssh.exec_command('kubectl get node sninfr2lnxwrk01 -o jsonpath="{.status.conditions[-1].type}={.status.conditions[-1].status}" 2>/dev/null || echo "NOT_REGISTERED"')
k3s_status = stdout.read().decode().strip()
print(f"[{attempt * 10}s] Ping: {ping_status} | SSH Port: {ssh_port} | K3s Status: {k3s_status}")
if k3s_status == "Ready=True":
print("\nSUCCESS! sninfr2lnxwrk01 is Ready in Kubernetes!")
stdin, stdout, stderr = ssh.exec_command('kubectl get node sninfr2lnxwrk01 -o wide')
print(stdout.read().decode())
break
time.sleep(10)
ssh.close()