From 2693b16fb4a81a32bf2f0215284f7f6b3e03fbaa Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Sat, 16 Aug 2025 12:15:54 +0700 Subject: [PATCH 1/2] chore(deps): bump clickhouse to 25.3 --- clickhouse/default-password.xml | 10 ++++++++++ docker-compose.yml | 6 +++++- install/upgrade-clickhouse.sh | 34 ++++++++++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 clickhouse/default-password.xml diff --git a/clickhouse/default-password.xml b/clickhouse/default-password.xml new file mode 100644 index 00000000000..13588039cba --- /dev/null +++ b/clickhouse/default-password.xml @@ -0,0 +1,10 @@ + + + + + + ::/0 + + + + diff --git a/docker-compose.yml b/docker-compose.yml index 8873990cb3e..1467ef6ce58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -187,7 +187,7 @@ services: build: context: ./clickhouse args: - BASE_IMAGE: "altinity/clickhouse-server:23.8.11.29.altinitystable" + BASE_IMAGE: "altinity/clickhouse-server:25.3.6.10034.altinitystable" ulimits: nofile: soft: 262144 @@ -199,6 +199,10 @@ services: read_only: true source: ./clickhouse/config.xml target: /etc/clickhouse-server/config.d/sentry.xml + - type: bind + read_only: true + source: "./clickhouse/default-password.xml" + target: "/etc/clickhouse-server/users.d/default-password.xml:" environment: # This limits Clickhouse's memory to 30% of the host memory # If you have high volume and your search return incomplete results diff --git a/install/upgrade-clickhouse.sh b/install/upgrade-clickhouse.sh index 93456b8ddbe..7ac7e826e61 100644 --- a/install/upgrade-clickhouse.sh +++ b/install/upgrade-clickhouse.sh @@ -14,15 +14,47 @@ if $ps_command | grep -q clickhouse; then # Start clickhouse if it is not already running start_service_and_wait_ready clickhouse - # In order to get to 23.8, we need to first upgrade go from 21.8 -> 22.8 -> 23.3 -> 23.8 + # In order to get to 25.3, we need to first upgrade go from 21.8 -> 22.8 -> 23.3 -> 23.8 -> 24.8 -> 25.3 version=$($dc exec clickhouse clickhouse-client -q 'SELECT version()') if [[ "$version" == "21.8.13.1.altinitystable" || "$version" == "21.8.12.29.altinitydev.arm" ]]; then + echo "Detected clickhouse version $version" $dc down clickhouse + + echo "Upgrading clickhouse to 22.8" $dcb $build_arg BASE_IMAGE=altinity/clickhouse-server:22.8.15.25.altinitystable clickhouse start_service_and_wait_ready clickhouse $dc down clickhouse + + echo "Upgrading clickhouse to 23.3" $dcb $build_arg BASE_IMAGE=altinity/clickhouse-server:23.3.19.33.altinitystable clickhouse start_service_and_wait_ready clickhouse + $dc down clickhouse + + echo "Upgrading clickhouse to 23.8" + $dcb $build_arg BASE_IMAGE=altinity/clickhouse-server:23.8.11.29.altinitystable clickhouse + start_service_and_wait_ready clickhouse + $dc down clickhouse + + echo "Upgrading clickhouse to 24.8" + $dcb $build_arg BASE_IMAGE=altinity/clickhouse-server:24.8.14.10459.altinitystable clickhouse + start_service_and_wait_ready clickhouse + $dc down clickhouse + + echo "Upgrading clickhouse to 25.3" + $dcb $build_arg BASE_IMAGE=altinity/clickhouse-server:25.3.6.10034.altinitystable clickhouse + start_service_and_wait_ready clickhouse + elif [[ "$version" == "23.8.11.29.altinitystable" ]]; then + echo "Detected clickhouse version $version" + $dc down clickhouse + + echo "Upgrading clickhouse to 24.8" + $dcb $build_arg BASE_IMAGE=altinity/clickhouse-server:24.8.14.10459.altinitystable clickhouse + start_service_and_wait_ready clickhouse + $dc down clickhouse + + echo "Upgrading clickhouse to 25.3" + $dcb $build_arg BASE_IMAGE=altinity/clickhouse-server:25.3.6.10034.altinitystable clickhouse + start_service_and_wait_ready clickhouse else echo "Detected clickhouse version $version. Skipping upgrades!" fi From ebdba216477c2ca7197c6d61dcf0f2b494115c04 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Sat, 16 Aug 2025 12:23:44 +0700 Subject: [PATCH 2/2] fix: wrong volume path for clickhouse default password: --- docker-compose.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1467ef6ce58..e9f3e50d29a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -195,14 +195,14 @@ services: volumes: - "sentry-clickhouse:/var/lib/clickhouse" - "sentry-clickhouse-log:/var/log/clickhouse-server" - - type: bind + - type: "bind" read_only: true - source: ./clickhouse/config.xml - target: /etc/clickhouse-server/config.d/sentry.xml - - type: bind + source: "./clickhouse/config.xml" + target: "/etc/clickhouse-server/config.d/sentry.xml" + - type: "bind" read_only: true source: "./clickhouse/default-password.xml" - target: "/etc/clickhouse-server/users.d/default-password.xml:" + target: "/etc/clickhouse-server/users.d/default-password.xml" environment: # This limits Clickhouse's memory to 30% of the host memory # If you have high volume and your search return incomplete results