mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
Feature/memgraph (#182)
* Add database override to bolt output, default is neo4j * Add memgraph templates
This commit is contained in:
parent
b2f7b34529
commit
9c97ca32f6
6 changed files with 171 additions and 5 deletions
81
templates/components/memgraph.jsonnet
Normal file
81
templates/components/memgraph.jsonnet
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
local memgraph = import "stores/memgraph.jsonnet";
|
||||
|
||||
memgraph + {
|
||||
|
||||
"memgraph-url":: "bolt://memgraph:7687",
|
||||
"memgraph-database":: "memgraph",
|
||||
|
||||
"store-triples" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local container =
|
||||
engine.container("store-triples")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"triples-write-neo4j",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
$["memgraph-url"],
|
||||
"--database",
|
||||
$["memgraph-database"],
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"store-triples", [ container ]
|
||||
);
|
||||
|
||||
local service =
|
||||
engine.internalService(containerSet)
|
||||
.with_port(8080, 8080, "metrics");
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
"query-triples" +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
local container =
|
||||
engine.container("query-triples")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"triples-query-neo4j",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
$["memgraph-url"],
|
||||
"--database",
|
||||
$["memgraph-database"],
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"query-triples", [ container ]
|
||||
);
|
||||
|
||||
local service =
|
||||
engine.internalService(containerSet)
|
||||
.with_port(8080, 8080, "metrics");
|
||||
|
||||
engine.resources([
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue