From 622943645f1e7c541a2155a17d4f11562dd56293 Mon Sep 17 00:00:00 2001 From: Prashant Shahi Date: Tue, 15 Nov 2022 20:07:09 +0530 Subject: [PATCH] Bump version of clickhouse to 22.8.8 LTS and deploy file changes (#1711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 🔥 remove docker-compose-prod.yaml as redundant and update Makefile * chore: 🔧 scrape otel-collector internal metrics in same container and related changes * chore: 📌 Bump version of clickhouse to 22.8.8 LTS Signed-off-by: Prashant Shahi Co-authored-by: Srikanth Chekuri --- Makefile | 8 +--- .../clickhouse-setup/docker-compose.yaml | 2 +- .../otel-collector-config.yaml | 14 +++++- .../otel-collector-metrics-config.yaml | 16 ++----- .../clickhouse-setup/docker-compose-core.yaml | 2 +- .../clickhouse-setup/docker-compose-prod.yaml | 44 ------------------- .../clickhouse-setup/docker-compose.yaml | 2 +- .../otel-collector-config.yaml | 14 +++++- .../otel-collector-metrics-config.yaml | 10 +---- .../tests/test-deploy/docker-compose.yaml | 2 +- .../test-deploy/otel-collector-config.yaml | 15 ++++++- .../otel-collector-metrics-config.yaml | 10 +---- 12 files changed, 51 insertions(+), 88 deletions(-) delete mode 100644 deploy/docker/clickhouse-setup/docker-compose-prod.yaml diff --git a/Makefile b/Makefile index 17a4b32fb6..c46effa9a9 100644 --- a/Makefile +++ b/Makefile @@ -120,14 +120,10 @@ down-local: down -v run-x86: - @docker-compose -f \ - $(STANDALONE_DIRECTORY)/docker-compose-core.yaml -f $(STANDALONE_DIRECTORY)/docker-compose-prod.yaml \ - up --build -d + @docker-compose -f $(STANDALONE_DIRECTORY)/docker-compose.yaml up --build -d down-x86: - @docker-compose -f \ - $(STANDALONE_DIRECTORY)/docker-compose-core.yaml -f $(STANDALONE_DIRECTORY)/docker-compose-prod.yaml \ - down -v + @docker-compose -f $(STANDALONE_DIRECTORY)/docker-compose.yaml down -v clear-standalone-data: @docker run --rm -v "$(PWD)/$(STANDALONE_DIRECTORY)/data:/pwd" busybox \ diff --git a/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml b/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml index 5bc37de791..66dba0bec5 100644 --- a/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml +++ b/deploy/docker-swarm/clickhouse-setup/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3.9" services: clickhouse: - image: clickhouse/clickhouse-server:22.4.5-alpine + image: clickhouse/clickhouse-server:22.8.8-alpine # ports: # - "9000:9000" # - "8123:8123" diff --git a/deploy/docker-swarm/clickhouse-setup/otel-collector-config.yaml b/deploy/docker-swarm/clickhouse-setup/otel-collector-config.yaml index 0a54841d0c..92e6a2a255 100644 --- a/deploy/docker-swarm/clickhouse-setup/otel-collector-config.yaml +++ b/deploy/docker-swarm/clickhouse-setup/otel-collector-config.yaml @@ -55,6 +55,16 @@ receivers: disk: {} filesystem: {} network: {} + prometheus: + config: + global: + scrape_interval: 30s + scrape_configs: + # otel-collector internal metrics + - job_name: otel-collector + static_configs: + - targets: + - localhost:8888 processors: batch: @@ -134,8 +144,8 @@ service: receivers: [otlp] processors: [batch] exporters: [clickhousemetricswrite] - metrics/hostmetrics: - receivers: [hostmetrics] + metrics/generic: + receivers: [hostmetrics, prometheus] processors: [resourcedetection, batch] exporters: [clickhousemetricswrite] metrics/spanmetrics: diff --git a/deploy/docker-swarm/clickhouse-setup/otel-collector-metrics-config.yaml b/deploy/docker-swarm/clickhouse-setup/otel-collector-metrics-config.yaml index ecaee5977a..1786eb42e3 100644 --- a/deploy/docker-swarm/clickhouse-setup/otel-collector-metrics-config.yaml +++ b/deploy/docker-swarm/clickhouse-setup/otel-collector-metrics-config.yaml @@ -2,27 +2,19 @@ receivers: prometheus: config: scrape_configs: - # otel-collector internal metrics - - job_name: "otel-collector" - scrape_interval: 60s - dns_sd_configs: - - names: - - 'tasks.otel-collector' - type: 'A' - port: 8888 # otel-collector-metrics internal metrics - - job_name: "otel-collector-metrics" + - job_name: otel-collector-metrics scrape_interval: 60s static_configs: - targets: - localhost:8888 # SigNoz span metrics - - job_name: "signozspanmetrics-collector" + - job_name: signozspanmetrics-collector scrape_interval: 60s dns_sd_configs: - names: - - 'tasks.otel-collector' - type: 'A' + - tasks.otel-collector + type: A port: 8889 processors: diff --git a/deploy/docker/clickhouse-setup/docker-compose-core.yaml b/deploy/docker/clickhouse-setup/docker-compose-core.yaml index a7d265d3f5..f2bb54db30 100644 --- a/deploy/docker/clickhouse-setup/docker-compose-core.yaml +++ b/deploy/docker/clickhouse-setup/docker-compose-core.yaml @@ -2,7 +2,7 @@ version: "2.4" services: clickhouse: - image: clickhouse/clickhouse-server:22.4.5-alpine + image: clickhouse/clickhouse-server:22.8.8-alpine container_name: clickhouse # ports: # - "9000:9000" diff --git a/deploy/docker/clickhouse-setup/docker-compose-prod.yaml b/deploy/docker/clickhouse-setup/docker-compose-prod.yaml deleted file mode 100644 index 2aa522026e..0000000000 --- a/deploy/docker/clickhouse-setup/docker-compose-prod.yaml +++ /dev/null @@ -1,44 +0,0 @@ -version: "2.4" - -services: - query-service: - image: signoz/query-service:0.11.2 - container_name: query-service - command: ["-config=/root/config/prometheus.yml"] - # ports: - # - "6060:6060" # pprof port - # - "8080:8080" # query-service port - volumes: - - ./prometheus.yml:/root/config/prometheus.yml - - ../dashboards:/root/config/dashboards - - ./data/signoz/:/var/lib/signoz/ - environment: - - ClickHouseUrl=tcp://clickhouse:9000/?database=signoz_traces - - ALERTMANAGER_API_PREFIX=http://alertmanager:9093/api/ - - SIGNOZ_LOCAL_DB_PATH=/var/lib/signoz/signoz.db - - DASHBOARDS_PATH=/root/config/dashboards - - STORAGE=clickhouse - - GODEBUG=netdns=go - - TELEMETRY_ENABLED=true - - DEPLOYMENT_TYPE=docker-standalone-amd - restart: on-failure - healthcheck: - test: ["CMD", "wget", "--spider", "-q", "localhost:8080/api/v1/version"] - interval: 30s - timeout: 5s - retries: 3 - depends_on: - clickhouse: - condition: service_healthy - - frontend: - image: signoz/frontend:0.11.2 - container_name: frontend - restart: on-failure - depends_on: - - alertmanager - - query-service - ports: - - "3301:3301" - volumes: - - ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf diff --git a/deploy/docker/clickhouse-setup/docker-compose.yaml b/deploy/docker/clickhouse-setup/docker-compose.yaml index 964a835e26..5170927cc8 100644 --- a/deploy/docker/clickhouse-setup/docker-compose.yaml +++ b/deploy/docker/clickhouse-setup/docker-compose.yaml @@ -2,7 +2,7 @@ version: "2.4" services: clickhouse: - image: clickhouse/clickhouse-server:22.4.5-alpine + image: clickhouse/clickhouse-server:22.8.8-alpine # ports: # - "9000:9000" # - "8123:8123" diff --git a/deploy/docker/clickhouse-setup/otel-collector-config.yaml b/deploy/docker/clickhouse-setup/otel-collector-config.yaml index b05b957e30..b7311a18f8 100644 --- a/deploy/docker/clickhouse-setup/otel-collector-config.yaml +++ b/deploy/docker/clickhouse-setup/otel-collector-config.yaml @@ -55,6 +55,16 @@ receivers: disk: {} filesystem: {} network: {} + prometheus: + config: + global: + scrape_interval: 30s + scrape_configs: + # otel-collector internal metrics + - job_name: otel-collector + static_configs: + - targets: + - localhost:8888 processors: batch: @@ -138,8 +148,8 @@ service: receivers: [otlp] processors: [batch] exporters: [clickhousemetricswrite] - metrics/hostmetrics: - receivers: [hostmetrics] + metrics/generic: + receivers: [hostmetrics, prometheus] processors: [resourcedetection, batch] exporters: [clickhousemetricswrite] metrics/spanmetrics: diff --git a/deploy/docker/clickhouse-setup/otel-collector-metrics-config.yaml b/deploy/docker/clickhouse-setup/otel-collector-metrics-config.yaml index fdc5830f57..aecad4eaaf 100644 --- a/deploy/docker/clickhouse-setup/otel-collector-metrics-config.yaml +++ b/deploy/docker/clickhouse-setup/otel-collector-metrics-config.yaml @@ -6,20 +6,14 @@ receivers: prometheus: config: scrape_configs: - # otel-collector internal metrics - - job_name: "otel-collector" - scrape_interval: 60s - static_configs: - - targets: - - otel-collector:8888 # otel-collector-metrics internal metrics - - job_name: "otel-collector-metrics" + - job_name: otel-collector-metrics scrape_interval: 60s static_configs: - targets: - localhost:8888 # SigNoz span metrics - - job_name: "signozspanmetrics-collector" + - job_name: signozspanmetrics-collector scrape_interval: 60s static_configs: - targets: diff --git a/pkg/query-service/tests/test-deploy/docker-compose.yaml b/pkg/query-service/tests/test-deploy/docker-compose.yaml index 294fed787d..8dcea153d2 100644 --- a/pkg/query-service/tests/test-deploy/docker-compose.yaml +++ b/pkg/query-service/tests/test-deploy/docker-compose.yaml @@ -2,7 +2,7 @@ version: "2.4" services: clickhouse: - image: clickhouse/clickhouse-server:22.4.5-alpine + image: clickhouse/clickhouse-server:22.8.8-alpine tty: true volumes: - ./clickhouse-config.xml:/etc/clickhouse-server/config.xml diff --git a/pkg/query-service/tests/test-deploy/otel-collector-config.yaml b/pkg/query-service/tests/test-deploy/otel-collector-config.yaml index d11e2793b8..3cef45e640 100644 --- a/pkg/query-service/tests/test-deploy/otel-collector-config.yaml +++ b/pkg/query-service/tests/test-deploy/otel-collector-config.yaml @@ -55,6 +55,17 @@ receivers: disk: {} filesystem: {} network: {} + prometheus: + config: + global: + scrape_interval: 30s + scrape_configs: + # otel-collector internal metrics + - job_name: otel-collector + scrape_interval: 60s + static_configs: + - targets: + - otel-collector:8888 processors: batch: @@ -126,8 +137,8 @@ service: receivers: [otlp] processors: [batch] exporters: [clickhousemetricswrite] - metrics/hostmetrics: - receivers: [hostmetrics] + metrics/generic: + receivers: [hostmetrics, prometheus] processors: [resourcedetection, batch] exporters: [clickhousemetricswrite] metrics/spanmetrics: diff --git a/pkg/query-service/tests/test-deploy/otel-collector-metrics-config.yaml b/pkg/query-service/tests/test-deploy/otel-collector-metrics-config.yaml index fdc5830f57..aecad4eaaf 100644 --- a/pkg/query-service/tests/test-deploy/otel-collector-metrics-config.yaml +++ b/pkg/query-service/tests/test-deploy/otel-collector-metrics-config.yaml @@ -6,20 +6,14 @@ receivers: prometheus: config: scrape_configs: - # otel-collector internal metrics - - job_name: "otel-collector" - scrape_interval: 60s - static_configs: - - targets: - - otel-collector:8888 # otel-collector-metrics internal metrics - - job_name: "otel-collector-metrics" + - job_name: otel-collector-metrics scrape_interval: 60s static_configs: - targets: - localhost:8888 # SigNoz span metrics - - job_name: "signozspanmetrics-collector" + - job_name: signozspanmetrics-collector scrape_interval: 60s static_configs: - targets: