bluefly / alternative_services
Discover, configure, and monitor external services and containers from Drupal
Requires
- php: >=8.1
- drupal/core: ^10 || ^11
- symfony/service-contracts: ^3.0
Requires (Dev)
- drupal/core-dev: ^10 || ^11
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-09-26 18:25:24 UTC
README
What it actually does: A comprehensive service discovery and orchestration platform that transforms container management into an intuitive, AI-powered experience with visual composition, unified CLI/UI wizard, and Tour module integration across Docker, Kubernetes, and DDEV environments.
✨ Key Features
🎯 Service Discovery Dashboard
- AI-powered environment detection with automatic service discovery across Docker, Kubernetes, and DDEV
- Smart categorization with real-time filtering (Web Services, Databases, Caching, Monitoring)
- Multi-environment discovery from local containers, Kubernetes clusters, and DDEV projects
- Service health monitoring with dependency analysis and real-time status updates
- AI recommendations based on automated infrastructure analysis
🛠️ Visual Orchestration Builder
- Drag-and-drop interface for composing service workflows from containers, configs, and networking
- Real-time validation with dependency checking and conflict detection
- AI assistance for suggesting optimal service configurations and connections
- Multiple export formats (Docker Compose, Kubernetes YAML, DDEV Config, Terraform)
- Auto-save with progress tracking and session management
🧙♂️ Unified Setup Wizard (CLI + UI + Tour)
- Tour module integration for interactive guided service deployment experiences
- CLI support (
drush service:wizard
) with full ASCII interface and interactive prompts - Real-time progress via WebSocket for live updates during service deployment
- Smart rollback capabilities on deployment failure
- Automatic tour generation from deployed service configurations
🤖 AI Integration Points
- Smart service suggestions based on infrastructure configuration analysis
- Natural language search for finding relevant services ("I need a web app with database")
- Automated configuration generation for optimal service settings
- Intelligent dependency resolution and conflict detection
- Context-aware help system with troubleshooting for container environments
🔗 Smart Integrations
- Docker Engine: Native container discovery and management
- Kubernetes: Cluster service orchestration and deployment
- DDEV: Local development environment integration
- SSL Certificate Manager: Automated certificate generation and management
- Tour Module: Interactive onboarding experiences
Features
Discovery Dashboard
- Real-time service discovery across multiple environments
- Health monitoring and status tracking
- SSL certificate management integration
- AI-powered recommendations
- Export/import configuration capabilities
Orchestration Builder
- Visual workflow designer with drag-and-drop interface
- Node-based service configuration
- Real-time validation with error reporting
- Template system for common configurations
- AI suggestions for optimization
Setup Wizard
- Multi-step configuration process
- Environment detection and selection
- Service discovery and configuration
- SSL certificate setup
- Tour mode for guided learning
CLI Integration
- Interactive Drush commands with ASCII art interfaces
- Tour-guided CLI workflows
- Health monitoring and management
- SSL certificate operations
- Configuration export/import
Installation
Enable the module:
drush en alternative_services
Run the setup wizard:
# Interactive UI wizard drush alternative-services:setup # Quick setup with defaults drush alternative-services:setup --quick # Tour-guided setup drush alternative-services:setup --tour
Usage
Web Interface
Navigate to Configuration > Services > Alternative Services to access:
- Discovery Dashboard:
/admin/config/services/alternative-services/discovery
- Orchestration Builder:
/admin/config/services/alternative-services/orchestration
- Setup Wizard:
/admin/config/services/alternative-services/setup
Drush Commands
Service Discovery
# Interactive discovery dashboard
drush alternative-services:discovery
# Discover services in specific environment
drush as:discover --environment=ddev
# Export discovered services
drush as:discover --export=/path/config.json
# Start with interactive tour
drush as:discover --tour
Orchestration Builder
# Interactive orchestration builder
drush alternative-services:orchestrate
# Load pre-built template
drush as:orchestrate --load-template=basic
# Validate configuration only
drush as:orchestrate --validate-only
# Tour-guided orchestration
drush as:orchestrate --tour
Setup Wizard
# Full interactive setup
drush alternative-services:setup
# Quick setup with defaults
drush as:setup --quick
# Setup for specific environment
drush as:setup --environment=ddev
# Tour-guided setup
drush as:setup --tour
Health Monitoring
# Check all services health
drush alternative-services:health
# Continuous monitoring
drush as:health --watch
# Check specific service
drush as:health --service=ollama
SSL Management
# Generate SSL certificates
drush alternative-services:ssl generate
# Check certificate status
drush as:ssl status
# Renew certificates
drush as:ssl renew
Tour Generation
# Generate tour from current configuration
drush alternative-services:generate-tour
# Export tour configuration
drush as:tour-gen --output=tour.json
Configuration
Environment Variables
The module supports the following environment variables:
# LLM Platform root directory
export LLM_PLATFORM_ROOT="${HOME}/Sites/LLM"
# Alternative Services configuration
export ALTERNATIVE_SERVICES_CONFIG_DIR="${HOME}/.alternative-services"
# WebSocket configuration
export ALTERNATIVE_SERVICES_WS_HOST="localhost"
export ALTERNATIVE_SERVICES_WS_PORT="8080"
Service Configuration
Configure services via the web interface or by editing configuration files:
# Example service configuration
services:
ollama:
name: "Ollama AI Service"
type: "AI"
endpoint: "http://localhost:11434"
enabled: true
health_check_interval: 30
ssl_enabled: false
qdrant:
name: "Qdrant Vector Database"
type: "DATABASE"
endpoint: "http://localhost:6333"
enabled: true
health_check_interval: 60
ssl_enabled: true
SSL Configuration
SSL certificates are managed automatically or can be configured manually:
ssl:
mode: "auto" # auto, manual, none
domain: "local.bluefly.io"
wildcard: true
auto_renewal: true
certificates_path: "/path/to/certificates"
API Integration
The module provides both GraphQL and REST APIs:
GraphQL Schema
type Query {
alternativeServices: [AlternativeService]
alternativeService(id: String!): AlternativeService
serviceHealth(id: String!): ServiceHealth
discoverServices(environment: String!): [DiscoveredService]
}
type Mutation {
createAlternativeService(input: AlternativeServiceInput!): AlternativeService
updateAlternativeService(id: String!, input: AlternativeServiceInput!): AlternativeService
deleteAlternativeService(id: String!): Boolean
executeWorkflow(input: WorkflowInput!): WorkflowResult
}
REST Endpoints
GET /api/alternative-services
- List all servicesPOST /api/alternative-services
- Create new serviceGET /api/alternative-services/{id}
- Get specific servicePUT /api/alternative-services/{id}
- Update serviceDELETE /api/alternative-services/{id}
- Delete servicePOST /api/alternative-services/discovery/start
- Start discoveryGET /api/alternative-services/health
- Health check all servicesPOST /api/alternative-services/ssl/generate
- Generate SSL certificates
AI Integration
The module integrates with AI services for:
- Smart Service Discovery: AI-powered service detection and recommendation
- Configuration Assistance: Intelligent configuration suggestions
- Health Prediction: Predictive health monitoring and alerting
- Workflow Optimization: AI-suggested improvements for orchestration workflows
WebSocket Support
Real-time updates are provided via WebSocket connections:
// Connect to WebSocket for real-time updates
const ws = new WebSocket('ws://localhost:8080/alternative-services');
ws.onmessage = function(event) {
const data = JSON.parse(event.data);
switch(data.type) {
case 'service_discovered':
// Handle new service discovery
break;
case 'health_update':
// Handle health status change
break;
case 'configuration_change':
// Handle configuration update
break;
}
};
Tour Integration
The module integrates with Drupal's Tour module to provide guided experiences:
- Interactive step-by-step tutorials
- Context-aware help and hints
- CLI command demonstrations
- Best practice guidance
Tours can be customized and extended through the configuration interface.
Troubleshooting
Common Issues
Service Discovery Not Working
# Check environment detection
drush as:health
# Verify network connectivity
drush as:discover --environment=manual
# Check logs
drush watchdog:show --filter=alternative_services
SSL Certificate Issues
# Regenerate certificates
drush as:ssl generate --force
# Check certificate status
drush as:ssl status
# Verify domain configuration
drush as:ssl status --domain=your-domain.com
WebSocket Connection Errors
- Ensure WebSocket server is running
- Check firewall settings
- Verify port availability
- Review browser console for errors
Debug Mode
Enable debug mode for additional logging:
# In settings.local.php
$config['alternative_services.settings']['debug'] = TRUE;
Development
Extending the Module
The module follows Drupal best practices and provides extension points:
- Custom Service Types: Add new service types via plugins
- Discovery Adapters: Implement custom environment adapters
- Orchestration Templates: Create reusable workflow templates
- AI Integrations: Add custom AI service providers
- Tour Customization: Create custom tour configurations
Testing
Run the test suite:
# Unit tests
phpunit --group alternative_services
# Functional tests
phpunit --group alternative_services_functional
# JavaScript tests
npm test
Support
For support and documentation:
License
This module is part of the LLM Platform ecosystem and follows the same licensing terms.