diff --git a/ydb/docs/en/core/contributor/devcontainer/index.md b/ydb/docs/en/core/contributor/devcontainer/index.md new file mode 100644 index 000000000000..6503dbc96366 --- /dev/null +++ b/ydb/docs/en/core/contributor/devcontainer/index.md @@ -0,0 +1,41 @@ +# Using Dev Container for Client {{ ydb-short-name }} SDK Contributors + +- [Official Dev Containers Documentation](https://containers.dev/) +- [VS Code Dev Containers Extension Documentation](https://code.visualstudio.com/docs/devcontainers/containers) + +Dev Container allows you to quickly set up a reproducible and isolated environment for developing and testing client {{ ydb-short-name }} SDKs. + +## Benefits of Dev Container + +- No need for manual environment and dependency setup. +- The environment matches CI and other project contributors. +- You can run integration tests with a local {{ ydb-short-name }} database without extra preparation. +- All necessary tools for development and testing are pre-installed. + +## Getting Started + +1. Install a container engine (e.g., [Docker](https://www.docker.com/) or [Podman](https://podman.io/)) and [Visual Studio Code](https://code.visualstudio.com/) with the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). +2. Clone the repository of the required [SDK](https://github.com/ydb-platform?q=sdk). +3. If the repository contains a `.devcontainer` folder, open the project in VS Code and select **Reopen in Container**. +4. After the environment starts, use standard commands to build, test, and run the code. + +## Implementation Details in {{ ydb-short-name }} SDKs + +### Java SDK +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-java-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, and scripts for automatic environment setup. +- All necessary dependencies are pre-installed. + +### Go SDK +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-go-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts for automatic environment setup. +- All necessary dependencies are pre-installed. +- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured. + +### JavaScript/TypeScript SDK +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-js-sdk/tree/main/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts for automatic environment setup. +- All necessary dependencies are pre-installed. +- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured. + +### Python SDK (PR #590) +- The [`.devcontainer`](https://github.com/ydb-platform/ydb-python-sdk/pull/590/files) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts for automatic environment setup. +- All necessary dependencies are pre-installed. +- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured. diff --git a/ydb/docs/en/core/contributor/toc_i.yaml b/ydb/docs/en/core/contributor/toc_i.yaml index bf4b3e0785a2..40f2436152f1 100644 --- a/ydb/docs/en/core/contributor/toc_i.yaml +++ b/ydb/docs/en/core/contributor/toc_i.yaml @@ -51,3 +51,7 @@ items: href: load-actors-memory.md - name: Stop href: load-actors-stop.md +- name: SDK + items: + - name: Dev Containers + href: devcontainer/index.md diff --git a/ydb/docs/ru/core/contributor/devcontainer/index.md b/ydb/docs/ru/core/contributor/devcontainer/index.md new file mode 100644 index 000000000000..95d96b87ce59 --- /dev/null +++ b/ydb/docs/ru/core/contributor/devcontainer/index.md @@ -0,0 +1,41 @@ +# Использование Dev Container для контрибьюторов клиентских SDK {{ ydb-short-name }} + +- [Официальная документация Dev Containers](https://containers.dev/) +- [Документация расширения VS Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) + +Dev Container позволяет быстро развернуть воспроизводимую и изолированную среду для разработки и тестирования клиентских {{ ydb-short-name }} SDK. + +## Преимущества Dev Container + +- Не требуется ручная настройка окружения и зависимостей. +- Среда полностью совпадает с CI и другими участниками проекта. +- Можно запускать интеграционные тесты с локальной базой {{ ydb-short-name }} без дополнительной подготовки. +- Все необходимые инструменты для разработки и тестирования уже установлены. + +## Как начать работу + +1. Установите контейнерный движок (например, [Docker](https://www.docker.com/) или [Podman](https://podman.io/)) и [Visual Studio Code](https://code.visualstudio.com/) с расширением [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). +2. Клонируйте репозиторий нужного [SDK](https://github.com/ydb-platform?q=sdk). +3. Если в репозитории есть папка `.devcontainer`, откройте проект в VS Code и выберите команду **Reopen in Container**. +4. После запуска среды используйте стандартные команды для сборки, тестирования и запуска кода. + +## Особенности реализации в {{ ydb-short-name }} SDK + +### Java SDK +- В папке [`.devcontainer`](https://github.com/ydb-platform/ydb-java-sdk/tree/master/.devcontainer) есть `Dockerfile`, `devcontainer.json` и скрипты для автоматической настройки окружения. +- Установлены все необходимые зависимости. + +### Go SDK +- В папке [`.devcontainer`](https://github.com/ydb-platform/ydb-go-sdk/tree/master/.devcontainer) есть `Dockerfile`, `devcontainer.json`, `compose.yml` и скрипты для автоматической настройки окружения. +- Установлены все необходимые зависимости. +- При запуске среды автоматически поднимается локальный кластер {{ ydb-short-name }}, к которому сразу настроен доступ из контейнера. + +### JavaScript/TypeScript SDK +- В папке [`.devcontainer`](https://github.com/ydb-platform/ydb-js-sdk/tree/main/.devcontainer) есть `Dockerfile`, `devcontainer.json`, `compose.yml` и скрипты для автоматической настройки окружения. +- Установлены все необходимые зависимости. +- При запуске среды автоматически поднимается локальный кластер {{ ydb-short-name }}, к которому сразу настроен доступ из контейнера. + +### Python SDK (PR #590) +- В папке [`.devcontainer`](https://github.com/ydb-platform/ydb-python-sdk/pull/590/files) есть `Dockerfile`, `devcontainer.json`, `compose.yml` и скрипты для автоматической настройки окружения. +- Установлены все необходимые зависимости. +- При запуске среды автоматически поднимается локальный кластер {{ ydb-short-name }}, к которому сразу настроен доступ из контейнера. diff --git a/ydb/docs/ru/core/contributor/toc_i.yaml b/ydb/docs/ru/core/contributor/toc_i.yaml index 556e8e91a4a8..05c389ed4fe6 100644 --- a/ydb/docs/ru/core/contributor/toc_i.yaml +++ b/ydb/docs/ru/core/contributor/toc_i.yaml @@ -54,3 +54,7 @@ items: href: load-actors-memory.md - name: Stop href: load-actors-stop.md +- name: SDK + items: + - name: Dev Containers + href: devcontainer/index.md