mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Add jepsen docker image
This commit is contained in:
parent
5e3ebb3e0e
commit
132c2f6f22
38
docker/test/keeper-jepsen/Dockerfile
Normal file
38
docker/test/keeper-jepsen/Dockerfile
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# docker build -t yandex/clickhouse-keeper-jepsen-test .
|
||||||
|
FROM yandex/clickhouse-test-base
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV CLOJURE_VERSION=1.10.3.814
|
||||||
|
|
||||||
|
# arguments
|
||||||
|
ENV CLICKHOUSE_PACKAGE=""
|
||||||
|
ENV NODES_USERNAME="root"
|
||||||
|
ENV NODES_PASSWORD=""
|
||||||
|
ENV TESTS_TO_RUN="30"
|
||||||
|
ENV TIME_LIMIT="30"
|
||||||
|
|
||||||
|
# volumes
|
||||||
|
ENV CLICKHOUSE_REPO_PATH="/repo"
|
||||||
|
ENV NODES_FILE_PATH="/nodes.txt"
|
||||||
|
ENV TEST_OUTPUT="/test_output"
|
||||||
|
ENV SSH_KEY_PATH="/root/.ssh/id_rsa"
|
||||||
|
|
||||||
|
RUN mkdir "/root/.ssh"
|
||||||
|
RUN touch "/root/.ssh/known_hosts"
|
||||||
|
|
||||||
|
# install java
|
||||||
|
RUN apt-get update && apt-get install default-jre default-jdk ssh gnuplot graphviz --yes --no-install-recommends
|
||||||
|
|
||||||
|
# install clojure
|
||||||
|
RUN curl -O "https://download.clojure.org/install/linux-install-${CLOJURE_VERSION}.sh" && \
|
||||||
|
chmod +x "linux-install-${CLOJURE_VERSION}.sh" && \
|
||||||
|
bash "./linux-install-${CLOJURE_VERSION}.sh"
|
||||||
|
|
||||||
|
# install leiningen
|
||||||
|
RUN curl -O "https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein" && \
|
||||||
|
chmod +x ./lein && \
|
||||||
|
mv ./lein /usr/bin
|
||||||
|
|
||||||
|
COPY run.sh /
|
||||||
|
|
||||||
|
CMD ["/bin/bash", "/run.sh"]
|
9
docker/test/keeper-jepsen/run.sh
Normal file
9
docker/test/keeper-jepsen/run.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
|
||||||
|
cd "$CLICKHOUSE_REPO_PATH/tests/jepsen.clickhouse-keeper"
|
||||||
|
|
||||||
|
lein run test-all --nodes-file "$NODES_FILE_PATH" --ssh-private-key "$SSH_KEY_PATH" --username "$NODES_USERNAME" --password "$NODES_PASSWORD" --time-limit "$TIME_LIMIT" --concurrency 50 -r 50 --snapshot-distance 100 --stale-log-gap 100 --reserved-log-items 10 --lightweight-run --clickhouse-source "$CLICKHOUSE_PACKAGE" -q --test-count "$TESTS_TO_RUN" | tee "$TEST_OUTPUT/jepsen_run_all_tests.log"
|
||||||
|
|
||||||
|
mv store "$TEST_OUTPUT/"
|
Loading…
Reference in New Issue
Block a user