Skip to content

Commit

Permalink
feat(dev): Use arm64 ClickHouse image on Apple arm64 machines
Browse files Browse the repository at this point in the history
ClickHouse, currently, [does not provide an `arm64` Docker image for the clickhouse-server][issue].

Until they do, we can use the [experimental image that Altinity produces][image].
I believe this image is built by this [script][script] on an `aarch64` host.

Fixes #28564

[issue]: ClickHouse/ClickHouse#22222
[image]: https://hub.docker.com/layers/altinity/clickhouse-server/21.6.1.6734-testing-arm/images/sha256-9a4516444fef9e0f11ee6b2de716d3b97b36bf05d9cc2d44c4596cfb0584dea6?context=explore
[script]: https://gist.github.com/filimonov/5f9732909ff66d5d0a65b8283382590d
  • Loading branch information
armenzg committed Oct 5, 2021
1 parent 5f60817 commit 0dea2a8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import sys
import tempfile
from datetime import timedelta
from platform import platform as pf
from urllib.parse import urlparse

from django.conf.global_settings import * # NOQA
Expand Down Expand Up @@ -1697,6 +1698,8 @@ def build_cdc_postgres_init_db_volume(settings):
)


APPLE_ARM64 = pf().startswith("mac") and pf().endswith("arm64-arm-64bit")

SENTRY_DEVSERVICES = {
"redis": lambda settings, options: (
{
Expand Down Expand Up @@ -1780,7 +1783,11 @@ def build_cdc_postgres_init_db_volume(settings):
),
"clickhouse": lambda settings, options: (
{
"image": "yandex/clickhouse-server:20.3.9.70",
# altinity provides clickhouse support to other companies
# Official support: https://github.com/ClickHouse/ClickHouse/issues/22222
"image": "altinity/clickhouse-server:21.6.1.6734-testing-arm"
if APPLE_ARM64
else "yandex/clickhouse-server:20.3.9.70",
"pull": True,
"ports": {"9000/tcp": 9000, "9009/tcp": 9009, "8123/tcp": 8123},
"ulimits": [{"name": "nofile", "soft": 262144, "hard": 262144}],
Expand Down

0 comments on commit 0dea2a8

Please sign in to comment.