Refactor templates (#52)

* Switching from docker compose to abstract form - should be easier to k8s later
* Text loader util
* Recreate templates
This commit is contained in:
cybermaggedon 2024-09-05 16:40:47 +01:00 committed by GitHub
parent af5508ff68
commit 65d7f6d261
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 1659 additions and 1277 deletions

View file

@ -6,53 +6,59 @@ local cassandra = import "stores/cassandra.jsonnet";
cassandra + {
services +: {
"store-triples" +: {
create:: function(engine)
"store-triples": base + {
image: images.trustgraph,
command: [
"triples-write-cassandra",
"-p",
url.pulsar,
"-g",
cassandra_hosts,
],
deploy: {
resources: {
limits: {
cpus: '0.5',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
},
local container =
engine.container("store-triples")
.with_image(images.trustgraph)
.with_command([
"triples-write-cassandra",
"-p",
url.pulsar,
"-g",
cassandra_hosts,
])
.with_limits("0.5", "128M")
.with_reservations("0.1", "128M");
"query-triples": base + {
image: images.trustgraph,
command: [
"triples-query-cassandra",
"-p",
url.pulsar,
"-g",
cassandra_hosts,
],
deploy: {
resources: {
limits: {
cpus: '0.5',
memory: '512M'
},
reservations: {
cpus: '0.1',
memory: '512M'
}
}
},
},
local containerSet = engine.containers(
"stop-triples", [ container ]
);
engine.resources([
containerSet,
])
},
"query-triples" +: {
create:: function(engine)
local container =
engine.container("query-triples")
.with_image(images.trustgraph)
.with_command([
"triples-query-cassandra",
"-p",
url.pulsar,
"-g",
cassandra_hosts,
])
.with_limits("0.5", "512M")
.with_reservations("0.1", "512M");
local containerSet = engine.containers(
"query-triples", [ container ]
);
engine.resources([
containerSet,
])
}
}