Skip to content

yandex/ch-tools

Repository files navigation

license tests status chat

clickhouse-tools

clickhouse-tools is a set of tools for administration and diagnostics of ClickHouse DBMS.

Tools

clickhouse-tools consist of following components:

All of these tools must be run on the same host as ClickHouse server is running.

Local development (using poetry)

sudo make install-poetry
# or to install in user's home directory
make POETRY_HOME=~/opt/poetry install-poetry

# lint
make lint

# unit tests
make test-unit
make test-unit PYTEST_ARGS="-k test_name"

# integration tests (rebuild docker images using a .whl file)
make test-integration
make test-integration BEHAVE_ARGS="-i feature_name"

# integration tests (supply a custom ClickHouse version to test against)
CLICKHOUSE_VERSION="1.2.3.4" make test-integration
# If you want to have containers running on failure, supply a flag:
# BEHAVE_ARGS="-D no_stop_on_fail"

# For building deb packages
make prepare-build-deb
make build-deb-package  

Please note: base images for tests are pulled from chtools Dockerhub. If you want to build base images locally, run

docker buildx bake -f tests/bake.hcl

If you want to build base images for multiple versions of ClickHouse, run:

CLICKHOUSE_VERSIONS='1.2.3.4, 5.6.7.8, latest' docker buildx bake -f tests/bake.hcl