mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-04 10:52:27 +02:00
git-subtree-dir: ai-context/trustgraph-templates git-subtree-split: 42a5fd1b678f32be378062e30451e2052ccb95dd
75 lines
2.1 KiB
Jsonnet
75 lines
2.1 KiB
Jsonnet
local images = import "values/images.jsonnet";
|
|
local url = import "values/url.jsonnet";
|
|
local cassandra_hosts = "cassandra";
|
|
local cassandra = import "backends/cassandra.jsonnet";
|
|
|
|
cassandra + {
|
|
|
|
"store-rows" +: {
|
|
|
|
create:: function(engine)
|
|
|
|
local container =
|
|
engine.container("store-rows")
|
|
.with_image(images.trustgraph_flow)
|
|
.with_command([
|
|
"rows-write-cassandra",
|
|
] + $["pub-sub-args"] + [
|
|
"--cassandra-host",
|
|
cassandra_hosts,
|
|
"--log-level",
|
|
$["log-level"],
|
|
])
|
|
.with_limits("0.5", "128M")
|
|
.with_reservations("0.1", "128M");
|
|
|
|
local containerSet = engine.containers(
|
|
"store-rows", [ container ]
|
|
);
|
|
|
|
local service =
|
|
engine.internalService(containerSet)
|
|
.with_port(8000, 8000, "metrics");
|
|
|
|
engine.resources([
|
|
containerSet,
|
|
service,
|
|
])
|
|
|
|
},
|
|
|
|
"query-rows" +: {
|
|
|
|
create:: function(engine)
|
|
|
|
local container =
|
|
engine.container("query-rows")
|
|
.with_image(images.trustgraph_flow)
|
|
.with_command([
|
|
"rows-query-cassandra",
|
|
] + $["pub-sub-args"] + [
|
|
"--cassandra-host",
|
|
cassandra_hosts,
|
|
"--log-level",
|
|
$["log-level"],
|
|
])
|
|
.with_limits("0.5", "512M")
|
|
.with_reservations("0.1", "512M");
|
|
|
|
local containerSet = engine.containers(
|
|
"query-rows", [ container ]
|
|
);
|
|
|
|
local service =
|
|
engine.internalService(containerSet)
|
|
.with_port(8000, 8000, "metrics");
|
|
|
|
engine.resources([
|
|
containerSet,
|
|
service,
|
|
])
|
|
|
|
},
|
|
|
|
}
|
|
|