feat: add Supervisor process manager for service management
- Add supervisord.conf with ComfyUI and orchestrator services - Update Ansible playbook with supervisor installation tag - Rewrite start-all.sh and stop-all.sh to use Supervisor - Add status.sh script for checking service status - Update arty.yml with supervisor commands and shortcuts - Update CLAUDE.md with Supervisor documentation and troubleshooting - Services now auto-restart on crashes with centralized logging Benefits: - Better process control than manual pkill/background jobs - Auto-restart on service crashes - Centralized log management in /workspace/logs/ - Web interface for monitoring (port 9001) - Works perfectly in RunPod containers (no systemd needed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
50
playbook.yml
50
playbook.yml
@@ -26,6 +26,7 @@
|
||||
# comfyui-nodes - Install essential custom nodes
|
||||
# comfyui-essential - Quick setup (ComfyUI + essential models only)
|
||||
# tailscale - Install and configure Tailscale
|
||||
# supervisor - Install and configure Supervisor process manager
|
||||
# systemd - Configure systemd services
|
||||
# validate - Health checks and validation
|
||||
#
|
||||
@@ -755,6 +756,55 @@
|
||||
|
||||
Note: Authentication requires manual intervention via provided URL
|
||||
|
||||
#
|
||||
# Supervisor Process Manager
|
||||
#
|
||||
- name: Install and configure Supervisor
|
||||
tags: [supervisor]
|
||||
block:
|
||||
- name: Install Supervisor
|
||||
pip:
|
||||
name: supervisor
|
||||
executable: pip3
|
||||
become: true
|
||||
|
||||
- name: Create logs directory
|
||||
file:
|
||||
path: "{{ workspace_dir }}/logs"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Deploy supervisord configuration
|
||||
copy:
|
||||
src: "{{ ai_dir }}/supervisord.conf"
|
||||
dest: "{{ workspace_dir }}/supervisord.conf"
|
||||
mode: '0644'
|
||||
|
||||
- name: Display Supervisor setup instructions
|
||||
debug:
|
||||
msg: |
|
||||
✓ Supervisor installed successfully!
|
||||
|
||||
Configuration: {{ workspace_dir }}/supervisord.conf
|
||||
Logs: {{ workspace_dir }}/logs/
|
||||
|
||||
Services configured:
|
||||
- comfyui: ComfyUI server (port 8188) - autostart enabled
|
||||
- orchestrator: Model orchestrator (port 9000) - autostart disabled
|
||||
|
||||
To start Supervisor:
|
||||
supervisord -c {{ workspace_dir }}/supervisord.conf
|
||||
|
||||
To manage services:
|
||||
supervisorctl status # Check service status
|
||||
supervisorctl start orchestrator # Start orchestrator
|
||||
supervisorctl restart comfyui # Restart ComfyUI
|
||||
supervisorctl stop all # Stop all services
|
||||
supervisorctl tail -f comfyui # Follow ComfyUI logs
|
||||
|
||||
Web interface:
|
||||
http://localhost:9001 (username: admin, password: runpod2024)
|
||||
|
||||
#
|
||||
# Systemd Services (Optional)
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user