docker: for dev, separate standalone ClickHouse setup from cluster

This way, there is no need to start a whole cluster just to work on a
single ClickHouse. Also add some hints in CONTRIBUTING.md.
This commit is contained in:
Vincent Bernat
2025-08-08 08:55:29 +02:00
parent fd9dc0dbf3
commit 3e68a41f57
5 changed files with 35 additions and 19 deletions

View File

@@ -40,9 +40,12 @@ with `make test-go PKG=akvorado/orchestrator/clickhouse`. Using just `go test`
would work, but `make test-go` also runs linting and formatting automatically.
If possible, tests should not rely on external components, but when it becomes
hard to do so, it is possible to spawns services through Docker. Locally, one
can spawns them through `docker compose -f docker/docker-compose-dev.yml`.
GitHub actions are using services to spawn them.
hard to do so, it is possible to spawn services through Docker. Locally, one
can spawn them through `docker compose -f docker/docker-compose-dev.yml`:
- `... up clickhouse` to spawn a single ClickHouse
- `... up clickhouse-\*` to spawn a ClickHouse cluster
- `... up kafka` to spawn a Kafka broker
For manual end-to-end tests, you can use `make docker-dev` to build a Docker
container of Akvorado, then use `docker compose up` to run Docker compose.