Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions README.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,75 @@ Upload (docx / xlsx / pdf / eml / msg)
| Parser | Eigenes Paket `doc-parser` (python-docx, openpyxl, pypdf) |
| LLM / Embeddings | Beliebiger OpenAI-kompatibler Endpoint (Ollama, vLLM, OpenRouter, …) |

## Deployment, Speicher und Replikate

Der native Start unter Windows/macOS/Linux und Docker auf einem einzelnen Server
bleiben verfügbar. Kubernetes ermöglicht separate Deployments für Frontend, API
und Worker, wenn eine unabhängige Skalierung erforderlich ist.

### Speicheroptionen

Metadaten und dauerhafter Auftragszustand liegen in PostgreSQL, Suchvektoren in
Qdrant. Dokumentoriginale, erzeugte Bundles und weitere binäre Artefakte verwenden
einen separaten Speicher. SQLite ist eine Alternative für die lokale Entwicklung,
keine verteilte Datenbank.

| Deployment | PostgreSQL / Qdrant | Artefaktspeicher |
| :-- | :-- | :-- |
| Native lokale Entwicklung | Lokale Prozesse oder konfigurierte vorhandene Dienste | Lokales Dateisystem |
| Docker Compose `bundled` | Auf demselben Server enthalten, mit persistenten Volumes und ohne veröffentlichte Datenbankports | Persistentes lokales Anwendungsvolume |
| Docker Compose `external` | Vorhandene Dienste des Kunden | Persistentes lokales Anwendungsvolume |
| Kubernetes compact | Mitgelieferte Dienste, vom Anwendungs-Chart verwaltet | Lokales persistentes Volume |
| Kubernetes distributed, managed | Vom Deployment verwaltete PostgreSQL- und Qdrant-Instanzen | RWX-Volume der Plattform oder vom Deployment verwalteter S3-kompatibler Speicher |
| Kubernetes distributed, external oder mixed | Verwaltete oder kundeneigene Anbieter für jede Komponente unabhängig wählbar | Kundeneigener oder vom Deployment verwalteter S3-kompatibler Speicher oder gemeinsames RWX-Dateisystem, etwa NFS über CSI |

Compose unterstützt genau zwei Speichermodi: `STORAGE_MODE=bundled` zusammen mit
`COMPOSE_PROFILES=bundled` oder `STORAGE_MODE=external` mit dem externen Overlay.
Dieselbe ausgewählte env-Datei muss über `OKF_RUNTIME_ENV_FILE` und
`docker compose --env-file` übergeben werden. Konfiguration, Backup und
Wiederherstellung beschreibt die [Produktionsanleitung](docs/PRODUCTION_DEPLOYMENT.md).

Für verteiltes Kubernetes bietet das separate
[Speicher-Chart](deploy/helm/ai-knowledge-storage) grundlegende Rezepte mit jeweils
einer Instanz für PostgreSQL, Qdrant und den S3-kompatiblen RustFS. Externe Anbieter
sind die Voreinstellung; die Ressourcenbereitstellung wird ausdrücklich aktiviert.
Die verwalteten Einzelinstanzen bieten keine Hochverfügbarkeit des Speichers.
Anbieterauswahl, persistente Volumes, Zugangsdaten und Backup-Verantwortung sind im
[Speicherbetrieb](docs/REPLICA_STORAGE_OPERATIONS.md) beschrieben.

### Replikat-Topologien

| Kubernetes-Modus | Anwendungstopologie | Skalierungsumfang |
| :-- | :-- | :-- |
| `compact` | Ein Pod mit kombiniertem Backend und Frontend | Eine Anwendungsinstanz |
| `frontend-split` | Separates Frontend-Deployment; ein kombiniertes Backend | Mehrere Frontend-Replikate |
| `distributed` | Separate Deployments für Frontend, API und Worker | Unabhängige Replikatzahl je Rolle; das Basisbeispiel verwendet 2 / 2 / 2 |

Der verteilte Betrieb wird ausdrücklich mit `OKF_DEPLOYMENT_SCHEMA=replicas-v1`
aktiviert. API- und Worker-Replikate teilen PostgreSQL, Qdrant, einen RWX- oder
S3-Artefaktspeicher und die installierte Laufzeitidentität. Jeder Backend-Pod
führt einen Prozess mit privatem temporärem Speicher aus. Eine höhere Replikatzahl
allein richtet keinen gemeinsamen Zustand ein. Das
[verteilte Beispiel](deploy/kubernetes/profiles/distributed-basic.values.example.yaml)
lässt die Anwendung deaktiviert, bis Speicher-Bootstrap und Installation der
Laufzeitidentität abgeschlossen sind. Siehe die
[Kubernetes-Anleitung](docs/KUBERNETES_DEPLOYMENT.md) und die
[Plattformanforderungen](docs/REPLICA_PLATFORM_CONTRACT.md).

Ausgewählte `basic`-Konfigurationen wurden im Schulungscluster getestet; `basic`
erlaubt Speicherausfallzeiten. Anwendungsreplikate belegen keine physische
Ausfallsicherheit von Hosts oder Speicher. Die Abnahme auf der Kundenplattform
bleibt erforderlich; das Profil `resilient` ist geplant und noch nicht qualifiziert.
Getestete Kombinationen und offene Voraussetzungen stehen in der
[Support-Matrix](deploy/kubernetes/replicas/support-matrix.json) und der
[Abnahmematrix](docs/REPLICA_ACCEPTANCE_MATRIX.md).

Ein vorhandener Dokumentbestand erfordert eine ausdrückliche Migration mit
Integritätsprüfung; ein anderer Endpoint allein verschiebt keine Daten.
[Artefaktmigration](docs/ARTIFACT_STORAGE_MIGRATION.md) und
[Kubernetes-Wiederherstellung](docs/KUBERNETES_REPLICAS_RECOVERY.md) beschreiben die
jeweils geeigneten Offline-Migrations-, Backup- und Umschaltverfahren.

## Schnellstart

### Docker (lokaler bundled-Stack)
Expand Down Expand Up @@ -207,6 +276,9 @@ committen). Für lokale Läufe `ENVIRONMENT=development` setzen.
- **[SECURITY.md](SECURITY.md)** — Sicherheitsrichtlinie: Bedrohungsmodell,
Vertrauensgrenzen, Authentifizierung/RBAC, Audit-Log, Aufbewahrung. *(englisch)*
- Checkliste für das Produktions-Deployment: [PRODUCTION_DEPLOYMENT.md](docs/PRODUCTION_DEPLOYMENT.md) *(russisch)*
- Kubernetes und Replikate: [Deployment-Anleitung](docs/KUBERNETES_DEPLOYMENT.md),
[Speicherbetrieb](docs/REPLICA_STORAGE_OPERATIONS.md),
[Abnahmematrix](docs/REPLICA_ACCEPTANCE_MATRIX.md)
- Architektur & Roadmap: [OKF_Knowledge_Service_Roadmap.md](docs/OKF_Knowledge_Service_Roadmap.md) *(russisch)*
- Datenbankschema & Migrationen: [MIGRATION_PLAN.md](docs/MIGRATION_PLAN.md) *(russisch)*
- Reproduzierbarkeit und Qualität der Suche: [SEARCH_REPRODUCTION.md](docs/SEARCH_REPRODUCTION.md) *(russisch)*
Expand Down
72 changes: 72 additions & 0 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,75 @@ Carga (docx / xlsx / pdf / eml / msg)
| Analizador | Paquete propio `doc-parser` (python-docx, openpyxl, pypdf) |
| LLM / embeddings | Cualquier endpoint compatible con OpenAI (Ollama, vLLM, OpenRouter, …) |

## Despliegue, almacenamiento y réplicas

El arranque nativo en Windows/macOS/Linux y Docker en un solo servidor siguen
disponibles. Kubernetes permite separar frontend, API y worker para escalarlos
de forma independiente.

### Opciones de almacenamiento

Los metadatos y el estado duradero de las tareas residen en PostgreSQL; los vectores
de búsqueda, en Qdrant. Los originales, los paquetes generados y otros artefactos
binarios utilizan un almacén separado. SQLite es una alternativa para desarrollo
local, no una base de datos distribuida.

| Despliegue | PostgreSQL / Qdrant | Almacenamiento de artefactos |
| :-- | :-- | :-- |
| Desarrollo local nativo | Procesos locales o servicios existentes configurados | Sistema de archivos local |
| Docker Compose `bundled` | Incluidos en el mismo servidor, con volúmenes persistentes y sin publicar puertos de las bases de datos | Volumen local persistente de la aplicación |
| Docker Compose `external` | Servicios existentes del cliente | Volumen local persistente de la aplicación |
| Kubernetes compact | Servicios incluidos gestionados por el chart de la aplicación | Volumen persistente local |
| Kubernetes distributed, managed | PostgreSQL y Qdrant gestionados por el despliegue | Volumen RWX de la plataforma o almacenamiento compatible con S3 gestionado por el despliegue |
| Kubernetes distributed, external o mixed | Selección independiente de proveedores gestionados o del cliente para cada componente | Almacenamiento compatible con S3 del cliente o gestionado por el despliegue, o sistema de archivos RWX compartido, por ejemplo NFS mediante CSI |

Compose admite exactamente dos modos: `STORAGE_MODE=bundled` junto con
`COMPOSE_PROFILES=bundled`, o `STORAGE_MODE=external` con el overlay externo.
Pasa el mismo archivo env seleccionado mediante `OKF_RUNTIME_ENV_FILE` y
`docker compose --env-file`. La [guía de producción](docs/PRODUCTION_DEPLOYMENT.md)
describe la configuración, las copias de seguridad y la restauración.

Para Kubernetes distribuido, el [chart de almacenamiento](deploy/helm/ai-knowledge-storage)
separado proporciona recetas básicas de una sola instancia para PostgreSQL,
Qdrant y RustFS compatible con S3. Los proveedores externos son la opción
predeterminada; el aprovisionamiento se activa explícitamente. Las instancias
gestionadas no proporcionan alta disponibilidad del almacenamiento. Consulta las
[operaciones de almacenamiento](docs/REPLICA_STORAGE_OPERATIONS.md) para elegir
proveedores, volúmenes persistentes, credenciales y responsables de las copias.

### Topologías de réplicas

| Modo Kubernetes | Topología de la aplicación | Alcance del escalado |
| :-- | :-- | :-- |
| `compact` | Un Pod con backend combinado y frontend | Una instancia de la aplicación |
| `frontend-split` | Deployment separado del frontend; un backend combinado | Varias réplicas del frontend |
| `distributed` | Deployments separados para frontend, API y worker | Número independiente de réplicas de cada rol; el ejemplo básico usa 2 / 2 / 2 |

El modo distribuido se activa explícitamente con `OKF_DEPLOYMENT_SCHEMA=replicas-v1`.
Las réplicas de API y worker comparten PostgreSQL, Qdrant, un almacén de artefactos
RWX o S3 y la identidad de ejecución instalada. Cada Pod del backend ejecuta un
proceso con espacio temporal privado. Aumentar el número de réplicas no configura
por sí solo el estado compartido. El
[ejemplo distribuido](deploy/kubernetes/profiles/distributed-basic.values.example.yaml)
mantiene la aplicación desactivada hasta completar la inicialización del
almacenamiento y la instalación de la identidad de ejecución. Sigue la
[guía de Kubernetes](docs/KUBERNETES_DEPLOYMENT.md) y los
[requisitos de la plataforma](docs/REPLICA_PLATFORM_CONTRACT.md).

Algunas configuraciones `basic` han superado pruebas en un clúster de formación;
`basic` admite interrupciones del almacenamiento. Las réplicas de la aplicación no
demuestran tolerancia a fallos físicos de servidores o almacenamiento. La aceptación
en la plataforma del cliente sigue siendo necesaria; el perfil `resilient` está
planificado y aún no cualificado. Las combinaciones probadas y los requisitos
pendientes figuran en la [matriz de soporte](deploy/kubernetes/replicas/support-matrix.json)
y la [matriz de aceptación](docs/REPLICA_ACCEPTANCE_MATRIX.md).

Un corpus existente requiere una migración explícita con comprobaciones de
integridad; cambiar un endpoint no traslada los datos. Consulta la
[migración de artefactos](docs/ARTIFACT_STORAGE_MIGRATION.md) y los
[procedimientos de recuperación de Kubernetes](docs/KUBERNETES_REPLICAS_RECOVERY.md)
para la migración sin conexión, las copias y el cambio de almacenamiento aplicables.

## Inicio rápido

### Docker (pila local bundled)
Expand Down Expand Up @@ -210,6 +279,9 @@ repositorio). Usa `ENVIRONMENT=development` para las ejecuciones locales.
- **[SECURITY.md](SECURITY.md)** — política de seguridad: modelo de amenazas, fronteras de
confianza, autenticación/RBAC, registro de auditoría, retención. *(en inglés)*
- Lista de verificación para despliegue en producción: [PRODUCTION_DEPLOYMENT.md](docs/PRODUCTION_DEPLOYMENT.md) *(en ruso)*
- Kubernetes y réplicas: [guía de despliegue](docs/KUBERNETES_DEPLOYMENT.md),
[operaciones de almacenamiento](docs/REPLICA_STORAGE_OPERATIONS.md),
[matriz de aceptación](docs/REPLICA_ACCEPTANCE_MATRIX.md)
- Arquitectura y hoja de ruta: [OKF_Knowledge_Service_Roadmap.md](docs/OKF_Knowledge_Service_Roadmap.md) *(en ruso)*
- Esquema de base de datos y migraciones: [MIGRATION_PLAN.md](docs/MIGRATION_PLAN.md) *(en ruso)*
- Reproducibilidad y calidad de la búsqueda: [SEARCH_REPRODUCTION.md](docs/SEARCH_REPRODUCTION.md) *(en ruso)*
Expand Down
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,71 @@ Upload (docx / xlsx / pdf / eml / msg)
| Parser | Custom `doc-parser` package (python-docx, openpyxl, pypdf) |
| LLM / embeddings | Any OpenAI-compatible endpoint (Ollama, vLLM, OpenRouter, …) |

## Deployment, storage and replicas

The native Windows/macOS/Linux launch and the single-server Docker launch remain
available. Kubernetes adds separate frontend, API and worker deployments when
independent scaling is needed.

### Storage choices

Metadata and durable work state live in PostgreSQL; search vectors live in Qdrant.
Document originals, generated bundles and other binary artifacts use a separate
artifact store. SQLite is a local development fallback, not a distributed database.

| Deployment | PostgreSQL / Qdrant | Artifact storage |
| :-- | :-- | :-- |
| Native local development | Local processes or configured existing services | Local filesystem |
| Docker Compose `bundled` | Included on the same server, with persistent volumes and no published database ports | Persistent local application volume |
| Docker Compose `external` | Existing customer services | Persistent local application volume |
| Kubernetes compact | Bundled services managed by the application chart | Local persistent volume |
| Kubernetes distributed, managed | Deployment-managed PostgreSQL and Qdrant | Platform-provided RWX volume or deployment-managed S3-compatible storage |
| Kubernetes distributed, external or mixed | Select managed or customer-owned providers independently for each component | Customer-owned or deployment-managed S3-compatible storage, or shared RWX filesystem (for example NFS through CSI) |

Compose supports exactly two storage modes: `STORAGE_MODE=bundled` with
`COMPOSE_PROFILES=bundled`, or `STORAGE_MODE=external` with the external overlay.
Pass the same selected env file through `OKF_RUNTIME_ENV_FILE` and
`docker compose --env-file`; use the
[production deployment guide](docs/PRODUCTION_DEPLOYMENT.md) for configuration,
backup and restore commands.

For distributed Kubernetes, the separate
[storage chart](deploy/helm/ai-knowledge-storage) provides basic single-instance
PostgreSQL, Qdrant and S3-compatible RustFS recipes. External providers are the
default; provisioning is explicit. Managed storage instances do not provide storage
HA. See [storage operations](docs/REPLICA_STORAGE_OPERATIONS.md) for provider
selection, persistent volumes, credentials and backup ownership.

### Replica topologies

| Kubernetes mode | Application topology | Scaling scope |
| :-- | :-- | :-- |
| `compact` | One combined backend and frontend Pod | Single application instance |
| `frontend-split` | Separate frontend Deployment; one combined backend | Multiple frontend replicas |
| `distributed` | Separate frontend, API and worker Deployments | Independent replica counts for all three roles; the basic example uses 2 / 2 / 2 |

Distributed operation explicitly opts into `OKF_DEPLOYMENT_SCHEMA=replicas-v1`.
API and worker replicas share PostgreSQL, Qdrant, an RWX or S3 artifact store and
the installed runtime identity. Each backend Pod runs one process with private
temporary scratch. Increasing a replica count alone does not configure shared
state. The [distributed example](deploy/kubernetes/profiles/distributed-basic.values.example.yaml)
keeps application workloads disabled until storage bootstrap and runtime identity
installation are complete. Follow the [Kubernetes deployment guide](docs/KUBERNETES_DEPLOYMENT.md)
and [platform requirements](docs/REPLICA_PLATFORM_CONTRACT.md).

Selected `basic` configurations have passed training-cluster tests; `basic` permits
storage downtime. Application replicas do not establish physical host or storage
fault tolerance. Customer platform acceptance remains required, and the
`resilient` profile is planned and unqualified. Exact tested combinations and
remaining gates are recorded in the [support matrix](deploy/kubernetes/replicas/support-matrix.json)
and [acceptance matrix](docs/REPLICA_ACCEPTANCE_MATRIX.md).

Existing document storage requires an explicit migration and integrity checks;
changing an endpoint alone does not move the corpus. Consult
[artifact migration](docs/ARTIFACT_STORAGE_MIGRATION.md) and
[Kubernetes recovery procedures](docs/KUBERNETES_REPLICAS_RECOVERY.md) for the
applicable offline migration, backup and cutover procedure.

## Quick start

### Docker (bundled local stack)
Expand Down Expand Up @@ -192,6 +257,9 @@ documented there; never commit real secrets). Set `ENVIRONMENT=development` for
- **[SECURITY.md](SECURITY.md)** — security policy: threat model, trust boundaries,
authentication/RBAC, audit log, retention. (English)
- Production deployment checklist: [PRODUCTION_DEPLOYMENT.md](docs/PRODUCTION_DEPLOYMENT.md) *(Russian)*
- Kubernetes deployment and replicas: [deployment guide](docs/KUBERNETES_DEPLOYMENT.md),
[storage operations](docs/REPLICA_STORAGE_OPERATIONS.md),
[acceptance matrix](docs/REPLICA_ACCEPTANCE_MATRIX.md)
- Architecture & roadmap: [OKF_Knowledge_Service_Roadmap.md](docs/OKF_Knowledge_Service_Roadmap.md) *(Russian)*
- Database schema & migrations: [MIGRATION_PLAN.md](docs/MIGRATION_PLAN.md) *(Russian)*
- Search reproduction & quality: [SEARCH_REPRODUCTION.md](docs/SEARCH_REPRODUCTION.md) *(Russian)*
Expand Down
Loading
Loading