feat: add homelab deployment configs, documentation, and automation scripts

This commit is contained in:
2026-11-12 16:57:08 -05:00
parent 1228b957de
commit 5a70460e89
270 changed files with 9709 additions and 47 deletions

View File

@@ -0,0 +1,45 @@
import paramiko
import sys
import time
sys.stdout.reconfigure(encoding='utf-8')
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect('140.44.4.71', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
shepherd_compose = '''version: "3.8"
services:
shepherd:
image: containrrr/shepherd:latest
environment:
- SLEEP_TIME=24h
- IGNORELIST_SERVICES=nginx-proxy-manager_app nginx-proxy-manager_backup
- UPDATE_OPTIONS=--with-registry-auth
- ROLLBACK_FAILURE=true
- TZ=America/New_York
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
restart_policy:
condition: on-failure
'''
sftp = c.open_sftp()
with sftp.file('/tmp/shepherd_compose.yml', 'w') as f:
f.write(shepherd_compose)
sftp.close()
_, o, _ = c.exec_command("docker stack deploy -c /tmp/shepherd_compose.yml shepherd")
print(o.read().decode())
time.sleep(3)
_, o, _ = c.exec_command("docker service ps shepherd_shepherd")
print(o.read().decode())
c.close()