-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·73 lines (61 loc) · 1.9 KB
/
setup.sh
File metadata and controls
executable file
·73 lines (61 loc) · 1.9 KB
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
73
#!/bin/bash
# Setup script for Snort3-AI-Ops development environment
set -e
echo "=========================================="
echo "Snort3-AI-Ops Development Setup"
echo "=========================================="
# Check Python version
echo "Checking Python version..."
python3 --version
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
else
echo "Virtual environment already exists"
fi
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install requirements
echo "Installing dependencies..."
pip install -r requirements.txt
# Install development dependencies
echo "Installing development dependencies..."
pip install -r requirements-dev.txt
# Create necessary directories
echo "Creating necessary directories..."
mkdir -p data logs models reports pcaps
# Copy example config if config doesn't exist
if [ ! -f "config/config.yaml" ]; then
echo "Creating config.yaml from example..."
cp config/config.example.yaml config/config.yaml
else
echo "config.yaml already exists"
fi
# Copy .env.example if .env doesn't exist
if [ ! -f ".env" ]; then
echo "Creating .env from example..."
cp .env.example .env
echo "⚠️ Please edit .env and add your API keys"
else
echo ".env already exists"
fi
echo ""
echo "=========================================="
echo "✅ Setup complete!"
echo "=========================================="
echo ""
echo "Next steps:"
echo "1. Activate the virtual environment: source venv/bin/activate"
echo "2. Edit .env file and add your API keys"
echo "3. Edit config/config.yaml as needed"
echo "4. Run tests: pytest tests/"
echo "5. Validate config: python main.py validate"
echo "6. Start the engine: python main.py start"
echo ""
echo "For more information, see README.md"
echo ""