Skip to content

Latest commit

 

History

History
279 lines (208 loc) · 9.97 KB

File metadata and controls

279 lines (208 loc) · 9.97 KB

OpsOrch Docker Compose Configurations

This repository provides several Docker Compose configurations to run the complete OpsOrch stack in different environments.

Quick Start (Demo Environment)

The fastest way to try OpsOrch is with the demo configuration using mock adapters:

# Download the demo configuration
curl -O https://raw.githubusercontent.com/OpsOrch/.github/main/profile/docker-compose.yml

# Start the complete stack with demo data
docker compose up -d

# Access the services
open http://localhost:3000  # Console UI
curl http://localhost:8080/health -H 'Authorization: Bearer demo'  # Core API health check
curl http://localhost:7070/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'  # MCP tools

This starts:

  • OpsOrch Mock Adapters (includes Core + all mock providers with demo data) on port 8080
  • OpsOrch MCP Server (AI tools layer) on port 7070
  • OpsOrch Console (web UI) on port 3000

Available Configurations

1. docker-compose.yml - Demo/Evaluation

Best for: First-time users, demos, evaluation

  • Uses mock adapters with realistic demo data
  • Single console instance
  • Minimal configuration required
  • Perfect for understanding OpsOrch capabilities
curl -O https://raw.githubusercontent.com/OpsOrch/.github/main/profile/docker-compose.yml
docker compose up -d

2. docker-compose.dev.yml - Development

Best for: Developers and local development

  • Mock adapters with debug logging
  • Console plus optional Copilot integration
  • Development-friendly configuration
curl -O https://raw.githubusercontent.com/OpsOrch/.github/main/profile/docker-compose.dev.yml
docker compose -f docker-compose.dev.yml up -d

Access:

3. docker-compose.prod.yml - Production Template

Best for: Production deployments with real providers

  • Base Core image (requires custom build with adapters)
  • Production-ready configuration
  • Environment variable driven
  • Requires real provider credentials
curl -O https://raw.githubusercontent.com/OpsOrch/.github/main/profile/docker-compose.prod.yml
# 1. Build custom image with your adapters (see example below)
# 2. Configure environment variables
# 3. Start the stack
docker compose -f docker-compose.prod.yml up -d

Production Setup

Step 1: Build Custom Core Image

Create a Dockerfile with your required adapters:

FROM ghcr.io/opsorch/opsorch-core:latest
WORKDIR /opt/opsorch

# Download specific adapter versions you need
ADD https://github.com/OpsOrch/opsorch-jira-adapter/releases/download/v0.1.0/ticketplugin-linux-amd64 ./plugins/ticketplugin
ADD https://github.com/OpsOrch/opsorch-pagerduty-adapter/releases/download/v0.1.0/incidentplugin-linux-amd64 ./plugins/incidentplugin
ADD https://github.com/OpsOrch/opsorch-prometheus-adapter/releases/download/v0.1.0/metricplugin-linux-amd64 ./plugins/metricplugin
ADD https://github.com/OpsOrch/opsorch-slack-adapter/releases/download/v0.1.0/messagingplugin-linux-amd64 ./plugins/messagingplugin

RUN chmod +x ./plugins/*

Build your custom image:

docker build -t my-opsorch-core:latest .

Step 2: Configure Environment Variables

Create a .env file. Each capability in opsorch-core loads JSON from OPSORCH_<CAPABILITY>_CONFIG via loadProviderConfig (see opsorch-core/api/provider_config_handler.go:199) and forwards that map directly to the adapter. Use the fields the adapters document (examples below match the default PagerDuty/Jira/Prometheus/Elastic/Slack bundles that ship with the Compose templates):

# Security
OPSORCH_BEARER_TOKEN=your-secure-random-token-here

# Incident Configuration (PagerDuty incident plugin)
OPSORCH_INCIDENT_CONFIG={"apiToken":"your-pd-token","serviceID":"PXXXXXX","fromEmail":"pagerduty-user@example.com","apiURL":"https://api.pagerduty.com"}

# Ticket Configuration (Jira ticket plugin)
OPSORCH_TICKET_CONFIG={"apiToken":"your-jira-token","email":"your-email@example.com","apiURL":"https://your-domain.atlassian.net","projectKey":"OPS","defaultIssueType":"Task"}

# Metric Configuration (Prometheus metric plugin)
OPSORCH_METRIC_CONFIG={"url":"http://your-prometheus:9090"}

# Log Configuration (Elasticsearch log plugin)
OPSORCH_LOG_CONFIG={"addresses":["http://your-elasticsearch:9200"],"username":"elastic","password":"your-password","indexPattern":"logs-*"}

# Messaging Configuration (Slack messaging plugin)
OPSORCH_MESSAGING_CONFIG={"token":"xoxb-your-slack-bot-token"}

# Service Configuration (PagerDuty service plugin)
OPSORCH_SERVICE_CONFIG={"apiToken":"your-pd-token","apiURL":"https://api.pagerduty.com"}

# Additional capabilities follow the same pattern: export `OPSORCH_<CAPABILITY>_CONFIG`
# with JSON that matches the adapter you mount (alerts, deployments, etc.).

# Console Configuration
CORE_URL=http://localhost:8080
CONSOLE_URL=http://localhost:3000
# COPILOT_URL=http://localhost:6060

Step 3: Update docker-compose.prod.yml

Replace the Core service image with your custom image:

services:
  opsorch-core:
    image: my-opsorch-core:latest  # Your custom image
    # ... rest of configuration

Step 4: Deploy

docker compose -f docker-compose.prod.yml up -d

Available Adapters

Set the JSON payloads in the Configuration column as OPSORCH_<CAPABILITY>_CONFIG for the respective capability (e.g., OPSORCH_TICKET_CONFIG for Jira).

Provider Capability Plugin Binary Configuration
PagerDuty Incident, Service incidentplugin, serviceplugin Incident: {"apiToken":"pd_token","serviceID":"PXXXXXX","fromEmail":"user@example.com"}
Service: {"apiToken":"pd_token"}
Jira Ticket ticketplugin {"apiToken":"token","email":"user@domain","apiURL":"https://domain.atlassian.net","projectKey":"PROJ"}
Prometheus Metric metricplugin {"url":"http://prometheus:9090"}
Elasticsearch Log logplugin {"addresses":["http://elasticsearch:9200"],"username":"user","password":"pass","indexPattern":"logs-*"}
Datadog Metric, Log, Alert, Incident, Service metricplugin, logplugin, etc. {"apiKey":"dd_api_key","appKey":"dd_app_key","site":"datadoghq.com"}
Slack Messaging messagingplugin {"token":"xoxb-slack-bot-token"}

Download pre-built binaries from each adapter's GitHub Releases.

Service Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│  Console UI     │    │   MCP Server    │    │ Mock Adapters   │
│  (Next.js)      │    │  (TypeScript)   │    │ (Core + Mocks)  │
│  Port 3000      │◄──►│  Port 7070      │◄──►│   Port 8080     │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                                       │
                                                       ▼
                                              ┌─────────────────┐
                                              │   Demo Data     │
                                              │ (All Providers) │
                                              └─────────────────┘

Health Checks

All services include health checks. Monitor service status:

# Check all services
docker compose ps

# Check individual service logs
docker compose logs opsorch-mock-adapters
docker compose logs opsorch-mcp
docker compose logs opsorch-console

# Manual health checks
curl http://localhost:8080/health -H 'Authorization: Bearer demo'
curl http://localhost:7070/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
curl http://localhost:3000

Scaling and High Availability

For production deployments:

  1. Load Balancing: Put a load balancer (nginx, HAProxy) in front of multiple Core instances
  2. Database: Core is stateless, but consider external secret storage for production
  3. Monitoring: Add Prometheus metrics and Grafana dashboards
  4. Logging: Configure centralized logging (ELK stack, Datadog, etc.)
  5. Security: Use proper TLS certificates and secure token management

Troubleshooting

Common Issues

Services won't start:

# Check logs
docker compose logs

# Verify network connectivity
docker network ls
docker network inspect opsorch-network

Console can't reach Core:

# Verify Mock Adapters service is healthy
curl http://localhost:8080/health -H 'Authorization: Bearer demo'

# Check console proxy configuration in docker-compose.yml
# Ensure OPSORCH_API_BASE_URL and OPSORCH_API_TOKEN are correct

MCP tools not working:

# Test MCP server directly
curl http://localhost:7070/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# Check Core connectivity from MCP container
docker exec opsorch-mcp wget -qO- --header='Authorization: Bearer demo' http://opsorch-mock-adapters:8080/health

Provider authentication errors:

# Check Mock Adapters logs for any issues
docker compose logs opsorch-mock-adapters

# Verify provider configuration JSON is valid (for production)
echo $OPSORCH_TICKET_CONFIG | jq .

Getting Help

  • Check service logs: docker compose logs [service-name]
  • Verify environment variables: docker compose config
  • Test individual components: Use curl commands above
  • File issues: GitHub Issues

Cleanup

# Stop services
docker compose down

# Remove volumes (careful - this deletes data!)
docker compose down -v

# Remove images
docker compose down --rmi all