feat: add DNS setup blueprint and infrastructure automation scripts
This commit is contained in:
24
scripts/audit_harvester_live_nodes.py
Normal file
24
scripts/audit_harvester_live_nodes.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import paramiko
|
||||
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect('140.44.4.90', username='rancher', password='Katzir476!', timeout=10)
|
||||
|
||||
def run(cmd):
|
||||
stdin, stdout, stderr = c.exec_command(f"echo Katzir476! | sudo -S sh -c '{cmd}'")
|
||||
return stdout.read().decode().strip()
|
||||
|
||||
print("=== CPU & VIRTUALIZATION (lscpu) ===")
|
||||
print(run("lscpu | grep -E 'Model name|CPU\(s\):|Thread|Socket|Virtualization|NUMA'"))
|
||||
|
||||
print("\n=== KERNEL PARAMETERS (/proc/cmdline) ===")
|
||||
print(run("cat /proc/cmdline"))
|
||||
|
||||
print("\n=== STORAGE CONTROLLER (lspci) ===")
|
||||
print(run("lspci | grep -E 'RAID|SAS|SATA|Ethernet|Network'"))
|
||||
|
||||
print("\n=== BLOCK DEVICES (lsblk) ===")
|
||||
print(run("lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS"))
|
||||
|
||||
c.close()
|
||||
|
||||
Reference in New Issue
Block a user