Prerequisites
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
Make sure you are in a group that has the
admin role within your tenant or project; for example, the default admins group. You can check this in the Administration → IAM section of the web console.- Install and configure the Nebius AI Cloud CLI.
-
Make sure that you or the service account that you use is in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
- Install and configure the Nebius AI Cloud provider for Terraform.
-
Make sure that you or the service account that you use is in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for Go.
-
Make sure that you or the service account that you use is in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for Python.
-
Make sure that you or the service account that you use is in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
- Install and initialize the Nebius SDK for JavaScript.
-
Make sure that you or the service account that you use is in a group that has the
adminrole within your tenant or project; for example, the defaultadminsgroup. You can check this in the Administration → IAM section of the web console.
How to create a cluster
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
-
In the sidebar, go to
MLflow.
-
Click
Create cluster.
- On the page that opens, enter the cluster name and optional description.
-
Select the
mlflow-saservice account. It was created for Managed MLflow by default after you signed up for Nebius AI Cloud. -
In the Access field, select configuration for tracking endpoints:
- Public and private: The cluster has both public and private tracking endpoints. You can access the public endpoint from the internet and the private endpoint from the network where the cluster is located (for example, via a virtual machine in this network).
- Private only: The cluster only has a private tracking endpoint.
public-trackingandprivate-tracking, respectively. - Select a network where the cluster should be located.
-
Select a
mediumcluster size. Eachmediumcluster includes 8 vCPUs, 32 GiB RAM and a 200 GiB Network SSD disk. - In the Bucket for artifacts block, select a bucket to store logs and metrics of machine learning experiments launched in the cluster. Alternatively, select the Auto option to create the bucket automatically. This bucket is not deleted automatically after you delete the cluster. You are still charged for the bucket until you delete it.
-
In the Admin credentials block, specify the username and password of the cluster administrator.
The password must be between 8 and 64 characters long and must contain at least the following:
- One uppercase letter
- One lowercase letter
- One digit
- One special character from -!@#$^&*_=+:;’”|/?,.~§±()[]<>`.
- Click Create cluster.
-
Create a password for administrator access to the cluster and save it to an environment variable:
The password must be between 8 and 64 characters long and must contain at least the following:
export PASSWORD=<password>- One uppercase letter
- One lowercase letter
- One digit
- One special character from -!@#$^&*_=+:;’”|/?,.~§±()[]<>`.
-
Get the ID of the
mlflow-saservice account. It was created by default after you signed up for Nebius AI Cloud. Save the ID to an environment variable:export SA_ID=$(nebius iam service-account get-by-name \ --name mlflow-sa \ --format jsonpath='{.metadata.id}') -
Get the ID of the default network and save it to an environment variable:
export NETWORK_ID=$(nebius vpc network get-by-name \ --name default-network \ --format jsonpath='{.metadata.id}') -
Create a cluster:
The command contains the following parameters:
nebius msp mlflow v1alpha1 cluster create \ --name <cluster_name> \ --description "<cluster_description>" \ --network-id $NETWORK_ID \ --size medium \ --public-access=<true|false> \ --admin-username <username> \ --admin-password $PASSWORD \ --service-account-id $SA_ID \ --storage-bucket-name <bucket_name>-
--name: Cluster name. -
--description: Cluster description. -
--network-id: Network ID. -
--size: Size of resources allocated to the cluster. Onlymediumsize is available. Eachmediumcluster includes 8 vCPUs, 32 GiB RAM and a 200 GiB Network SSD disk. -
--public-access: Configuration for tracking endpoints:- If
true, the cluster has both public and private tracking endpoints. You can access the public endpoint from the internet and the private endpoint from the network where the cluster is located (for example, via a virtual machine in this network). - If
false, the cluster only has a private tracking endpoint.
public-trackingandprivate-tracking, respectively. - If
-
--admin-username: Name of the cluster administrator, for exampleadmin. -
--admin-password: Administrator password that you set earlier. -
--service-account-id: ID of themlflow-saservice account. -
--storage-bucket-name(optional): Name of the bucket to store logs and metrics from machine learning experiments launched in the cluster. If you do not specify this parameter, a bucket is created automatically. This bucket is not deleted automatically after you delete the cluster. You are still charged for the bucket until you delete it.
-
-
Create the following configuration file:
The file contains the following parameters:
resource "nebius_msp_mlflow_v1alpha1_cluster" "<cluster_name>" { name = "<cluster_name>" description = "<cluster_description>" network_id = "<network_ID>" size = "medium" parent_id = "<project_ID>" public_access = <true|false> admin_username = "<username>" admin_password = "<password>" service_account_id = "<service_account_ID>" storage_bucket_name = "<bucket>" }-
name: Cluster name. -
description: Cluster description. -
network_id: Network ID. -
size: Size of resources allocated to the cluster. Onlymediumsize is available. Eachmediumcluster includes 8 vCPUs, 32 GiB RAM and a 200 GiB Network SSD disk. -
parent_id: Project ID. -
public_access: Configuration for tracking endpoints:- If
true, the cluster has both public and private tracking endpoints. You can access the public endpoint from the internet and the private endpoint from the network where the cluster is located (for example, via a virtual machine in this network). - If
false, the cluster only has a private tracking endpoint.
public-trackingandprivate-tracking, respectively. - If
-
admin_username: Name of the cluster administrator, for exampleadmin. -
admin_password: Administrator password. The password must be between 8 and 64 characters long and must contain at least the following:- One uppercase letter
- One lowercase letter
- One digit
- One special character from -!@#$^&*_=+:;’”|/?,.~§±()[]<>`.
-
service_account_id: ID of themlflow-saservice account. It was created by default after you signed up for Nebius AI Cloud. -
storage_bucket_name(optional): Name of the bucket to store logs and metrics from machine learning experiments launched in the cluster. If you do not specify this parameter, a bucket is created automatically. This bucket is not deleted automatically after you delete the cluster. You are still charged for the bucket until you delete it.
-
-
Check that the configuration is correct:
terraform validate -
Apply the changes:
terraform apply
-
Get the ID of the
mlflow-saservice account. It was created by default after you signed up for Nebius AI Cloud:InserviceAccount, err := sdk.Services().IAM().V1(). ServiceAccount().GetByName( ctx, &iam.GetServiceAccountByNameRequest{ ParentId: "<project_ID>", Name: "mlflow-sa", }, ) if err != nil { return fmt.Errorf("get service account by name: %w", err) } serviceAccountID := serviceAccount.GetMetadata().GetId() fmt.Println(serviceAccountID)ParentId, specify the project ID. The code prints the service account ID. -
Get the ID of the default network:
The code prints the network ID.
network, err := sdk.Services().VPC().V1().Network(). GetByName( ctx, &vpc.GetNetworkByNameRequest{ ParentId: "<project_ID>", Name: "default-network", }, ) if err != nil { return fmt.Errorf("get network by name: %w", err) } networkID := network.GetMetadata().GetId() fmt.Println(networkID) -
Create a cluster:
The code contains the following parameters:
createService := sdk.Services().MSP().MLFlow(). V1Alpha1().Cluster() createOperation, err := createService.Create( ctx, &mlflow.CreateClusterRequest{ Metadata: &common.ResourceMetadata{ ParentId: "<project_ID>", Name: "<cluster_name>", }, Spec: &mlflow.ClusterSpec{ NetworkId: "<network_ID>", ServiceAccountId: "<service_account_ID>", AdminUsername: "<username>", AdminPassword: "<password>", PublicAccess: <true|false>, Description: "<cluster_description>", Size: "medium", StorageBucketName: "<bucket_name>", }, }, ) if err != nil { return fmt.Errorf("create cluster: %w", err) } _, err = createOperation.Wait(ctx) if err != nil { return fmt.Errorf("wait for cluster creation: %w", err) }-
Metadata.ParentId: Project ID. -
Metadata.Name: Cluster name. -
Spec.NetworkId: Network ID that you got earlier. -
Spec.ServiceAccountId: ID of themlflow-saservice account that you got earlier. -
Spec.AdminUsername: Name of the cluster administrator, for exampleadmin. -
Spec.AdminPassword: Administrator password. The password must be between 8 and 64 characters long and must contain at least the following:- One uppercase letter
- One lowercase letter
- One digit
- One special character from -!@#$^&*_=+:;’”|/?,.~§±()[]<>`.
-
Spec.PublicAccess: Configuration for tracking endpoints:- If
true, the cluster has both public and private tracking endpoints. You can access the public endpoint from the internet and the private endpoint from the network where the cluster is located (for example, via a virtual machine in this network). - If
false, the cluster only has a private tracking endpoint.
public-trackingandprivate-tracking, respectively. - If
-
Spec.Description: Cluster description. -
Spec.Size: Size of resources allocated to the cluster. Onlymediumsize is available. Eachmediumcluster includes 8 vCPUs, 32 GiB RAM and a 200 GiB Network SSD disk. -
Spec.StorageBucketName(optional): Name of the bucket to store logs and metrics from machine learning experiments launched in the cluster. If you don’t specify this parameter, a bucket is created automatically. This bucket isn’t deleted automatically after you delete the cluster. You are still charged for the bucket until you delete it.
-
-
Get the ID of the
mlflow-saservice account. It was created by default after you signed up for Nebius AI Cloud:Inservice_account_service = ServiceAccountServiceClient(sdk) service_account = await service_account_service.get_by_name( GetServiceAccountByNameRequest( parent_id="<project_ID>", name="mlflow-sa", ), ) service_account_id = service_account.metadata.id print(service_account_id)parent_id, specify the project ID. The code prints the service account ID. -
Get the ID of the default network:
The code prints the network ID.
network_service = NetworkServiceClient(sdk) network = await network_service.get_by_name( GetNetworkByNameRequest( parent_id="<project_ID>", name="default-network", ), ) network_id = network.metadata.id print(network_id) -
Create a cluster:
The code contains the following parameters:
create_service = mlflow.ClusterServiceClient(sdk) create_operation = await create_service.create( mlflow.CreateClusterRequest( metadata=ResourceMetadata( parent_id="<project_ID>", name="<cluster_name>", ), spec=mlflow.ClusterSpec( network_id="<network_ID>", service_account_id="<service_account_ID>", admin_username="<username>", admin_password="<password>", public_access=<True|False>, description="<cluster_description>", size="medium", storage_bucket_name="<bucket_name>", ), ), ) await create_operation.wait()-
metadata.parent_id: Project ID. -
metadata.name: Cluster name. -
spec.network_id: Network ID that you got earlier. -
spec.service_account_id: ID of themlflow-saservice account that you got earlier. -
spec.admin_username: Name of the cluster administrator, for exampleadmin. -
spec.admin_password: Administrator password. The password must be between 8 and 64 characters long and must contain at least the following:- One uppercase letter
- One lowercase letter
- One digit
- One special character from -!@#$^&*_=+:;’”|/?,.~§±()[]<>`.
-
spec.public_access: Configuration for tracking endpoints:- If
True, the cluster has both public and private tracking endpoints. You can access the public endpoint from the internet and the private endpoint from the network where the cluster is located (for example, via a virtual machine in this network). - If
False, the cluster only has a private tracking endpoint.
public-trackingandprivate-tracking, respectively. - If
-
spec.description: Cluster description. -
spec.size: Size of resources allocated to the cluster. Onlymediumsize is available. Eachmediumcluster includes 8 vCPUs, 32 GiB RAM and a 200 GiB Network SSD disk. -
spec.storage_bucket_name(optional): Name of the bucket to store logs and metrics from machine learning experiments launched in the cluster. If you don’t specify this parameter, a bucket is created automatically. This bucket isn’t deleted automatically after you delete the cluster. You are still charged for the bucket until you delete it.
-
-
Get the ID of the
mlflow-saservice account. It was created by default after you signed up for Nebius AI Cloud:Inconst serviceAccountService = new ServiceAccountService(sdk); const serviceAccount = await serviceAccountService.getByName( GetServiceAccountByNameRequest.create({ parentId: "<project_ID>", name: "mlflow-sa", }), ).result; const serviceAccountId = serviceAccount.metadata.id; console.log(serviceAccountId);parentId, specify the project ID. The code prints the service account ID. -
Get the ID of the default network:
The code prints the network ID.
const networkService = new NetworkService(sdk); const network = await networkService.getByName( GetNetworkByNameRequest.create({ parentId: "<project_ID>", name: "default-network", }), ).result; const networkId = network.metadata.id; console.log(networkId); -
Create a cluster:
The code contains the following parameters:
const createService = new mlflow.ClusterService(sdk); const createOperation = await createService.create( mlflow.CreateClusterRequest.create({ metadata: { parentId: "<project_ID>", name: "<cluster_name>", }, spec: { networkId: "<network_ID>", serviceAccountId: "<service_account_ID>", adminUsername: "<username>", adminPassword: "<password>", publicAccess: <true|false>, description: "<cluster_description>", size: "medium", storageBucketName: "<bucket_name>", }, }), ).result; await createOperation.wait();-
metadata.parentId: Project ID. -
metadata.name: Cluster name. -
spec.networkId: Network ID that you got earlier. -
spec.serviceAccountId: ID of themlflow-saservice account that you got earlier. -
spec.adminUsername: Name of the cluster administrator, for exampleadmin. -
spec.adminPassword: Administrator password. The password must be between 8 and 64 characters long and must contain at least the following:- One uppercase letter
- One lowercase letter
- One digit
- One special character from -!@#$^&*_=+:;’”|/?,.~§±()[]<>`.
-
spec.publicAccess: Configuration for tracking endpoints:- If
true, the cluster has both public and private tracking endpoints. You can access the public endpoint from the internet and the private endpoint from the network where the cluster is located (for example, via a virtual machine in this network). - If
false, the cluster only has a private tracking endpoint.
public-trackingandprivate-tracking, respectively. - If
-
spec.description: Cluster description. -
spec.size: Size of resources allocated to the cluster. Onlymediumsize is available. Eachmediumcluster includes 8 vCPUs, 32 GiB RAM and a 200 GiB Network SSD disk. -
spec.storageBucketName(optional): Name of the bucket to store logs and metrics from machine learning experiments launched in the cluster. If you don’t specify this parameter, a bucket is created automatically. This bucket isn’t deleted automatically after you delete the cluster. You are still charged for the bucket until you delete it.
-