addon
This commit is contained in:
183
docs/QUICKSTART.md
Executable file
183
docs/QUICKSTART.md
Executable file
@@ -0,0 +1,183 @@
|
||||
# Quick Start - Linux BenchTools
|
||||
|
||||
Guide de démarrage rapide pour Linux BenchTools.
|
||||
|
||||
## 🚀 Installation en 3 étapes
|
||||
|
||||
### 1. Cloner le dépôt
|
||||
|
||||
```bash
|
||||
git clone https://gitea.maison43.duckdns.org/gilles/linux-benchtools.git
|
||||
cd linux-benchtools
|
||||
```
|
||||
|
||||
### 2. Lancer l'installation
|
||||
|
||||
```bash
|
||||
./install.sh
|
||||
```
|
||||
|
||||
Le script va :
|
||||
- ✅ Vérifier Docker et Docker Compose
|
||||
- ✅ Créer les répertoires nécessaires
|
||||
- ✅ Générer un fichier `.env` avec un token aléatoire
|
||||
- ✅ Construire les images Docker
|
||||
- ✅ Démarrer les services
|
||||
- ✅ Afficher les URLs et le token API
|
||||
|
||||
### 3. Accéder à l'interface
|
||||
|
||||
Ouvrez votre navigateur sur :
|
||||
```
|
||||
http://localhost:8087
|
||||
```
|
||||
|
||||
## 📊 Lancer votre premier benchmark
|
||||
|
||||
Sur une machine Linux à benchmarker, exécutez :
|
||||
|
||||
```bash
|
||||
curl -s http://VOTRE_SERVEUR:8087/scripts/bench.sh | bash -s -- \
|
||||
--server http://VOTRE_SERVEUR:8007/api/benchmark \
|
||||
--token "VOTRE_TOKEN_API"
|
||||
```
|
||||
|
||||
Remplacez :
|
||||
- `VOTRE_SERVEUR` par l'IP ou hostname de votre serveur
|
||||
- `VOTRE_TOKEN_API` par le token affiché lors de l'installation
|
||||
|
||||
## 🎯 Options du script benchmark
|
||||
|
||||
```bash
|
||||
# Mode rapide (tests courts)
|
||||
--short
|
||||
|
||||
# Spécifier un nom de device personnalisé
|
||||
--device "mon-serveur-prod"
|
||||
|
||||
# Serveur iperf3 pour tests réseau
|
||||
--iperf-server 192.168.1.100
|
||||
|
||||
# Ignorer certains tests
|
||||
--skip-cpu
|
||||
--skip-memory
|
||||
--skip-disk
|
||||
--skip-network
|
||||
--skip-gpu
|
||||
```
|
||||
|
||||
### Exemple complet
|
||||
|
||||
```bash
|
||||
curl -s http://192.168.1.50:8087/scripts/bench.sh | bash -s -- \
|
||||
--server http://192.168.1.50:8007/api/benchmark \
|
||||
--token "abc123..." \
|
||||
--device "elitedesk-800g3" \
|
||||
--iperf-server 192.168.1.50 \
|
||||
--short
|
||||
```
|
||||
|
||||
## 📁 Structure des fichiers
|
||||
|
||||
```
|
||||
linux-benchtools/
|
||||
├── backend/ # API FastAPI
|
||||
├── frontend/ # Interface web
|
||||
├── scripts/ # Scripts clients
|
||||
│ └── bench.sh # Script de benchmark
|
||||
├── uploads/ # Documents uploadés
|
||||
├── docker-compose.yml # Orchestration Docker
|
||||
├── .env # Configuration (généré)
|
||||
└── install.sh # Script d'installation
|
||||
```
|
||||
|
||||
## 🔧 Commandes utiles
|
||||
|
||||
### Gérer les services
|
||||
|
||||
```bash
|
||||
# Voir les logs
|
||||
docker compose logs -f
|
||||
|
||||
# Voir les logs du backend uniquement
|
||||
docker compose logs -f backend
|
||||
|
||||
# Arrêter les services
|
||||
docker compose down
|
||||
|
||||
# Redémarrer les services
|
||||
docker compose restart
|
||||
|
||||
# Mettre à jour
|
||||
git pull
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
### Accès aux services
|
||||
|
||||
| Service | URL | Description |
|
||||
|---------|-----|-------------|
|
||||
| Frontend | http://localhost:8087 | Interface web |
|
||||
| Backend API | http://localhost:8007 | API REST |
|
||||
| API Docs | http://localhost:8007/docs | Documentation Swagger |
|
||||
| Health Check | http://localhost:8007/api/health | Vérification statut |
|
||||
|
||||
## 🐛 Dépannage
|
||||
|
||||
### Le backend ne démarre pas
|
||||
|
||||
```bash
|
||||
# Voir les logs
|
||||
docker compose logs backend
|
||||
|
||||
# Vérifier que le port 8007 est libre
|
||||
ss -tulpn | grep 8007
|
||||
|
||||
# Reconstruire l'image
|
||||
docker compose build --no-cache backend
|
||||
docker compose up -d backend
|
||||
```
|
||||
|
||||
### Le frontend ne s'affiche pas
|
||||
|
||||
```bash
|
||||
# Vérifier que le port 8087 est libre
|
||||
ss -tulpn | grep 8087
|
||||
|
||||
# Redémarrer le frontend
|
||||
docker compose restart frontend
|
||||
```
|
||||
|
||||
### Erreur 401 lors du benchmark
|
||||
|
||||
Vérifiez que vous utilisez le bon token :
|
||||
```bash
|
||||
grep API_TOKEN .env
|
||||
```
|
||||
|
||||
### Base de données corrompue
|
||||
|
||||
```bash
|
||||
# Sauvegarder l'ancienne base
|
||||
mv backend/data/data.db backend/data/data.db.backup
|
||||
|
||||
# Redémarrer (la base sera recréée)
|
||||
docker compose restart backend
|
||||
```
|
||||
|
||||
## 📖 Documentation complète
|
||||
|
||||
- [README.md](README.md) - Vue d'ensemble
|
||||
- [STRUCTURE.md](STRUCTURE.md) - Structure du projet
|
||||
- [01_vision_fonctionnelle.md](01_vision_fonctionnelle.md) - Spécifications détaillées
|
||||
- [backend/README.md](backend/README.md) - Documentation backend
|
||||
|
||||
## 🆘 Besoin d'aide ?
|
||||
|
||||
1. Consultez les [spécifications](01_vision_fonctionnelle.md)
|
||||
2. Vérifiez les [logs](#commandes-utiles)
|
||||
3. Ouvrez une issue sur Gitea
|
||||
|
||||
## 🎉 C'est tout !
|
||||
|
||||
Votre système de benchmarking est prêt. Amusez-vous bien ! 🚀
|
||||
Reference in New Issue
Block a user