Skip to content

Commit

Permalink
#6: Add script to start YDB in Docker for YdbRepositoryIntegrationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
nvamelichev committed Aug 9, 2024
1 parent 5687230 commit 175f18f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions repository-ydb-v2/src/test/script/run-ydb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Script to run before starting YdbRepositoryIntegrationTest.
# Starts a local instance of YDB inside a Docker container.

set -e

# Same as in https://ydb.tech/docs/en/quickstart, but with:
# - TLS port=2136 and non-TLS port=2135
# - Explicit row limit = 10_000
# - Auto kill container and data after you press [Enter]
# - No volumes (= no persistence)
docker run -d --rm --name ydb-local -h localhost \
--platform linux/amd64 \
-p 2135:2135 -p 2136:2136 -p 8765:8765 \
-e GRPC_TLS_PORT=2136 -e GRPC_PORT=2135 -e MON_PORT=8765 \
-e YDB_USE_IN_MEMORY_PDISKS=true \
-e YDB_KQP_RESULT_ROWS_LIMIT=10000 \
cr.yandex/yc/yandex-docker-local-ydb:latest &
read -r -p "Press [Enter] key to exit..."
docker kill ydb-local || true

0 comments on commit 175f18f

Please sign in to comment.