Hi. I’m trying to install on premise sentry with remote DBaaS based on Yandex Cloud. Sentry supports SASL_SSL on Kafka cluster.
The problem is YC using their own CA certificates with clickhouse, without them it would not work. So is there any way to start Snuba and sentry (maybe) to work with clickhouse on ssl/ca certs
Here is YC documentation which is not working inside Snuba container:
mkdir -p ~/.clickhouse-client /usr/local/share/ca-certificates/Yandex && \
wget "https://crls.yandex.net/allCAs.pem" -O /usr/local/share/ca-certificates/Yandex/YandexInternalRootCA.crt && \
wget "https://storage.yandexcloud.net/mdb/clickhouse-client.conf.example" -O ~/.clickhouse-client/config.xml
clickhouse-client --host sas-fsdfdsdb.yandex.net \
--secure \
--user <username> \
--database <databasename> \
--port 9440 \
--ask-password
Or here is python version:
def request():
url = 'https://{host}:8443/?database={db}&query={query}'.format(
host='sas-wfwqv2yebnxbtfrx.db.yandex.net',
db='<databasename>',
query='SELECT now()')
auth = {
'X-ClickHouse-User': '<username>',
'X-ClickHouse-Key': '<password>',
}
res = requests.get(
url,
headers=auth,
verify='/usr/local/share/ca-certificates/Yandex/YandexInternalRootCA.crt')
res.raise_for_status()
return res.text
print(request())
YC docs Подключение к базе данных в кластере ClickHouse | Yandex.Cloud - Документация