Skip to main content
Saturn Cloud is an AI development platform. Your team can use it to run development workspaces by using JupyterLab® or RStudio. Saturn Cloud also runs scheduled jobs and deployments that serve models and dashboards. It manages the environments for these workloads and automatically scales the computing resources that they need. You can deploy and run Saturn Cloud on a Managed Service for Kubernetes cluster by using the ready Terraform recipe. It creates the cluster, its node groups, and a shared filesystem and then installs Saturn Cloud on the cluster. To deploy Saturn Cloud, sign up in Saturn Cloud to get the recipe settings for your organization, prepare the infrastructure for the recipe and apply it. Then log in to Saturn Cloud and run code in a JupyterLab workspace to test the deployment.

Costs

Nebius AI Cloud charges you for the following billing items:

Prerequisites

  1. You need this role because the deployment adds service accounts to the editors and viewers groups of your tenant.
  2. Install and configure the Nebius AI Cloud CLI.
  3. Install Terraform 1.8 or later. The recipe uses provider functions that earlier versions of Terraform don’t support.
  4. Install kubectl. Terraform uses kubectl to move the system components of the cluster to the system nodes.
  5. Install jq to extract IDs from the JSON data returned by the Nebius AI Cloud CLI.
  6. Generate an SSH key pair.

Steps

Sign up in Saturn Cloud

  1. Go to the Saturn Cloud registration page.
  2. Specify the following settings:
    • Organization Name: Name of your organization in Saturn Cloud. The name becomes part of your Saturn Cloud domain. For example, if the name is my-team, the domain is my-team.saturnenterprise.io.
    • Email Address: Email address of the Saturn Cloud administrator.
    • Cloud Provider: Nebius.
  3. Click Create Account.
  4. Open the activation email from Saturn Cloud. This email includes a command that activates your account—run this command. After that, Saturn Cloud sends the second email with the setup instructions and the terraform.tfvars file. The file contains the configuration of your Saturn Cloud installation, including a bootstrap token. Only download the file from this email. Don’t create a repository based on the instructions in the email. You’ll use the saturncloud-reference-terraform repository instead.
The bootstrap token from the terraform.tfvars file expires in 4 hours. If you can’t complete the deployment within this time frame, request a new terraform.tfvars file with a new token.
If the token expires, run the following command:
In the request body, set the organization and email that you specified when you registered in Saturn Cloud.Saturn Cloud sends you the setup email again. The terraform.tfvars file in this email has a new bootstrap token. Copy the saturn_bootstrap_token value from this file to the terraform.tfvars file that you use for the deployment.

Prepare infrastructure

  1. Clone the Saturn Cloud reference Terraform repository and go to the nebius directory:
  2. Replace the terraform.tfvars file in the nebius directory with the file from the Saturn Cloud email.
  3. Add the path of your public SSH key to terraform.tfvars, for example:
    The nodes of the cluster use this key. If you don’t add the path, Terraform uses ~/.ssh/id_rsa.pub, and terraform apply fails if id_rsa.pub doesn’t exist.
  4. Save the IDs of your tenant and project, and the region of the project, to environment variables:
    For more information, see: The setup email asks you to set a region in terraform.tfvars. You don’t need to do this because the environment.sh script sets the region from the NEBIUS_REGION environment variable.
  5. In the nebius directory of the cloned repository, run the environment.sh script:
    The script creates the following resources:
    • The saturn-cloud-sa service account in the editors group of your tenant.
    • A bucket for the Terraform state, with versioning enabled.
    • An access key of the service account, so that Terraform can access the bucket. The access key expires after one day.
    The script also saves the values that Terraform needs to environment variables. For example, it saves an IAM access token, which expires after 12 hours, and the ID of the first subnet in your project, which the cluster uses. The first time you run the script, it shows an error that the saturn-cloud-sa service account is not found. You can ignore this error because the script creates the service account right after this check.

Deploy Saturn Cloud and Nebius AI Cloud resources

Before you deploy Saturn Cloud, define configuration of node groups that you create. The default configuration is located in the nebius/variables.tf file, in the node_pools variable. Each group starts with no nodes. The cluster adds up to 10 nodes to a group when your workloads need them. When you create a workload in Saturn Cloud, you select one of these node groups. In addition, the default configuration includes a shared filesystem with the 100 GiB size.
  1. (Optional) If you want to change the configuration of the node groups (for example, the region doesn’t support the default gpu-h200-sxm Compute platform), uncomment and adjust the node_pools parameter in the terraform.tfvars file. Thus, Terraform only creates node groups with configuration from this parameter. In node_pools, in terraform.tfvars:
    • Preserve the group with the cpu-d3 platform and the 4vcpu-16gb preset because Saturn Cloud builds images on these nodes.
    • Replace the gpu-h200-sxm platform with the required one, if needed.
    • If you don’t need nodes with eight GPUs, remove the group with the 8gpu-128vcpu-1600gb preset. If you keep it, specify an InfiniBand™ fabric in the infiniband_fabric parameter.
    For the supported values of the platforms and presets, see the nebius/validation.tf file.
  2. (Optional) If you want to change the size of the shared filesystem, add the filestore_disk_size_gibibytes parameter to terraform.tfvars and set the size in GiB.
  3. To use up-to-date versions of resources and to make sure that the resources are created successfully, update the following files in the repository:
    • In the provider.tf file, in provider "nebius", set the following contents:
      If provider "nebius" already includes some contents, replace them with the lines above.
    • In the terraform.tf file, in required_providers.nebius, update source and version to the following:
    • In the terraform.tfvars file, specify an up-to-date Kubernetes version: k8s_version = "<version>". To get the up-to-date version, see Available Kubernetes versions.
    • In the nebius/mk8s.tf file, add the following contents to the nebius_mk8s_v1_cluster resource:
  4. Initialize Terraform in the working directory:
  5. Apply the changes:
    Terraform creates the following resources in your project in Nebius AI Cloud:
    • Managed Kubernetes cluster with a group of system nodes and the node groups from node_pools.
    • Shared filesystem.
    • Service account that the nodes use to pull images from Container Registry.
    You can check these resources in the web console. Terraform creates the resources. After that, Saturn Cloud installs its components in the Managed Kubernetes cluster. The resource creation and component installation can take about 15 minutes in total. When the installation is complete, Saturn Cloud sends a welcome email to the administrator’s email address.

Log in to Saturn Cloud

Once installation is finished, Saturn Cloud deploys a website for your organization, https://app.<organization_name>.saturnenterprise.io. At this website, you can access the Saturn Cloud dashboard and run workloads.
  1. Open the welcome email from Saturn Cloud and follow the link for resetting a password. The link expires in 4 hours.
    If the browser shows that the website can’t be found, the DNS record for your Saturn Cloud domain isn’t available yet. Wait 15 minutes and try again.
  2. On this website, set the password of the admin user. After that, the Saturn Cloud dashboard opens automatically.

Test the deployment

To test the deployment, create a workspace with JupyterLab® preinstalled in Saturn Cloud and run code in JupyterLab:
  1. On the Dashboard page, click Create a resource.
  2. On the Instance Size step, select the values that correspond to your configuration:
    • Cloud: Nebius.
    • GPU Type and Memory: should correspond to the preset in the Terraform manifest. For example, if you specify the 1gpu-16vcpu-200gb preset in node_pools, in terraform.tfvars, select the H200 GPU type and the 200Gi memory.
    After that, select the suggested configuration and click Next.
  3. On the Resource Type step, select New Python Server and click Next.
  4. On the Details step, specify a name for the workspace in the Name field and click Create Resource.
  5. On the workspace page that opens, click Start. Wait until the status of the workspace changes to Running. The cluster first adds a node for the workspace, so the workspace can take a few minutes to start.
  6. Click Jupyter Lab.
  7. In JupyterLab, create a notebook and run the following code:
    The output is the number of vCPUs in the preset of the node group that you selected.
  8. Stop the workspace in Saturn Cloud. Close the JupyterLab window and then click Stop on the workspace page. In the window that opens, click Yes to confirm the action.
To learn how to invite your team, configure single sign-on and run jobs and deployments, see the Saturn Cloud documentation.

How to delete the created resources

Some of the created resources are chargeable. If you don’t need them, delete these resources, so Nebius AI Cloud doesn’t charge for them. The terraform destroy command deletes only the resources that Terraform created: the Managed Kubernetes cluster, its node groups, and the shared filesystem. The environment.sh script creates the bucket and the service account by using the Nebius AI Cloud CLI, and the cluster creates disks for Saturn Cloud workspaces. The following steps delete all of these resources:
  1. On the workspace page in Saturn Cloud, click Delete to delete the workspace. In the window that opens, click Yes to confirm the action.
  2. Go to the nebius directory of the cloned repository and run the environment.sh script again:
    Terraform reads the project and subnet IDs, the IAM access token, and the access key to the bucket with the Terraform state from environment variables that the script sets. These variables exist only in the terminal session where you ran the script, and the token and the key expire. The script sets the variables again.
  3. Get the ID of the Managed Kubernetes cluster:
    Save the received ID. The disks of the workspaces have the cluster ID in their labels. After Terraform deletes the cluster, use this ID to find these disks.
  4. Delete the resources that Terraform created:
    The command can fail with the Error uninstalling release error. In this case, run the command again.
  5. Get the IDs of the disks that the cluster created for Saturn Cloud workspaces:
  6. Delete the disks with these IDs.
  7. Delete the bucket that stores the Terraform state. Its name starts with tfstate-saturn-cloud-.
  8. Delete the service account saturn-cloud-sa. Nebius AI Cloud also deletes its access keys and removes it from the editors group.

See also


“Jupyter” and the Jupyter logos are trademarks or registered trademarks of LF Charities, used by Nebius B.V. with permission. InfiniBand and InfiniBand Trade Association are registered trademarks of the InfiniBand Trade Association.