CAMPUX Cloud Bootcamp Phase Four · Class Thirty-Four
Phase Four — Operate, Secure & AI
Reading 36 min · Drills 6 · 1 Lab
Build IV foundations
Class Thirty-Four

AI Infrastructure I: Deployment

Every job posting now asks for "AI experience," and almost nobody posting it can say what that means — this class gives it a meaning you can deploy, secure, and defend in an interview: the resource, the deployment, the quota, and the door.

§1

What you own in AI — and what you don't

Here is the settling fact before anything else: you are not going to train a model, and nobody is asking you to. The models are trained by a handful of labs at a cost measured in datacentres; what companies actually need — in numbers that dwarf the demand for machine-learning researchers — is someone who can stand a model up inside their estate, behind their identity system, on their network, under their cost controls. That is not a new discipline. It is the last thirty-two classes pointed at a new resource type. The model arrives as a finished artifact, like the database engine in Class Twelve or the container runtime in Class Twenty-Six; nobody expected you to write PostgreSQL either.

Draw the Class One line through an AI workload and it lands in a familiar place. Microsoft owns the model weights, the GPUs, the serving infrastructure, and the uptime of the endpoint. You own everything that makes calling it safe and accountable: which identities may reach it, which network paths exist to it, how much it may spend, what gets logged, and which version answers when your application asks a question. The provider will never take that half — and the provider's half is not what your employer is worried about. Their half of the model is, as ever, the half you are paid to hold.

The model is theirs. The meter is yours.

§2

The resource — what actually gets created

Strip the branding away and Azure's AI offering is an ordinary Azure resource with an unusually famous tenant.1 You create an Azure OpenAI resource (the portal now walks you through it under the Microsoft Foundry banner, the latest name for what was Azure AI Foundry) the way you have created everything since Class Seven: it lands in a resource group, in a region, with tags, RBAC, diagnostic settings, and a line on the invoice. Everything you know applies. What you get for it is small and specific:

The resource
The billable, governable container. Region matters twice: data is processed where you put it — the compliance conversation — and model availability differs by region, so the model you want may dictate the region you choose.
An endpoint
One HTTPS URL, shaped like https://<name>.openai.azure.com. A REST API, Class Sixteen's kind — everything that calls the model calls this, and everything you know about securing an endpoint applies to it.
Two API keys
Born with the resource, granting full data-plane access to anyone holding them. §4 is about why the pair exists — and why your goal is to need neither.
Nothing else
No model answers yet. An Azure OpenAI resource with no deployments is a locked, empty room with a famous address — the model only exists for you once you deploy one into it, which is §3.

The distinction in that last row is the one interviews probe, so take it slowly: the resource is not the model. The resource is yours — a governance boundary. The model becomes reachable only through a deployment you create inside it, and the two are separated for the same reason Class Eleven separated the VM from its disks: they have different lifecycles, different limits, and different failure modes.

§3

Deployments, quotas, and the TPM budget

A model deployment is a named instance of a specific model, at a specific version, with a specific slice of capacity, living inside your resource. Your application never asks for "GPT-4o"; it asks for campux-chat — the deployment name you chose — and you decide, on the infrastructure side, what answers to that name. This indirection is the whole trick, and it is one you have seen twice: it is Class Thirteen's load-balancer frontend and Class Nineteen's branch pointer, reapplied. When the model version retires — and they retire on published schedules, roughly annually — you stand up a new deployment, test it, and repoint. The application never changes.

Deployment
A named, versioned instance of a model inside your resource, with capacity you assign — the level of indirection that lets models change underneath an application that only ever knows a name.

Capacity is where AI infrastructure stops resembling web infrastructure, because the unit is new: the token, roughly three-quarters of a word, counted in both directions — the question and the answer both meter. Quota arrives as TPM, tokens per minute, granted per model, per region, per subscription, and you assign slices of it to deployments; a request-per-minute allowance rides along in proportion.2 When a deployment exhausts its TPM in a given minute, callers get HTTP 429 — throttled, Class Sixteen's status codes still doing the work — until the minute rolls over. Two consequences follow. First, TPM is a ceiling, not a purchase: standard deployments bill per token consumed, so an idle deployment with generous TPM costs nearly nothing, while Class Thirty-Two's use-it-or-lose-it warning belongs to the provisioned tier, where you buy dedicated throughput by the hour whether you use it or not. Second, quota is a finite pool: TPM parked on a forgotten dev deployment is TPM production cannot have — the §2 orphan sweep gains a new species.

§4

Keys vs Entra — the ladder's last rung

The resource was born with two API keys, and here is the full measure of what they are: bearer tokens with no name attached. A request presenting the key is served — whoever sent it, from wherever, for whatever. The audit log records that the key was used, never who used it; the Class Thirty-One question "who accessed this in May" is unanswerable by design. Two exist so you can rotate one while the other serves, which tells you Microsoft's own expectation: keys are a thing you rotate, which means a thing that leaks. And an AI key that leaks is a special kind of leak — the finder does not deface your website; they quietly run their chatbot on your invoice, at token prices, until the Class Thirty-Two budget alert is the thing that catches it.

You have climbed this ladder before — it is Class Nine's hygiene ladder, and this is its final rung. The top looks the same as it did there: the calling app's managed identity holds the data-plane role Cognitive Services OpenAI User on the resource, requests carry an Entra token instead of a key, and every call is attributable to a named identity with a revocable role assignment.3 No secret exists to store, leak, or rotate. Then take the step that makes the posture real: the resource accepts a disable local auth setting that turns key access off entirely — the same move as Class Twelve's storage keys, and the difference between "we prefer identity" and "keys do not work here." Flip it, and the §2 keys become inert strings; flip it by policy, per Class Eight, and nobody re-enables them quietly.

§5

The resume line, made true

"AI experience" appears in job postings the way "cloud experience" appeared in 2015 — demanded everywhere, defined nowhere, and filtered for by people who cannot themselves define it. That vagueness is an opportunity, because it means you get to supply the definition in the interview, and the definition you can now supply is concrete: "I deploy and operate AI infrastructure on Azure" — a resource in the right region for the model, deployments pinned to versions with a tested repointing path, TPM budgeted like the finite pool it is, key auth disabled in favour of managed identity, and the spend visible in cost analysis by tag. Every noun in that sentence is something you can screen-share; most candidates claiming AI experience can screen-share a chat window.

Be equally precise about the boundary, because naming it is what makes the rest credible — the Class Thirty-One move, reapplied. You do not train models, tune models, or evaluate model quality; when asked about prompt engineering, the honest answer is that you build the infrastructure under the people who do. Interviewers are drowning in candidates who blur that line upward. The one who draws it crisply — infrastructure, not models; the meter, not the math — reads as the only person in the stack of resumes who has actually run this in production.

Case File · Campux Retail

The chatbot leadership wanted, deployed like infrastructure

a product-question bot, done properly the first time

It arrives, as these things do, as a sentence in a leadership meeting: customers ask the same forty questions about hiking boots, and an AI chatbot on the product pages should answer them. The demo that follows is a weekend of enthusiasm — a prototype calling a model with an API key pasted into the code, which Class Thirty-One's push protection bounces at the first commit. Correctly. So the engineer does it as infrastructure instead: an Azure OpenAI resource in East US 2 — chosen because the model version they want lives there — tagged cost-center: ecommerce per Class Thirty-Two, with diagnostic settings flowing to the Class Twenty-Eight workspace from day one.

Inside it, a deployment named product-chat, pinned to a specific model version, with 30K TPM — a number chosen by arithmetic, not vibes: the average question-and-answer runs about 700 tokens, so 30K TPM sustains roughly forty exchanges a minute, triple the storefront's observed peak of concurrent shoppers who actually open the chat. The backend's managed identity holds Cognitive Services OpenAI User on the resource; local auth is disabled, so the two keys the resource was born with cannot be used by anyone, including the weekend prototype. Deployed via the Class Twenty-Three pipeline, from Bicep, reviewed like anything else. Total time from meeting to production: six days — and when the CEO asks whether Campux "does AI now," the engineer's answer is the §5 sentence, every noun of it screen-shareable. What happens when the bot gets popular and the bill gets interesting is Class Thirty-Five's problem, and it knows it is coming.

Watch · Microsoft Learn

The official pages, and a CAMPUX overview

The overview before the lab; the quota page before Situation 02
Microsoft Learn · Docs

What is Microsoft Foundry?
learn.microsoft.com/azure/foundry/what-is-foundry

Azure OpenAI quotas and limits
learn.microsoft.com/azure/foundry/openai/quotas-limits

CAMPUX overview video

Creating the resource, deploying a model and watching it answer at a named deployment, and the local-auth switch turning both keys into inert strings will live here. Video to be added.

Lab · Deploy a model

Resource, deployment, one identity-authenticated call

~20 minutes · portal + Cloud Shell · costs cents if you delete promptly

Create the resource, deploy a small model into it, call it once with an Entra token instead of a key, and read what the response tells you about the meter.

  1. Create the resource (names are global — adjust yours):

    az group create --name rg-ai-lab --location eastus2
    az cognitiveservices account create \
      --name campux-aoai-<initials> --resource-group rg-ai-lab \
      --kind OpenAI --sku S0 --location eastus2
    What to notice: the kind is OpenAI but the resource type is Cognitive Services — an ordinary Azure resource, which is the §2 point. It supports tags, locks, policy, diagnostic settings, and RBAC like everything else you have built.
  2. Deploy a small model into it:

    az cognitiveservices account deployment create \
      --name campux-aoai-<initials> --resource-group rg-ai-lab \
      --deployment-name lab-chat \
      --model-name gpt-4o-mini --model-version "2024-07-18" \
      --model-format OpenAI --sku-name Standard --sku-capacity 10
    What to notice: four decisions in one command — the name applications will call (lab-chat), the model, the pinned version, and the capacity (10 here means 10K TPM). The deployment, not the resource, is where the model starts existing for you.
  3. Grant yourself the data-plane role, then call the deployment with an Entra token — no key anywhere:

    az role assignment create \
      --assignee $(az ad signed-in-user show --query id -o tsv) \
      --role "Cognitive Services OpenAI User" \
      --scope $(az cognitiveservices account show \
          --name campux-aoai-<initials> -g rg-ai-lab --query id -o tsv)
    # wait ~60s for the role to propagate
    curl "https://campux-aoai-<initials>.openai.azure.com/openai/deployments/lab-chat/chat/completions?api-version=2024-10-21" \
      -H "Authorization: Bearer $(az account get-access-token \
          --resource https://cognitiveservices.azure.com --query accessToken -o tsv)" \
      -H "Content-Type: application/json" \
      -d '{"messages":[{"role":"user","content":"One sentence: what is a VNet?"}]}'
    What to notice: the URL path names lab-chat, your deployment — not the model. The auth header carries an Entra token attributable to you, the Class 9 ladder's top rung. And this is Class 16 unchanged: a REST endpoint, a bearer token, a JSON body.
  4. Read the response's usage block, then delete the group:

    # in the JSON: "usage": { "prompt_tokens": …,
    #   "completion_tokens": …, "total_tokens": … }
    az group delete --name rg-ai-lab --yes --no-wait
    The lesson: every response ends with its own meter reading — both directions counted, exactly as §3 said. That usage block is what Class 35 will aggregate into dashboards and bills; you have now seen the atom the AI invoice is made of.
Note · model names, versions, and the API version string in these commands age faster than anything else in this bootcamp — if a command rejects the model or version, list what your region offers with az cognitiveservices account list-models and substitute. Some subscriptions still require enabling Azure OpenAI access first; the portal will say so plainly if yours does.
On the job

Boring, in the best way

You · Cloud Engineer · ship the AI workload for real

The prototype works in a notebook; now it has to be a real service. You deploy the model behind a proper endpoint, give it a managed identity instead of a pasted key, and put it through the same pipeline as everything else. The AI stops being a demo and becomes infrastructure — governed, deployed, and boring in the best possible way.

Class Thirty-Four

Examination

Four drills, then two situations. The situations have no marking scheme — write your answer before you reveal the reasoning, or the exercise is worthless. Nothing is stored; this is between you and the page.

Drill 01Recall · anatomy
Campux's application sends its chat requests to something. In the request path, what does the application actually name?
Marked

B — the application knows a name, and the name is the point. The URL path says /deployments/product-chat/, and what answers to that name is an infrastructure decision Campux can change without the application noticing — Class 13's frontend and Class 19's branch pointer, reapplied. Now run the tape with A instead: the application hard-codes a model version, the version retires on Microsoft's schedule a year later, and the migration is a code change, a review, and a redeploy of every consuming app — during whatever week the retirement lands. With B it is a new deployment, a test, and a repoint, owned entirely by you. C and D invent routing that does not exist. The indirection is not a convenience; it is who owns the model lifecycle — you, or the retirement calendar.

Drill 02Recall · quota
A standard deployment is assigned 30K TPM but receives no traffic for a month. What does that idle capacity cost?
Marked

C — and the distinction it protects is standard versus provisioned. A standard deployment bills per token consumed: no tokens, no charge, so the dollar cost of idleness is roughly zero and A describes the provisioned tier, where you buy dedicated throughput by the hour and Class 32's use-it-or-lose-it warning applies in full. But D is the trap on the other side: TPM is granted per model, per region, per subscription — a finite pool — and quota parked on a forgotten dev deployment is quota production cannot be assigned when November needs it. The cost of the idle deployment is paid in a currency this class introduced: capacity. Sweep unused deployments the way Class 32 sweeps unattached disks; same instinct, new species.

Drill 03Select three
Leadership asks what you, the cloud engineer, actually own in the company's new AI workload. Which three belong on your list?
Marked

The door, the name, and the meter. Identity and auth posture, deployment versioning, and capacity-plus-cost — every one an application of a class you have already passed, aimed at a new resource type. The two rejects mark the boundary from opposite sides, and both matter in the room. Answer quality is the model's affair and the product team's evaluation problem — claim it and you own every hallucination about hiking boots at the next incident review. Serving uptime is Microsoft's side of the Class One line; claim it and you have promised an SLA you cannot influence. The §5 interview move is exactly this drill: list the three you own with confidence because you can name the two you refuse.

Drill 04Spot the error
This pull request description is about to be approved. One line is a serious mistake. Which?
# PR: product-chat frontend, v2
1.  Deployment "product-chat" pinned to a specific
    model version; 30K TPM.
2.  Frontend calls the Azure OpenAI endpoint directly
    from the browser using VITE_AOAI_KEY, baked in at
    build time — saves a hop through our backend.
3.  Backend /api/chat route retained for logged-in
    users; authenticates via managed identity.
4.  On 429 responses, the UI shows "high demand,
    retry shortly" with exponential backoff.
Marked

Line two — a frontend environment variable is not configuration, it is publication. Anything baked into a browser bundle ships to every visitor; "View source" and one minute of curiosity extract the key, and §4 told you what the finder does with it: runs their own workload on Campux's invoice, at token prices, invisibly — no defaced page, no alert, just a Class 32 budget notification weeks later wondering why the chat line tripled. The "saved hop" defense makes it worse: that hop through the backend is the security boundary — the place where the caller is authenticated, the request is shaped, and the managed identity (line three, which is correct) does the only talking to Azure.

The distractors are the plan working: pinning versions is §3's discipline, not a flaw (A — "automatic improvements" is how behaviour changes under you unreviewed); line three is the §4 pattern verbatim (C); and treating 429 as backoff-able throttling rather than an outage is exactly right (D — it means the TPM ceiling did its job). The reviewer's instinct to build: any credential in frontend code has already leaked; the build step just set the schedule.

Situation 01Write before you reveal
The product manager, keen to ship the chatbot this sprint, asks: "Why do we need all this Azure setup? Can't the frontend just call OpenAI directly from the browser — it's one fetch call." How do you answer?
The PM is right that it works. List what the company loses the day it ships that way — and offer them a faster path than they expect.
Reasoning

Concede the demo before you argue the production. The PM is correct: one fetch call works, today, in the demo. The disagreement is not about whether it works; it is about what the company signs up for the day real customers use it. So skip the security lecture and price the losses concretely. First, the credential: a browser call needs a key in the browser, and a key in the browser belongs to everyone — Drill 04's arithmetic, someone else's workload on our invoice at token prices. Second, control: with no backend in the path there is nowhere to authenticate the caller, cap a single user's usage, or shape what gets sent — the bot will answer questions about competitors' boots, homework, and anything else the internet brings, on our meter, under our logo. Third, accountability: no logging, no attribution, no answer to "what did it cost and who spent it" — Classes 28 and 32, both blind.

Then reframe who bears the risk. The failure modes of a browser-direct integration do not land on engineering first — they land on the PM: the surprise invoice is a product-budget conversation, the screenshot of the bot saying something unfortunate is a product incident, and the retrofit under pressure is the sprint that eats a quarter. "All this Azure setup" is not engineering gold-plating; it is the difference between an incident the PM explains and an incident that never files. The setup is also where the product features they will ask for next quarter — per-user limits, usage analytics, response shaping — actually live. There is nowhere to put them in a fetch call.

Close with the schedule, because that was the real question. The PM asked about architecture but meant the deadline — so answer the deadline: the resource, the deployment, and a thin backend route are days, not months; Campux's own case file ran meeting-to-production in six. Offer the split: demo browser-direct in the sprint review behind a feature flag if that helps the story, ship customers the backend path. The sentence that ends the meeting: the fetch call is the demo; the infrastructure is the product.

Situation 02Write before you reveal
An interviewer reads your resume and says: "It says AI experience here. Everyone's says that now. What did you actually do?" You have ninety seconds. What do you say?
Ninety seconds is about six sentences. The interviewer is testing for one thing: does the claim survive a follow-up question?
Reasoning

The question is a trap for the vague, which makes it a gift for the specific. The interviewer has heard "I used ChatGPT to be more productive" forty times this month and is waiting to hear it a forty-first; the bar you must clear is not impressiveness but falsifiability — an answer concrete enough that a follow-up question has somewhere to land. So answer in nouns you have deployed: an Azure OpenAI resource, placed in its region for model availability and compliance; deployments pinned to model versions, with a tested repointing path for retirements; TPM assigned by arithmetic from observed traffic; key auth disabled, managed identity and a data-plane role in its place; diagnostics and cost attribution wired in from day one. Six sentences, each one an invitation to dig — which is precisely what makes them believable.

Then draw the boundary unprompted, because it is the strongest sentence available to you. "I don't train or tune models, and I don't evaluate answer quality — I build and run the infrastructure underneath the people who do." Every other candidate inflates toward the model; the interviewer knows it, and the candidate who deflates — precisely, voluntarily — is displaying the exact judgment the job needs. This is Class 31's residual-risk move and Class 23's auditor voice wearing a new topic: in any technical conversation, the credibility of what you claim is set by the precision of what you decline to claim.

Spend the last fifteen seconds on consequence, not inventory. One outcome sentence — "when the model version retired, the swap was a deployment repoint and a test run, zero application changes" or "the leaked-key class of incident can't happen; there are no keys to leak" — converts the noun list into evidence of operation. Anyone can create a resource once. The interviewer is hiring for the person who ran it through a retirement, a throttling event, and a bill. End there; do not fill the remaining silence. The silence is the follow-up question arriving, and you want it.

Examination record · first attempt
0/4
Class Thirty-Four · Complete
Retain this much

Five things worth carrying out of this class

  1. You own the infrastructure, not the model: identity, network, versioning, capacity, cost, and telemetry. The model arrives finished, like the database engine did — and the boundary, stated plainly, is what makes the rest of your claim credible.
  2. The resource is not the model: the resource is the governance container — region, tags, RBAC, diagnostics, invoice — and nothing answers until a deployment exists inside it.
  3. A deployment is a name you own mapped to a version Microsoft retires: applications call the name, you repoint the mapping. The indirection is the model lifecycle staying in your hands.
  4. TPM is a ceiling from a finite regional pool — standard deployments bill per token and idle costs almost nothing; provisioned throughput is the use-it-or-lose-it tier. 429 means the ceiling worked; back off and retry.
  5. Keys are anonymous, leak-prone, and optional: the ladder's top rung is managed identity plus the data-plane role, with local auth disabled by policy so the keys are not merely unused but unusable.
Notes
  1. The branding around this resource moves faster than the resource does: "Azure OpenAI Service" became "Azure OpenAI in Azure AI Foundry," which by 2026 sits under the "Microsoft Foundry" banner, the portal experience has been renamed at least twice, and non-OpenAI models (Meta, Mistral, DeepSeek and others) are available through the same Foundry umbrella. Expect the names in the portal to have shifted again by the time you read this; the anatomy — resource, endpoint, deployment, quota — is the durable part, and it is the part interviews test.
  2. Default TPM quotas vary by model, region, subscription type, and Microsoft's capacity that quarter, so this class deliberately quotes none of them. Check the quotas-and-limits page for today's numbers, and know that quota increases are a support request with real turnaround time — which makes quota planning a deployment-day task, not a launch-day discovery.
  3. The role names are easy to transpose in an interview: Cognitive Services OpenAI User grants data-plane access to call deployed models; Cognitive Services OpenAI Contributor adds management of deployments and fine-tuning. Apps get User. The Class 31 lesson transfers whole: the caller of a thing and the manager of a thing are different roles, and the app is always the narrower one.