mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-06 11:52:10 +02:00
Add metering to templates (#74)
* Add metering to trustgraph-core component * Regenerate templates to run metering
This commit is contained in:
parent
56b3b50e94
commit
6d57b7a6f3
17 changed files with 270 additions and 0 deletions
|
|
@ -102,5 +102,35 @@ local prompt = import "prompt-template.jsonnet";
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"metering" +: {
|
||||||
|
|
||||||
|
create:: function(engine)
|
||||||
|
|
||||||
|
local container =
|
||||||
|
engine.container("metering")
|
||||||
|
.with_image(images.trustgraph)
|
||||||
|
.with_command([
|
||||||
|
"metering",
|
||||||
|
"-p",
|
||||||
|
url.pulsar,
|
||||||
|
])
|
||||||
|
.with_limits("0.5", "128M")
|
||||||
|
.with_reservations("0.1", "128M");
|
||||||
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"metering", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
containerSet,
|
||||||
|
service,
|
||||||
|
])
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
} + prompt
|
} + prompt
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
pdf-decoder:
|
pdf-decoder:
|
||||||
command:
|
command:
|
||||||
- pdf-decoder
|
- pdf-decoder
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,21 @@ services:
|
||||||
memory: 128M
|
memory: 128M
|
||||||
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
restart: on-failure:100
|
restart: on-failure:100
|
||||||
|
metering:
|
||||||
|
command:
|
||||||
|
- metering
|
||||||
|
- -p
|
||||||
|
- pulsar://pulsar:6650
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 128M
|
||||||
|
image: docker.io/trustgraph/trustgraph-flow:0.11.1
|
||||||
|
restart: on-failure:100
|
||||||
neo4j:
|
neo4j:
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue