This Docker Compose setup provides a comprehensive testing environment for SeaweedFS Erasure Coding (EC) workers using official SeaweedFS commands.
The testing environment is located in docker/admin_integration/ and includes:
docker/admin_integration/
├── Makefile # Main management interface
├── docker-compose-ec-test.yml # Docker compose configuration
├── EC-TESTING-README.md # This documentation
└── run-ec-test.sh # Quick start script
The testing environment uses official SeaweedFS commands and includes:
admin commandworker command with task-specific working directoriesEach worker now creates dedicated subdirectories for different task types:
/work/erasure_coding/ - For EC encoding tasks/work/vacuum/ - For vacuum cleanup tasks/work/balance/ - For volume balancing tasksThis provides:
# Navigate to the admin integration directory
cd docker/admin_integration/
# Show available commands
make help
# Start the complete testing environment
make start
The make start command will:
# Quick start aliases
make up # Same as 'make start'
# Development mode (higher load for faster testing)
make dev-start
# Build images without starting
make build
Run make help to see all available targets:
make start - Start the complete EC testing environmentmake stop - Stop all servicesmake restart - Restart all servicesmake clean - Complete cleanup (containers, volumes, images)make health - Check health of all servicesmake status - Show status of all containersmake urls - Display all monitoring URLsmake monitor - Open monitor dashboard in browsermake monitor-status - Show monitor status via APImake volume-status - Show volume status from mastermake admin-status - Show admin server statusmake cluster-status - Show complete cluster statusmake logs - Show logs from all servicesmake logs-admin - Show admin server logsmake logs-workers - Show all worker logsmake logs-worker1/2/3 - Show specific worker logsmake logs-load - Show load generator logsmake logs-monitor - Show monitor logsmake backup-logs - Backup all logs to filesmake scale-workers WORKERS=5 - Scale workers to 5 instancesmake scale-load RATE=25 - Increase load generation ratemake test-ec - Run focused EC test scenariomake shell-admin - Open shell in admin containermake shell-worker1 - Open shell in worker containermake debug - Show debug informationmake troubleshoot - Run troubleshooting checks| Service | URL | Description |
|---|---|---|
| Master UI | http://localhost:9333 | Cluster status and topology |
| Filer | http://localhost:8888 | File operations |
| Admin Server | http://localhost:23646/ | Task management |
| Monitor | http://localhost:9999/status | Complete cluster monitoring |
| Volume Servers | http://localhost:8080-8085/status | Individual volume server stats |
Quick access: make urls or make monitor
Each EC task follows 6 phases:
# Start environment
make start
# Watch progress
make monitor-status
# Check for EC candidates
make volume-status
# View worker activity
make logs-workers
# Stop when done
make stop
# Start with higher load
make dev-start
# Scale up workers and load
make scale-workers WORKERS=5
make scale-load RATE=50
# Monitor intensive EC activity
make logs-admin
# Check port conflicts and system state
make troubleshoot
# View specific service logs
make logs-admin
make logs-worker1
# Get shell access for debugging
make shell-admin
make shell-worker1
# Check detailed status
make debug
# Quick restart after code changes
make restart
# Rebuild and restart
make clean
make start
# Monitor specific components
make logs-monitor
# Check current status
make monitor-status
# Output example:
{
"monitor": {
"uptime": "15m30s",
"master_addr": "master:9333",
"admin_addr": "admin:9900"
},
"stats": {
"VolumeCount": 12,
"ECTasksDetected": 3,
"WorkersActive": 3
}
}
You can customize the environment by setting variables:
# High load testing
WRITE_RATE=25 DELETE_RATE=5 make start
# Extended test duration
TEST_DURATION=7200 make start # 2 hours
# Scale workers
make scale-workers WORKERS=6
# Increase load generation
make scale-load RATE=30
# Combined scaling
make scale-workers WORKERS=4
make scale-load RATE=40
# Stop services only
make stop
# Remove containers but keep volumes
make down
# Remove data volumes only
make clean-volumes
# Remove built images only
make clean-images
# Complete cleanup (everything)
make clean
# Run complete troubleshooting
make troubleshoot
# Check specific components
make health
make debug
make status
Services not starting:
# Check port availability
make troubleshoot
# View startup logs
make logs-master
make logs-admin
No EC tasks being created:
# Check volume status
make volume-status
# Increase load to fill volumes faster
make scale-load RATE=30
# Check admin detection
make logs-admin
Workers not responding:
# Check worker registration
make admin-status
# View worker logs
make logs-workers
# Restart workers
make restart
For faster testing:
make dev-start # Higher default load
make scale-load RATE=50 # Very high load
For stress testing:
make scale-workers WORKERS=8
make scale-load RATE=100
make help)# Essential commands
make help # Show all available targets
make start # Start complete environment
make health # Check all services
make monitor # Open dashboard
make logs-admin # View admin activity
make clean # Complete cleanup
# Monitoring
make volume-status # Check for EC candidates
make admin-status # Check task queue
make monitor-status # Full cluster status
# Scaling & Testing
make test-ec # Run focused EC test
make scale-load RATE=X # Increase load
make troubleshoot # Diagnose issues
This environment provides a realistic testing scenario for SeaweedFS EC workers with actual data operations, comprehensive monitoring, and easy management through Make targets.