Costs
Nebius AI Cloud charges you for the following billing items:Prerequisites
-
You need this role because the deployment adds service accounts to the
editorsandviewersgroups of your tenant. - Install and configure the Nebius AI Cloud CLI.
- Install Terraform 1.8 or later. The recipe uses provider functions that earlier versions of Terraform don’t support.
- Install kubectl. Terraform uses kubectl to move the system components of the cluster to the system nodes.
- Install jq to extract IDs from the JSON data returned by the Nebius AI Cloud CLI.
- Generate an SSH key pair.
Steps
Sign up in Saturn Cloud
- Go to the Saturn Cloud registration page.
-
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 ismy-team.saturnenterprise.io. - Email Address: Email address of the Saturn Cloud administrator.
- Cloud Provider: Nebius.
- Organization Name: Name of your organization in Saturn Cloud. The name becomes part of your Saturn Cloud domain. For example, if the name is
- Click Create Account.
-
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.tfvarsfile. 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.
What to do if the bootstrap token expires
What to do if the bootstrap token expires
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
-
Clone the Saturn Cloud reference Terraform repository and go to the
nebiusdirectory: -
Replace the
terraform.tfvarsfile in thenebiusdirectory with the file from the Saturn Cloud email. -
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, andterraform applyfails ifid_rsa.pubdoesn’t exist. -
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 theenvironment.shscript sets the region from theNEBIUS_REGIONenvironment variable. -
In the
nebiusdirectory of the cloned repository, run theenvironment.shscript:The script creates the following resources:- The
saturn-cloud-saservice account in theeditorsgroup 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.
saturn-cloud-saservice account is not found. You can ignore this error because the script creates the service account right after this check. - The
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 thenebius/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.
-
(Optional) If you want to change the configuration of the node groups (for example, the region doesn’t support the default
gpu-h200-sxmCompute platform), uncomment and adjust thenode_poolsparameter in theterraform.tfvarsfile. Thus, Terraform only creates node groups with configuration from this parameter. Innode_pools, interraform.tfvars:- Preserve the group with the
cpu-d3platform and the4vcpu-16gbpreset because Saturn Cloud builds images on these nodes. - Replace the
gpu-h200-sxmplatform with the required one, if needed. - If you don’t need nodes with eight GPUs, remove the group with the
8gpu-128vcpu-1600gbpreset. If you keep it, specify an InfiniBand™ fabric in theinfiniband_fabricparameter.
nebius/validation.tffile. - Preserve the group with the
-
(Optional) If you want to change the size of the shared filesystem, add the
filestore_disk_size_gibibytesparameter toterraform.tfvarsand set the size in GiB. -
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.tffile, inprovider "nebius", set the following contents:Ifprovider "nebius"already includes some contents, replace them with the lines above. -
In the
terraform.tffile, inrequired_providers.nebius, updatesourceandversionto the following: -
In the
terraform.tfvarsfile, 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.tffile, add the following contents to thenebius_mk8s_v1_clusterresource:
-
In the
-
Initialize Terraform in the working directory:
-
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.
- Managed Kubernetes cluster with a group of system nodes and the node groups from
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.
- Open the welcome email from Saturn Cloud and follow the link for resetting a password. The link expires in 4 hours.
-
On this website, set the password of the
adminuser. 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:- On the Dashboard page, click Create a resource.
-
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-200gbpreset innode_pools, interraform.tfvars, select theH200GPU type and the200Gimemory.
- Cloud:
- On the Resource Type step, select New Python Server and click Next.
- On the Details step, specify a name for the workspace in the Name field and click Create Resource.
-
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. - Click Jupyter Lab.
-
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.
- 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.
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. Theterraform 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:
- On the workspace page in Saturn Cloud, click Delete to delete the workspace. In the window that opens, click Yes to confirm the action.
-
Go to the
nebiusdirectory of the cloned repository and run theenvironment.shscript 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. -
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.
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
- REST API
-
Delete the resources that Terraform created:
The command can fail with the
Error uninstalling releaseerror. In this case, run the command again. -
Get the IDs of the disks that the cluster created for Saturn Cloud workspaces:
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
- REST API
- Delete the disks with these IDs.
-
Delete the bucket that stores the Terraform state. Its name starts with
tfstate-saturn-cloud-. -
Delete the service account
saturn-cloud-sa. Nebius AI Cloud also deletes its access keys and removes it from theeditorsgroup.
See also
- Installation (Nebius) in Saturn Cloud documentation
“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.