File size: 2,254 Bytes
d59ae58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash

# Quick Start Debug Script for Multi-Agent NLP System
# This script helps you debug and validate your multi-agent system step by step

set -e  # Exit on any error

echo "πŸš€ Multi-Agent NLP System - Quick Start Debug"
echo "=============================================="

# Check if we're in the right directory
if [ ! -f "shared/kafka_client.py" ]; then
    echo "❌ Error: Please run this script from the multi-agent-nlp-system directory"
    exit 1
fi

echo ""
echo "πŸ“‹ Step 1: Installing Python dependencies..."
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-validation.txt

echo ""
echo "πŸ“‹ Step 2: Checking Docker status..."
if ! docker --version > /dev/null 2>&1; then
    echo "❌ Docker is not installed or not running"
    echo "πŸ’‘ Please install Docker and ensure it's running"
    exit 1
fi

if ! docker info > /dev/null 2>&1; then
    echo "❌ Docker daemon is not running"
    echo "πŸ’‘ Please start Docker daemon"
    exit 1
fi

echo "βœ… Docker is running"

echo ""
echo "πŸ“‹ Step 3: Starting core infrastructure services..."
echo "πŸ”§ Starting Kafka, Redis, and MinIO..."

# Stop any existing containers
docker-compose -f docker-compose-minimal.yml down 2>/dev/null || true

# Start the minimal infrastructure
docker-compose -f docker-compose-minimal.yml up -d

echo "⏳ Waiting for services to start up..."
sleep 30

echo ""
echo "πŸ“‹ Step 4: Running infrastructure validation..."
python3 check_infrastructure.py

echo ""
echo "πŸ“‹ Step 5: Running comprehensive debug tests..."
python3 run_debug_tests.py

echo ""
echo "πŸŽ‰ Debug process completed!"
echo ""
echo "πŸ“Š Next steps:"
echo "   1. Review any failed tests above"
echo "   2. Check service logs: docker-compose -f docker-compose-minimal.yml logs"
echo "   3. Access MinIO console: http://localhost:9001 (admin/minioadmin123)"
echo "   4. Monitor Kafka: docker exec -it kafka kafka-topics --list --bootstrap-server localhost:9092"
echo ""
echo "πŸ”§ Troubleshooting:"
echo "   - Stop services: docker-compose -f docker-compose-minimal.yml down"
echo "   - View logs: docker-compose -f docker-compose-minimal.yml logs [service-name]"
echo "   - Restart services: docker-compose -f docker-compose-minimal.yml restart"