Skip to content

Commit 0e5d23d

Browse files
kruallAnton Bobkov
andauthored
Change install instruction for ydb-dstool (#11834)
Co-authored-by: Anton Bobkov <anton-bobkov@yandex-team.ru>
1 parent f64a6ad commit 0e5d23d

File tree

8 files changed

+159
-45
lines changed

8 files changed

+159
-45
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- markdownlint-disable blanks-around-fences -->
2+
3+
```bash
4+
ydb-dstool -e <bs_endpoint> cluster list
5+
```
6+
7+
* `bs_endpoint`: URI of the cluster's HTTP endpoint, the same endpoint that serves the [Embedded UI](../../embedded-ui/index.md). Example: `http://localhost:8765`.
8+
9+
Result:
10+
11+
```text
12+
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐
13+
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │
14+
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤
15+
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │
16+
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘
17+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
To install the {{ ydb-short-name }} DSTool, follow these steps:
2+
3+
1. Run the command:
4+
5+
{% include [install command](./unix_install_command.md) %}
6+
7+
1. To update the environment variables, restart the command shell.
8+
9+
1. Test it by running the command that shows cluster information:
10+
11+
{% include [test step](./test.md) %}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- markdownlint-disable blanks-around-fences -->
2+
3+
```bash
4+
curl -sSL 'https://install.ydb.tech/dstool' | bash
5+
```
6+
7+
The script will install the {{ ydb-short-name }} DSTool. If the script is run from a `bash` or `zsh` shell, it will also add the `ydb-dstool` executable to the `PATH` environment variable. Otherwise, you can run it from the `~/ydb/bin` folder or add it to `PATH` manually.
Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,55 @@
1-
# Installing {{ ydb-short-name }} DSTool
1+
# Installing the {{ ydb-short-name }} DSTool
22

3-
To install and configure {{ ydb-short-name }} DSTool:
3+
<!-- markdownlint-disable blanks-around-fences -->
44

5-
1. Install the `ydb-dstool` Python package:
5+
{% list tabs %}
66

7-
```bash
8-
pip install ydb-dstool
9-
```
7+
- Linux
108

11-
1. Configure the environment:
9+
{% include [unix_install](./_includes/unix_install.md) %}
1210

13-
```bash
14-
export PATH=${PATH}:${HOME}/.local/bin
15-
```
11+
- macOS
1612

17-
1. Test it by running the command that shows cluster information:
13+
{% include [unix_install](./_includes/unix_install.md) %}
1814

19-
```bash
20-
ydb-dstool -e <bs_endpoint> cluster list
21-
```
15+
- Windows
2216

23-
* `bs_endpoint`: URI of the interface for {{ ydb-short-name }} cluster distributed storage management. The interface is accessible over HTTP on any cluster node on port 8765 by default. URI example: `http://localhost:8765`.
17+
To install the {{ ydb-short-name }} DSTool, follow these steps:
2418

25-
Result:
19+
1. Run the command:
2620

27-
```text
28-
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐
29-
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │
30-
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤
31-
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │
32-
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘
33-
```
21+
- in **PowerShell**:
22+
23+
```powershell
24+
iex (New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows')
25+
```
26+
27+
- in **CMD**:
28+
29+
```cmd
30+
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows'))"
31+
```
32+
33+
1. Specify whether to add `ydb-dstool` to the `PATH` environment variable:
34+
35+
```text
36+
Add ydb-dstool installation dir to your PATH? [Y/n]
37+
```
38+
39+
1. To update the environment variables, restart the command shell.
40+
41+
{% note info %}
42+
43+
The {{ ydb-short-name }} DSTool uses Unicode characters in the output of some commands. If these characters aren't displayed correctly in the Windows console, switch the encoding to UTF-8:
44+
45+
```cmd
46+
chcp 65001
47+
```
48+
49+
{% endnote %}
50+
51+
1. Test it by running the command that shows cluster information:
52+
53+
{% include [test step](./_includes/test.md) %}
54+
55+
{% endlist %}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- markdownlint-disable blanks-around-fences -->
2+
3+
```bash
4+
ydb-dstool -e <bs_endpoint> cluster list
5+
```
6+
7+
* `bs_endpoint` — URI HTTP-эндпоинта кластера — это тот же самый эндпоинт, который обслуживает [Embedded UI](../../embedded-ui/index.md). Пример: `http://localhost:8765`.
8+
9+
Результат:
10+
11+
```text
12+
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐
13+
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │
14+
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤
15+
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │
16+
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘
17+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Чтобы установить {{ ydb-short-name }} DSTool:
2+
3+
1. Выполните команду:
4+
5+
{% include [install command](./unix_install_command.md) %}
6+
7+
1. Чтобы обновить переменные окружения, перезапустите командную оболочку.
8+
9+
1. Проверьте работу, выполнив команду вывода информации о кластере:
10+
11+
{% include [test step](./test.md) %}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- markdownlint-disable blanks-around-fences -->
2+
3+
```bash
4+
curl -sSL 'https://install.ydb.tech/dstool' | bash
5+
```
6+
7+
Скрипт установит {{ ydb-short-name }} DSTool. Если скрипт запускается из оболочки `bash` или `zsh`, он также добавит исполняемый файл `ydb-dstool` в переменную окружения `PATH`. В противном случае вы можете запускать его из папки `~/ydb/bin` или добавить в `PATH` вручную.
Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,55 @@
11
# Установка {{ ydb-short-name }} DSTool
22

3-
Чтобы установить и настроить {{ ydb-short-name }} DSTool:
3+
<!-- markdownlint-disable blanks-around-fences -->
44

5-
1. Установите Python-пакет `ydb-dstool`:
5+
{% list tabs %}
66

7-
```bash
8-
pip install ydb-dstool
9-
```
7+
- Linux
108

11-
1. Настройте окружение:
9+
{% include [unix_install](./_includes/unix_install.md) %}
1210

13-
```bash
14-
export PATH=${PATH}:${HOME}/.local/bin
15-
```
11+
- macOS
1612

17-
1. Проверьте работу, выполнив команду вывода информации о кластере:
13+
{% include [unix_install](./_includes/unix_install.md) %}
1814

19-
```bash
20-
ydb-dstool -e <bs_endpoint> cluster list
21-
```
15+
- Windows
2216

23-
* `bs_endpoint` — URI интерфейса управления распределенным хранилищем кластера {{ ydb-short-name }}. Интерфейс доступен на любом узле кластера по протоколу HTTP на порте 8765 по умолчанию. Пример URI: `http://localhost:8765`.
17+
Чтобы установить {{ ydb-short-name }} DSTool:
2418

25-
Результат:
19+
1. Выполните команду:
2620

27-
```text
28-
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐
29-
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │
30-
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤
31-
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │
32-
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘
33-
```
21+
- **PowerShell**:
22+
23+
```powershell
24+
iex (New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows')
25+
```
26+
27+
- **CMD**:
28+
29+
```cmd
30+
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows'))"
31+
```
32+
33+
1. Укажите, нужно ли добавить путь к `ydb-dstool` в переменную окружения `PATH`:
34+
35+
```text
36+
Add ydb-dstool installation dir to your PATH? [Y/n]
37+
```
38+
39+
1. Чтобы обновить переменные окружения, перезапустите командную оболочку.
40+
41+
{% note info %}
42+
43+
{{ ydb-short-name }} DSTool использует символы Юникода в выводе некоторых команд. При некорректном отображении таких символов в консоли Windows, переключите кодировку на UTF-8:
44+
45+
```cmd
46+
chcp 65001
47+
```
48+
49+
{% endnote %}
50+
51+
1. Проверьте работу, выполнив команду вывода информации о кластере:
52+
53+
{% include [test step](./_includes/test.md) %}
54+
55+
{% endlist %}

0 commit comments

Comments
 (0)