Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

ServicePortTypeAuto-StartDependencies
orchestrator8080PlatformYes-
control-center8081PlatformNoorchestrator
coredns5353InfrastructureNo-
gitea3000, 222InfrastructureNo-
oci-registry5000InfrastructureNo-
mcp-server8082PlatformNoorchestrator
api-gateway8083PlatformNoorchestrator, 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

ServiceEndpointType
orchestratorhttp://localhost:9090/healthHTTP
control-centerhttp://localhost:9080/healthHTTP
corednslocalhost:5353TCP
giteahttp://localhost:3000/api/healthzHTTP
oci-registryhttp://localhost:5000/v2/HTTP
mcp-serverhttp://localhost:8082/healthHTTP
api-gatewayhttp://localhost:8083/healthHTTP

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:

  1. Dependency order (topological sort)
  2. start_order field (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.