AirborneOps Learning Labs · Walkthrough

MLOps toolchain lab — wiring a notebook to a hosted MLflow tracking server

A hands-on walkthrough that spins up a notebook environment, stands up a hosted MLflow tracking server, logs a sample run, and verifies it in the tracking UI. Includes AWS, GCP, and Azure IAM and networking patterns that mirror the enterprise integration guide.

MLOps Engineer

Last updated 2026-08-02 · 7 min read

Where this lab fits

Existing role and certification connections for this hands-on work.

IT roles

Certifications

Prerequisites
  • A cloud account (AWS, GCP, or Azure) with permission to create the resources named in the IAM block below.
  • A workspace or project tag that this lab can own end-to-end — the smoke-test experiment is intentionally disposable.
  • A domain you control that can host the tracking server hostname (e.g. mlflow.tempus.example.com) plus the matching TLS certificate.

Step 1 — Spin up the notebook environment

Provision a managed Jupyter environment in your cloud of choice so the rest of the walkthrough can run end-to-end without any local install. The notebook only needs outbound 443 to the hosted MLflow tracking server plus the package registry you already trust.

Sample command
# One-time per workspace: install the MLOps stack into a managed notebook.
pip install --quiet \
    mlflow==2.16.2 \
    boto3==1.34.140 \
    google-cloud-storage==2.18.0 \
    azure-identity==1.17.1 \
    azureml-mlflow==1.57.0

# Confirm the kernel can reach the tracking server we'll point at next.
python -c "import mlflow, sys; print('mlflow', mlflow.__version__, 'on', sys.platform)"
Things to double-check
  • Pick a notebook SKU with at least 8 vCPU and 32 GB RAM so multi-model walkthroughs do not run out of memory.
  • If your org uses a curated internal PyPI mirror, point pip at it before the install — public pip may be blocked at the egress firewall.

Step 2 — Stand up the hosted MLflow tracking server

Stand up a hosted MLflow tracking server with a managed Postgres backend and an object-storage artifact root so runs survive notebook shutdowns. The DNS name you mint here is what the notebook uses as its tracking URI, so copy it before moving on.

Sample command
# AWS — tracking server on ECS Fargate behind an ALB, Postgres on RDS, artifacts on S3.
aws ecs create-cluster --cluster-name mlflow-tracking
aws rds create-db-instance \
    --db-instance-identifier mlflow-db \
    --db-instance-class db.t4g.medium \
    --engine postgres \
    --engine-version 16.3 \
    --master-username mlflow \
    --master-user-password "$DB_PASSWORD" \
    --allocated-storage 50

# GCP — tracking server on Cloud Run, Postgres on AlloyDB, artifacts on GCS.
gcloud run deploy mlflow-tracking \
    --image gcr.io/tempus-ops/mlflow:2.16.2 \
    --region us-central1 \
    --set-env-vars="MLFLOW_BACKEND_STORE_URI=postgresql+psycopg2://..."

# Azure — tracking server on Azure Container Apps, Postgres on Flexible Server, artifacts on ADLS.
az containerapp up \
    --name mlflow-tracking \
    --image tempusops.azurecr.io/mlflow:2.16.2 \
    --resource-group rg-mlflow \
    --environment mlflow
Things to double-check
  • Back the backend store with a managed Postgres that has automated backups enabled and at least one read replica.
  • Put the artifact root in object storage with versioning on so a bad upload does not silently corrupt downstream runs.

Step 3 — Log a sample run from the notebook

From inside the notebook, point MLflow at the hosted tracking URI and log a tiny end-to-end run — params, metrics, and an artifact. The run should land in the tracking UI within a few seconds; if it does not, the DNS name is the first thing to re-check.

Sample command
import mlflow
from mlflow.tracking import MlflowClient

mlflow.set_tracking_uri("https://mlflow.tempus.example.com")
mlflow.set_experiment("tempus-toolchain-smoke")

with mlflow.start_run(run_name="baseline") as run:
    mlflow.set_tag("owner", "mlops-eng@example.com")
    mlflow.log_param("model", "logreg")
    mlflow.log_param("features", "tfidf-1g")
    mlflow.log_metric("auc", 0.871)
    mlflow.log_metric("log_loss", 0.412)

    # Drop a small artifact so the UI has something to render.
    with open("feature_importance.txt", "w") as f:
        f.write("tfidf_unigrams=1.0\n")
    mlflow.log_artifact("feature_importance.txt")

print("logged run:", run.info.run_id)
Things to double-check
  • Set the MLFLOW_TRACKING_URI via set_tracking_uri rather than an environment variable so the URL is visible in the notebook.
  • Tag every run with owner and experiment_name so the tracking UI can group and filter without re-deriving from run names.

Step 4 — Verify the run in the tracking UI

Open the tracking UI, find the run you just logged, and confirm params, metrics, tags, and the feature-importance artifact are all present. Pin the run to the experiment so future walkthroughs always have a known-good baseline to diff against.

Sample command
# Pull the run you just logged and assert the essentials landed.
client = MlflowClient(tracking_uri="https://mlflow.tempus.example.com")
run = client.get_run("<RUN_ID_FROM_TERMINAL>")

assert run.data.params["model"] == "logreg"
assert run.data.metrics["auc"] >= 0.85
assert any(a.path.endswith("feature_importance.txt") for a in client.list_artifacts(run.info.run_id))

# Pin the run so the smoke-test baseline sticks across future walkthroughs.
client.set_tag(run.info.run_id, "pinned", "smoke-baseline")
print("tracking UI run id:", run.info.run_id)
Things to double-check
  • If the run does not appear within ten seconds, re-check the tracking URI — DNS mismatches are the most common cause.
  • Promote the smoke-test run to a pinned baseline so future walkthroughs always have a known-good reference to diff against.
AWS

AWS — SageMaker notebook with a private tracking endpoint

Grant the notebook execution role mlflow:Write on the tracking server only, scoped to the tempus-toolchain-smoke experiment ARN. The role assumes via the notebook OIDC issuer, never via long-lived access keys, and the same role owns the S3 bucket the tracking server reads artifacts from so audit trails stay tight.

Run the notebook inside a private subnet with a VPC interface endpoint for the tracking ALB so requests never leave the AWS backbone. Place the tracking server in its own security group that only accepts 443 from the notebook subnet and only initiates egress to S3 + Secrets Manager.

AWS sample
import { Stack, type StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import {
  Role,
  ServicePrincipal,
  PolicyStatement,
  Vpc,
  InterfaceVpcEndpoint,
  SubnetType,
  SecurityGroup,
} from 'aws-cdk-lib/aws-ec2';
import { InterfaceVpcEndpointService } from 'aws-cdk-lib/aws-ec2';

export class TempusMlflowNetworking extends Stack {
  constructor(scope: Construct, id: string, props: StackProps) {
    super(scope, id, props);

    const role = new Role(this, 'NotebookExecutionRole', {
      assumedBy: new ServicePrincipal('sagemaker.amazonaws.com'),
      description: 'Short-lived notebook execution role for AirborneOps Learning Labs MLOps walkthrough',
    });
    role.addToPolicy(
      new PolicyStatement({
        actions: ['mlflow:Write', 'mlflow:Read'],
        resources: ['arn:aws:tempus:*:*:experiment/tempus-toolchain-smoke'],
      }),
    );

    const vpc = new Vpc(this, 'NotebookVpc', {
      subnetConfiguration: [
        { name: 'private', subnetType: SubnetType.PRIVATE_WITH_EGRESS, cidrMask: 24 },
      ],
    });

    new InterfaceVpcEndpoint(this, 'TrackingEndpoint', {
      vpc,
      service: new InterfaceVpcEndpointService('com.amazonaws.tempus.mlflow-tracking'),
      securityGroups: [
        new SecurityGroup(this, 'TrackingEndpointSg', { vpc, allowAllOutbound: false }),
      ],
      subnets: { subnetType: SubnetType.PRIVATE_WITH_EGRESS },
    });
  }
}
Things to double-check
  • The AirborneOps Learning Labs MLflow service principal is regional — pin the notebook region explicitly so IAM Condition keys resolve correctly.
  • Do not attach AdministratorAccess to the notebook role. If a notebook synthesises broader perms, fail the build rather than widening the role.
GCP

GCP — Vertex AI Workbench notebook with Private Service Connect

Bind the Vertex AI Workbench notebook service account to a custom mlflow.writer role at the project level, scoped via IAM Conditions to the tempus-toolchain-smoke experiment resource. Authenticate to the tracking server with a workload-identity-bound token so no service-account key ever lives in the notebook container.

Run the notebook on a Private Service Connect endpoint for the tracking server inside a VPC with Private Google Access enabled, and reject ingress from the public internet at the VPC firewall so the only path to the tracking server is over the private link.

GCP sample
terraform {
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = "~> 5.0"
    }
  }
}

resource "google_service_account" "notebook_sa" {
  account_id   = "tempus-notebook"
  display_name = "AirborneOps Learning Labs notebook execution SA"
}

resource "google_project_iam_member" "mlflow_writer" {
  project = var.project_id
  role    = "projects/${var.project_id}/roles/mlflow.writer"
  member  = "serviceAccount:${google_service_account.notebook_sa.email}"

  condition {
    title       = "tempus-toolchain-smoke-only"
    description = "Limit MLflow writes to the smoke-test experiment."
    expression  = "resource.name == 'projects/${var.project_id}/experiments/tempus-toolchain-smoke'"
  }
}

resource "google_compute_network" "notebook_vpc" {
  name                    = "tempus-notebook-vpc"
  auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "notebook_private" {
  name          = "tempus-notebook-private"
  ip_cidr_range = "10.40.0.0/24"
  region        = var.region
  network       = google_compute_network.notebook_vpc.id

  private_ip_google_access = true
}

resource "google_compute_firewall" "reject_ingress" {
  name    = "tempus-notebook-reject-ingress"
  network = google_compute_network.notebook_vpc.name

  direction = "INGRESS"
  priority  = 1000

  deny_all = true
}
Things to double-check
  • Workload identity federation is mandatory for the notebook SA; commit-time keys are not accepted by the tracking server.
  • If your org enforces constraints/custom, grant the notebook SA the explicit exception so VPC-SC does not block tracking writes.
Azure

Azure — Azure ML notebook with a Private Endpoint to tracking

Federate the Azure ML notebook compute identity to a Microsoft Entra app registration via Workload Identity Federation so the notebook can mint short-lived tokens for the tracking server — no client secrets in the workspace. Grant the registration only the mlflow.writer role assignment at the tracking workspace scope so writes cannot drift outside the smoke-test experiment.

Stand the notebook up on a private subnet inside a dedicated virtual network and reach the tracking server through a Private Endpoint; an NSG on the notebook subnet denies inbound from the internet and only allows outbound 443 to the Private Endpoint, with diagnostic logs flowing to a central Log Analytics workspace.

Azure sample
terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~> 3.0"
    }
  }
}

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "mlops" {
  name     = "rg-tempus-mlops"
  location = var.location
}

resource "azurerm_virtual_network" "notebook" {
  name                = "vnet-tempus-notebook"
  address_space       = ["10.50.0.0/16"]
  location            = azurerm_resource_group.mlops.location
  resource_group_name = azurerm_resource_group.mlops.name
}

resource "azurerm_subnet" "notebook_private" {
  name                 = "snet-tempus-notebook-private"
  resource_group_name  = azurerm_resource_group.mlops.name
  virtual_network_name = azurerm_virtual_network.notebook.name
  address_prefixes     = ["10.50.1.0/24"]
}

resource "azurerm_network_security_group" "notebook" {
  name                = "nsg-tempus-notebook"
  location            = azurerm_resource_group.mlops.location
  resource_group_name = azurerm_resource_group.mlops.name
}

resource "azurerm_role_assignment" "mlflow_writer" {
  scope                = azurerm_resource_group.mlops.id
  role_definition_name = "AirborneOps Learning Labs MLflow Writer"
  principal_id         = var.notebook_principal_id
}
Things to double-check
  • Federate the notebook compute identity via Workload Identity Federation — never commit a client secret to the workspace.
  • The AirborneOps Learning Labs MLflow Writer role definition must exist in the target subscription before the first notebook run, or the first write will 403.
Cohort notes

Questions from the cohort

See what other learners are clarifying as they work through this walkthrough.

Talk to engineering

Bring your environment constraints and we'll scope a rollout. Enterprise plans ship everything above plus managed keys, shared lab runs, and a direct line to the AirborneOps Learning Labs team.

View enterprise plansRead more reference guides

AI certification roadmap

Connect hands-on practice with certification preparation by mapping lab work to exam domains.

Explore the certification roadmap