Details
Description
User story:
As a user, I want to use external Clickhouse instance.
Acceptance criteria:
- We can use a separate Clickhouse instance outside the container
- We can setup clickhouse hostname/port and database with environment variables.
Out of scope:
- Changing settings from UI (hostname, login/password, and so on)
- TLS + authorization
Suggested implementation:
-
How to test:
We can use external Clickhouse from outside of the container. Clickhouse setting can be changed with environment variables:
PERCONA_TEST_PMM_CLICKHOUSE_ADDR -> hostname:port
PERCONA_TEST_PMM_CLICKHOUSE_DATABASE -> database name
PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE -> https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/config.xml#L1130
PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE -> https://clickhouse.com/docs/en/operations/settings/settings/#setting-max_block_size
- QAN works as expected with external Clickhouse
- QAN works as expected with internal Clickhouse
- clickhouse datasource works as expected