Service type
Dagster code location service
Dagster code location service that builds your Dagster project from Git and serves its assets, jobs, and schedules to the Dagster webserver and daemon.
This service runs your code: its image is built from a Git repository, and each build is deployed to an app environment.
On Wodby
How Dagster code location runs on Wodby
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.
Overview
Technical profile of Dagster code location
Stacks
Stacks that include Dagster code location
CI/CD
Build Dagster code location from a Git repository
Vanilla Dagster project
Use it as it is, or clone it into your own Git account.
wodby/dagster-boilerplateGit providers
You connect a repository through an integration with its Git provider.
CI providers
Wodby CI is built in: the pipeline is the file .wodby/pipeline.yml in the repository. For a repository you connect, an external CI provider can run the same steps with Wodby CLI.
Container registries
Built images go to Wodby Registry by default, or to an external registry that you connect as an integration.
Environment variables from integrations
A variable integration stores the credentials of a third-party service once. Attach it to Dagster code location and Wodby passes them to the container as environment variables at runtime, not during the image build.
Configuration
Dagster code location service configuration
Settings
Service links
Each link is a connection from Dagster code location to another service. A stack sets which service a link points to. The cards list the public services that can satisfy each link.
postgres
Services that can satisfy this link