Skip to main content
Version: Next

MLflow on Aruba Cloud

Deploy MLflow — an open-source platform for managing the end-to-end ML lifecycle, including experiment tracking, model registry, and artifact storage — on Aruba Cloud using Terraform and cloud-init. Uses Managed MySQL 8.0 as the tracking backend and nginx with HTTP Basic Auth as a reverse proxy.

Provider version: arubacloud/arubacloud ~> 1.0 | Terraform: ≥ 1.9


Introduction​

This example deploys:

  • MLflow tracking server (pip, native install) on a CSO2A4 VM
  • Managed MySQL 8.0 (Aruba Cloud DBaaS) for experiment and run metadata
  • nginx reverse proxy with HTTP Basic Auth on port 80
  • Artifact files (models, plots) stored locally on the VM disk
  • Optional HTTPS via Actalis ACME Certificates or Let's Encrypt when a custom domain is provided

Architecture Overview​


Variables​

Required​

VariableDescription
arubacloud_client_idArubaCloud OAuth2 client ID
arubacloud_client_secretArubaCloud OAuth2 client secret

Optional​

VariableDefaultDescription
app_name"mlflow"Short name used in resource names (2–8 chars)
environment"prod"Environment label
location"ITBG-Bergamo"ArubaCloud region
zone"ITBG-1"Availability zone
billing_period"Hour""Hour" or "Month"
vm_flavor"CSO2A4"CloudServer flavor (2 vCPU / 4 GB)
vm_disk_size_gb40Boot disk size — increase for large artifact storage
ssh_public_keyproject owner keySSH public key content
ssh_cidr"0.0.0.0/0"CIDR for SSH access
dbaas_flavor"DBO2A8"Managed MySQL flavor
db_storage_gb20DBaaS initial storage in GB
db_passwordpre-set defaultMySQL password (min 8 chars, no newlines)
mlflow_admin_user"admin"Username for HTTP Basic Auth
mlflow_admin_passwordpre-set defaultPassword for HTTP Basic Auth (min 8 chars)
mlflow_version"2.16.0"MLflow version to install
domain""Custom domain for HTTPS (e.g. mlflow.example.com); leave empty for HTTP over Elastic IP
acme_eab_kid""Actalis ACME EAB key ID; leave empty to fall back to Let's Encrypt
acme_eab_hmac_key""Actalis ACME EAB HMAC key; required when acme_eab_kid is set

Outputs​

OutputDescription
app_urlMLflow tracking server URL
mlflow_tracking_uriMLFLOW_TRACKING_URI to set in experiment code
vm_public_ipPublic IP of the VM
ssh_commandSSH command to connect

Deployment Instructions​

1. Clone and navigate​

git clone https://github.com/arubacloud/terraform-arubacloud-examples.git
cd terraform-arubacloud-examples/mlflow

2. Configure variables​

cp terraform.tfvars.example terraform.tfvars

3. Deploy​

terraform init
terraform plan
terraform apply

Bootstrap takes approximately 5–10 minutes.

4. Connect your experiments​

import mlflow

mlflow.set_tracking_uri("http://<vm_public_ip>") # or the domain
mlflow.set_experiment("my-experiment")

with mlflow.start_run():
mlflow.log_param("alpha", 0.5)
mlflow.log_metric("rmse", 0.82)

Set HTTP Basic Auth credentials in your environment:

export MLFLOW_TRACKING_USERNAME=admin
export MLFLOW_TRACKING_PASSWORD=<mlflow_admin_password>

References​