2
2
3
3
## Install ydb-dstool package
4
4
5
+ For Unix-like systems:
6
+
5
7
``` bash
6
- user@host:~ $ pip install ydb- dstool
8
+ user@host:~ $ curl -sSL ' https://install. ydb.tech/ dstool' | bash
7
9
```
8
10
9
- ## Set up environment and run
11
+ For Windows:
10
12
11
- ``` bash
12
- user@host:~ $ export PATH=${PATH} :${HOME} /.local/bin
13
- user@host:~ $ ydb-dstool -e ydb.endpoint cluster list
13
+ ``` powershell
14
+ iex (New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows')
15
+ ```
16
+
17
+ ``` cmd
18
+ @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows'))"
14
19
```
15
20
16
21
# How to run ydb-dstool from source
@@ -23,49 +28,12 @@ user@host:~$ cd github
23
28
user@host:~ /github$ git clone https://github.com/ydb-platform/ydb.git
24
29
```
25
30
26
- ## Install grpc_tools python package
27
-
28
- Follow the steps described at https://grpc.io/docs/languages/python/quickstart .
29
-
30
- Typical command to install the ` grpc_tools ` package:
31
+ ## Use ya make to build ydb-dstool
31
32
32
33
``` bash
33
- pip3 install grpcio-tools ' protobuf<5.0.0,>=3.13.0'
34
- ```
35
-
36
- ## Compile proto files for python
37
-
38
- ``` bash
39
- user@host:~ $ cd ~ /github/ydb
40
- user@host:~ /github/ydb$ ydb_root=$( pwd)
41
- user@host:~ /github/ydb$ ./ydb/apps/dstool/compile_protos.py --ydb-root ${ydb_root} 2> /dev/null
42
- ```
43
-
44
- ## Set up environment and run
45
-
46
- ``` bash
47
- user@host:~ $ cd ~ /github/ydb
48
- user@host:~ /github/ydb$ ydb_root=$( pwd)
49
- user@host:~ /github/ydb$ export PATH=${PATH} :${ydb_root} /ydb/apps/dstool
50
- user@host:~ /github/ydb$ export PYTHONPATH=${PYTHONPATH} :${ydb_root}
51
- user@host:~ /github/ydb$ alias ydb-dstool=${PWD} /main.py
52
- user@host:~ /github/ydb$ ydb-dstool -e ydb.endpoint cluster list
53
- ```
54
-
55
- # How to build and upload ydb-dstool package
56
-
57
- ``` bash
58
- user@host:~ $ mkdir github
59
- user@host:~ $ cd github
60
- user@host:~ /github$ git clone https://github.com/ydb-platform/ydb.git
61
- user@host:~ /github$ cd ydb
62
- user@host:~ /github/ydb$ ydb_root=$( pwd)
63
- user@host:~ /github/ydb$ ./ydb/apps/dstool/compile_protos.py --ydb-root ${ydb_root} 2> /dev/null
64
- user@host:~ /github/ydb$ mv ydb/apps/dstool/setup.py .
65
- user@host:~ /github/ydb$ python3 -m pip install --upgrade build
66
- user@host:~ /github/ydb$ python3 -m build
67
- user@host:~ /github/ydb$ python3 -m pip install --upgrade twine
68
- user@host:~ /github/ydb$ python3 -m twine upload dist/*
34
+ user@host:~ /github$ cd ydb/apps/dstool
35
+ user@host:~ /github/ydb/apps/dstool$ ya make
36
+ user@host:~ /github/ydb/apps/dstool$ ./ydb-dstool --help
69
37
```
70
38
71
39
# How to do things with ydb-dstool
0 commit comments