Kapitel 13/Tutorial.md aktualisiert
This commit is contained in:
@@ -68,15 +68,12 @@ Im weiteren Verlauf des Tutorials berücksichtigen wir:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Abschnitt 2: Einrichten des Clipper-LXC
|
## Einrichten des Clipper-LXC
|
||||||
Nun richten wir Clipper selbst im vorbereiteten Container ein: Installation von ffmpeg, grundlegende Services und Basis-Konfiguration. (Details folgen in diesem Abschnitt.)
|
Nun richten wir Clipper selbst im vorbereiteten Container ein: Installation von ffmpeg, grundlegende Services und Basis-Konfiguration. (Details folgen in diesem Abschnitt.)
|
||||||
---
|
|
||||||
|
|
||||||
## Abschnitt 2 – Clipper‑LXC einrichten (Basisdienste & Service‑Skelett)
|
|
||||||
|
|
||||||
Ziel: Der LXC enthält alles Nötige, damit n8n ihn bei Bedarf starten kann und klare Einstiegspunkte zum **Analysieren** und **Schneiden** vorhanden sind. Die eigentliche Logik füllen wir später (Abschnitt 4/5) – jetzt legen wir nur das **saubere Gerüst** an.
|
Ziel: Der LXC enthält alles Nötige, damit n8n ihn bei Bedarf starten kann und klare Einstiegspunkte zum **Analysieren** und **Schneiden** vorhanden sind. Die eigentliche Logik füllen wir später (Abschnitt 4/5) – jetzt legen wir nur das **saubere Gerüst** an.
|
||||||
|
|
||||||
### 2.1 Service‑Benutzer & Verzeichnisse
|
### Service‑Benutzer & Verzeichnisse
|
||||||
```bash
|
```bash
|
||||||
# Systemnutzer ohne Login
|
# Systemnutzer ohne Login
|
||||||
useradd --system --create-home --shell /usr/sbin/nologin clipper
|
useradd --system --create-home --shell /usr/sbin/nologin clipper
|
||||||
@@ -88,7 +85,7 @@ mkdir -p /etc/clipper
|
|||||||
chmod 750 /etc/clipper
|
chmod 750 /etc/clipper
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2.2 Pakete installieren
|
### Pakete installieren
|
||||||
```bash
|
```bash
|
||||||
apt update && apt install -y ffmpeg jq python3 python3-venv curl unzip inotify-tools
|
apt update && apt install -y ffmpeg jq python3 python3-venv curl unzip inotify-tools
|
||||||
```
|
```
|
||||||
@@ -96,7 +93,7 @@ apt update && apt install -y ffmpeg jq python3 python3-venv curl unzip inotify-t
|
|||||||
> **Warum diese Pakete?**
|
> **Warum diese Pakete?**
|
||||||
> **ffmpeg** für Analyse/Schnitt, **jq** für JSON‑Handling, **python3/venv** für optionale Analyse‑Hilfen (z. B. Szenen/Facedetect in Abschnitt 4), **inotify-tools** für eventuelle lokale Hooks.
|
> **ffmpeg** für Analyse/Schnitt, **jq** für JSON‑Handling, **python3/venv** für optionale Analyse‑Hilfen (z. B. Szenen/Facedetect in Abschnitt 4), **inotify-tools** für eventuelle lokale Hooks.
|
||||||
|
|
||||||
### 2.3 Konfiguration (env)
|
### Konfiguration (env)
|
||||||
```bash
|
```bash
|
||||||
nano /etc/clipper/clipper.env
|
nano /etc/clipper/clipper.env
|
||||||
```
|
```
|
||||||
@@ -115,7 +112,7 @@ chown root:clipper /etc/clipper/clipper.env
|
|||||||
chmod 640 /etc/clipper/clipper.env
|
chmod 640 /etc/clipper/clipper.env
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2.4 Python‑Umgebung vorbereiten (für Analyse‑Tools, Abschnitt 4)
|
### Python‑Umgebung vorbereiten (für Analyse‑Tools, Abschnitt 4)
|
||||||
```bash
|
```bash
|
||||||
sudo -u clipper python3 -m venv /srv/clipper/.venv
|
sudo -u clipper python3 -m venv /srv/clipper/.venv
|
||||||
sudo -u clipper /srv/clipper/.venv/bin/pip install --upgrade pip
|
sudo -u clipper /srv/clipper/.venv/bin/pip install --upgrade pip
|
||||||
@@ -124,7 +121,7 @@ sudo -u clipper /srv/clipper/.venv/bin/pip install numpy opencv-python-headless
|
|||||||
```
|
```
|
||||||
> Wir installieren nur Basis‑Bausteine. STT/KI o. Ä. binden wir erst in Abschnitt 4 an.
|
> Wir installieren nur Basis‑Bausteine. STT/KI o. Ä. binden wir erst in Abschnitt 4 an.
|
||||||
|
|
||||||
### 2.5 Entrypoints (noch „stubs“)
|
### Entrypoints (noch „stubs“)
|
||||||
Wir erstellen zwei **CLI‑Einstiegspunkte**, die n8n aufruft. Sie tun jetzt noch nichts Schweres – nur Validierung & Logging. Die echte Logik folgt in Abschnitt 4/5.
|
Wir erstellen zwei **CLI‑Einstiegspunkte**, die n8n aufruft. Sie tun jetzt noch nichts Schweres – nur Validierung & Logging. Die echte Logik folgt in Abschnitt 4/5.
|
||||||
|
|
||||||
**Analyse‑Stub**
|
**Analyse‑Stub**
|
||||||
@@ -170,7 +167,7 @@ chmod +x /srv/clipper/bin/clipper-*
|
|||||||
chown -R clipper:clipper /srv/clipper/bin
|
chown -R clipper:clipper /srv/clipper/bin
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2.6 Systemd‑Dienst (on‑demand)
|
### Systemd‑Dienst (on‑demand)
|
||||||
Wir wollen Clipper „auf Zuruf“ starten/stoppen. Für einfache Integrationen setzt n8n **SSH/Command** ab. Optional ergänzen wir später einen Webhook.
|
Wir wollen Clipper „auf Zuruf“ starten/stoppen. Für einfache Integrationen setzt n8n **SSH/Command** ab. Optional ergänzen wir später einen Webhook.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -213,7 +210,7 @@ systemctl start "clipper@clipper-analyze"
|
|||||||
```
|
```
|
||||||
> In Abschnitt 3/4 ruft n8n die EntryPoints mit Parametern auf (Dateipfad, JOBID usw.).
|
> In Abschnitt 3/4 ruft n8n die EntryPoints mit Parametern auf (Dateipfad, JOBID usw.).
|
||||||
|
|
||||||
### 2.7 Log‑Rotation
|
### Log‑Rotation
|
||||||
```bash
|
```bash
|
||||||
nano /etc/logrotate.d/clipper
|
nano /etc/logrotate.d/clipper
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user