From 69bf6af41975b9bd4dcdf954b4e21889a628e13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Thu, 27 Nov 2025 11:51:21 +0100 Subject: [PATCH] chore: minimal refactoring --- arty.yml | 68 +++++++++++++++++++++++++++----------------------------- start.sh | 20 ++++++++++++----- 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/arty.yml b/arty.yml index d221b9d..051ecb3 100644 --- a/arty.yml +++ b/arty.yml @@ -86,45 +86,10 @@ references: scripts: setup: | arty deps - arty setup/tailscale arty setup/services arty setup/comfyui arty models/download arty models/link - arty supervisor/start - - setup/tailscale: | - echo "=========================================" - echo " Setting up tailscale" - echo "=========================================" - echo "" - - if [ ! "$TAILSCALE_AUTHKEY" ]; then - echo " ⚠ Tailscale disabled (no TAILSCALE_AUTHKEY in env)" - echo " Services requiring VPN connectivity will not work" - exit 1 - fi - - echo " Starting Tailscale daemon..." - tailscaled --tun=userspace-networking --socks5-server=localhost:1055 & - sleep 3 - - echo " Connecting to Tailscale network..." - HOSTNAME="runpod-ai-orchestrator" - tailscale up --authkey="$TAILSCALE_AUTHKEY" --advertise-tags=tag:gpu --hostname="$HOSTNAME" || { - echo " ⚠ Tailscale connection failed, continuing without VPN" - } - - # Get Tailscale IP if connected - TAILSCALE_IP=$(tailscale ip -4 2>/dev/null || echo "not connected") - if [ "$TAILSCALE_IP" == "not connected" ]; then - echo " ⚠ Tailscale failed to obtain IP" - exit 1 - fi - - echo " ✓ Tailscale connected" - echo " Hostname: $HOSTNAME" - echo " IP: $TAILSCALE_IP" setup/services: | echo "=========================================" @@ -227,6 +192,39 @@ scripts: artifact_civitai_download.sh link -c ./models/models_civitai.yaml --cache-dir $PWD/.cache/civitai --output-dir ./services/comfyui/models artifact_huggingface_download.sh link -c ./models/models_huggingface.yaml --cache-dir $PWD/.cache/huggingface --output-dir ./services/comfyui/models + tailscale/start: | + echo "=========================================" + echo " Starting tailscale" + echo "=========================================" + echo "" + + if [ ! "$TAILSCALE_AUTHKEY" ]; then + echo " ⚠ Tailscale disabled (no TAILSCALE_AUTHKEY in env)" + echo " Services requiring VPN connectivity will not work" + exit 1 + fi + + echo " Starting Tailscale daemon..." + tailscaled --tun=userspace-networking --socks5-server=localhost:1055 & + sleep 3 + + echo " Connecting to Tailscale network..." + HOSTNAME="runpod-ai-orchestrator" + tailscale up --authkey="$TAILSCALE_AUTHKEY" --advertise-tags=tag:gpu --hostname="$HOSTNAME" || { + echo " ⚠ Tailscale connection failed, continuing without VPN" + } + + # Get Tailscale IP if connected + TAILSCALE_IP=$(tailscale ip -4 2>/dev/null || echo "not connected") + if [ "$TAILSCALE_IP" == "not connected" ]; then + echo " ⚠ Tailscale failed to obtain IP" + exit 1 + fi + + echo " ✓ Tailscale connected" + echo " Hostname: $HOSTNAME" + echo " IP: $TAILSCALE_IP" + # # Supervisor Control Scripts # diff --git a/start.sh b/start.sh index 1dbc9a0..166203f 100644 --- a/start.sh +++ b/start.sh @@ -55,17 +55,25 @@ else echo " ⏭ Skipping" fi +# [5/7] Setting up tailscale +echo "[5/7] Starting tailscale..." +cd "$PWD/orchestrator" +arty tailscale/start +cd - +echo " ✓ Started successfully" + +# [6/7] Starting supervisor +echo "[6/7] Starting supervisor..." +cd "$PWD/orchestrator" +arty supervisor/start +cd - +echo " ✓ Started successfully" + # Display connection information echo "" echo "========================================" echo " Container Ready" echo "========================================" -echo "Services:" -echo " - SSH: port 22" -if [ -n "${TAILSCALE_IP:-}" ] && [ "$TAILSCALE_IP" != "not connected" ]; then - echo " - Tailscale IP: $TAILSCALE_IP" -fi -echo "" echo "========================================" # Keep container running