lordraw/open-automator-streamlit

By lordraw

Updated 7 months ago

Interactive web UI for Open-Automator workflows with real-time monitoring and visual editing.

Image
Languages & frameworks
API management
0

1.1K

lordraw/open-automator-streamlit repository overview

Open-Automator Streamlit

Docker Image Version Docker Pulls Image Size Platform

Interactive web interface for managing and executing Open-Automator workflows with real-time monitoring.


Overview

Open-Automator Streamlit provides a user-friendly web UI built with Streamlit for creating, managing, and monitoring YAML-based automation workflows. It offers visual workflow editing, real-time execution monitoring, wallet management, and comprehensive logging.

Key Features
  • 🎨 Visual Workflow Editor - Create and edit YAML workflows through an intuitive UI
  • 📊 Real-time Monitoring - Watch workflow execution with live logs and status updates
  • 🔐 Wallet Management - Secure credential management with encryption support
  • 📝 Workflow Templates - Pre-built templates for common automation tasks
  • 🔄 Execution History - Track past executions with detailed logs
  • 🎛️ Module Configuration - Configure and test individual modules
  • 📤 Export/Import - Share workflows between environments
  • 🌐 Multi-Platform - Native support for AMD64 and ARM64 architectures

Quick Start

Basic Usage
docker run -d \
  -p 8501:8501 \
  --name open-automator-ui \
  lordraw/open-automator-streamlit:latest

Access the UI at http://localhost:8502 Access the api at http://localhost:8503

With Persistent Storage
docker run -d \
  -p 8501:8501 \
  -v $(pwd)/workflows:/app/workflows \
  -v $(pwd)/data:/app/data \
  -v $(pwd)/logs:/app/logs \
  --name open-automator-ui \
  lordraw/open-automator-streamlit:latest
With Wallet Support
docker run -d \
  -p 8501:8501 \
  -v $(pwd)/workflows:/app/workflows \
  -v $(pwd)/data:/app/data \
  -e OA_WALLET_FILE=/app/data/wallet.enc \
  -e OA_WALLET_PASSWORD=your_secure_password \
  --name open-automator-ui \
  lordraw/open-automator-streamlit:latest
Custom Port
docker run -d \
  -p 3000:8501 \
  -v $(pwd)/workflows:/app/workflows \
  --name open-automator-ui \
  lordraw/open-automator-streamlit:latest

Access at http://localhost:3000


Usage Examples

1. Create New Workflow
  1. Navigate to "Create Workflow" page
  2. Choose a template or start from scratch
  3. Define tasks using the visual editor
  4. Configure modules and parameters
  5. Save and execute
2. Execute Existing Workflow
# Place your workflow in the workflows directory
echo 'version: 1.0
tasks:
  - name: hello
    module: system
    action: execute_command
    params:
      command: echo "Hello from Streamlit!"' > workflows/hello.yaml

# Access UI and select the workflow from the dropdown
3. Monitor Execution
  • View real-time logs in the "Monitor" tab
  • Check execution status and progress
  • Review error messages and stack traces
  • Export logs for analysis
4. Manage Wallets
# Create encrypted wallet via UI
# Navigate to "Wallet Management"
# Add credentials with encryption
# Use in workflows with ${WALLET:key_name}

Environment Variables

VariableDescriptionDefault
STREAMLIT_SERVER_PORTStreamlit server port8501
STREAMLIT_SERVER_ADDRESSServer bind address0.0.0.0
OA_WALLET_FILEPath to wallet file-
OA_WALLET_PASSWORDWallet encryption password-
OA_LOG_LEVELLogging levelINFO
OA_WORKFLOWS_DIRWorkflows directory/app/workflows
OA_DATA_DIRData directory/app/data
OA_LOGS_DIRLogs directory/app/logs

Volume Mounts

Container PathPurposeRecommended
/app/workflowsYAML workflow files✅ Yes
/app/dataPersistent data (wallets, state)✅ Yes
/app/logsExecution logs✅ Yes
/app/templatesCustom workflow templatesOptional

Docker Compose

Basic Setup
version: '3.8'

services:
  streamlit-ui:
    image: lordraw/open-automator-streamlit:latest
    container_name: open-automator-ui
    ports:
      - "8501:8501"
    volumes:
      - ./workflows:/app/workflows
      - ./data:/app/data
      - ./logs:/app/logs
    environment:
      - OA_LOG_LEVEL=INFO
    restart: unless-stopped
With Wallet and Custom Config
version: '3.8'

services:
  streamlit-ui:
    image: lordraw/open-automator-streamlit:latest
    container_name: open-automator-ui
    ports:
      - "8501:8501"
    volumes:
      - ./workflows:/app/workflows
      - ./data:/app/data
      - ./logs:/app/logs
      - ./templates:/app/templates
    environment:
      - OA_WALLET_FILE=/app/data/production.wallet
      - OA_WALLET_PASSWORD=${WALLET_PASSWORD}
      - OA_LOG_LEVEL=DEBUG
      - STREAMLIT_SERVER_PORT=8501
      - STREAMLIT_SERVER_ADDRESS=0.0.0.0
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
      interval: 30s
      timeout: 10s
      retries: 3
Multi-Service Stack
version: '3.8'

services:
  # Web UI
  streamlit-ui:
    image: lordraw/open-automator-streamlit:latest
    ports:
      - "8501:8501"
    volumes:
      - workflows:/app/workflows
      - data:/app/data
      - logs:/app/logs
    environment:
      - OA_WALLET_FILE=/app/data/wallet.enc
      - OA_WALLET_PASSWORD=${WALLET_PASSWORD}
    depends_on:
      - postgres

  # CLI Worker
  shell-worker:
    image: lordraw/open-automator-shell:latest
    volumes:
      - workflows:/workflows
      - data:/data
    environment:
      - OA_WALLET_FILE=/data/wallet.enc
      - OA_WALLET_PASSWORD=${WALLET_PASSWORD}
    command: tail -f /dev/null  # Keep alive for manual execution

  # PostgreSQL (for workflow state)
  postgres:
    image: postgres:15-alpine
    environment:
      - POSTGRES_DB=automator
      - POSTGRES_USER=automator
      - POSTGRES_PASSWORD=${DB_PASSWORD}
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  workflows:
  data:
  logs:
  postgres_data:

UI Features

Workflow Editor
  • Syntax Highlighting - YAML syntax validation
  • Template Library - Pre-built workflow templates
  • Module Browser - Explore available modules and actions
  • Parameter Validation - Real-time parameter checking
  • Workflow Visualization - DAG view of task dependencies
Execution Monitor
  • Live Logs - Real-time log streaming
  • Progress Tracking - Task-by-task progress
  • Error Highlighting - Visual error indicators
  • Performance Metrics - Execution time per task
  • Export Results - Download logs and results
Wallet Manager
  • Secure Storage - Encrypted credential storage
  • Import/Export - Backup and restore wallets
  • Credential Testing - Test credentials before use
  • Access Control - Password-protected access
Configuration
  • Module Settings - Configure module parameters
  • Environment Variables - Manage environment settings
  • Logging Configuration - Adjust log levels
  • Theme Customization - Light/dark mode

Workflow Templates

Available templates in the UI:

  • Basic Execution - Simple command execution
  • File Operations - Copy, move, compress files
  • Git Operations - Clone, pull, commit, push
  • Database Tasks - PostgreSQL queries and backups
  • API Calls - HTTP requests with authentication
  • Notification Setup - Email, Slack, webhooks
  • Multi-Step Pipeline - Complex task orchestration

Available Modules

All Open-Automator modules are accessible through the UI:

ModuleDescriptionActions
systemSystem commandsexecute_command, file operations
gitGit operationsclone, pull, push, commit
networkNetwork operationshttp_request, download, upload
ioFile I/Oread, write, copy, move
pgPostgreSQLquery, backup, restore
notifyNotificationsemail, slack, webhook
utilityUtilitiestemplate, validate, transform

Healthcheck

The container includes a built-in healthcheck:

# Check if Streamlit is running
curl -f http://localhost:8501/_stcore/health

Use in Docker Compose:

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
  interval: 30s
  timeout: 10s
  retries: 3
  start_period: 40s

Networking

Access from Host
# Default
http://localhost:8501

# Custom port
docker run -p 3000:8501 lordraw/open-automator-streamlit:latest
http://localhost:3000
Access from Other Containers
services:
  app:
    image: myapp
    environment:
      - AUTOMATOR_UI_URL=http://streamlit-ui:8501

  streamlit-ui:
    image: lordraw/open-automator-streamlit:latest
Reverse Proxy (Nginx)
location /automator/ {
    proxy_pass http://localhost:8501/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

Troubleshooting

UI Not Loading
# Check if container is running
docker ps | grep open-automator-streamlit

# Check logs
docker logs open-automator-ui

# Verify port binding
docker port open-automator-ui

# Test health endpoint
curl http://localhost:8501/_stcore/health
Workflows Not Appearing
# Check workflows directory
docker exec open-automator-ui ls -la /app/workflows

# Verify volume mount
docker inspect open-automator-ui | grep -A 10 Mounts

# Check permissions
docker exec open-automator-ui ls -la /app/workflows/*.yaml
Wallet Issues
# Verify wallet file exists
docker exec open-automator-ui ls -la /app/data/wallet.enc

# Check environment variables
docker exec open-automator-ui env | grep OA_WALLET

# Test wallet password
docker logs open-automator-ui 2>&1 | grep -i wallet
Performance Issues
# Check resource usage
docker stats open-automator-ui

# Increase resources
docker run -d \
  --memory="2g" \
  --cpus="2.0" \
  -p 8501:8501 \
  lordraw/open-automator-streamlit:latest

# Enable debug logging
docker run -d \
  -e OA_LOG_LEVEL=DEBUG \
  -p 8501:8501 \
  lordraw/open-automator-streamlit:latest
Connection Refused
# Verify Streamlit is listening
docker exec open-automator-ui netstat -tulpn | grep 8501

# Check firewall
sudo ufw status
sudo ufw allow 8501/tcp

# Check Docker network
docker network inspect bridge

Security Considerations

Production Deployment
  • ✅ Use encrypted wallets for sensitive credentials
  • ✅ Set strong OA_WALLET_PASSWORD
  • ✅ Bind to specific IP: -e STREAMLIT_SERVER_ADDRESS=127.0.0.1
  • ✅ Use HTTPS reverse proxy (Nginx, Traefik)
  • ✅ Implement authentication (OAuth, LDAP)
  • ✅ Restrict Docker socket access
  • ✅ Use read-only volumes where possible
  • ✅ Regular security updates
Authentication
# Example with Traefik + OAuth
services:
  streamlit-ui:
    image: lordraw/open-automator-streamlit:latest
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.automator.rule=Host(`automator.example.com`)"
      - "traefik.http.routers.automator.middlewares=oauth@docker"
      - "traefik.http.routers.automator.tls.certresolver=letsencrypt"

Tips & Best Practices

Workflow Organization
  • Use descriptive workflow names
  • Group related workflows in subdirectories
  • Add comments in YAML files
  • Use templates for repetitive tasks
  • Version control your workflows
Performance
  • Use workflow caching for repeated tasks
  • Limit concurrent executions
  • Clean up old logs regularly
  • Monitor resource usage
  • Use database for state management
Debugging
  • Start with OA_LOG_LEVEL=DEBUG
  • Test modules individually first
  • Use the UI's execution monitor
  • Check logs in real-time
  • Export logs for offline analysis
Backup
# Backup workflows and data
docker run --rm \
  -v $(pwd)/backup:/backup \
  -v open-automator_workflows:/workflows \
  -v open-automator_data:/data \
  alpine tar czf /backup/automator-backup-$(date +%Y%m%d).tar.gz /workflows /data

# Restore
docker run --rm \
  -v $(pwd)/backup:/backup \
  -v open-automator_workflows:/workflows \
  -v open-automator_data:/data \
  alpine tar xzf /backup/automator-backup-YYYYMMDD.tar.gz

Image Details

  • Base Image: python:3.12-slim
  • Size: ~600MB
  • Platforms: linux/amd64, linux/arm64
  • Exposed Port: 8501
  • Working Directory: /app
  • User: root (can be changed)

Support


Built with ❤️ by the Open-Automator team

Tag summary

Content type

Image

Digest

sha256:fbd328875

Size

308.3 MB

Last updated

7 months ago

docker pull lordraw/open-automator-streamlit