-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
163 additions
and
45 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,15 @@ | ||
```bash | ||
ydb-dstool -e <bs_endpoint> cluster list | ||
``` | ||
|
||
* `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`. | ||
|
||
Result: | ||
|
||
```text | ||
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐ | ||
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │ | ||
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤ | ||
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │ | ||
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘ | ||
``` |
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 |
---|---|---|
@@ -1,33 +1,65 @@ | ||
# Installing {{ ydb-short-name }} DSTool | ||
# Installing the {{ ydb-short-name }} DSTool | ||
|
||
To install and configure {{ ydb-short-name }} DSTool: | ||
<!-- markdownlint-disable blanks-around-fences --> | ||
|
||
1. Install the `ydb-dstool` Python package: | ||
{% list tabs %} | ||
|
||
```bash | ||
pip install ydb-dstool | ||
``` | ||
- Linux / macOS | ||
|
||
1. Configure the environment: | ||
To install the {{ ydb-short-name }} DSTool, follow these steps: | ||
|
||
```bash | ||
export PATH=${PATH}:${HOME}/.local/bin | ||
``` | ||
1. Run the command: | ||
|
||
1. Test it by running the command that shows cluster information: | ||
```bash | ||
curl -sSL 'https://install.ydb.tech/dstool' | bash | ||
``` | ||
|
||
```bash | ||
ydb-dstool -e <bs_endpoint> cluster list | ||
``` | ||
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-dstool/bin` folder or add it to `PATH` manually. | ||
|
||
* `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`. | ||
1. To update the environment variables, restart the command shell. | ||
|
||
Result: | ||
1. Test it by running the command that shows cluster information: | ||
|
||
```text | ||
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐ | ||
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │ | ||
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤ | ||
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │ | ||
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘ | ||
``` | ||
{% include [test step](./_includes/test.md) %} | ||
|
||
- Windows | ||
|
||
To install the {{ ydb-short-name }} DSTool, follow these steps: | ||
|
||
1. Run the command: | ||
|
||
- in **PowerShell**: | ||
|
||
```powershell | ||
iex (New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows1') | ||
``` | ||
|
||
- in **CMD**: | ||
|
||
```cmd | ||
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://install.ydb.tech/dstool-windows'))" | ||
``` | ||
|
||
1. Specify whether to add `ydb-dstool` to the `PATH` environment variable: | ||
|
||
```text | ||
Add ydb-dstool installation dir to your PATH? [Y/n] | ||
``` | ||
|
||
1. To update the environment variables, restart the command shell. | ||
|
||
{% note info %} | ||
|
||
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: | ||
```cmd | ||
chcp 65001 | ||
``` | ||
{% endnote %} | ||
1. Test it by running the command that shows cluster information: | ||
{% include [test step](./_includes/test.md) %} | ||
{% endlist %} |
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,15 @@ | ||
```bash | ||
ydb-dstool -e <bs_endpoint> cluster list | ||
``` | ||
|
||
* `bs_endpoint` — URI интерфейса управления распределенным хранилищем кластера {{ ydb-short-name }}. Интерфейс доступен на любом узле кластера по протоколу HTTP на порте 8765 по умолчанию. Пример URI: `http://localhost:8765`. | ||
|
||
Результат: | ||
|
||
```text | ||
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐ | ||
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │ | ||
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤ | ||
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │ | ||
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘ | ||
``` |
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 |
---|---|---|
@@ -1,33 +1,89 @@ | ||
# Установка {{ ydb-short-name }} DSTool | ||
|
||
Чтобы установить и настроить {{ ydb-short-name }} DSTool: | ||
<!-- markdownlint-disable blanks-around-fences --> | ||
|
||
1. Установите Python-пакет `ydb-dstool`: | ||
{% list tabs %} | ||
|
||
```bash | ||
pip install ydb-dstool | ||
``` | ||
- Linux | ||
|
||
1. Настройте окружение: | ||
Чтобы установить {{ ydb-short-name }} DSTool: | ||
|
||
```bash | ||
export PATH=${PATH}:${HOME}/.local/bin | ||
``` | ||
1. Выполните команду: | ||
|
||
1. Проверьте работу, выполнив команду вывода информации о кластере: | ||
```bash | ||
curl -sSL 'https://storage.yandexcloud.net/yandexcloud-ydb-dstool/install.sh' | bash | ||
``` | ||
|
||
```bash | ||
ydb-dstool -e <bs_endpoint> cluster list | ||
``` | ||
Скрипт установит {{ ydb-short-name }} DSTool и добавит путь к исполняемому файлу в переменную окружения `PATH`. | ||
|
||
* `bs_endpoint` — URI интерфейса управления распределенным хранилищем кластера {{ ydb-short-name }}. Интерфейс доступен на любом узле кластера по протоколу HTTP на порте 8765 по умолчанию. Пример URI: `http://localhost:8765`. | ||
{% note info %} | ||
|
||
Результат: | ||
Скрипт дополнит переменную `PATH`, только если его запустить в командной оболочке bash или zsh. Если вы запустили скрипт в другой оболочке, добавьте путь до CLI в переменную `PATH` самостоятельно. | ||
|
||
```text | ||
┌───────┬───────┬───────┬────────┬────────┬───────┬────────┐ | ||
│ Hosts │ Nodes │ Pools │ Groups │ VDisks │ Boxes │ PDisks │ | ||
├───────┼───────┼───────┼────────┼────────┼───────┼────────┤ | ||
│ 8 │ 16 │ 1 │ 5 │ 40 │ 1 │ 32 │ | ||
└───────┴───────┴───────┴────────┴────────┴───────┴────────┘ | ||
``` | ||
{% endnote %} | ||
|
||
1. Чтобы обновить переменные окружения, перезапустите командную оболочку. | ||
|
||
1. Проверьте работу, выполнив команду вывода информации о кластере: | ||
|
||
{% include [test step](./_includes/test.md) %} | ||
|
||
- macOS | ||
|
||
Чтобы установить {{ ydb-short-name }} DSTool: | ||
|
||
1. Выполните команду: | ||
|
||
```bash | ||
curl -sSL 'https://storage.yandexcloud.net/yandexcloud-ydb-dstool/install.sh' | bash | ||
``` | ||
|
||
Скрипт установит {{ ydb-short-name }} DSTool и добавит путь до исполняемого файла в переменную окружения `PATH`. | ||
|
||
1. Чтобы обновить переменные окружения, перезапустите командную оболочку. | ||
|
||
1. Проверьте работу, выполнив команду вывода информации о кластере: | ||
|
||
{% include [test step](./_includes/test.md) %} | ||
|
||
- Windows | ||
|
||
Чтобы установить {{ ydb-short-name }} DSTool: | ||
|
||
1. Выполните команду: | ||
|
||
- **PowerShell**: | ||
|
||
```powershell | ||
iex (New-Object System.Net.WebClient).DownloadString('https://storage.yandexcloud.net/yandexcloud-ydb-dstool/install.ps1') | ||
``` | ||
|
||
- **CMD**: | ||
|
||
```cmd | ||
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://storage.yandexcloud.net/yandexcloud-ydb-dstool/install.ps1'))" | ||
``` | ||
|
||
1. Укажите, нужно ли добавить путь к исполняемому в переменную окружения `PATH`: | ||
|
||
```text | ||
Add ydb-dstool installation dir to your PATH? [Y/n] | ||
``` | ||
|
||
1. Чтобы обновить переменные окружения, перезапустите командную оболочку. | ||
|
||
{% note info %} | ||
|
||
{{ ydb-short-name }} DSTool использует символы Юникода в выводе некоторых команд. При некорректном отображении таких символов в консоли Windows, переключите кодировку на UTF-8: | ||
|
||
```cmd | ||
chcp 65001 | ||
``` | ||
|
||
{% endnote %} | ||
|
||
1. Проверьте работу, выполнив команду вывода информации о кластере: | ||
|
||
{% include [test step](./_includes/test.md) %} | ||
|
||
{% endlist %} |