Skip to content
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
10 changes: 10 additions & 0 deletions clickhouse/default-password.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<clickhouse>
<users>
<default>
<password></password>
<networks>
<ip>::/0</ip>
</networks>
</default>
</users>
</clickhouse>
12 changes: 8 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,22 @@ 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
hard: 262144
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"
read_only: true
source: ./clickhouse/config.xml
target: /etc/clickhouse-server/config.d/sentry.xml
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
Expand Down
34 changes: 33 additions & 1 deletion install/upgrade-clickhouse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading