Skip to content

Commit 526699e

Browse files
authored
Merge 49b5616 into a1b9627
2 parents a1b9627 + 49b5616 commit 526699e

File tree

2 files changed

+84
-0
lines changed
  • ydb/docs
    • en/core/contributor/devcontainer
    • ru/core/contributor/devcontainer

2 files changed

+84
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Using Dev Container for YDB Client SDK Contributors
2+
3+
- [Official Dev Containers Documentation](https://containers.dev/)
4+
- [VS Code Dev Containers Extension Documentation](https://code.visualstudio.com/docs/devcontainers/containers)
5+
6+
Dev Container allows you to quickly set up a reproducible and isolated environment for developing and testing YDB client SDKs.
7+
8+
## Why Use It
9+
10+
- No need for manual environment and dependency setup.
11+
- The environment matches CI and other project contributors.
12+
- You can run integration tests with a local YDB database without extra preparation.
13+
- All necessary tools for development and testing are pre-installed.
14+
15+
## Getting Started
16+
17+
1. Install a container engine (e.g., Docker or Podman) and Visual Studio Code with the Dev Containers extension.
18+
2. Clone the repository of the required SDK.
19+
3. If the repository contains a `.devcontainer` folder, open the project in VS Code and select **Reopen in Container**.
20+
4. After the environment starts, use standard commands to build, test, and run the code.
21+
22+
## Implementation Details in YDB SDKs
23+
24+
### Java SDK
25+
- The [`devcontainer`](https://github.com/ydb-platform/ydb-java-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, and scripts.
26+
- The environment includes JDK, Gradle, and development tools.
27+
- You can extend the Dockerfile to install additional tools.
28+
29+
### Go SDK
30+
- The [`devcontainer`](https://github.com/ydb-platform/ydb-go-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts.
31+
- A local YDB cluster is automatically started for integration tests.
32+
- All dependencies and the required Go version are pre-installed.
33+
34+
### JavaScript/TypeScript SDK
35+
- The [`devcontainer`](https://github.com/ydb-platform/ydb-js-sdk/tree/main/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts.
36+
- The environment includes Node.js, npm, TypeScript, and development tools.
37+
- When the devcontainer starts, a YDB cluster is automatically started for integration tests.
38+
39+
### Python SDK (PR #590)
40+
- The [`devcontainer`](https://github.com/ydb-platform/ydb-python-sdk/pull/590/files) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, scripts, and automatic ydb-cli profile setup.
41+
- When the environment starts, a local YDB cluster is automatically started and access from the container is pre-configured.
42+
- All dependencies, flake8, tox, and ydb-cli are pre-installed.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Использование Dev Container для контрибьюторов клиентских SDK YDB
2+
3+
- [Официальная документация Dev Containers](https://containers.dev/)
4+
- [Документация расширения VS Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers)
5+
6+
Dev Container позволяет быстро развернуть воспроизводимую и изолированную среду для разработки и тестирования клиентских SDK YDB.
7+
8+
## Для чего использовать
9+
10+
- Не требуется ручная настройка окружения и зависимостей.
11+
- Среда полностью совпадает с CI и другими участниками проекта.
12+
- Можно запускать интеграционные тесты с локальной базой YDB без дополнительной подготовки.
13+
- Все необходимые инструменты для разработки и тестирования уже установлены.
14+
15+
## Как начать работу
16+
17+
1. Установите контейнерный движок (например, Docker или Podman) и Visual Studio Code с расширением Dev Containers.
18+
2. Клонируйте репозиторий нужного SDK.
19+
3. Если в репозитории есть папка `.devcontainer`, откройте проект в VS Code и выберите команду **Reopen in Container**.
20+
4. После запуска среды используйте стандартные команды для сборки, тестирования и запуска кода.
21+
22+
## Особенности реализации в SDK YDB
23+
24+
### Java SDK
25+
- В [`devcontainer`](https://github.com/ydb-platform/ydb-java-sdk/tree/master/.devcontainer) есть `Dockerfile`, `devcontainer.json` и скрипты.
26+
- Окружение включает JDK, Gradle и инструменты для разработки.
27+
- Можно расширять Dockerfile для установки дополнительных средств.
28+
29+
### Go SDK
30+
- В [`devcontainer`](https://github.com/ydb-platform/ydb-go-sdk/tree/master/.devcontainer) есть `Dockerfile`, `devcontainer.json`, `compose.yml` и скрипты.
31+
- Автоматически поднимается локальный кластер YDB для интеграционных тестов.
32+
- Все зависимости и нужная версия Go уже установлены.
33+
34+
### JavaScript/TypeScript SDK
35+
- В [`devcontainer`](https://github.com/ydb-platform/ydb-js-sdk/tree/main/.devcontainer) есть `Dockerfile`, `devcontainer.json`, `compose.yml` и скрипты.
36+
- Окружение включает Node.js, npm, TypeScript и инструменты для разработки.
37+
- При запуске devcontainer автоматически поднимается кластер YDB для интеграционных тестов.
38+
39+
### Python SDK (PR #590)
40+
- В [`devcontainer`](https://github.com/ydb-platform/ydb-python-sdk/pull/590/files) есть `Dockerfile`, `devcontainer.json`, `compose.yml`, скрипты и автоматическая настройка профиля ydb-cli.
41+
- При запуске среды автоматически поднимается локальный кластер YDB, к которому сразу настроен доступ из контейнера.
42+
- Все зависимости, flake8, tox, ydb-cli уже установлены.

0 commit comments

Comments
 (0)