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.
Last updated 2026-08-02 · 7 min read
Existing role and certification connections for this hands-on work.
Role track: MLOps Engineer
Exam domains: Data Engineering, Modeling
Role track: MLOps Engineer
Exam domains: Frame ML problems, Design data preparation & pipelines, Automate & orchestrate ML pipelines
Role track: MLOps Engineer
Exam domains: Plan and manage an Azure AI solution
Role track: MLOps Engineer
Role track: AI Agent Developer
Role track: AI Agent Developer
Role track: AI Agent Developer
Exam domains: Generative AI fundamentals
Exam domains: TensorFlow Developer Certificate (Google), DeepLearning.AI TensorFlow Developer Professional Certificate
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.
# 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)"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.
# 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 mlflowFrom 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.
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)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.
# 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)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.
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 },
});
}
}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.
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
}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.
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
}See what other learners are clarifying as they work through this walkthrough.
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.
Connect hands-on practice with certification preparation by mapping lab work to exam domains.
Explore the certification roadmap