Skip to content

Commit 015748c

Browse files
authored
Merge f9cf50a into 57bdc05
2 parents 57bdc05 + f9cf50a commit 015748c

File tree

4 files changed

+98
-0
lines changed

4 files changed

+98
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Using Dev Container for Client {{ ydb-short-name }} 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 client {{ ydb-short-name }} SDKs.
7+
8+
## Benefits of Dev Container
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-short-name }} 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](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).
18+
2. Clone the repository of the required [SDK](https://github.com/ydb-platform?q=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-short-name }} 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 for automatic environment setup.
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 for automatic environment setup.
31+
- All dependencies and the required Go version are pre-installed.
32+
- [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/) is installed.
33+
- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured.
34+
35+
### JavaScript/TypeScript SDK
36+
- 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.
37+
- The environment includes Node.js, npm, TypeScript, and development tools.
38+
- [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/) is installed.
39+
- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured.
40+
41+
### Python SDK (PR #590)
42+
- 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.
43+
- All dependencies, flake8, tox are pre-installed.
44+
- [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/) is installed.
45+
- When the environment starts, a local {{ ydb-short-name }} cluster is automatically started and access from the container is pre-configured.

ydb/docs/en/core/contributor/toc_i.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ items:
4949
href: load-actors-memory.md
5050
- name: Stop
5151
href: load-actors-stop.md
52+
- name: SDK
53+
items:
54+
- name: Dev Containers
55+
href: devcontainer/index.md
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Использование Dev Container для контрибьюторов клиентских SDK {{ ydb-short-name }}
2+
3+
- [Официальная документация Dev Containers](https://containers.dev/)
4+
- [Документация расширения VS Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers)
5+
6+
Dev Container позволяет быстро развернуть воспроизводимую и изолированную среду для разработки и тестирования клиентских {{ ydb-short-name }} SDK.
7+
8+
## Преимущества Dev Container
9+
10+
- Не требуется ручная настройка окружения и зависимостей.
11+
- Среда полностью совпадает с CI и другими участниками проекта.
12+
- Можно запускать интеграционные тесты с локальной базой {{ ydb-short-name }} без дополнительной подготовки.
13+
- Все необходимые инструменты для разработки и тестирования уже установлены.
14+
15+
## Как начать работу
16+
17+
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).
18+
2. Клонируйте репозиторий нужного [SDK](https://github.com/ydb-platform?q=sdk).
19+
3. Если в репозитории есть папка `.devcontainer`, откройте проект в VS Code и выберите команду **Reopen in Container**.
20+
4. После запуска среды используйте стандартные команды для сборки, тестирования и запуска кода.
21+
22+
## Особенности реализации в {{ ydb-short-name }} SDK
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+
- Все зависимости и нужная версия Go уже установлены.
32+
- Установлен [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/).
33+
- При запуске среды автоматически поднимается локальный кластер {{ ydb-short-name }}, к которому сразу настроен доступ из контейнера.
34+
35+
### JavaScript/TypeScript SDK
36+
- В папке [`.devcontainer`](https://github.com/ydb-platform/ydb-js-sdk/tree/main/.devcontainer) есть `Dockerfile`, `devcontainer.json`, `compose.yml` и скрипты для автоматической настройки окружения.
37+
- Окружение включает Node.js, npm, TypeScript и инструменты для разработки.
38+
- Установлен [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/).
39+
- При запуске среды автоматически поднимается локальный кластер {{ ydb-short-name }}, к которому сразу настроен доступ из контейнера.
40+
41+
### Python SDK (PR #590)
42+
- В папке [`.devcontainer`](https://github.com/ydb-platform/ydb-python-sdk/pull/590/files) есть `Dockerfile`, `devcontainer.json`, `compose.yml` и скрипты для автоматической настройки окружения.
43+
- Все зависимости, flake8, tox уже установлены.
44+
- Установлен [ydb-cli](https://ydb.tech/docs/en/reference/ydb-cli/).
45+
- При запуске среды автоматически поднимается локальный кластер {{ ydb-short-name }}, к которому сразу настроен доступ из контейнера.

ydb/docs/ru/core/contributor/toc_i.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ items:
5454
href: load-actors-memory.md
5555
- name: Stop
5656
href: load-actors-stop.md
57+
- name: SDK
58+
items:
59+
- name: Dev Containers
60+
href: devcontainer/index.md

0 commit comments

Comments
 (0)