Getting started with Dagster Cloud using Serverless Deployment#
This guide is applicable to Dagster Cloud.
In this guide, we'll give you everything you need to get up and running with Dagster Cloud using Serverless Deployment. Serverless Deployment is a fully-managed version of Dagster Cloud that allows you to run your Dagster jobs without spinning up any infrastructure.
We'll walk you through setting up your Dagster Cloud account, activating Serverless, loading your code, launching your first run, and configuring Continuous Integration (CI).
Before you get started, note that:
Serverless Deployments are still in early access
This deployment type works best with jobs that aren't computationally expensive. Refer to the Serverless guide for more info.
If you find that Serverless isn't right for you, you can switch to a Hybrid deployment at any time
Step 1: Create a Dagster Cloud account and organization#
If you don't already have a Dagster Cloud account, sign up for one before continuing.
You'll also be asked to create a Dagster Cloud organization. When your organization is created, a single deployment, named prod, will also be created. Deployments are standalone environments, allowing you to operate independent instances of Dagster with separately managed permissions.
Step 2: Select Serverless as your deployment type#
Next, you'll be prompted to select a deployment type. Click Select under Serverless deployment and confirm when prompted.
Note: If you find that Serverless isn't right for you, you can switch to Hybrid Deployment at any time.
Now that you've set up your deployment, you'll need to tell Dagster Cloud the location of your Dagster code.
A code location specifies a single Python package or file that defines your Dagster code. Each Dagster Cloud deployment can include code from one or more code locations. Refer to the Adding a code location guide for more info.
There are two ways to deploy your code to Dagster Cloud:
Using GitHub - If you're a GitHub user, this is the easiest way to deploy your code.
Using the dagster-cloud CLI - If you use a non-GitHub git provider or are developing locally, you can use our CLI to get started.
Click Choose account or organization and sign into your GitHub account.
Select the account or organization where Dagster should be installed.
After the installation and authorization is complete, you'll be redirected back to Dagster Cloud.
After Dagster Cloud is connected, you'll be prompted to either:
Clone the Dagster Cloud starter project - This option clones the dagster-cloud-template repo, which already has Serverless Deployment and Branch Deployments configured.
Enter a Repository name.
Select a Repository visibility.
Click Clone and deploy.
Use an existing repo - This option uses an existing repository in your GitHub account.
Using the dagster-cloud CLI requires a recent version of Python 3 and Docker.
To complete this step using the CLI, you can use your own Dagster code or the dagster-cloud-examples code. Our examples use the dagster-cloud-examples package.
To install the dagster-cloud CLI and the dagster-cloud-examples package, run:
If you used the GitHub integration to deploy your code and you cloned the Dagster Cloud starter project, this step has already been completed for you! Branch Deployments come pre-configured in the Dagster Cloud starter project.
Branch Deployments allow you to quickly and collaboratively develop your Dagster jobs. When a branch is created or updated in your Dagster repository, Branch Deployments will create a testing environment in your Dagster Cloud instance.
Check out the Branch deployment docs for more info. If you skip this step now, you can always set it up later.