Тип сервиса
Сервис Dagster code location
Сервис code location для Dagster: собирает ваш проект Dagster из Git и предоставляет его ассеты, задания и расписания веб-серверу и демону Dagster.
Этот сервис запускает ваш код: его образ собирается из Git-репозитория, а каждая сборка развёртывается в окружение.
В StackMaster
Как Dagster code location работает в StackMaster
Image
The image is built from the app's Git repository on top of the Dagster image of the dagster service's version (dagster/dagster-celery-k8s), so the code server runs the same Dagster as the webserver and daemon. Start the repository from the Dagster boilerplate. The build:
- copies the repository to
/opt/dagster/app, which is on the Python path; - installs the packages in
requirements.txt, when the repository has one. It fails when they change Dagster's own version: Dagster comes with the image, and Dagster libraries must match it; - writes Dagster's instance settings (
$DAGSTER_HOME/dagster.yaml), which read the PostgreSQL connection of thepostgreslink from the environment.
Code server
The container runs dagster code-server start on port 4000 (private), loading the module in the "Python module" setting (DAGSTER_CODE_MODULE, default app.definitions) under the name in the "Location name" setting (DAGSTER_CODE_LOCATION, default app). The dagster service's workspace (workspace.yaml) must list it as a gRPC server with the stack service's name as the host, port 4000 and the same location name. Startup and readiness use dagster api grpc-health-check.
A deployment builds a new image and restarts the code server; Dagster reloads the code location.
Runs
The Dagster stack sets the dagster service's run launcher to Dagster's DefaultRunLauncher: the daemon starts each run inside this code server, which has the project's code and packages, instead of in a Kubernetes job. Runs and their events are stored in the linked PostgreSQL database. Run outputs that Dagster's default IO manager writes to the code server's disk don't survive a restart: configure an IO manager that writes to external storage for outputs that later runs read.
Give the code server enough memory and CPU for the runs it executes.
Обзор
Технический профиль Dagster code location
Версии
Репозиторий исходного кода
Публичный Helm-чарт
Стеки
Стеки, в которые входит Dagster code location
CI/CD
Сборка Dagster code location из Git-репозитория
Vanilla Dagster project
Используйте его как есть или клонируйте в свой Git-аккаунт.
wodby/dagster-boilerplateCI-провайдеры
StackMaster CI встроен в платформу: пайплайн описывается в файле .wodby/pipeline.yml в репозитории. Для подключённого репозитория те же шаги может выполнять внешний CI-провайдер с помощью StackMaster CLI.
Реестры контейнеров
Собранные образы по умолчанию попадают в StackMaster Registry или во внешний реестр, подключённый как интеграция.
Переменные окружения из интеграций
Интеграция с переменными один раз сохраняет учётные данные стороннего сервиса. Подключите её к Dagster code location, и StackMaster передаст их в контейнер как переменные окружения во время работы, а не при сборке образа.
Конфигурация
Конфигурация сервиса Dagster code location
Настройки
Связи сервиса
Каждая связь — это подключение Dagster code location к другому сервису. На какой сервис указывает связь, задаёт стек. На карточках перечислены публичные сервисы, которые подходят для каждой связи.
postgres
Сервисы, которые подходят для этой связи