8000 chore: sync server changes by outerlook · Pull Request #711 · trufnetwork/node · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: sync server changes #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ services:
- ${POSTGRES_VOLUME:-data-kwil-postgres}:/var/lib/postgresql/data
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

tsn-conf:
# this service permits us to use the best approach for configuration:
Expand All @@ -37,6 +43,12 @@ services:
- ${TSN_VOLUME:-data-tsn-db}:/root/.kwild
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

tsn-db:
container_name: tsn-db
Expand Down Expand Up @@ -82,6 +94,12 @@ services:
- ${TSN_VOLUME:-data-tsn-db}:/root/.kwild
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

networks:
tsn-network:
Expand Down
30 changes: 30 additions & 0 deletions deployments/dev-gateway/dev-gateway-compose.yaml
10000
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ services:
META_LOG_OTEL_PROCESSOR: "batch"
OTEL_EXPORTER_OTLP_ENDPOINT: "vector:4317"
META_LOG_OTEL_COLLECTOR_TLS: "false"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

nginx:
container_name: nginx
Expand All @@ -54,6 +60,12 @@ services:
- kwil-gateway
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

vector:
image: timberio/vector:latest-alpine
Expand All @@ -63,6 +75,12 @@ services:

networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

prometheus:
image: prom/prometheus:v2.30.3
Expand All @@ -74,6 +92,12 @@ services:
- "9090:9090"
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

grafana:
image: grafana/grafana:8.2.2
Expand All @@ -85,6 +109,12 @@ services:
- grafana-storage:/var/lib/grafana
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

volumes:
grafana-storage:
Expand Down
30 changes: 30 additions & 0 deletions deployments/dev-net/devnet-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ services:
nocopy: true
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

kwil-postgres-2:
image: "kwildb/postgres:latest"
Expand All @@ -40,6 +46,12 @@ services:
nocopy: true
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

tsn-conf:
container_name: tsn-conf
Expand All @@ -60,6 +72,12 @@ services:
- type: volume
source: tsn-conf
target: /app/config
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

tsn-db-1:
container_name: tsn-db-1
Expand Down Expand Up @@ -90,6 +108,12 @@ services:
- type: volume
source: tsn-conf
target: /root/.kwild
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

tsn-db-2:
container_name: tsn-db-2
Expand Down Expand Up @@ -120,6 +144,12 @@ services:
- type: volume
source: tsn-conf
target: /root/.kwild
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

networks:
tsn-network:
Expand Down
8 changes: 7 additions & 1 deletion deployments/gateway/gateway-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ services:
target: /app/kgw
- type: bind
source: ./kgw-config.pkl
target: /app/kgw-config.pkl
target: /app/kgw-config.pkl
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"
18 changes: 18 additions & 0 deletions deployments/indexer/dev-indexer-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ services:
target: /etc/caddy/Caddyfile
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"
indexer-postgres:
image: "postgres:latest"
hostname: indexer-postgres
Expand All @@ -34,6 +40,12 @@ services:
nocopy: true
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"
indexer:
hostname: indexer
restart: unless-stopped
Expand All @@ -55,6 +67,12 @@ services:
interval: 5s
retries: 5
timeout: 5s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

networks:
tsn-network:
Expand Down
19 changes: 19 additions & 0 deletions deployments/indexer/indexer-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ services:
target: /etc/caddy/Caddyfile
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

indexer-postgres:
image: "postgres:latest"
Expand All @@ -32,6 +38,13 @@ services:
- ${POSTGRES_VOLUME:-data-indexer}:/var/lib/postgresql/data
networks:
- tsn-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

indexer:
restart: unless-stopped
build:
Expand All @@ -52,6 +65,12 @@ services:
interval: 5s
retries: 5
timeout: 5s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

networks:
tsn-network:
Expand Down
26 changes: 25 additions & 1 deletion deployments/observer/dev-observer-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,28 @@ services:
PROCFS_ROOT: /mnt/host/proc
SYSFS_ROOT: /mnt/host/sys
DOCKER_HOST: unix:///var/run/docker.sock
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

prometheus:
image: prom/prometheus:v2.30.3
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.enable-remote-write-receiver'
volumes:
- ./dev-prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- '9090:9090'
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

grafana:
image: grafana/grafana:8.2.2
Expand All @@ -44,7 +57,12 @@ services:
- grafana-storage:/var/lib/grafana
# provision our sources
- ./dev-grafana/provisioning/datasources/sources.yaml:/etc/grafana/provisioning/datasources/sources.yaml

logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

loki:
image: grafana/loki:2.7.1
Expand All @@ -53,6 +71,12 @@ services:
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./loki-config.yaml:/etc/loki/local-config.yaml
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"

volumes:
grafana-storage: null
8 changes: 8 additions & 0 deletions deployments/observer/observer-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ services:
INSTANCE_NAME: ${INSTANCE_NAME}
SERVICE_NAME: ${SERVICE_NAME}
ENV: ${ENV}
network_mode: host
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "2"
tag: "{{.Name}}"
11 changes: 6 additions & 5 deletions deployments/observer/vector-dev-destination.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Dev destination for Vector, sends metrics to Prometheus
sinks:
prometheus:
type: prometheus_exporter
# use this to mimic prod destination
type: prometheus_remote_write
batch:
timeout_secs: 30 # preventing excess here
inputs:
- out-metrics-*
address: 0.0.0.0:8686
default_namespace: dev-observer
flush_period_secs: 60
endpoint: http://localhost:9090/api/v1/write

loki:
type: loki
inputs:
- out-logs-*
endpoint: "http://loki:3100"
endpoint: "http://localhost:3100"
labels:
job: vector
encoding:
Expand Down
2 changes: 2 additions & 0 deletions deployments/observer/vector-prod-destination.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ sinks:
inputs:
- out-transformed-metrics
endpoint: ${GRAFANA_CLOUD_PROMETHEUS_ENDPOINT?}
batch:
timeout_secs: 30 # preventing excess here
auth:
strategy: basic
user: "${GRAFANA_CLOUD_PROMETHEUS_USER?}"
Expand Down
13 changes: 12 additions & 1 deletion deployments/observer/vector-sources.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Vector sources configuration
# Should be used for both development and production
sources:
out-metrics-hostmetrics:
in-metrics-hostmetrics:
# https://vector.dev/docs/reference/configuration/sources/host_metrics/
type: host_metrics
scrape_interval_secs: 60
collectors: # default are [cpu disk filesystem load host memory network cgroups]
- cpu
- disk
Expand Down Expand Up @@ -35,6 +36,7 @@ sources:
# It uses too many metrics
in-metrics-internal:
type: internal_metrics
scrape_interval_secs: 60

out-logs-journald:
# https://vector.dev/docs/reference/configuration/sources/journald/
Expand Down Expand Up @@ -91,3 +93,12 @@ transforms:
source: |
.name == "component_discarded_events_total" ||
.name == "component_errors_total"

out-metrics-hostmetrics:
# filter out filesystem and mountpoint tags as not needed
type: remap
inputs:
- in-metrics-hostmetrics
source: |
del(.filesystem)
del(.mountpoint)
Loading
0