docs: HOWTO updated for scan-only VPS mode + dual server setup
This commit is contained in:
@@ -1,37 +1,52 @@
|
|||||||
# AUR-Shield HOWTO
|
# AUR-Shield HOWTO
|
||||||
|
|
||||||
## Server einrichten (10.90.9.102)
|
## Server einrichten
|
||||||
|
|
||||||
|
### Voll-Modus (Server mit GPU, baut Pakete)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Klonen
|
|
||||||
git clone https://gitea.die-heimatlosen.eu/arch_agent/aur-shield.git
|
git clone https://gitea.die-heimatlosen.eu/arch_agent/aur-shield.git
|
||||||
cd aur-shield
|
cd aur-shield
|
||||||
|
|
||||||
# Installieren (Python venv, systemd service, cache dirs)
|
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
# Config anpassen falls nötig
|
|
||||||
cp config.example.yaml config.yaml
|
cp config.example.yaml config.yaml
|
||||||
nano config.yaml
|
# nano config.yaml — Modell, Port etc. anpassen
|
||||||
|
|
||||||
# Service starten
|
|
||||||
sudo systemctl enable --now aur-shield
|
sudo systemctl enable --now aur-shield
|
||||||
|
|
||||||
# Verifikation
|
|
||||||
curl http://localhost:8443/api/status
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Erwartete Ausgabe:
|
### Scan-Only Modus (VPS ohne GPU, Client baut lokal)
|
||||||
```json
|
|
||||||
{
|
```bash
|
||||||
"status": "running",
|
git clone https://gitea.die-heimatlosen.eu/arch_agent/aur-shield.git /opt/aur-shield
|
||||||
"model": "qwen2.5:latest",
|
cd /opt/aur-shield
|
||||||
"ollama_url": "http://localhost:11434",
|
python3 -m venv .venv
|
||||||
"repo_dir": "/var/cache/aur-shield/repo",
|
.venv/bin/pip install -e ".[dev]"
|
||||||
"cached_scans": 0
|
cp config.example.yaml config.yaml
|
||||||
}
|
|
||||||
|
# Scan-Only aktivieren + kleinstes Modell:
|
||||||
|
sed -i 's/model: qwen2.5:latest/model: qwen2.5-coder:3b/' config.yaml
|
||||||
|
sed -i 's/scan_only: false/scan_only: true/' config.yaml
|
||||||
|
|
||||||
|
# Systemd Service:
|
||||||
|
cat > /etc/systemd/system/aur-shield.service << 'EOF'
|
||||||
|
[Unit]
|
||||||
|
Description=AUR-Shield (Scan-Only)
|
||||||
|
After=network.target ollama.service
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/opt/aur-shield/.venv/bin/python -m aur_shield /opt/aur-shield/config.yaml
|
||||||
|
WorkingDirectory=/opt/aur-shield
|
||||||
|
Restart=on-failure
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl daemon-reload && systemctl enable --now aur-shield
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Im Scan-Only Modus:
|
||||||
|
- Server macht nur IOC + Regex + LLM Scan (kein `makepkg`, kein pacman repo)
|
||||||
|
- Client baut das Paket lokal mit `yay`/`paru` nachdem der Scan clean ist
|
||||||
|
- Braucht nur ~4GB RAM (3B Modell) + Python — kein `base-devel`, kein `devtools`
|
||||||
|
|
||||||
## Client einrichten (Desktop/Laptop)
|
## Client einrichten (Desktop/Laptop)
|
||||||
|
|
||||||
### Standard-Installation
|
### Standard-Installation
|
||||||
@@ -41,10 +56,17 @@ Erwartete Ausgabe:
|
|||||||
curl -sL https://gitea.die-heimatlosen.eu/arch_agent/aur-shield/raw/branch/main/install-client.sh | sudo bash
|
curl -sL https://gitea.die-heimatlosen.eu/arch_agent/aur-shield/raw/branch/main/install-client.sh | sudo bash
|
||||||
```
|
```
|
||||||
|
|
||||||
Das macht:
|
### Mit VPS (Scan-Only Server)
|
||||||
1. `/etc/safe-yay.conf` — Server-Adresse (`SHIELD_HOST="10.90.9.102"`)
|
|
||||||
2. `[aur-shield]` repo in `/etc/pacman.conf` — zeigt auf `http://10.90.9.102:8443/repo`
|
```bash
|
||||||
3. `/usr/local/bin/safe-yay` — Wrapper-Skript
|
# VPS als Scanner, Client baut lokal
|
||||||
|
curl -sL https://gitea.die-heimatlosen.eu/arch_agent/aur-shield/raw/branch/main/install-client.sh \
|
||||||
|
| AUR_SHIELD_HOST=89.58.33.228 sudo bash
|
||||||
|
```
|
||||||
|
|
||||||
|
Der Client erkennt automatisch ob der Server im Scan-Only Modus läuft:
|
||||||
|
- **Scan-Only Server:** Clean → `yay -S <pkg>` lokal bauen
|
||||||
|
- **Full Server:** Clean → `pacman -S aur-shield/<pkg>` aus Repo
|
||||||
|
|
||||||
### Manuelle Installation (anderer Server)
|
### Manuelle Installation (anderer Server)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user