diff options
author | yuryalekseev <yuryalekseev@yandex-team.com> | 2022-12-30 20:07:50 +0300 |
---|---|---|
committer | yuryalekseev <yuryalekseev@yandex-team.com> | 2022-12-30 20:07:50 +0300 |
commit | d9cef367473952ae95e3ed1d64822ddad757cd3c (patch) | |
tree | 17e0ee48ad8d8b493fd500923e9ba39c7953da36 | |
parent | e8ac1f63d70588f605a4b93b64e6c07931702531 (diff) | |
download | ydb-d9cef367473952ae95e3ed1d64822ddad757cd3c.tar.gz |
Make ydb-dstool.py executable in open source.
-rw-r--r-- | ydb/apps/dstool/README.md | 30 | ||||
-rw-r--r-- | ydb/apps/dstool/version.txt | 1 | ||||
-rw-r--r-- | ydb/apps/dstool/ydb-dstool.py | 6 |
3 files changed, 36 insertions, 1 deletions
diff --git a/ydb/apps/dstool/README.md b/ydb/apps/dstool/README.md index 8d8d96bd72a..d7d2513a51e 100644 --- a/ydb/apps/dstool/README.md +++ b/ydb/apps/dstool/README.md @@ -1,3 +1,33 @@ +# How to run ydb-dstool + +## Clone ydb + +```bash +~$ mkdir github +~$ cd github +~$ git clone https://github.com/ydb-platform/ydb.git +``` + +## Install python grpc_tools + +Have a look at https://grpc.io/docs/languages/python/quickstart. + +## Compile proto files + +```bash +~$ cd ~/github/ydb +~/github/ydb$ ydb_root=$(pwd) +~/github/ydb$ python3 -m grpc_tools.protoc -I=${ydb_root} --python_out=. --grpc_python_out=. ${ydb_root}/ydb/core/protos/*.proto +``` + +## Run + +```bash +~/github/ydb$ export PYTHONPATH=$PYTHONPATH:${ydb_root} +~/github/ydb$ chmod +x ./ydb/apps/dstool/ydb-dstool.py +~/github/ydb$ ./ydb/apps/dstool/ydb-dstool.py -e ydb.endpoint cluster list +``` + # How to do things with ydb-dstool ### Get available commands diff --git a/ydb/apps/dstool/version.txt b/ydb/apps/dstool/version.txt deleted file mode 100644 index 3eefcb9dd5b..00000000000 --- a/ydb/apps/dstool/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.0.0 diff --git a/ydb/apps/dstool/ydb-dstool.py b/ydb/apps/dstool/ydb-dstool.py index ad94a06ce8b..d2e8b7359b9 100644 --- a/ydb/apps/dstool/ydb-dstool.py +++ b/ydb/apps/dstool/ydb-dstool.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + from ydb.apps.dstool.lib.arg_parser import ArgumentParser import ydb.apps.dstool.lib.common as common import ydb.apps.dstool.lib.commands as commands @@ -15,3 +17,7 @@ def main(): args = parser.parse_args() common.apply_args(args) commands.run_command(command_map, args) + + +if __name__ == '__main__': + main() |