feat: Complete MVP implementation of Linux BenchTools
✨ Features: - Backend FastAPI complete (25 Python files) - 5 SQLAlchemy models (Device, HardwareSnapshot, Benchmark, Link, Document) - Pydantic schemas for validation - 4 API routers (benchmark, devices, links, docs) - Authentication with Bearer token - Automatic score calculation - File upload support - Frontend web interface (13 files) - 4 HTML pages (Dashboard, Devices, Device Detail, Settings) - 7 JavaScript modules - Monokai dark theme CSS - Responsive design - Complete CRUD operations - Client benchmark script (500+ lines Bash) - Hardware auto-detection - CPU, RAM, Disk, Network benchmarks - JSON payload generation - Robust error handling - Docker deployment - Optimized Dockerfile - docker-compose with 2 services - Persistent volumes - Environment variables - Documentation & Installation - Automated install.sh script - README, QUICKSTART, DEPLOYMENT guides - Complete API documentation - Project structure documentation 📊 Stats: - ~60 files created - ~5000 lines of code - Full MVP feature set implemented 🚀 Ready for production deployment! 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
147
README.md
147
README.md
@@ -1,2 +1,147 @@
|
||||
# serv_benchmark
|
||||
# Linux BenchTools
|
||||
|
||||
Application self-hosted de benchmarking et d'inventaire matériel pour machines Linux.
|
||||
|
||||
## 🎯 Objectifs
|
||||
|
||||
Linux BenchTools permet de :
|
||||
|
||||
- 📊 **Recenser vos machines** (physiques, VM, SBC type Raspberry Pi)
|
||||
- 🔍 **Collecter automatiquement** les informations matérielles (CPU, RAM, GPU, stockage, réseau)
|
||||
- ⚡ **Exécuter des benchmarks** standardisés (CPU, mémoire, disque, réseau, GPU)
|
||||
- 📈 **Calculer des scores** comparables entre machines
|
||||
- 🏆 **Afficher un classement** dans un dashboard web
|
||||
- 📝 **Gérer la documentation** (notices PDF, factures, liens constructeurs)
|
||||
|
||||
## 🚀 Installation rapide
|
||||
|
||||
```bash
|
||||
# Cloner le dépôt
|
||||
git clone https://gitea.maison43.duckdns.org/gilles/linux-benchtools.git
|
||||
cd linux-benchtools
|
||||
|
||||
# Lancer l'installation automatique
|
||||
./install.sh
|
||||
|
||||
# Ou avec Docker directement
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
L'application sera accessible sur :
|
||||
- **Backend API** : http://localhost:8007
|
||||
- **Frontend UI** : http://localhost:8087
|
||||
|
||||
## 📦 Prérequis
|
||||
|
||||
- Docker + Docker Compose
|
||||
- Système Linux (Debian/Ubuntu recommandé)
|
||||
|
||||
## 🔧 Utilisation
|
||||
|
||||
### 1. Exécuter un benchmark sur une machine
|
||||
|
||||
Sur la machine à benchmarker, exécutez :
|
||||
|
||||
```bash
|
||||
curl -s https://gitea.maison43.duckdns.org/gilles/linux-benchtools/raw/branch/main/scripts/bench.sh \
|
||||
| bash -s -- \
|
||||
--server http://<IP_SERVEUR>:8007/api/benchmark \
|
||||
--token "VOTRE_TOKEN_API" \
|
||||
--device "nom-machine"
|
||||
```
|
||||
|
||||
Le token API est généré automatiquement lors de l'installation et disponible dans le fichier `.env`.
|
||||
|
||||
### 2. Consulter le dashboard
|
||||
|
||||
Ouvrez votre navigateur sur `http://<IP_SERVEUR>:8087` pour :
|
||||
- Voir le classement des machines par score global
|
||||
- Consulter les détails matériels de chaque machine
|
||||
- Visualiser l'historique des benchmarks
|
||||
- Uploader des documents (PDF, images)
|
||||
- Ajouter des liens constructeurs
|
||||
|
||||
## 📚 Documentation
|
||||
|
||||
- [Vision fonctionnelle](01_vision_fonctionnelle.md) - Objectifs et fonctionnalités
|
||||
- [Modèle de données](02_model_donnees.md) - Schéma SQLite
|
||||
- [API Backend](03_api_backend.md) - Endpoints REST
|
||||
- [Script client](04_bench_script_client.md) - bench.sh
|
||||
- [WebUI Design](05_webui_design.md) - Interface utilisateur
|
||||
- [Architecture](06_backend_architecture.md) - Backend FastAPI
|
||||
- [Installation](08_installation_bootstrap.md) - Guide d'installation
|
||||
- [Tests](09_tests_qualite.md) - Stratégie de tests
|
||||
- [Roadmap](10_roadmap_evolutions.md) - Évolutions futures
|
||||
- [Structure](STRUCTURE.md) - Arborescence du projet
|
||||
|
||||
## 🏗️ Architecture
|
||||
|
||||
```
|
||||
┌─────────────────┐
|
||||
│ Machine Linux │
|
||||
│ (bench.sh) │
|
||||
└────────┬────────┘
|
||||
│ POST JSON
|
||||
↓
|
||||
┌─────────────────┐ ┌──────────────┐
|
||||
│ Backend API │◄─────┤ Frontend │
|
||||
│ FastAPI + SQL │ │ HTML/CSS/JS │
|
||||
└─────────────────┘ └──────────────┘
|
||||
```
|
||||
|
||||
## 🛠️ Stack technique
|
||||
|
||||
- **Backend** : Python 3.11+, FastAPI, SQLAlchemy, SQLite
|
||||
- **Frontend** : HTML5, CSS3, JavaScript (Vanilla)
|
||||
- **Script client** : Bash
|
||||
- **Outils benchmark** : sysbench, fio, iperf3, glmark2
|
||||
- **Déploiement** : Docker, docker-compose
|
||||
|
||||
## 📊 Scores calculés
|
||||
|
||||
Pour chaque machine, l'application calcule :
|
||||
|
||||
- **Score CPU** (sysbench) : événements/seconde
|
||||
- **Score Mémoire** (sysbench) : throughput MiB/s
|
||||
- **Score Disque** (fio) : read/write MB/s, IOPS
|
||||
- **Score Réseau** (iperf3) : débit up/down, latence
|
||||
- **Score GPU** (glmark2) : score graphique (optionnel)
|
||||
- **Score Global** : moyenne pondérée (CPU 30%, Mem 20%, Disk 25%, Net 15%, GPU 10%)
|
||||
|
||||
## 🎨 Interface
|
||||
|
||||
Dashboard avec style **Monokai dark** :
|
||||
- Vue d'ensemble du parc machines
|
||||
- Classement par score global
|
||||
- Détail complet de chaque machine
|
||||
- Historique des benchmarks
|
||||
- Gestion des documents
|
||||
|
||||
## 🔐 Sécurité
|
||||
|
||||
- Authentification par **token Bearer** pour l'API
|
||||
- Token généré automatiquement à l'installation
|
||||
- Accès local (LAN) par défaut
|
||||
- Intégration possible avec reverse proxy existant
|
||||
|
||||
## 🤝 Contribution
|
||||
|
||||
Projet personnel self-hosted. Les suggestions et améliorations sont les bienvenues.
|
||||
|
||||
## 📝 License
|
||||
|
||||
Usage personnel - Gilles @ maison43
|
||||
|
||||
## 🗓️ Roadmap
|
||||
|
||||
- ✅ Phase 1 : MVP (backend + frontend + bench.sh)
|
||||
- ⏳ Phase 2 : Améliorations UX (filtres, tri)
|
||||
- ⏳ Phase 3 : Graphiques d'historique (Chart.js)
|
||||
- ⏳ Phase 4 : Détection de régressions + alertes
|
||||
- ⏳ Phase 5 : Intégrations (Home Assistant, Prometheus)
|
||||
|
||||
Voir [roadmap détaillée](10_roadmap_evolutions.md).
|
||||
|
||||
---
|
||||
|
||||
**Linux BenchTools** - Benchmarking simplifié pour votre infrastructure Linux
|
||||
|
||||
Reference in New Issue
Block a user