Files
foxhunt/start_all_services.sh
jgrusewski 5452bb75af 🚀 Wave 77: Service Fixes & Production Certification (DEFERRED at 58.9%)
12 parallel agents executed - comprehensive service deployment and fixes

AGENTS COMPLETED (12/12):
 Agent 1: ML AWS Dependencies - Fixed 30+ compilation errors
 Agent 2: Data Result Types - Fixed 4 type conflicts
 Agent 3: Backtesting Rustls - Fixed CryptoProvider panic
 Agent 4: ML CLI Interface - Fixed deployment scripts
 Agent 5: Backtesting Deployment - Service operational (port 50052)
 Agent 6: API Gateway Deployment - Service operational (port 50050)
⚠️  Agent 7: Test Suite - Blocked by ML compilation timeout
⚠️  Agent 8: Load Testing - Architecture gap identified
 Agent 9: Integration Validation - Services communicating
⚠️  Agent 10: Certification - DEFERRED (58.9%, -2.1% regression)
 Agent 11: Performance Benchmarks - Auth <3μs validated
 Agent 12: Documentation - Comprehensive delivery report

PRODUCTION STATUS: 58.9% (5.3/9 criteria) - DOWN 2.1% from Wave 76

SERVICES: 4/4 Operational 
- Trading Service: port 50051 (PID 1256859)
- Backtesting Service: port 50052 (PID 1739871)
- ML Training Service: port 50053 (PID 1270680)
- API Gateway: port 50050 (PID 1747365)

CRITICAL BLOCKERS (3):
1. 🔴 Database container DOWN - blocks testing
2. 🔴 ML compilation timeout (60s+) - blocks test suite
3. 🔴 Load testing architecture gap - gRPC vs HTTP mismatch

FIXES APPLIED:
- ml/Cargo.toml: Added AWS SDK deps (aws-config, aws-sdk-s3, aws-types)
- ml/src/checkpoint/storage.rs: Fixed S3Client usage, tagging format
- ml/src/safety/memory_manager.rs: Removed invalid gc call
- data/src/providers/benzinga/production_historical.rs: Fixed Result types (lines 533, 1116)
- services/backtesting_service/src/main.rs: Added Rustls CryptoProvider init
- start_all_services.sh: Updated ML service to use 'serve' subcommand
- deployment/create_systemd_services.sh: Added ML CLI logic

DOCUMENTATION:
- docs/WAVE77_AGENT*.md (12 agent reports)
- docs/WAVE77_DELIVERY_REPORT.md
- docs/WAVE77_PRODUCTION_SCORECARD.md
- WAVE77_COMPLETION_SUMMARY.txt

NEXT WAVE: Fix database, ML timeout, load testing → achieve 100%
2025-10-03 17:29:52 +02:00

94 lines
2.8 KiB
Bash
Executable File

#!/bin/bash
# Wave 75 Agent 1: Start all backend services with proper TLS configuration
set -e
# Load and export environment variables
set -a
source .env
set +a
# Create logs directory
mkdir -p logs
echo "Starting Foxhunt HFT Services..."
echo "================================"
# Start Trading Service (port 50051)
echo "[1/4] Starting Trading Service on port 50051..."
./target/release/trading_service &> logs/trading.log &
TRADING_PID=$!
sleep 3
# Check if trading service started successfully
if ! kill -0 $TRADING_PID 2>/dev/null; then
echo "ERROR: Trading Service failed to start. Check logs/trading.log"
tail -20 logs/trading.log
exit 1
fi
echo "✓ Trading Service started (PID: $TRADING_PID)"
# Start Backtesting Service (port 50052)
echo "[2/4] Starting Backtesting Service on port 50052..."
./target/release/backtesting_service &> logs/backtesting.log &
BACKTEST_PID=$!
sleep 3
# Check if backtesting service started successfully
if ! kill -0 $BACKTEST_PID 2>/dev/null; then
echo "ERROR: Backtesting Service failed to start. Check logs/backtesting.log"
tail -20 logs/backtesting.log
exit 1
fi
echo "✓ Backtesting Service started (PID: $BACKTEST_PID)"
# Start ML Training Service (port 50053)
echo "[3/4] Starting ML Training Service on port 50053..."
./target/release/ml_training_service serve &> logs/ml_training.log &
ML_PID=$!
sleep 3
# Check if ML training service started successfully
if ! kill -0 $ML_PID 2>/dev/null; then
echo "ERROR: ML Training Service failed to start. Check logs/ml_training.log"
tail -20 logs/ml_training.log
exit 1
fi
echo "✓ ML Training Service started (PID: $ML_PID)"
# Wait for backend services to be ready
echo "Waiting for backend services to initialize..."
sleep 5
# Start API Gateway (port 50050)
echo "[4/4] Starting API Gateway on port 50050..."
./target/release/api_gateway &> logs/api_gateway.log &
GATEWAY_PID=$!
sleep 3
# Check if API gateway started successfully
if ! kill -0 $GATEWAY_PID 2>/dev/null; then
echo "ERROR: API Gateway failed to start. Check logs/api_gateway.log"
tail -20 logs/api_gateway.log
exit 1
fi
echo "✓ API Gateway started (PID: $GATEWAY_PID)"
echo ""
echo "================================"
echo "All services started successfully!"
echo "================================"
echo "Trading Service: localhost:50051 (PID: $TRADING_PID)"
echo "Backtesting Service: localhost:50052 (PID: $BACKTEST_PID)"
echo "ML Training Service: localhost:50053 (PID: $ML_PID)"
echo "API Gateway: localhost:50050 (PID: $GATEWAY_PID)"
echo ""
echo "Environment:"
echo " DATABASE: $DATABASE_URL"
echo " REDIS: $REDIS_URL"
echo " TLS CA: $TLS_CA_PATH"
echo ""
echo "Logs: ./logs/"
echo ""
echo "To stop all services: pkill -f '(trading_service|backtesting_service|ml_training_service|api_gateway)'"