diff --git a/Makefile b/Makefile index 5fd5cc9b..c5e3d68b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # VERSION=$(shell git describe | sed 's/^v//') -VERSION=0.9.3 +VERSION=0.10.0 DOCKER=podman @@ -50,29 +50,54 @@ VECTORDB=qdrant JSONNET_FLAGS=-J templates -J . -update-templates: set-version +update-templates: update-dcs update-minikubes + +JSON_TO_YAML=python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' +# JSON_TO_YAML=cat + +update-dcs: set-version + rm -rf deploy + mkdir -p deploy/docker-compose deploy/minikube for graph in ${GRAPHS}; do \ cm=$${graph},pulsar,${VECTORDB},grafana; \ - input=templates/main.jsonnet; \ - output=tg-storage-$${graph}.yaml; \ + input=templates/opts-to-docker-compose.jsonnet; \ + output=deploy/docker-compose/tg-storage-$${graph}.yaml; \ echo $${graph} '->' $${output}; \ jsonnet ${JSONNET_FLAGS} \ - --ext-str options=$${cm} -S $${input} > $${output}; \ + --ext-str options=$${cm} $${input} | \ + ${JSON_TO_YAML} > $${output}; \ done for model in ${MODELS}; do \ for graph in ${GRAPHS}; do \ cm=$${graph},pulsar,${VECTORDB},embeddings-hf,graph-rag,grafana,trustgraph,$${model}; \ - input=templates/main.jsonnet; \ - output=tg-launch-$${model}-$${graph}.yaml; \ + input=templates/opts-to-docker-compose.jsonnet; \ + output=deploy/docker-compose/tg-launch-$${model}-$${graph}.yaml; \ echo $${model} + $${graph} '->' $${output}; \ jsonnet ${JSONNET_FLAGS} \ - --ext-str options=$${cm} -S $${input} > $${output}; \ + --ext-str options=$${cm} $${input} | \ + ${JSON_TO_YAML} > $${output}; \ done; \ done -config.yaml: config.json FORCE - jsonnet -J . -J templates/ templates/config-to-k8s.jsonnet | \ - python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' > $@ +update-minikubes: set-version + for model in ${MODELS}; do \ + for graph in ${GRAPHS}; do \ + cm=$${graph},pulsar,${VECTORDB},embeddings-hf,graph-rag,grafana,trustgraph,$${model}; \ + input=templates/opts-to-minikube-k8s.jsonnet; \ + output=deploy/minikube/tg-launch-$${model}-$${graph}.yaml; \ + echo $${model} + $${graph} '->' $${output}; \ + jsonnet ${JSONNET_FLAGS} \ + --ext-str options=$${cm} $${input} | \ + ${JSON_TO_YAML} > $${output}; \ + done; \ + done FORCE: +IGNOREconfig.yaml: config.json FORCE + jsonnet -J . -J templates/ templates/config-to-gcp-k8s.jsonnet | \ + python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' > $@ + +config.yaml: config.json FORCE + jsonnet -J . -J templates/ templates/config-to-minikube-k8s.jsonnet | \ + python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' > $@ diff --git a/deploy/docker-compose/tg-launch-azure-cassandra.yaml b/deploy/docker-compose/tg-launch-azure-cassandra.yaml new file mode 100644 index 00000000..547c3aa6 --- /dev/null +++ b/deploy/docker-compose/tg-launch-azure-cassandra.yaml @@ -0,0 +1,721 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-azure-neo4j.yaml b/deploy/docker-compose/tg-launch-azure-neo4j.yaml new file mode 100644 index 00000000..79525710 --- /dev/null +++ b/deploy/docker-compose/tg-launch-azure-neo4j.yaml @@ -0,0 +1,722 @@ +services: + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-bedrock-cassandra.yaml b/deploy/docker-compose/tg-launch-bedrock-cassandra.yaml new file mode 100644 index 00000000..8dd10511 --- /dev/null +++ b/deploy/docker-compose/tg-launch-bedrock-cassandra.yaml @@ -0,0 +1,729 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + chunker: + command: + - chunker-recursive + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '2000' + - --chunk-overlap + - '100' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-bedrock-neo4j.yaml b/deploy/docker-compose/tg-launch-bedrock-neo4j.yaml new file mode 100644 index 00000000..3da7aa57 --- /dev/null +++ b/deploy/docker-compose/tg-launch-bedrock-neo4j.yaml @@ -0,0 +1,730 @@ +services: + chunker: + command: + - chunker-recursive + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '2000' + - --chunk-overlap + - '100' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-claude-cassandra.yaml b/deploy/docker-compose/tg-launch-claude-cassandra.yaml new file mode 100644 index 00000000..97d3752f --- /dev/null +++ b/deploy/docker-compose/tg-launch-claude-cassandra.yaml @@ -0,0 +1,717 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-claude-neo4j.yaml b/deploy/docker-compose/tg-launch-claude-neo4j.yaml new file mode 100644 index 00000000..add8b52b --- /dev/null +++ b/deploy/docker-compose/tg-launch-claude-neo4j.yaml @@ -0,0 +1,718 @@ +services: + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-cohere-cassandra.yaml b/deploy/docker-compose/tg-launch-cohere-cassandra.yaml new file mode 100644 index 00000000..957beb0f --- /dev/null +++ b/deploy/docker-compose/tg-launch-cohere-cassandra.yaml @@ -0,0 +1,713 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '150' + - --chunk-overlap + - '10' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-cohere-neo4j.yaml b/deploy/docker-compose/tg-launch-cohere-neo4j.yaml new file mode 100644 index 00000000..e016e6ea --- /dev/null +++ b/deploy/docker-compose/tg-launch-cohere-neo4j.yaml @@ -0,0 +1,714 @@ +services: + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '150' + - --chunk-overlap + - '10' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-ollama-cassandra.yaml b/deploy/docker-compose/tg-launch-ollama-cassandra.yaml new file mode 100644 index 00000000..051a5e63 --- /dev/null +++ b/deploy/docker-compose/tg-launch-ollama-cassandra.yaml @@ -0,0 +1,425 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-ollama-neo4j.yaml b/deploy/docker-compose/tg-launch-ollama-neo4j.yaml new file mode 100644 index 00000000..a3e7fa40 --- /dev/null +++ b/deploy/docker-compose/tg-launch-ollama-neo4j.yaml @@ -0,0 +1,426 @@ +services: + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-openai-cassandra.yaml b/deploy/docker-compose/tg-launch-openai-cassandra.yaml new file mode 100644 index 00000000..d3580736 --- /dev/null +++ b/deploy/docker-compose/tg-launch-openai-cassandra.yaml @@ -0,0 +1,721 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-openai-neo4j.yaml b/deploy/docker-compose/tg-launch-openai-neo4j.yaml new file mode 100644 index 00000000..37ff30a4 --- /dev/null +++ b/deploy/docker-compose/tg-launch-openai-neo4j.yaml @@ -0,0 +1,722 @@ +services: + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion-rag: + command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-vertexai-cassandra.yaml b/deploy/docker-compose/tg-launch-vertexai-cassandra.yaml new file mode 100644 index 00000000..a7d421a8 --- /dev/null +++ b/deploy/docker-compose/tg-launch-vertexai-cassandra.yaml @@ -0,0 +1,729 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + deploy: + resources: + limits: + cpus: '0.5' + memory: 256M + reservations: + cpus: '0.1' + memory: 256M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + volumes: + - ./vertexai:/vertexai + text-completion-rag: + command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 256M + reservations: + cpus: '0.1' + memory: 256M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + volumes: + - ./vertexai:/vertexai + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-launch-vertexai-neo4j.yaml b/deploy/docker-compose/tg-launch-vertexai-neo4j.yaml new file mode 100644 index 00000000..4cdc5127 --- /dev/null +++ b/deploy/docker-compose/tg-launch-vertexai-neo4j.yaml @@ -0,0 +1,730 @@ +services: + chunker: + command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + embeddings: + command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + deploy: + resources: + limits: + cpus: '1.0' + memory: 400M + reservations: + cpus: '0.5' + memory: 400M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + graph-rag: + command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + kg-extract-definitions: + command: + - kg-extract-definitions + - -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.10.0 + restart: on-failure:100 + kg-extract-relationships: + command: + - kg-extract-relationships + - -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.10.0 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + pdf-decoder: + command: + - pdf-decoder + - -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.10.0 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + prompt: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + prompt-rag: + command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value or date. true + if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only the + provided set of knowledge statements in your response. Do not speculate if the + answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the context + in your response. Do not speculate if the answer is not found in the provided + set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + text-completion: + command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + deploy: + resources: + limits: + cpus: '0.5' + memory: 256M + reservations: + cpus: '0.1' + memory: 256M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + volumes: + - ./vertexai:/vertexai + text-completion-rag: + command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + deploy: + resources: + limits: + cpus: '0.5' + memory: 256M + reservations: + cpus: '0.1' + memory: 256M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + volumes: + - ./vertexai:/vertexai + vectorize: + command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + deploy: + resources: + limits: + cpus: '1.0' + memory: 512M + reservations: + cpus: '0.5' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-storage-cassandra.yaml b/deploy/docker-compose/tg-storage-cassandra.yaml new file mode 100644 index 00000000..6f32f90f --- /dev/null +++ b/deploy/docker-compose/tg-storage-cassandra.yaml @@ -0,0 +1,220 @@ +services: + cassandra: + deploy: + resources: + limits: + cpus: '1.0' + memory: 800M + reservations: + cpus: '0.5' + memory: 800M + environment: + JVM_OPTS: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + ports: + - 9042:9042 + restart: on-failure:100 + volumes: + - cassandra:/var/lib/cassandra + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 512M + reservations: + cpus: '0.1' + memory: 512M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + cassandra: {} + grafana-storage: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/docker-compose/tg-storage-neo4j.yaml b/deploy/docker-compose/tg-storage-neo4j.yaml new file mode 100644 index 00000000..3f9594c5 --- /dev/null +++ b/deploy/docker-compose/tg-storage-neo4j.yaml @@ -0,0 +1,221 @@ +services: + grafana: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + environment: + GF_ORG_NAME: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + ports: + - 3000:3000 + restart: on-failure:100 + volumes: + - grafana-storage:/var/lib/grafana + - ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/ + - ./grafana/provisioning/:/etc/grafana/provisioning/datasources/ + - ./grafana/dashboards/:/var/lib/grafana/dashboards/ + init-pulsar: + command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin + --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url + http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url + http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; + sleep 20; done + deploy: + resources: + limits: + cpus: '1' + memory: 400M + reservations: + cpus: '0.1' + memory: 400M + image: docker.io/apachepulsar/pulsar:3.3.1 + restart: on-failure:100 + neo4j: + deploy: + resources: + limits: + cpus: '1.0' + memory: 768M + reservations: + cpus: '0.5' + memory: 768M + environment: + NEO4J_AUTH: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + ports: + - 7474:7474 + - 7687:7687 + restart: on-failure:100 + volumes: + - neo4j:/data + prometheus: + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/prom/prometheus:v2.53.2 + ports: + - 9090:9090 + restart: on-failure:100 + volumes: + - ./prometheus:/etc/prometheus/ + - prometheus-data:/prometheus + pulsar: + command: + - bin/pulsar + - standalone + deploy: + resources: + limits: + cpus: '2.0' + memory: 1500M + reservations: + cpus: '1.0' + memory: 1500M + environment: + PULSAR_MEM: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + ports: + - 6650:6650 + - 8080:8080 + restart: on-failure:100 + volumes: + - pulsar-data:/pulsar/data + qdrant: + deploy: + resources: + limits: + cpus: '1.0' + memory: 256M + reservations: + cpus: '0.5' + memory: 256M + image: docker.io/qdrant/qdrant:v1.11.1 + ports: + - 6333:6333 + - 6334:6334 + restart: on-failure:100 + volumes: + - qdrant:/qdrant/storage + query-doc-embeddings: + command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-graph-embeddings: + command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + query-triples: + command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-doc-embeddings: + command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-graph-embeddings: + command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 + store-triples: + command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + deploy: + resources: + limits: + cpus: '0.5' + memory: 128M + reservations: + cpus: '0.1' + memory: 128M + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + restart: on-failure:100 +volumes: + grafana-storage: {} + neo4j: {} + prometheus-data: {} + pulsar-data: {} + qdrant: {} + diff --git a/deploy/minikube/tg-launch-azure-cassandra.yaml b/deploy/minikube/tg-launch-azure-cassandra.yaml new file mode 100644 index 00000000..5f3c16dd --- /dev/null +++ b/deploy/minikube/tg-launch-azure-cassandra.yaml @@ -0,0 +1,2016 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: cassandra + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-cassandra + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: cassandra + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: cassandra + name: cassandra + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: cassandra + template: + metadata: + labels: + app: cassandra + spec: + containers: + - env: + - name: JVM_OPTS + value: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + name: cassandra + ports: + - containerPort: 9042 + hostPort: 9042 + resources: + limits: + cpu: '1.0' + memory: 800M + requests: + cpu: '0.5' + memory: 800M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/cassandra + name: cassandra + volumes: + - name: cassandra + persistentVolumeClaim: + claimName: cassandra +- apiVersion: v1 + kind: Service + metadata: + name: cassandra + namespace: trustgraph + spec: + ports: + - name: api + port: 9042 + targetPort: 9042 + selector: + app: cassandra + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 512M + requests: + cpu: '0.1' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: stop-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: stop-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-azure-neo4j.yaml b/deploy/minikube/tg-launch-azure-neo4j.yaml new file mode 100644 index 00000000..5341546e --- /dev/null +++ b/deploy/minikube/tg-launch-azure-neo4j.yaml @@ -0,0 +1,2021 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: neo4j + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-neo4j + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: neo4j + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: neo4j + name: neo4j + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: neo4j + template: + metadata: + labels: + app: neo4j + spec: + containers: + - env: + - name: NEO4J_AUTH + value: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + name: neo4j + ports: + - containerPort: 7474 + hostPort: 7474 + - containerPort: 7687 + hostPort: 7687 + resources: + limits: + cpu: '1.0' + memory: 768M + requests: + cpu: '0.5' + memory: 768M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: neo4j + volumes: + - name: neo4j + persistentVolumeClaim: + claimName: neo4j +- apiVersion: v1 + kind: Service + metadata: + name: neo4j + namespace: trustgraph + spec: + ports: + - name: api + port: 7474 + targetPort: 7474 + - name: api2 + port: 7687 + targetPort: 7687 + selector: + app: neo4j + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-azure + - -p + - pulsar://pulsar:6650 + - -k + - ${AZURE_TOKEN} + - -e + - ${AZURE_ENDPOINT} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-bedrock-cassandra.yaml b/deploy/minikube/tg-launch-bedrock-cassandra.yaml new file mode 100644 index 00000000..9db0d164 --- /dev/null +++ b/deploy/minikube/tg-launch-bedrock-cassandra.yaml @@ -0,0 +1,2024 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: cassandra + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-cassandra + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: cassandra + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: cassandra + name: cassandra + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: cassandra + template: + metadata: + labels: + app: cassandra + spec: + containers: + - env: + - name: JVM_OPTS + value: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + name: cassandra + ports: + - containerPort: 9042 + hostPort: 9042 + resources: + limits: + cpu: '1.0' + memory: 800M + requests: + cpu: '0.5' + memory: 800M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/cassandra + name: cassandra + volumes: + - name: cassandra + persistentVolumeClaim: + claimName: cassandra +- apiVersion: v1 + kind: Service + metadata: + name: cassandra + namespace: trustgraph + spec: + ports: + - name: api + port: 9042 + targetPort: 9042 + selector: + app: cassandra + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-recursive + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '2000' + - --chunk-overlap + - '100' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 512M + requests: + cpu: '0.1' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: stop-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: stop-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-bedrock-neo4j.yaml b/deploy/minikube/tg-launch-bedrock-neo4j.yaml new file mode 100644 index 00000000..6c464845 --- /dev/null +++ b/deploy/minikube/tg-launch-bedrock-neo4j.yaml @@ -0,0 +1,2029 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-recursive + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '2000' + - --chunk-overlap + - '100' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: neo4j + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-neo4j + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: neo4j + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: neo4j + name: neo4j + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: neo4j + template: + metadata: + labels: + app: neo4j + spec: + containers: + - env: + - name: NEO4J_AUTH + value: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + name: neo4j + ports: + - containerPort: 7474 + hostPort: 7474 + - containerPort: 7687 + hostPort: 7687 + resources: + limits: + cpu: '1.0' + memory: 768M + requests: + cpu: '0.5' + memory: 768M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: neo4j + volumes: + - name: neo4j + persistentVolumeClaim: + claimName: neo4j +- apiVersion: v1 + kind: Service + metadata: + name: neo4j + namespace: trustgraph + spec: + ports: + - name: api + port: 7474 + targetPort: 7474 + - name: api2 + port: 7687 + targetPort: 7687 + selector: + app: neo4j + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-bedrock + - -p + - pulsar://pulsar:6650 + - -z + - ${AWS_ID_KEY} + - -k + - ${AWS_SECRET_KEY} + - -r + - us-west-2 + - -x + - '4096' + - -t + - '0' + - -m + - mistral.mixtral-8x7b-instruct-v0:1 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-claude-cassandra.yaml b/deploy/minikube/tg-launch-claude-cassandra.yaml new file mode 100644 index 00000000..a49a2dc5 --- /dev/null +++ b/deploy/minikube/tg-launch-claude-cassandra.yaml @@ -0,0 +1,2012 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: cassandra + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-cassandra + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: cassandra + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: cassandra + name: cassandra + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: cassandra + template: + metadata: + labels: + app: cassandra + spec: + containers: + - env: + - name: JVM_OPTS + value: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + name: cassandra + ports: + - containerPort: 9042 + hostPort: 9042 + resources: + limits: + cpu: '1.0' + memory: 800M + requests: + cpu: '0.5' + memory: 800M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/cassandra + name: cassandra + volumes: + - name: cassandra + persistentVolumeClaim: + claimName: cassandra +- apiVersion: v1 + kind: Service + metadata: + name: cassandra + namespace: trustgraph + spec: + ports: + - name: api + port: 9042 + targetPort: 9042 + selector: + app: cassandra + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 512M + requests: + cpu: '0.1' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: stop-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: stop-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-claude-neo4j.yaml b/deploy/minikube/tg-launch-claude-neo4j.yaml new file mode 100644 index 00000000..c3608bab --- /dev/null +++ b/deploy/minikube/tg-launch-claude-neo4j.yaml @@ -0,0 +1,2017 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: neo4j + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-neo4j + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: neo4j + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: neo4j + name: neo4j + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: neo4j + template: + metadata: + labels: + app: neo4j + spec: + containers: + - env: + - name: NEO4J_AUTH + value: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + name: neo4j + ports: + - containerPort: 7474 + hostPort: 7474 + - containerPort: 7687 + hostPort: 7687 + resources: + limits: + cpu: '1.0' + memory: 768M + requests: + cpu: '0.5' + memory: 768M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: neo4j + volumes: + - name: neo4j + persistentVolumeClaim: + claimName: neo4j +- apiVersion: v1 + kind: Service + metadata: + name: neo4j + namespace: trustgraph + spec: + ports: + - name: api + port: 7474 + targetPort: 7474 + - name: api2 + port: 7687 + targetPort: 7687 + selector: + app: neo4j + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-claude + - -p + - pulsar://pulsar:6650 + - -k + - ${CLAUDE_KEY} + - -x + - '4096' + - -t + - '0' + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-cohere-cassandra.yaml b/deploy/minikube/tg-launch-cohere-cassandra.yaml new file mode 100644 index 00000000..f803186c --- /dev/null +++ b/deploy/minikube/tg-launch-cohere-cassandra.yaml @@ -0,0 +1,2008 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: cassandra + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-cassandra + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: cassandra + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: cassandra + name: cassandra + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: cassandra + template: + metadata: + labels: + app: cassandra + spec: + containers: + - env: + - name: JVM_OPTS + value: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + name: cassandra + ports: + - containerPort: 9042 + hostPort: 9042 + resources: + limits: + cpu: '1.0' + memory: 800M + requests: + cpu: '0.5' + memory: 800M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/cassandra + name: cassandra + volumes: + - name: cassandra + persistentVolumeClaim: + claimName: cassandra +- apiVersion: v1 + kind: Service + metadata: + name: cassandra + namespace: trustgraph + spec: + ports: + - name: api + port: 9042 + targetPort: 9042 + selector: + app: cassandra + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '150' + - --chunk-overlap + - '10' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 512M + requests: + cpu: '0.1' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: stop-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: stop-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-cohere-neo4j.yaml b/deploy/minikube/tg-launch-cohere-neo4j.yaml new file mode 100644 index 00000000..5f1aa0be --- /dev/null +++ b/deploy/minikube/tg-launch-cohere-neo4j.yaml @@ -0,0 +1,2013 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '150' + - --chunk-overlap + - '10' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: neo4j + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-neo4j + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: neo4j + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: neo4j + name: neo4j + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: neo4j + template: + metadata: + labels: + app: neo4j + spec: + containers: + - env: + - name: NEO4J_AUTH + value: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + name: neo4j + ports: + - containerPort: 7474 + hostPort: 7474 + - containerPort: 7687 + hostPort: 7687 + resources: + limits: + cpu: '1.0' + memory: 768M + requests: + cpu: '0.5' + memory: 768M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: neo4j + volumes: + - name: neo4j + persistentVolumeClaim: + claimName: neo4j +- apiVersion: v1 + kind: Service + metadata: + name: neo4j + namespace: trustgraph + spec: + ports: + - name: api + port: 7474 + targetPort: 7474 + - name: api2 + port: 7687 + targetPort: 7687 + selector: + app: neo4j + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-cohere + - -p + - pulsar://pulsar:6650 + - -k + - ${COHERE_KEY} + - -t + - 0 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-ollama-cassandra.yaml b/deploy/minikube/tg-launch-ollama-cassandra.yaml new file mode 100644 index 00000000..aca769f1 --- /dev/null +++ b/deploy/minikube/tg-launch-ollama-cassandra.yaml @@ -0,0 +1,1718 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: cassandra + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-cassandra + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: cassandra + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: cassandra + name: cassandra + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: cassandra + template: + metadata: + labels: + app: cassandra + spec: + containers: + - env: + - name: JVM_OPTS + value: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + name: cassandra + ports: + - containerPort: 9042 + hostPort: 9042 + resources: + limits: + cpu: '1.0' + memory: 800M + requests: + cpu: '0.5' + memory: 800M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/cassandra + name: cassandra + volumes: + - name: cassandra + persistentVolumeClaim: + claimName: cassandra +- apiVersion: v1 + kind: Service + metadata: + name: cassandra + namespace: trustgraph + spec: + ports: + - name: api + port: 9042 + targetPort: 9042 + selector: + app: cassandra + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 512M + requests: + cpu: '0.1' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: stop-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: stop-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-ollama-neo4j.yaml b/deploy/minikube/tg-launch-ollama-neo4j.yaml new file mode 100644 index 00000000..bb2c70b1 --- /dev/null +++ b/deploy/minikube/tg-launch-ollama-neo4j.yaml @@ -0,0 +1,1723 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: neo4j + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-neo4j + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: neo4j + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: neo4j + name: neo4j + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: neo4j + template: + metadata: + labels: + app: neo4j + spec: + containers: + - env: + - name: NEO4J_AUTH + value: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + name: neo4j + ports: + - containerPort: 7474 + hostPort: 7474 + - containerPort: 7687 + hostPort: 7687 + resources: + limits: + cpu: '1.0' + memory: 768M + requests: + cpu: '0.5' + memory: 768M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: neo4j + volumes: + - name: neo4j + persistentVolumeClaim: + claimName: neo4j +- apiVersion: v1 + kind: Service + metadata: + name: neo4j + namespace: trustgraph + spec: + ports: + - name: api + port: 7474 + targetPort: 7474 + - name: api2 + port: 7687 + targetPort: 7687 + selector: + app: neo4j + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-generic + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-ollama + - -p + - pulsar://pulsar:6650 + - -m + - gemma2:9b + - -r + - ${OLLAMA_HOST} + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-openai-cassandra.yaml b/deploy/minikube/tg-launch-openai-cassandra.yaml new file mode 100644 index 00000000..7791580f --- /dev/null +++ b/deploy/minikube/tg-launch-openai-cassandra.yaml @@ -0,0 +1,2016 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: cassandra + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-cassandra + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: cassandra + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: cassandra + name: cassandra + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: cassandra + template: + metadata: + labels: + app: cassandra + spec: + containers: + - env: + - name: JVM_OPTS + value: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + name: cassandra + ports: + - containerPort: 9042 + hostPort: 9042 + resources: + limits: + cpu: '1.0' + memory: 800M + requests: + cpu: '0.5' + memory: 800M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/cassandra + name: cassandra + volumes: + - name: cassandra + persistentVolumeClaim: + claimName: cassandra +- apiVersion: v1 + kind: Service + metadata: + name: cassandra + namespace: trustgraph + spec: + ports: + - name: api + port: 9042 + targetPort: 9042 + selector: + app: cassandra + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 512M + requests: + cpu: '0.1' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: stop-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: stop-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-openai-neo4j.yaml b/deploy/minikube/tg-launch-openai-neo4j.yaml new file mode 100644 index 00000000..cc96c4c5 --- /dev/null +++ b/deploy/minikube/tg-launch-openai-neo4j.yaml @@ -0,0 +1,2021 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: neo4j + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-neo4j + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: neo4j + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: neo4j + name: neo4j + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: neo4j + template: + metadata: + labels: + app: neo4j + spec: + containers: + - env: + - name: NEO4J_AUTH + value: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + name: neo4j + ports: + - containerPort: 7474 + hostPort: 7474 + - containerPort: 7687 + hostPort: 7687 + resources: + limits: + cpu: '1.0' + memory: 768M + requests: + cpu: '0.5' + memory: 768M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: neo4j + volumes: + - name: neo4j + persistentVolumeClaim: + claimName: neo4j +- apiVersion: v1 + kind: Service + metadata: + name: neo4j + namespace: trustgraph + spec: + ports: + - name: api + port: 7474 + targetPort: 7474 + - name: api2 + port: 7687 + targetPort: 7687 + selector: + app: neo4j + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-openai + - -p + - pulsar://pulsar:6650 + - -k + - ${OPENAI_KEY} + - -x + - '4096' + - -t + - '0' + - -m + - GPT-3.5-Turbo + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-vertexai-cassandra.yaml b/deploy/minikube/tg-launch-vertexai-cassandra.yaml new file mode 100644 index 00000000..d2ec6f43 --- /dev/null +++ b/deploy/minikube/tg-launch-vertexai-cassandra.yaml @@ -0,0 +1,2046 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: cassandra + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-cassandra + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: cassandra + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: cassandra + name: cassandra + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: cassandra + template: + metadata: + labels: + app: cassandra + spec: + containers: + - env: + - name: JVM_OPTS + value: -Xms256M -Xmx256M + image: docker.io/cassandra:4.1.6 + name: cassandra + ports: + - containerPort: 9042 + hostPort: 9042 + resources: + limits: + cpu: '1.0' + memory: 800M + requests: + cpu: '0.5' + memory: 800M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/cassandra + name: cassandra + volumes: + - name: cassandra + persistentVolumeClaim: + claimName: cassandra +- apiVersion: v1 + kind: Service + metadata: + name: cassandra + namespace: trustgraph + spec: + ports: + - name: api + port: 9042 + targetPort: 9042 + selector: + app: cassandra + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 512M + requests: + cpu: '0.1' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-cassandra + - -p + - pulsar://pulsar:6650 + - -g + - cassandra + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: stop-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: stop-triples + type: LoadBalancer +- apiVersion: v1 + data: + private.json: UFJJVkFURSBLRVkgR09FUyBIRVJFCg== + kind: Secret + metadata: + name: vertexai-creds + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 256M + requests: + cpu: '0.1' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /vertexai + name: vertexai-creds + volumes: + - name: vertexai-creds + secret: + secretName: vertexai-creds +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: v1 + data: + private.json: UFJJVkFURSBLRVkgR09FUyBIRVJFCg== + kind: Secret + metadata: + name: vertexai-creds + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 256M + requests: + cpu: '0.1' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /vertexai + name: vertexai-creds + volumes: + - name: vertexai-creds + secret: + secretName: vertexai-creds +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/deploy/minikube/tg-launch-vertexai-neo4j.yaml b/deploy/minikube/tg-launch-vertexai-neo4j.yaml new file mode 100644 index 00000000..a08b0557 --- /dev/null +++ b/deploy/minikube/tg-launch-vertexai-neo4j.yaml @@ -0,0 +1,2051 @@ +apiVersion: v1 +items: +- apiVersion: v1 + kind: Namespace + metadata: + name: trustgraph + spec: {} +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: chunker + name: chunker + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: chunker + template: + metadata: + labels: + app: chunker + spec: + containers: + - command: + - chunker-token + - -p + - pulsar://pulsar:6650 + - --chunk-size + - '250' + - --chunk-overlap + - '15' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: chunker + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: chunker + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: chunker + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: embeddings + name: embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: embeddings + template: + metadata: + labels: + app: embeddings + spec: + containers: + - command: + - embeddings-hf + - -p + - pulsar://pulsar:6650 + - -m + - all-MiniLM-L6-v2 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: embeddings + resources: + limits: + cpu: '1.0' + memory: 400M + requests: + cpu: '0.5' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: embeddings + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: grafana-storage + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-grafana-storage + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: grafana-storage + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: v1 + data: + dashboard.yml: "\napiVersion: 1\n\nproviders:\n\n - name: 'trustgraph.ai'\n \ + \ orgId: 1\n folder: 'TrustGraph'\n folderUid: 'b6c5be90-d432-4df8-aeab-737c7b151228'\n\ + \ type: file\n disableDeletion: false\n updateIntervalSeconds: 30\n\ + \ allowUiUpdates: true\n options:\n path: /var/lib/grafana/dashboards\n\ + \ foldersFromFilesStructure: false\n\n" + kind: ConfigMap + metadata: + name: prov-dash + namespace: trustgraph +- apiVersion: v1 + data: + datasource.yml: "apiVersion: 1\n\nprune: true\n\ndatasources:\n - name: Prometheus\n\ + \ type: prometheus\n access: proxy\n orgId: 1\n # Sets\ + \ a custom UID to reference this\n # data source in other parts of the configuration.\n\ + \ # If not specified, Grafana generates one.\n uid: 'f6b18033-5918-4e05-a1ca-4cb30343b129'\n\ + \n url: http://prometheus:9090\n\n basicAuth: false\n withCredentials:\ + \ false\n isDefault: true\n editable: true\n\n" + kind: ConfigMap + metadata: + name: prov-data + namespace: trustgraph +- apiVersion: v1 + data: + dashboard.json: "{\n \"annotations\": {\n \"list\": [\n {\n \"\ + builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n\ + \ \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n\ + \ \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n\ + \ \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\ + \n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n\ + \ \"graphTooltip\": 0,\n \"id\": 2,\n \"links\": [],\n \"liveNow\": false,\n\ + \ \"panels\": [\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \ + \ \"tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \ + \ \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n\ + \ \"y\": 0\n },\n \"id\": 7,\n \"options\": {\n \ + \ \"calculate\": false,\n \"cellGap\": 1,\n \"color\": {\n \ + \ \"exponent\": 0.5,\n \"fill\": \"dark-orange\",\n \ + \ \"mode\": \"scheme\",\n \"reverse\": false,\n \"scale\"\ + : \"exponential\",\n \"scheme\": \"Oranges\",\n \"steps\"\ + : 64\n },\n \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\ + \n },\n \"filterValues\": {\n \"le\": 1e-9\n },\n\ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisPlacement\": \"left\",\n \"reverse\": false\n }\n },\n\ + \ \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n {\n \ + \ \"datasource\": {\n \"type\": \"prometheus\",\n \ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"editorMode\": \"code\",\n \"exemplar\": false,\n \"\ + expr\": \"max by(le) (text_completion_duration_bucket)\",\n \"format\"\ + : \"heatmap\",\n \"instant\": false,\n \"legendFormat\": \"\ + 99%\",\n \"range\": true,\n \"refId\": \"A\"\n }\n\ + \ ],\n \"title\": \"LLM latency\",\n \"type\": \"heatmap\"\n\ + \ },\n {\n \"datasource\": {\n \"type\": \"prometheus\",\n\ + \ \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {\n \ + \ \"hideFrom\": {\n \"legend\": false,\n \"\ + tooltip\": false,\n \"viz\": false\n },\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ }\n }\n },\n \"overrides\": []\n },\n \"\ + gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \ + \ \"y\": 0\n },\n \"id\": 2,\n \"options\": {\n \"\ + calculate\": false,\n \"cellGap\": 5,\n \"cellValues\": {\n \ + \ \"unit\": \"\"\n },\n \"color\": {\n \"exponent\"\ + : 0.5,\n \"fill\": \"dark-orange\",\n \"mode\": \"scheme\"\ + ,\n \"reverse\": false,\n \"scale\": \"exponential\",\n \ + \ \"scheme\": \"Oranges\",\n \"steps\": 64\n },\n \ + \ \"exemplars\": {\n \"color\": \"rgba(255,0,255,0.7)\"\n \ + \ },\n \"filterValues\": {\n \"le\": 1e-9\n },\n \ + \ \"legend\": {\n \"show\": true\n },\n \"rowsFrame\"\ + : {\n \"layout\": \"auto\"\n },\n \"tooltip\": {\n \ + \ \"mode\": \"single\",\n \"showColorScale\": false,\n \ + \ \"yHistogram\": false\n },\n \"yAxis\": {\n \"\ + axisLabel\": \"processing status\",\n \"axisPlacement\": \"left\",\n\ + \ \"reverse\": false\n }\n },\n \"pluginVersion\"\ + : \"11.1.4\",\n \"targets\": [\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"sum by(status)\ + \ (rate(processing_count_total{status!=\\\"success\\\"}[$__rate_interval]))\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": false,\n \ + \ \"interval\": \"\",\n \"legendFormat\": \"{{status}}\",\n\ + \ \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Error rate\",\n \"type\"\ + : \"heatmap\"\n },\n {\n \"datasource\": {\n \"type\": \"\ + prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"fieldConfig\": {\n \"defaults\": {\n \"color\"\ + : {\n \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 0,\n \"y\": 8\n\ + \ },\n \"id\": 1,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"rate(request_latency_count[1m])\",\n \"instant\": false,\n \ + \ \"legendFormat\": \"{{instance}}\",\n \"range\": true,\n \ + \ \"refId\": \"A\"\n }\n ],\n \"title\": \"Request rate\"\ + ,\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n\ + \ \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"palette-classic\"\n },\n \ + \ \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 9,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n\ + \ },\n \"id\": 5,\n \"options\": {\n \"legend\": {\n \ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"10.0.0\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"editorMode\": \"builder\",\n \"expr\":\ + \ \"pulsar_msg_backlog\",\n \"instant\": false,\n \"legendFormat\"\ + : \"{{topic}}\",\n \"range\": true,\n \"refId\": \"A\"\n \ + \ }\n ],\n \"title\": \"Pub/sub backlog\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"semi-dark-green\",\n \"\ + mode\": \"palette-classic-by-name\"\n },\n \"custom\": {\n\ + \ \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n\ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n\ + \ \"axisPlacement\": \"auto\",\n \"fillOpacity\": 80,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"lineWidth\": 1,\n \ + \ \"scaleDistribution\": {\n \"type\": \"linear\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n\ + \ },\n \"id\": 10,\n \"options\": {\n \"barRadius\": 0,\n\ + \ \"barWidth\": 0.97,\n \"fullHighlight\": false,\n \"\ + groupWidth\": 0.7,\n \"legend\": {\n \"calcs\": [],\n \ + \ \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \ + \ \"showLegend\": true\n },\n \"orientation\": \"auto\",\n\ + \ \"showValue\": \"auto\",\n \"stacking\": \"none\",\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"none\"\ + \n },\n \"xTickLabelRotation\": 0,\n \"xTickLabelSpacing\"\ + : 0\n },\n \"pluginVersion\": \"11.1.4\",\n \"targets\": [\n\ + \ {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n \ + \ },\n \"disableTextWrap\": false,\n \"editorMode\": \"builder\"\ + ,\n \"exemplar\": false,\n \"expr\": \"max by(le) (chunk_size_bucket)\"\ + ,\n \"format\": \"heatmap\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": false,\n \"instant\": true,\n \ + \ \"legendFormat\": \"{{le}}\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Chunk size\",\n \"type\": \"barchart\"\n },\n \ + \ {\n \"datasource\": {\n \"type\": \"prometheus\",\n \"\ + uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \"fieldConfig\"\ + : {\n \"defaults\": {\n \"color\": {\n \"mode\":\ + \ \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 7,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n\ + \ },\n \"id\": 11,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"increase(processing_count_total{status!=\\\ + \"success\\\"}[$__rate_interval])\",\n \"format\": \"time_series\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Errors\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"fixedColor\": \"light-blue\",\n \"mode\"\ + : \"palette-classic\"\n },\n \"custom\": {\n \"\ + axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \ + \ \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \ + \ \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \ + \ \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n \ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \"\ + viz\": false\n },\n \"insertNulls\": false,\n \ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \ + \ \"pointSize\": 5,\n \"scaleDistribution\": {\n \ + \ \"type\": \"linear\"\n },\n \"showPoints\": \"\ + auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n\ + \ }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 24\n\ + \ },\n \"id\": 12,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"rate(process_cpu_seconds_total[$__rate_interval])\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"CPU\",\n \"type\": \"\ + timeseries\"\n },\n {\n \"datasource\": {\n \"type\": \"prometheus\"\ + ,\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\n },\n \ + \ \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \ + \ \"mode\": \"palette-classic\"\n },\n \"custom\"\ + : {\n \"axisBorderShow\": false,\n \"axisCenteredZero\"\ + : false,\n \"axisColorMode\": \"text\",\n \"axisLabel\"\ + : \"GB\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\"\ + : 0,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 0,\n\ + \ \"gradientMode\": \"none\",\n \"hideFrom\": {\n \ + \ \"legend\": false,\n \"tooltip\": false,\n \ + \ \"viz\": false\n },\n \"insertNulls\": false,\n\ + \ \"lineInterpolation\": \"linear\",\n \"lineWidth\":\ + \ 1,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n\ + \ \"type\": \"linear\"\n },\n \"showPoints\"\ + : \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n\ + \ \"group\": \"A\",\n \"mode\": \"none\"\n \ + \ },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\ + \n }\n },\n \"mappings\": [],\n \"thresholds\"\ + : {\n \"mode\": \"absolute\",\n \"steps\": [\n \ + \ {\n \"color\": \"green\",\n \"value\"\ + : null\n },\n {\n \"color\": \"red\"\ + ,\n \"value\": 80\n }\n ]\n \ + \ }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n\ + \ \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 24\n\ + \ },\n \"id\": 13,\n \"options\": {\n \"legend\": {\n\ + \ \"calcs\": [],\n \"displayMode\": \"list\",\n \"\ + placement\": \"bottom\",\n \"showLegend\": true\n },\n \ + \ \"tooltip\": {\n \"mode\": \"single\",\n \"sort\": \"\ + none\"\n }\n },\n \"targets\": [\n {\n \"datasource\"\ + : {\n \"type\": \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"expr\": \"process_resident_memory_bytes / 1073741824\"\ + ,\n \"fullMetaSearch\": false,\n \"includeNullMetadata\":\ + \ true,\n \"instant\": false,\n \"legendFormat\": \"{{instance}}\"\ + ,\n \"range\": true,\n \"refId\": \"A\",\n \"useBackend\"\ + : false\n }\n ],\n \"title\": \"Memory\",\n \"type\":\ + \ \"timeseries\"\n },\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"fieldConfig\": {\n \"defaults\": {\n \"\ + color\": {\n \"mode\": \"thresholds\"\n },\n \"\ + custom\": {\n \"align\": \"auto\",\n \"cellOptions\":\ + \ {\n \"type\": \"auto\"\n },\n \"filterable\"\ + : false,\n \"inspect\": false\n },\n \"mappings\"\ + : [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \ + \ \"steps\": [\n {\n \"color\": \"green\"\ + ,\n \"value\": null\n },\n {\n \ + \ \"color\": \"red\",\n \"value\": 80\n \ + \ }\n ]\n }\n },\n \"overrides\": []\n\ + \ },\n \"gridPos\": {\n \"h\": 7,\n \"w\": 12,\n \ + \ \"x\": 0,\n \"y\": 32\n },\n \"id\": 14,\n \"options\"\ + : {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\"\ + : false,\n \"fields\": \"\",\n \"reducer\": [\n \ + \ \"sum\"\n ],\n \"show\": false\n },\n \"\ + showHeader\": true\n },\n \"pluginVersion\": \"11.1.4\",\n \"\ + targets\": [\n {\n \"datasource\": {\n \"type\":\ + \ \"prometheus\",\n \"uid\": \"f6b18033-5918-4e05-a1ca-4cb30343b129\"\ + \n },\n \"disableTextWrap\": false,\n \"editorMode\"\ + : \"builder\",\n \"exemplar\": false,\n \"expr\": \"last_over_time(params_info[$__interval])\"\ + ,\n \"format\": \"table\",\n \"fullMetaSearch\": false,\n\ + \ \"includeNullMetadata\": true,\n \"instant\": true,\n \ + \ \"legendFormat\": \"__auto\",\n \"range\": false,\n \ + \ \"refId\": \"A\",\n \"useBackend\": false\n }\n ],\n\ + \ \"title\": \"Model parameters\",\n \"transformations\": [\n \ + \ {\n \"id\": \"filterFieldsByName\",\n \"options\": {\n\ + \ \"include\": {\n \"names\": [\n \"\ + instance\",\n \"model\"\n ]\n }\n \ + \ }\n },\n {\n \"id\": \"filterByValue\",\n \ + \ \"options\": {\n \"filters\": [\n {\n \ + \ \"config\": {\n \"id\": \"equal\",\n \ + \ \"options\": {\n \"value\": \"\"\n \ + \ }\n },\n \"fieldName\": \"model\"\n \ + \ }\n ],\n \"match\": \"all\",\n \"\ + type\": \"exclude\"\n }\n }\n ],\n \"type\": \"table\"\ + \n }\n ],\n \"refresh\": \"5s\",\n \"schemaVersion\": 39,\n \"tags\"\ + : [],\n \"templating\": {\n \"list\": []\n },\n \"time\": {\n \"from\"\ + : \"now-5m\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\"\ + : \"\",\n \"title\": \"Overview\",\n \"uid\": \"b5c8abf8-fe79-496b-b028-10bde917d1f0\"\ + ,\n \"version\": 3,\n \"weekStart\": \"\"\n}\n" + kind: ConfigMap + metadata: + name: dashboards + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: grafana + name: grafana + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: grafana + template: + metadata: + labels: + app: grafana + spec: + containers: + - env: + - name: GF_ORG_NAME + value: trustgraph.ai + image: docker.io/grafana/grafana:11.1.4 + name: grafana + ports: + - containerPort: 3000 + hostPort: 3000 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-storage + - mountPath: /etc/grafana/provisioning/dashboards/ + name: prov-dash + - mountPath: /etc/grafana/provisioning/datasources/ + name: prov-data + - mountPath: /var/lib/grafana/dashboards/ + name: dashboards + volumes: + - name: grafana-storage + persistentVolumeClaim: + claimName: grafana-storage + - configMap: + name: prov-dash + name: prov-dash + - configMap: + name: prov-data + name: prov-data + - configMap: + name: dashboards + name: dashboards +- apiVersion: v1 + kind: Service + metadata: + name: grafana + namespace: trustgraph + spec: + ports: + - name: http + port: 3000 + targetPort: 3000 + selector: + app: grafana + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: graph-rag + name: graph-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: graph-rag + template: + metadata: + labels: + app: graph-rag + spec: + containers: + - command: + - graph-rag + - -p + - pulsar://pulsar:6650 + - --prompt-request-queue + - non-persistent://tg/request/prompt-rag + - --prompt-response-queue + - non-persistent://tg/response/prompt-rag-response + - --entity-limit + - '50' + - --triple-limit + - '30' + - --max-subgraph-size + - '3000' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: graph-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: graph-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: graph-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-definitions + name: kg-extract-definitions + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-definitions + template: + metadata: + labels: + app: kg-extract-definitions + spec: + containers: + - command: + - kg-extract-definitions + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-definitions + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-definitions + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-definitions + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kg-extract-relationships + name: kg-extract-relationships + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: kg-extract-relationships + template: + metadata: + labels: + app: kg-extract-relationships + spec: + containers: + - command: + - kg-extract-relationships + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: kg-extract-relationships + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: kg-extract-relationships + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: kg-extract-relationships + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: neo4j + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-neo4j + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: neo4j + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: neo4j + name: neo4j + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: neo4j + template: + metadata: + labels: + app: neo4j + spec: + containers: + - env: + - name: NEO4J_AUTH + value: neo4j/password + image: docker.io/neo4j:5.22.0-community-bullseye + name: neo4j + ports: + - containerPort: 7474 + hostPort: 7474 + - containerPort: 7687 + hostPort: 7687 + resources: + limits: + cpu: '1.0' + memory: 768M + requests: + cpu: '0.5' + memory: 768M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /data + name: neo4j + volumes: + - name: neo4j + persistentVolumeClaim: + claimName: neo4j +- apiVersion: v1 + kind: Service + metadata: + name: neo4j + namespace: trustgraph + spec: + ports: + - name: api + port: 7474 + targetPort: 7474 + - name: api2 + port: 7687 + targetPort: 7687 + selector: + app: neo4j + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pdf-decoder + name: pdf-decoder + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pdf-decoder + template: + metadata: + labels: + app: pdf-decoder + spec: + containers: + - command: + - pdf-decoder + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: pdf-decoder + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pdf-decoder + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: pdf-decoder + type: LoadBalancer +- apiVersion: v1 + data: + prometheus.yml: "global:\n\n scrape_interval: 15s # By default, scrape targets\ + \ every 15 seconds.\n\n # Attach these labels to any time series or alerts\ + \ when communicating with\n # external systems (federation, remote storage,\ + \ Alertmanager).\n external_labels:\n monitor: 'trustgraph'\n\n# A scrape\ + \ configuration containing exactly one endpoint to scrape:\n# Here it's Prometheus\ + \ itself.\nscrape_configs:\n\n # The job name is added as a label `job=`\ + \ to any timeseries\n # scraped from this config.\n\n - job_name: 'trustgraph'\n\ + \n # Override the global default and scrape targets from this job every\n\ + \ # 5 seconds.\n scrape_interval: 5s\n\n static_configs:\n - targets:\n\ + \ - 'pdf-decoder:8000'\n - 'chunker:8000'\n - 'vectorize:8000'\n\ + \ - 'embeddings:8000'\n - 'kg-extract-definitions:8000'\n \ + \ - 'kg-extract-relationships:8000'\n - 'store-graph-embeddings:8000'\n\ + \ - 'store-triples:8000'\n - 'text-completion:8000'\n -\ + \ 'text-completion-rag:8000'\n - 'graph-rag:8000'\n - 'prompt:8000'\n\ + \ - 'prompt-rag:8000'\n - 'query-graph-embeddings:8000'\n \ + \ - 'query-triples:8000'\n - 'pulsar:8080'\n\n" + kind: ConfigMap + metadata: + name: prometheus-cfg + namespace: trustgraph +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: prometheus-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-prometheus-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: prometheus-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prometheus + name: prometheus + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prometheus + template: + metadata: + labels: + app: prometheus + spec: + containers: + - image: docker.io/prom/prometheus:v2.53.2 + name: prometheus + ports: + - containerPort: 9090 + hostPort: 9090 + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /etc/prometheus/ + name: prometheus-cfg + - mountPath: /prometheus + name: prometheus-data + volumes: + - configMap: + name: prometheus-cfg + name: prometheus-cfg + - name: prometheus-data + persistentVolumeClaim: + claimName: prometheus-data +- apiVersion: v1 + kind: Service + metadata: + name: prometheus + namespace: trustgraph + spec: + ports: + - name: http + port: 9090 + targetPort: 9090 + selector: + app: prometheus + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt + name: prompt + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt + template: + metadata: + labels: + app: prompt + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - --text-completion-request-queue + - non-persistent://tg/request/text-completion + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: prompt-rag + name: prompt-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: prompt-rag + template: + metadata: + labels: + app: prompt-rag + spec: + containers: + - command: + - prompt-template + - -p + - pulsar://pulsar:6650 + - -i + - non-persistent://tg/request/prompt-rag + - -o + - non-persistent://tg/response/prompt-rag-response + - --text-completion-request-queue + - non-persistent://tg/request/text-completion-rag + - --text-completion-response-queue + - non-persistent://tg/response/text-completion-rag-response + - --definition-template + - ' + + Study the following text and derive definitions for any discovered entities. + + Do not provide definitions for entities whose definitions are incomplete + + or unknown. + + Output relationships in JSON format as an arary of objects with fields: + + - entity: the name of the entity + + - definition: English text which defines the entity + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract will be written as plain text. Do not add markdown formatting + + or headers or prefixes. Do not include null or unknown definitions. + + ' + - --relationship-template + - ' + + Study the following text and derive entity relationships. For each + + relationship, derive the subject, predicate and object of the relationship. + + Output relationships in JSON format as an arary of objects with fields: + + - subject: the subject of the relationship + + - predicate: the predicate + + - object: the object of the relationship + + - object-entity: false if the object is a simple data type: name, value + or date. true if it is an entity. + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not use special characters in the abstract text. The + + abstract must be written as plain text. Do not add markdown formatting + + or headers or prefixes. + + ' + - --knowledge-query-template + - 'Study the following set of knowledge statements. The statements are written + in Cypher format that has been extracted from a knowledge graph. Use only + the provided set of knowledge statements in your response. Do not speculate + if the answer is not found in the provided set of knowledge statements. + + + Here''s the knowledge statements: + + {graph} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --document-query-template + - 'Study the following context. Use only the information provided in the + context in your response. Do not speculate if the answer is not found + in the provided set of knowledge statements. + + + Here is the context: + + {documents} + + + Use only the provided knowledge statements to respond to the following: + + {query} + + ' + - --rows-template + - ' + + Study the following text and derive objects which match the schema provided. + + + You must output an array of JSON objects for each object you discover + + which matches the schema. For each object, output a JSON object whose + fields + + carry the name field specified in the schema. + + + + + + + {schema} + + + + + + + {text} + + + + + + + You will respond only with raw JSON format data. Do not provide + + explanations. Do not add markdown formatting or headers or prefixes. + + ' + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: prompt-rag + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: prompt-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: prompt-rag + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: pulsar-data + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-pulsar-data + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: pulsar-data + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: pulsar + name: pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: pulsar + template: + metadata: + labels: + app: pulsar + spec: + containers: + - command: + - bin/pulsar + - standalone + env: + - name: PULSAR_MEM + value: -Xms600M -Xmx600M + image: docker.io/apachepulsar/pulsar:3.3.1 + name: pulsar + ports: + - containerPort: 6650 + hostPort: 6650 + - containerPort: 8080 + hostPort: 8080 + resources: + limits: + cpu: '2.0' + memory: 1500M + requests: + cpu: '1.0' + memory: 1500M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /pulsar/data + name: pulsar-data + volumes: + - name: pulsar-data + persistentVolumeClaim: + claimName: pulsar-data +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: init-pulsar + name: init-pulsar + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: init-pulsar + template: + metadata: + labels: + app: init-pulsar + spec: + containers: + - command: + - sh + - -c + - while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create + tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request + ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response + ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention + --size -1 --time 3m tg/response; sleep 20; done + image: docker.io/apachepulsar/pulsar:3.3.1 + name: init-pulsar + resources: + limits: + cpu: '1' + memory: 400M + requests: + cpu: '0.1' + memory: 400M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: pulsar + namespace: trustgraph + spec: + ports: + - name: bookie + port: 6650 + targetPort: 6650 + - name: http + port: 8080 + targetPort: 8080 + selector: + app: pulsar + type: LoadBalancer +- apiVersion: v1 + kind: PersistentVolume + metadata: + name: qdrant + spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 20G + hostPath: + path: /data/pv-qdrant + persistentVolumeReclaimPolicy: Delete +- apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: qdrant + namespace: trustgraph + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20G +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: qdrant + name: qdrant + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: qdrant + template: + metadata: + labels: + app: qdrant + spec: + containers: + - image: docker.io/qdrant/qdrant:v1.11.1 + name: qdrant + ports: + - containerPort: 6333 + hostPort: 6333 + - containerPort: 6334 + hostPort: 6334 + resources: + limits: + cpu: '1.0' + memory: 256M + requests: + cpu: '0.5' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /qdrant/storage + name: qdrant + volumes: + - name: qdrant + persistentVolumeClaim: + claimName: qdrant +- apiVersion: v1 + kind: Service + metadata: + name: qdrant + namespace: trustgraph + spec: + ports: + - name: api + port: 6333 + targetPort: 6333 + - name: api2 + port: 6334 + targetPort: 6334 + selector: + app: qdrant + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-doc-embeddings + name: query-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-doc-embeddings + template: + metadata: + labels: + app: query-doc-embeddings + spec: + containers: + - command: + - de-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-graph-embeddings + name: query-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-graph-embeddings + template: + metadata: + labels: + app: query-graph-embeddings + spec: + containers: + - command: + - ge-query-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: query-triples + name: query-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: query-triples + template: + metadata: + labels: + app: query-triples + spec: + containers: + - command: + - triples-query-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: query-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: query-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: query-triples + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-doc-embeddings + name: store-doc-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-doc-embeddings + template: + metadata: + labels: + app: store-doc-embeddings + spec: + containers: + - command: + - de-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-doc-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-doc-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-doc-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-graph-embeddings + name: store-graph-embeddings + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-graph-embeddings + template: + metadata: + labels: + app: store-graph-embeddings + spec: + containers: + - command: + - ge-write-qdrant + - -p + - pulsar://pulsar:6650 + - -t + - http://qdrant:6333 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-graph-embeddings + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-graph-embeddings + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-graph-embeddings + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: store-triples + name: store-triples + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: store-triples + template: + metadata: + labels: + app: store-triples + spec: + containers: + - command: + - triples-write-neo4j + - -p + - pulsar://pulsar:6650 + - -g + - bolt://neo4j:7687 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: store-triples + resources: + limits: + cpu: '0.5' + memory: 128M + requests: + cpu: '0.1' + memory: 128M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: store-triples + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8080 + targetPort: 8080 + selector: + app: store-triples + type: LoadBalancer +- apiVersion: v1 + data: + private.json: UFJJVkFURSBLRVkgR09FUyBIRVJFCg== + kind: Secret + metadata: + name: vertexai-creds + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion + name: text-completion + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion + template: + metadata: + labels: + app: text-completion + spec: + containers: + - command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion + resources: + limits: + cpu: '0.5' + memory: 256M + requests: + cpu: '0.1' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /vertexai + name: vertexai-creds + volumes: + - name: vertexai-creds + secret: + secretName: vertexai-creds +- apiVersion: v1 + kind: Service + metadata: + name: text-completion + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion + type: LoadBalancer +- apiVersion: v1 + data: + private.json: UFJJVkFURSBLRVkgR09FUyBIRVJFCg== + kind: Secret + metadata: + name: vertexai-creds + namespace: trustgraph +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: text-completion-rag + name: text-completion-rag + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: text-completion-rag + template: + metadata: + labels: + app: text-completion-rag + spec: + containers: + - command: + - text-completion-vertexai + - -p + - pulsar://pulsar:6650 + - -k + - /vertexai/private.json + - -r + - us-central1 + - -x + - '4096' + - -t + - '0' + - -m + - gemini-1.0-pro-001 + - -i + - non-persistent://tg/request/text-completion-rag + - -o + - non-persistent://tg/response/text-completion-rag-response + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: text-completion-rag + resources: + limits: + cpu: '0.5' + memory: 256M + requests: + cpu: '0.1' + memory: 256M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumeMounts: + - mountPath: /vertexai + name: vertexai-creds + volumes: + - name: vertexai-creds + secret: + secretName: vertexai-creds +- apiVersion: v1 + kind: Service + metadata: + name: text-completion-rag + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: text-completion-rag + type: LoadBalancer +- apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: vectorize + name: vectorize + namespace: trustgraph + spec: + replicas: 1 + selector: + matchLabels: + app: vectorize + template: + metadata: + labels: + app: vectorize + spec: + containers: + - command: + - embeddings-vectorize + - -p + - pulsar://pulsar:6650 + image: docker.io/trustgraph/trustgraph-flow:0.10.0 + name: vectorize + resources: + limits: + cpu: '1.0' + memory: 512M + requests: + cpu: '0.5' + memory: 512M + securityContext: + runAsGroup: 0 + runAsUser: 0 + volumes: [] +- apiVersion: v1 + kind: Service + metadata: + name: vectorize + namespace: trustgraph + spec: + ports: + - name: metrics + port: 8000 + targetPort: 8000 + selector: + app: vectorize + type: LoadBalancer +kind: List + diff --git a/scripts/graph-show b/scripts/graph-show index 27ab98b5..63da0e19 100755 --- a/scripts/graph-show +++ b/scripts/graph-show @@ -12,7 +12,7 @@ default_pulsar_host = os.getenv("PULSAR_HOST", 'pulsar://pulsar:6650') def show_graph(pulsar): - tq = TriplesQueryClient(pulsar_host="pulsar://localhost:6650") + tq = TriplesQueryClient(pulsar_host=pulsar) rows = tq.request(None, None, None, limit=10_000_000) diff --git a/scripts/graph-to-turtle b/scripts/graph-to-turtle index 26e18774..a1c0e000 100755 --- a/scripts/graph-to-turtle +++ b/scripts/graph-to-turtle @@ -15,7 +15,7 @@ default_pulsar_host = os.getenv("PULSAR_HOST", 'pulsar://pulsar:6650') def show_graph(pulsar): - tq = TriplesQueryClient(pulsar_host="pulsar://localhost:6650") + tq = TriplesQueryClient(pulsar_host=pulsar) rows = tq.request(None, None, None, limit=10_000_000) diff --git a/setup.py b/setup.py index 601524c9..6d8de2e4 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os with open("README.md", "r") as fh: long_description = fh.read() -version = "0.9.3" +version = "0.10.0" setuptools.setup( name="trustgraph", diff --git a/templates/config-to-docker-compose.jsonnet b/templates/config-to-docker-compose.jsonnet index 71346abc..442d2cb7 100644 --- a/templates/config-to-docker-compose.jsonnet +++ b/templates/config-to-docker-compose.jsonnet @@ -1,6 +1,6 @@ -local engine = import "docker-compose.jsonnet"; -local decode = import "decode-config.jsonnet"; +local engine = import "engine/docker-compose.jsonnet"; +local decode = import "util/decode-config.jsonnet"; local components = import "components.jsonnet"; // Import config diff --git a/templates/config-to-gcp-k8s.jsonnet b/templates/config-to-gcp-k8s.jsonnet index 4ba0325e..3d089a24 100644 --- a/templates/config-to-gcp-k8s.jsonnet +++ b/templates/config-to-gcp-k8s.jsonnet @@ -1,6 +1,6 @@ -local engine = import "k8s.jsonnet"; -local decode = import "decode-config.jsonnet"; +local engine = import "engine/gcp-k8s.jsonnet"; +local decode = import "util/decode-config.jsonnet"; local components = import "components.jsonnet"; // Import config @@ -9,44 +9,8 @@ local config = import "config.json"; // Produce patterns from config local patterns = decode(config); -local ns = { - apiVersion: "v1", - kind: "Namespace", - metadata: { - name: "trustgraph", - }, - "spec": { - }, -}; - -local sc = { - apiVersion: "storage.k8s.io/v1", - kind: "StorageClass", - metadata: { - name: "tg", - }, - provisioner: "pd.csi.storage.gke.io", - parameters: { - type: "pd-balanced", - "csi.storage.k8s.io/fstype": "ext4", - }, - reclaimPolicy: "Delete", - volumeBindingMode: "WaitForFirstConsumer", -}; - -//patterns["pulsar"].create(engine) - // Extract resources usnig the engine -local resources = std.flattenArrays([ - p.create(engine) for p in std.objectValues(patterns) -]); - -local resourceList = { - apiVersion: "v1", - kind: "List", - items: [ns, sc] + resources, -}; - +local resourceList = engine.package(patterns); resourceList diff --git a/templates/config-to-minikube-k8s.jsonnet b/templates/config-to-minikube-k8s.jsonnet new file mode 100644 index 00000000..073358cb --- /dev/null +++ b/templates/config-to-minikube-k8s.jsonnet @@ -0,0 +1,26 @@ + +local engine = import "engine/minikube-k8s.jsonnet"; +local decode = import "util/decode-config.jsonnet"; +local components = import "components.jsonnet"; + +// Import config +local config = import "config.json"; + +// Produce patterns from config +local patterns = decode(config); + +local ns = { + apiVersion: "v1", + kind: "Namespace", + metadata: { + name: "trustgraph", + }, + "spec": { + }, +}; + +// Extract resources using the engine +local resourceList = engine.package(patterns); + +resourceList + diff --git a/templates/docker-compose.jsonnet b/templates/engine/docker-compose.jsonnet similarity index 94% rename from templates/docker-compose.jsonnet rename to templates/engine/docker-compose.jsonnet index e1733b78..d82f9a52 100644 --- a/templates/docker-compose.jsonnet +++ b/templates/engine/docker-compose.jsonnet @@ -1,5 +1,13 @@ { + // Extract resources usnig the engine + package:: function(patterns) + std.foldl( + function(state, p) state + p.create(self), + std.objectValues(patterns), + {} + ), + container:: function(name) { diff --git a/templates/engine/gcp-k8s.jsonnet b/templates/engine/gcp-k8s.jsonnet new file mode 100644 index 00000000..0605a570 --- /dev/null +++ b/templates/engine/gcp-k8s.jsonnet @@ -0,0 +1,44 @@ + +local k8s = import "k8s.jsonnet"; + +local ns = { + apiVersion: "v1", + kind: "Namespace", + metadata: { + name: "trustgraph", + }, + "spec": { + }, +}; + +local sc = { + apiVersion: "storage.k8s.io/v1", + kind: "StorageClass", + metadata: { + name: "tg", + }, + provisioner: "pd.csi.storage.gke.io", + parameters: { + type: "pd-balanced", + "csi.storage.k8s.io/fstype": "ext4", + }, + reclaimPolicy: "Delete", + volumeBindingMode: "WaitForFirstConsumer", +}; + +k8s + { + + // Extract resources usnig the engine + package:: function(patterns) + local resources = [sc, ns] + std.flattenArrays([ + p.create(self) for p in std.objectValues(patterns) + ]); + local resourceList = { + apiVersion: "v1", + kind: "List", + items: [ns, sc] + resources, + }; + resourceList + +} + diff --git a/templates/k8s.jsonnet b/templates/engine/k8s.jsonnet similarity index 86% rename from templates/k8s.jsonnet rename to templates/engine/k8s.jsonnet index cbde28d0..69aabfd7 100644 --- a/templates/k8s.jsonnet +++ b/templates/engine/k8s.jsonnet @@ -67,16 +67,16 @@ { name: container.name, image: container.image, + + // FIXME: Make everything run as + // root. Needed to get filesystems + // to be accessible. There's a + // better way of doing this? securityContext: { - // fsGroup: 1234 - // runAsUser: 65534 - // runAsGroup: 65534 - // runAsNonRoot: true - runAsUser: 0, - runAsGroup: 0, - // runAsNonRoot: true, - // readOnlyRootFilesystem: true, - }, + runAsUser: 0, + runAsGroup: 0, + }, + resources: { requests: container.reservations, limits: container.limits @@ -197,28 +197,6 @@ with_size:: function(size) self + { size: size }, add:: function() [ -/* - { - - apiVersion: "v1", - kind: "PersistentVolume", - metadata: { - name: volume.name, - labels: { - type: "local", - } - }, - spec: { - storageClassName: "tg", - volumeMode: "Filesystem", - capacity: { - storage: volume.size, - }, - accessModes: [ "ReadWriteOnce" ], - persistentVolumeReclaimPolicy: "Delete", - } - }, -*/ { apiVersion: "v1", kind: "PersistentVolumeClaim", @@ -234,7 +212,6 @@ storage: volume.size, } }, -// volumeName: volume.name, } } ], diff --git a/templates/engine/minikube-k8s.jsonnet b/templates/engine/minikube-k8s.jsonnet new file mode 100644 index 00000000..858b17ad --- /dev/null +++ b/templates/engine/minikube-k8s.jsonnet @@ -0,0 +1,115 @@ + +local k8s = import "k8s.jsonnet"; + +local ns = { + apiVersion: "v1", + kind: "Namespace", + metadata: { + name: "trustgraph", + }, + "spec": { + }, +}; + +k8s + { + + // Extract resources usnig the engine + package:: function(patterns) + local resources = [ns] + std.flattenArrays([ + p.create(self) for p in std.objectValues(patterns) + ]); + local resourceList = { + apiVersion: "v1", + kind: "List", + items: resources, + }; + resourceList, + + volume:: function(name) + { + local volume = self, + name: name, + with_size:: function(size) self + { size: size }, + add:: function() [ + { + apiVersion: "v1", + kind: "PersistentVolume", + metadata: { + name: volume.name, + }, + spec: { + accessModes: [ "ReadWriteOnce" ], + capacity: { + storage: volume.size, + }, + persistentVolumeReclaimPolicy: "Delete", + hostPath: { + path: "/data/pv-" + volume.name, + }, + } + }, + { + apiVersion: "v1", + kind: "PersistentVolumeClaim", + metadata: { + name: volume.name, + namespace: "trustgraph", + }, + spec: { + accessModes: [ "ReadWriteOnce" ], + resources: { + requests: { + storage: volume.size, + } + }, + } + } + ], + + volRef:: function() { + name: volume.name, + persistentVolumeClaim: { claimName: volume.name }, + } + + }, + + service:: function(containers) + { + local service = self, + name: containers.name, + ports: [], + with_port:: + function(src, dest, name) + self + { + ports: super.ports + [ + { src: src, dest: dest, name: name } + ] + }, + add:: function() [ + { + apiVersion: "v1", + kind: "Service", + metadata: { + name: service.name, + namespace: "trustgraph", + }, + spec: { + selector: { + app: service.name, + }, + type: "LoadBalancer", + ports: [ + { + port: port.src, + targetPort: port.dest, + name: port.name, + } + for port in service.ports + ], + } + } + ], + }, + +} + diff --git a/templates/opts-to-docker-compose.jsonnet b/templates/opts-to-docker-compose.jsonnet new file mode 100644 index 00000000..c916475d --- /dev/null +++ b/templates/opts-to-docker-compose.jsonnet @@ -0,0 +1,21 @@ + +local engine = import "engine/docker-compose.jsonnet"; +local components = import "components.jsonnet"; + +// Options +local options = std.split(std.extVar("options"), ","); + +// Produce patterns from config +local patterns = std.foldl( + function(state, p) state + components[p], + options, + {} +); + +// Extract resources usnig the engine +local resources = engine.package(patterns); + +resources + + + diff --git a/templates/main.jsonnet b/templates/opts-to-gcp-k8s.jsonnet similarity index 59% rename from templates/main.jsonnet rename to templates/opts-to-gcp-k8s.jsonnet index 06a93949..a338cd9e 100644 --- a/templates/main.jsonnet +++ b/templates/opts-to-gcp-k8s.jsonnet @@ -1,6 +1,5 @@ -local engine = import "docker-compose.jsonnet"; -local decode = import "decode-config.jsonnet"; +local engine = import "engine/docker-compose.jsonnet"; local components = import "components.jsonnet"; // Options @@ -14,11 +13,7 @@ local patterns = std.foldl( ); // Extract resources usnig the engine -local resources = std.foldl( - function(state, p) state + p.create(engine), - std.objectValues(patterns), - {} -); +local resources = engine.package(patterns); std.manifestYamlDoc(resources) diff --git a/templates/opts-to-minikube-k8s.jsonnet b/templates/opts-to-minikube-k8s.jsonnet new file mode 100644 index 00000000..15895909 --- /dev/null +++ b/templates/opts-to-minikube-k8s.jsonnet @@ -0,0 +1,19 @@ + +local engine = import "engine/minikube-k8s.jsonnet"; +local components = import "components.jsonnet"; + +// Options +local options = std.split(std.extVar("options"), ","); + +// Produce patterns from config +local patterns = std.foldl( + function(state, p) state + components[p], + options, + {} +); + +// Extract resources usnig the engine +local resources = engine.package(patterns); + +resources + diff --git a/templates/decode-config.jsonnet b/templates/util/decode-config.jsonnet similarity index 100% rename from templates/decode-config.jsonnet rename to templates/util/decode-config.jsonnet diff --git a/templates/values/version.jsonnet b/templates/values/version.jsonnet deleted file mode 100644 index e127b65d..00000000 --- a/templates/values/version.jsonnet +++ /dev/null @@ -1 +0,0 @@ -"0.9.3" diff --git a/tg-launch-azure-cassandra.yaml b/tg-launch-azure-cassandra.yaml deleted file mode 100644 index d6eb9207..00000000 --- a/tg-launch-azure-cassandra.yaml +++ /dev/null @@ -1,475 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-azure" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${AZURE_TOKEN}" - - "-e" - - "${AZURE_ENDPOINT}" - - "-x" - - "4096" - - "-t" - - "0" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-azure" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${AZURE_TOKEN}" - - "-e" - - "${AZURE_ENDPOINT}" - - "-x" - - "4096" - - "-t" - - "0" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-azure-neo4j.yaml b/tg-launch-azure-neo4j.yaml deleted file mode 100644 index 12809976..00000000 --- a/tg-launch-azure-neo4j.yaml +++ /dev/null @@ -1,476 +0,0 @@ -"services": - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-azure" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${AZURE_TOKEN}" - - "-e" - - "${AZURE_ENDPOINT}" - - "-x" - - "4096" - - "-t" - - "0" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-azure" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${AZURE_TOKEN}" - - "-e" - - "${AZURE_ENDPOINT}" - - "-x" - - "4096" - - "-t" - - "0" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-bedrock-cassandra.yaml b/tg-launch-bedrock-cassandra.yaml deleted file mode 100644 index 3aa98042..00000000 --- a/tg-launch-bedrock-cassandra.yaml +++ /dev/null @@ -1,483 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-recursive" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "2000" - - "--chunk-overlap" - - "100" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-bedrock" - - "-p" - - "pulsar://pulsar:6650" - - "-z" - - "${AWS_ID_KEY}" - - "-k" - - "${AWS_SECRET_KEY}" - - "-r" - - "us-west-2" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "mistral.mixtral-8x7b-instruct-v0:1" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-bedrock" - - "-p" - - "pulsar://pulsar:6650" - - "-z" - - "${AWS_ID_KEY}" - - "-k" - - "${AWS_SECRET_KEY}" - - "-r" - - "us-west-2" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "mistral.mixtral-8x7b-instruct-v0:1" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-bedrock-neo4j.yaml b/tg-launch-bedrock-neo4j.yaml deleted file mode 100644 index a5963277..00000000 --- a/tg-launch-bedrock-neo4j.yaml +++ /dev/null @@ -1,484 +0,0 @@ -"services": - "chunker": - "command": - - "chunker-recursive" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "2000" - - "--chunk-overlap" - - "100" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-bedrock" - - "-p" - - "pulsar://pulsar:6650" - - "-z" - - "${AWS_ID_KEY}" - - "-k" - - "${AWS_SECRET_KEY}" - - "-r" - - "us-west-2" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "mistral.mixtral-8x7b-instruct-v0:1" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-bedrock" - - "-p" - - "pulsar://pulsar:6650" - - "-z" - - "${AWS_ID_KEY}" - - "-k" - - "${AWS_SECRET_KEY}" - - "-r" - - "us-west-2" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "mistral.mixtral-8x7b-instruct-v0:1" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-claude-cassandra.yaml b/tg-launch-claude-cassandra.yaml deleted file mode 100644 index dd2aea90..00000000 --- a/tg-launch-claude-cassandra.yaml +++ /dev/null @@ -1,471 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-claude" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${CLAUDE_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-claude" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${CLAUDE_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-claude-neo4j.yaml b/tg-launch-claude-neo4j.yaml deleted file mode 100644 index abf2e8d2..00000000 --- a/tg-launch-claude-neo4j.yaml +++ /dev/null @@ -1,472 +0,0 @@ -"services": - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-claude" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${CLAUDE_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-claude" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${CLAUDE_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-cohere-cassandra.yaml b/tg-launch-cohere-cassandra.yaml deleted file mode 100644 index f92789c0..00000000 --- a/tg-launch-cohere-cassandra.yaml +++ /dev/null @@ -1,467 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "150" - - "--chunk-overlap" - - "10" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${COHERE_KEY}" - - "-t" - - 0 - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${COHERE_KEY}" - - "-t" - - 0 - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-cohere-neo4j.yaml b/tg-launch-cohere-neo4j.yaml deleted file mode 100644 index 77b6151a..00000000 --- a/tg-launch-cohere-neo4j.yaml +++ /dev/null @@ -1,468 +0,0 @@ -"services": - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "150" - - "--chunk-overlap" - - "10" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${COHERE_KEY}" - - "-t" - - 0 - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${COHERE_KEY}" - - "-t" - - 0 - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-ollama-cassandra.yaml b/tg-launch-ollama-cassandra.yaml deleted file mode 100644 index 3929fb42..00000000 --- a/tg-launch-ollama-cassandra.yaml +++ /dev/null @@ -1,419 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-ollama" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "gemma2:9b" - - "-r" - - "${OLLAMA_HOST}" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-ollama" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "gemma2:9b" - - "-r" - - "${OLLAMA_HOST}" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-ollama-neo4j.yaml b/tg-launch-ollama-neo4j.yaml deleted file mode 100644 index 0c3eb43a..00000000 --- a/tg-launch-ollama-neo4j.yaml +++ /dev/null @@ -1,420 +0,0 @@ -"services": - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-ollama" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "gemma2:9b" - - "-r" - - "${OLLAMA_HOST}" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-ollama" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "gemma2:9b" - - "-r" - - "${OLLAMA_HOST}" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-openai-cassandra.yaml b/tg-launch-openai-cassandra.yaml deleted file mode 100644 index 46921ae2..00000000 --- a/tg-launch-openai-cassandra.yaml +++ /dev/null @@ -1,475 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-openai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${OPENAI_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "GPT-3.5-Turbo" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-openai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${OPENAI_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "GPT-3.5-Turbo" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-openai-neo4j.yaml b/tg-launch-openai-neo4j.yaml deleted file mode 100644 index c0ffdfee..00000000 --- a/tg-launch-openai-neo4j.yaml +++ /dev/null @@ -1,476 +0,0 @@ -"services": - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-openai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${OPENAI_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "GPT-3.5-Turbo" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-openai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${OPENAI_KEY}" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "GPT-3.5-Turbo" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-vertexai-cassandra.yaml b/tg-launch-vertexai-cassandra.yaml deleted file mode 100644 index 05adee9a..00000000 --- a/tg-launch-vertexai-cassandra.yaml +++ /dev/null @@ -1,483 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-vertexai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "/vertexai/private.json" - - "-r" - - "us-central1" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "gemini-1.0-pro-001" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "256M" - "reservations": - "cpus": "0.1" - "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "volumes": - - "./vertexai:/vertexai" - "text-completion-rag": - "command": - - "text-completion-vertexai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "/vertexai/private.json" - - "-r" - - "us-central1" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "gemini-1.0-pro-001" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "256M" - "reservations": - "cpus": "0.1" - "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "volumes": - - "./vertexai:/vertexai" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-launch-vertexai-neo4j.yaml b/tg-launch-vertexai-neo4j.yaml deleted file mode 100644 index ed0f74dd..00000000 --- a/tg-launch-vertexai-neo4j.yaml +++ /dev/null @@ -1,484 +0,0 @@ -"services": - "chunker": - "command": - - "chunker-token" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "250" - - "--chunk-overlap" - - "15" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "400M" - "reservations": - "cpus": "0.5" - "memory": "400M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-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.9.3" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-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.9.3" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-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.9.3" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-template" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - - "--definition-template" - - "\nStudy the following text and derive definitions for any discovered entities.\nDo not provide definitions for entities whose definitions are incomplete\nor unknown.\nOutput relationships in JSON format as an arary of objects with fields:\n- entity: the name of the entity\n- definition: English text which defines the entity\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract will be written as plain text. Do not add markdown formatting\nor headers or prefixes. Do not include null or unknown definitions.\n" - - "--relationship-template" - - "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n" - - "--knowledge-query-template" - - | - Study the following set of knowledge statements. The statements are written in Cypher format that has been extracted from a knowledge graph. Use only the provided set of knowledge statements in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here's the knowledge statements: - {graph} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--document-query-template" - - | - Study the following context. Use only the information provided in the context in your response. Do not speculate if the answer is not found in the provided set of knowledge statements. - - Here is the context: - {documents} - - Use only the provided knowledge statements to respond to the following: - {query} - - "--rows-template" - - "\nStudy the following text and derive objects which match the schema provided.\n\nYou must output an array of JSON objects for each object you discover\nwhich matches the schema. For each object, output a JSON object whose fields\ncarry the name field specified in the schema.\n\n\n\n{schema}\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not add markdown formatting or headers or prefixes.\n" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-vertexai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "/vertexai/private.json" - - "-r" - - "us-central1" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "gemini-1.0-pro-001" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "256M" - "reservations": - "cpus": "0.1" - "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "volumes": - - "./vertexai:/vertexai" - "text-completion-rag": - "command": - - "text-completion-vertexai" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "/vertexai/private.json" - - "-r" - - "us-central1" - - "-x" - - "4096" - - "-t" - - "0" - - "-m" - - "gemini-1.0-pro-001" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "256M" - "reservations": - "cpus": "0.1" - "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "volumes": - - "./vertexai:/vertexai" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-storage-cassandra.yaml b/tg-storage-cassandra.yaml deleted file mode 100644 index a74fb726..00000000 --- a/tg-storage-cassandra.yaml +++ /dev/null @@ -1,214 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "800M" - "reservations": - "cpus": "0.5" - "memory": "800M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "grafana-storage": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {} diff --git a/tg-storage-neo4j.yaml b/tg-storage-neo4j.yaml deleted file mode 100644 index ea863dba..00000000 --- a/tg-storage-neo4j.yaml +++ /dev/null @@ -1,215 +0,0 @@ -"services": - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/provisioning/:/etc/grafana/provisioning/dashboards/" - - "./grafana/provisioning/:/etc/grafana/provisioning/datasources/" - - "./grafana/dashboards/:/var/lib/grafana/dashboards/" - "init-pulsar": - "command": - - "sh" - - "-c" - - "while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done" - "deploy": - "resources": - "limits": - "cpus": "1" - "memory": "400M" - "reservations": - "cpus": "0.1" - "memory": "400M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "neo4j": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "768M" - "reservations": - "cpus": "0.5" - "memory": "768M" - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus/" - - "prometheus-data:/prometheus" - "pulsar": - "command": - - "bin/pulsar" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "2.0" - "memory": "1500M" - "reservations": - "cpus": "1.0" - "memory": "1500M" - "environment": - "PULSAR_MEM": "-Xms600M -Xmx600M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-data:/pulsar/data" - "qdrant": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/qdrant/qdrant:v1.11.1" - "ports": - - "6333:6333" - - "6334:6334" - "restart": "on-failure:100" - "volumes": - - "qdrant:/qdrant/storage" - "query-doc-embeddings": - "command": - - "de-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-doc-embeddings": - "command": - - "de-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-qdrant" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://qdrant:6333" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.9.3" - "restart": "on-failure:100" -"volumes": - "grafana-storage": {} - "neo4j": {} - "prometheus-data": {} - "pulsar-data": {} - "qdrant": {}