-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6: Add script to start YDB in Docker for YdbRepositoryIntegrationTest
- Loading branch information
1 parent
5687230
commit 175f18f
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |