Service Management Quick Reference
Version: 1.0.0
Platform Commands (Manage All Services)
# Start all auto-start services
provisioning platform start
# Start specific services with dependencies
provisioning platform start control-center mcp-server
# Stop all running services
provisioning platform stop
# Stop specific services
provisioning platform stop orchestrator
# Restart services
provisioning platform restart
# Show platform status
provisioning platform status
# Check platform health
provisioning platform health
# View service logs
provisioning platform logs orchestrator --follow
Service Commands (Individual Services)
# List all services
provisioning services list
# List only running services
provisioning services list --running
# Filter by category
provisioning services list --category orchestration
# Service status
provisioning services status orchestrator
# Start service (with pre-flight checks)
provisioning services start orchestrator
# Force start (skip checks)
provisioning services start orchestrator --force
# Stop service
provisioning services stop orchestrator
# Force stop (ignore dependents)
provisioning services stop orchestrator --force
# Restart service
provisioning services restart orchestrator
# Check health
provisioning services health orchestrator
# View logs
provisioning services logs orchestrator --follow --lines 100
# Monitor health continuously
provisioning services monitor orchestrator --interval 30
Dependency & Validation
# View dependency graph
provisioning services dependencies
# View specific service dependencies
provisioning services dependencies control-center
# Validate all services
provisioning services validate
# Check readiness
provisioning services readiness
# Check required services for operation
provisioning services check server
Registered Services
| Service | Port | Type | Auto-Start | Dependencies |
|---|---|---|---|---|
| orchestrator | 8080 | Platform | Yes | - |
| control-center | 8081 | Platform | No | orchestrator |
| coredns | 5353 | Infrastructure | No | - |
| gitea | 3000, 222 | Infrastructure | No | - |
| oci-registry | 5000 | Infrastructure | No | - |
| mcp-server | 8082 | Platform | No | orchestrator |
| api-gateway | 8083 | Platform | No | orchestrator, control-center, mcp-server |
Docker Compose
# Start all services
cd provisioning/platform
docker-compose up -d
# Start specific services
docker-compose up -d orchestrator control-center
# Check status
docker-compose ps
# View logs
docker-compose logs -f orchestrator
# Stop all services
docker-compose down
# Stop and remove volumes
docker-compose down -v
Service State Directories
~/.provisioning/services/
├── pids/ # Process ID files
├── state/ # Service state (JSON)
└── logs/ # Service logs
Health Check Endpoints
| Service | Endpoint | Type |
|---|---|---|
| orchestrator | http://localhost:9090/health | HTTP |
| control-center | http://localhost:9080/health | HTTP |
| coredns | localhost:5353 | TCP |
| gitea | http://localhost:3000/api/healthz | HTTP |
| oci-registry | http://localhost:5000/v2/ | HTTP |
| mcp-server | http://localhost:8082/health | HTTP |
| api-gateway | http://localhost:8083/health | HTTP |
Common Workflows
Start Platform for Development
# Start core services
provisioning platform start orchestrator
# Check status
provisioning platform status
# Check health
provisioning platform health
Start Full Platform Stack
# Use Docker Compose
cd provisioning/platform
docker-compose up -d
# Verify
docker-compose ps
provisioning platform health
Debug Service Issues
# Check service status
provisioning services status <service>
# View logs
provisioning services logs <service> --follow
# Check health
provisioning services health <service>
# Validate prerequisites
provisioning services validate
# Restart service
provisioning services restart <service>
Safe Service Shutdown
# Check dependents
nu -c "use lib_provisioning/services/mod.nu *; can-stop-service orchestrator"
# Stop with dependency check
provisioning services stop orchestrator
# Force stop if needed
provisioning services stop orchestrator --force
Troubleshooting
Service Won’t Start
# 1. Check prerequisites
provisioning services validate
# 2. View detailed status
provisioning services status <service>
# 3. Check logs
provisioning services logs <service>
# 4. Verify binary/image exists
ls ~/.provisioning/bin/<service>
docker images | grep <service>
Health Check Failing
# Check endpoint manually
curl http://localhost:9090/health
# View health details
provisioning services health <service>
# Monitor continuously
provisioning services monitor <service> --interval 10
PID File Stale
# Remove stale PID file
rm ~/.provisioning/services/pids/<service>.pid
# Restart service
provisioning services restart <service>
Port Already in Use
# Find process using port
lsof -i :9090
# Kill process
kill <PID>
# Restart service
provisioning services start <service>
Integration with Operations
Server Operations
# Orchestrator auto-starts if needed
provisioning server create
# Manual check
provisioning services check server
Workflow Operations
# Orchestrator auto-starts
provisioning workflow submit my-workflow
# Check status
provisioning services status orchestrator
Test Operations
# Orchestrator required for test environments
provisioning test quick kubernetes
# Pre-flight check
provisioning services check test-env
Advanced Usage
Custom Service Startup Order
Services start based on:
- Dependency order (topological sort)
start_orderfield (lower = earlier)
Auto-Start Configuration
Edit provisioning/config/services.toml:
[services.<service>.startup]
auto_start = true # Enable auto-start
start_timeout = 30 # Timeout in seconds
start_order = 10 # Startup priority
Health Check Configuration
[services.<service>.health_check]
type = "http" # http, tcp, command, file
interval = 10 # Seconds between checks
retries = 3 # Max retry attempts
timeout = 5 # Check timeout
[services.<service>.health_check.http]
endpoint = "http://localhost:9090/health"
expected_status = 200
Key Files
- Service Registry:
provisioning/config/services.toml - KCL Schema:
provisioning/kcl/services.k - Docker Compose:
provisioning/platform/docker-compose.yaml - User Guide:
docs/user/SERVICE_MANAGEMENT_GUIDE.md
Getting Help
# View documentation
cat docs/user/SERVICE_MANAGEMENT_GUIDE.md | less
# Run verification
nu provisioning/core/nulib/tests/verify_services.nu
# Check readiness
provisioning services readiness
Quick Tip: Use --help flag with any command for detailed usage information.