Skip to content

Commit 805f251

Browse files
authored
Fix distribution part of dstool readme (#14750)
1 parent a3f8f09 commit 805f251

File tree

1 file changed

+14
-46
lines changed

1 file changed

+14
-46
lines changed

ydb/apps/dstool/README.md

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22

33
## Install ydb-dstool package
44

5+
For Unix-like systems:
6+
57
```bash
6-
user@host:~$ pip install ydb-dstool
8+
user@host:~$ curl -sSL 'https://install.ydb.tech/dstool' | bash
79
```
810

9-
## Set up environment and run
11+
For Windows:
1012

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'))"
1419
```
1520

1621
# How to run ydb-dstool from source
@@ -23,49 +28,12 @@ user@host:~$ cd github
2328
user@host:~/github$ git clone https://github.com/ydb-platform/ydb.git
2429
```
2530

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
3132

3233
```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
6937
```
7038

7139
# How to do things with ydb-dstool

0 commit comments

Comments
 (0)