forked from Ushnesha/PhishNChips
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (67 loc) · 2.39 KB
/
Makefile
File metadata and controls
82 lines (67 loc) · 2.39 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
74
75
76
77
78
79
80
81
.PHONY: help setup start stop restart clean test generate-data setup-es logs
help:
@echo "PhishNChips - Distributed Phishing Intelligence Platform"
@echo ""
@echo "Available commands:"
@echo " make setup - Initial setup (install dependencies)"
@echo " make start - Start all services (Elasticsearch, Kibana, API)"
@echo " make stop - Stop all services"
@echo " make restart - Restart all services"
@echo " make clean - Clean up volumes and containers"
@echo " make logs - View logs from all services"
@echo " make setup-es - Setup Elasticsearch indices and templates"
@echo " make generate-data - Generate and load test data"
@echo " make test-fault - Run fault tolerance tests"
@echo " make test-scale - Run scalability tests"
@echo " make icons - Generate browser extension icons"
@echo ""
setup:
@echo "Installing Python dependencies..."
pip install -r backend/requirements.txt
pip install requests Pillow
@echo "Setup complete!"
start:
@echo "Starting PhishNChips cluster..."
docker-compose up -d
@echo "Waiting for services to be ready..."
@sleep 20
@echo "Services started!"
@echo "Elasticsearch: http://localhost:9200"
@echo "Kibana: http://localhost:5601"
@echo "API: http://localhost:8000"
stop:
@echo "Stopping PhishNChips cluster..."
docker-compose down
restart: stop start
clean:
@echo "Cleaning up containers and volumes..."
docker-compose down -v
@echo "Cleanup complete!"
logs:
docker-compose logs -f
setup-es:
@echo "Setting up Elasticsearch..."
python3 scripts/setup_elasticsearch.py --template config/elasticsearch_template.json
@echo "Elasticsearch setup complete!"
generate-data:
@echo "Generating test data..."
python3 scripts/generate_data.py --count 1000 --send --balanced
@echo "Data generation complete!"
test-fault:
@echo "Running fault tolerance tests..."
python3 scripts/test_fault_tolerance.py
test-scale:
@echo "Running scalability tests..."
python3 scripts/test_scalability.py
icons:
@echo "Generating browser extension icons..."
python3 scripts/generate_icons.py
@echo "Icons generated!"
status:
@echo "Cluster Status:"
@curl -s http://localhost:8000/cluster/health | python3 -m json.tool
quick-start: start setup-es generate-data
@echo ""
@echo "Quick start complete!"
@echo "Access Kibana at http://localhost:5601"
@echo "API docs at http://localhost:8000/docs"