diff --git a/templates/components.jsonnet b/templates/components.jsonnet index 653c48bb..19a52206 100644 --- a/templates/components.jsonnet +++ b/templates/components.jsonnet @@ -34,6 +34,9 @@ "graph-rag": import "components/graph-rag.jsonnet", "document-rag": import "components/document-rag.jsonnet", + // Librarian - document management + "librarian": import "components/librarian.jsonnet", + // Vector stores "vector-store-milvus": import "components/milvus.jsonnet", "vector-store-qdrant": import "components/qdrant.jsonnet", diff --git a/templates/components/librarian.jsonnet b/templates/components/librarian.jsonnet new file mode 100644 index 00000000..4df1b692 --- /dev/null +++ b/templates/components/librarian.jsonnet @@ -0,0 +1,43 @@ +local base = import "base/base.jsonnet"; +local images = import "values/images.jsonnet"; +local url = import "values/url.jsonnet"; +local minio = import "stores/minio.jsonnet"; +local cassandra = import "stores/cassandra.jsonnet"; + +{ + + "librarian" +: { + + create:: function(engine) + + local container = + engine.container("librarian") + .with_image(images.trustgraph_flow) + .with_command([ + "librarian", + "-p", + url.pulsar, + ]) + .with_limits("0.5", "256M") + .with_reservations("0.1", "256M"); + + local containerSet = engine.containers( + "librarian", [ container ] + ); + + local service = + engine.internalService(containerSet) + .with_port(8000, 8000, "metrics"); + + engine.resources([ + containerSet, + service, + ]) + + }, + +} + + // Minio and Cassandra are used by the Librarian + + minio + cassandra + diff --git a/templates/components/trustgraph.jsonnet b/templates/components/trustgraph.jsonnet index 0c07ea4e..833d932b 100644 --- a/templates/components/trustgraph.jsonnet +++ b/templates/components/trustgraph.jsonnet @@ -1,8 +1,6 @@ local base = import "base/base.jsonnet"; local images = import "values/images.jsonnet"; local url = import "values/url.jsonnet"; -local minio = import "stores/minio.jsonnet"; -local cassandra = import "stores/cassandra.jsonnet"; { @@ -184,6 +182,3 @@ local cassandra = import "stores/cassandra.jsonnet"; } - // Minio and Cassandra are used by the Librarian - + minio + cassandra -