aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Arbatsky <eugine@elab.pro>2025-04-18 02:42:52 +0800
committerGitHub <noreply@github.com>2025-04-17 21:42:52 +0300
commit471d8acb121041385c1b6a34c20b8ed4ad37c9a2 (patch)
treecaf15bb83bab726031f73478f4c226492ed80249
parente702c136d23e1abf3c4b02597aafbeaf23192a13 (diff)
downloadydb-471d8acb121041385c1b6a34c20b8ed4ad37c9a2.tar.gz
YDBOPS-11054 Install description (#13636)
Co-authored-by: Eugene Arbatsky <elabpro@yandex-team.ru> Co-authored-by: anton-bobkov <anton-bobkov@ydb.tech> Co-authored-by: Ivan Blinkov <ivan@blinkov.ru> Co-authored-by: Alexander Petrukhin <shmel1k@ydb.tech>
-rw-r--r--ydb/docs/en/core/reference/ydbops/install.md86
-rw-r--r--ydb/docs/ru/core/reference/ydbops/install.md83
2 files changed, 143 insertions, 26 deletions
diff --git a/ydb/docs/en/core/reference/ydbops/install.md b/ydb/docs/en/core/reference/ydbops/install.md
index 614fb5082aa..f2171bb5510 100644
--- a/ydb/docs/en/core/reference/ydbops/install.md
+++ b/ydb/docs/en/core/reference/ydbops/install.md
@@ -2,30 +2,90 @@
{% include [warning.md](_includes/warning.md) %}
-Currently, only building from source is available as an installation option. The pre-compiled executables will be available later.
+## Download the binary from the releases page
-## Building from source
+You can download binary releases from [{#T}](../../downloads/index.md#ydbops).
-1. [Install Go](https://go.dev/doc/install). The minimal required Go version is 1.21.
+## Building from source
-2. Clone the `ydbops` repository from GitHub:
+1. Clone the `ydbops` repository from GitHub:
```bash
git clone https://github.com/ydb-platform/ydbops.git
```
-3. Invoke `go build` in the repository root folder:
+2. There are two ways to build `ydbops`:
+ 1. [Directly with Go](#go)
+ 2. [Inside a Docker container](#docker)
- ```bash
- go build
- ```
+The second approach requires a prepared [Docker](https://en.wikipedia.org/wiki/Docker_(software)) environment and uses the official Docker image for [Golang](https://en.wikipedia.org/wiki/Go_(programming_language)) [v1.22](https://hub.docker.com/_/golang/tags?name=1.22), guaranteeing a successful build. The Docker container operates using the `Dockerfile` from the repository. The build process in Docker also performs additional tasks: running linter checks and substituting the version for the `ydbops` assembly to register it in the executable file.
+
+### Building directly with Go {#go}
+
+#### Prerequsites
+
+[Install Go](https://go.dev/doc/install). The recommended version is 1.22.
+
+
+#### Compiling
+
+Invoke `go build` in the repository root folder:
+
+```bash
+go build
+```
+
+The `ydbops` executable will be available in the repository root folder.
+
+#### Installing
+
+You can copy the executable file manually or use `make`:
+
+```bash
+make install INSTALL_DIR=install_folder BUILD_DIR=.
+```
+
+### Inside a Docker container {#docker}
+
+#### Prerequsites
+
+- make
+- [Install docker engine](https://docs.docker.com/engine/install/)
+
+#### Compiling
+
+Invoke this command in the repository root folder:
+
+```bash
+make build-in-docker
+```
+
+The `ydbops` executables will be available in the `bin` folder. Binary files are generated for Linux and macOS (arm64, amd64).
+
+| Binary name | Platform |
+|------------------------|--------------|
+| ydbops | Linux (amd64) |
+| ydbops_darwin_amd64 | macOS (amd64) |
+| ydbops_darwin_arm64 | macOS (arm64) |
+
+
+#### Installing
+
+To install the binary file, execute the command `make`.
+
+Optional parameters:
+
+- `INSTALL_DIR`: The folder where the executable file will be installed. Default value: `~/ydb/bin`.
- The `ydbops` executable will be available in the repository root folder.
+- `BUILD_DIR`: The folder that contains the generated executable file. Use this parameter if you created the executable file manually. For example, use `BUILD_DIR=.` if the executable file is in the current working directory.
-## Download the binary from releases page
+```bash
+make install [INSTALL_DIR=<path_to_install_folder>] [BUILD_DIR=<path_to_build_folder>]
+```
-{% note warning %}
+Sample command to install into `install_folder` from the current folder:
-This option has yet to be made available.
+```bash
+make install INSTALL_DIR=install_folder BUILD_DIR=.
+```
-{% endnote %}
diff --git a/ydb/docs/ru/core/reference/ydbops/install.md b/ydb/docs/ru/core/reference/ydbops/install.md
index fda638a7281..b076d22f65c 100644
--- a/ydb/docs/ru/core/reference/ydbops/install.md
+++ b/ydb/docs/ru/core/reference/ydbops/install.md
@@ -2,30 +2,87 @@
{% include [warning.md](_includes/warning.md) %}
-В настоящее время доступна только сборка из исходного кода. Скомпилированные исполняемые файлы станут доступны позже.
+## Загрузка бинарного файла со страницы релизов
-## Сборка из исходного кода
+Скомпилированные исполняемые файлы можно скачать с [YDBOps Releases](../../downloads/index.md#ydbops).
-1. [Установите Go](https://go.dev/doc/install). Минимально требуемая версия Go — 1.21.
+## Сборка из исходного кода
-2. Склонируйте репозиторий `ydbops` с GitHub:
+1. Склонируйте репозиторий `ydbops` с GitHub:
```bash
git clone https://github.com/ydb-platform/ydbops.git
```
-3. Вызовите `go build` в корневой папке репозитория:
+2. Сборка исполняемого файла может быть выполнена одним из двух вариантов:
+ 1. [Сборка с использованием компилятора Go](#go)
+ 2. [Сборка внутри docker-контейнера](#docker)
- ```bash
- go build
- ```
+Для сборки с помощью [Docker](https://en.wikipedia.org/wiki/Docker_(software)) используется официальный docker image для [Golang](https://en.wikipedia.org/wiki/Go_(programming_language)) [v1.22](https://hub.docker.com/_/golang/tags?name=1.22), это гарантирует то, что сборка будет проведена успешно. Описание работы docker-контейнера в `Dockerfile` репозитория. Так же сборка в Docker проводит дополнительные манипуляции: выполняет проверки линтером, подставляет версию для сборки ydbops, чтобы она прописалась в исполняемом файле ydbops.
- Исполняемый файл `ydbops` будет доступен в корневой папке репозитория.
+### Сборка с использованием компилятора Go {#go}
-## Загрузка бинарного файла со страницы релизов
+#### Требования
+
+[Установите Go](https://go.dev/doc/install). Рекомендуемая версия Go — 1.22.
+
+#### Компиляция
+
+Вызовите `go build` в корневой папке репозитория:
+
+```bash
+go build
+```
+
+Исполняемый файл `ydbops` будет доступен в корневой папке репозитория.
+
+#### Установка
+
+Вручную переместите исполняемый файл в требуемый каталог или используйте утилиту `make` для установки в каталог `install_folder` из текущего каталога:
+
+```bash
+make install INSTALL_DIR=install_folder BUILD_DIR=.
+```
+
+### Сборка внутри docker-контейнера {#docker}
+
+#### Требования
+
+- make;
+- [docker engine](https://docs.docker.com/engine/install/).
+
+#### Компиляция
+
+Выполните в папке репозитория команду:
+
+```bash
+make build-in-docker
+```
+
+Исполняемый файл `ydbops` будет доступен в корневой папке `bin`. Автоматически собираются исполняемые файлы для Linux и MacOS (arm64, amd64).
+
+| Исполняемый файл | Платформа
+|-|-|
+| ydbops | Linux(amd64) |
+| ydbops_darwin_amd64 | MacOS(amd64) |
+| ydbops_darwin_arm64 | MacOS(arm64) |
+
+#### Установка
+
+Для установки исполняемого файла выполните команду `make`.
+
+Дополнительные параметры:
+
+- `INSTALL_DIR`: каталог, в который будет установлен исполняемый файл. По умолчанию: `~/ydb/bin`.
+
+- `BUILD_DIR`: каталог, содержащий скомпилированный исполняемый файл. Этот параметр используется, если файл собран самостоятельно. Например, если файл находится в текущем каталоге, используйте `BUILD_DIR=.`.
-{% note warning %}
+```bash
+make install [INSTALL_DIR=<путь_к_каталогу>] [BUILD_DIR=<путь_к_каталогу>]
+```
-Этот вариант ещё не доступен.
+Пример команды для установки в каталог `install_folder` из текущего каталога:
-{% endnote %}
+```bash
+make install INSTALL_DIR=install_folder BUILD_DIR=.
+```