Module 1: Getting Started - Repository & Azure Setup
Clone the repository, understand the structure, and prepare your Azure environment for deployment
Module 1: Getting Started - Repository & Azure Setup
Duration: 30 minutes
Objective: Get the code, understand what you're deploying, and configure Azure credentials for deployment.
๐ About Your Progress Tracking
As you work through this training, your completion status is tracked automatically:
โ How it works:
- Checkboxes and progress are saved in your browserโs local storage
- No login or account required
- Your progress persists across browser sessions (as long as you use the same browser)
โ ๏ธ Important Note:
- If you clear your browser cache/cookies, your progress will be reset
- Progress is browser-specific (if you switch browsers, youโll start fresh)
- For persistent tracking, consider bookmarking your progress or taking notes
๐ก Pro Tip: If youโre working across multiple devices, keep a simple checklist in a text file or notebook!
๐ค Meet CORA: Your AI Training Partner
CORA stands for Customer-Oriented Response Agent, but more importantly, sheโs the name we gave our AI training application! ๐ค
Why โCORAโ?
- Easy to remember (better than โVoice Agent Simulator v2.3โ)
- Friendly and approachable
- Represents a person (which is what she simulates!)
- This is NOT an industry-standard acronym - itโs the unique name for this specific application
What does CORA do?
CORA is an AI-powered customer simulator that:
- Role-plays as a customer seeking help
- Tests customer service agents in training
- Adapts personality based on scenarios (happy, frustrated, confused, etc.)
- Evaluates performance with AI-powered scoring
- Provides analytics to track improvement over time
Think of CORA as: A digital customer who never gets tired of being asked the same questions, always gives constructive feedback, and never leaves a bad Yelp review. The perfect training partner! ๐
Business Value:
- Train customer service teams safely without real customers
- Scale training without hiring actors
- Get consistent evaluation across all training sessions
- Track performance improvements with data
๐บ๏ธ What Youโll Learn in This Training
This training is organized into modules that walk you through deploying, testing, and understanding CORA:
- Module 1 (this module): Set up your development environment and Azure resources
- Module 2: Deploy CORA to Azure using Infrastructure as Code
- Module 3: Test CORA locally and understand the application architecture
- Module 4: Explore Azure services that power CORA
- Module 5: Monitor and troubleshoot your deployment
- Module 6: Customize and extend CORA for your needs
By the end, youโll have a fully functional AI training application running in Azure, and youโll understand how all the pieces work together!
๐ฏ Learning Objectives
By the end of this module, you will:
- Clone the training repository from GitHub
- Understand the repository structure (src/, infra/, docs/)
- Identify the key files needed for deployment
- Log in to Azure CLI and verify subscription access
- Locate your Azure AI Foundry project endpoint
- Prepare environment configuration for deployment
๐ฅ Step 1: Get the Repository Code
You have three options to get the code on your local machine:
Option A: Using Git Command Line (Recommended)
Open a terminal (PowerShell, Command Prompt, or Terminal) and run:
git clone https://github.com/jbaart37/Cora-Voice-Agent-Training.git
cd Cora-Voice-Agent-Training
Why Git? You can easily pull updates if we make changes to the training materials!
Option B: Using Visual Studio Code
- Open VS Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type โGit: Cloneโ and press Enter
- Paste the repository URL:
https://github.com/jbaart37/Cora-Voice-Agent-Training.git - Choose a local folder to clone into
- Click โOpenโ when prompted
๐ธ Screenshot placeholder: VS Code Git Clone dialog
Option C: Download as ZIP (No Git Required)
If you donโt have Git installed or prefer not to use it:
- Go to https://github.com/jbaart37/Cora-Voice-Agent-Training
- Click the green Code button
- Click Download ZIP
- Extract the ZIP file to a folder on your computer
- Open the extracted folder in VS Code or your preferred editor
Note: If you download as ZIP, you wonโt be able to use Git commands, but all the code will work fine!
Click to enlarge
๐ Step 2: Understanding the Repository Structure
Once cloned, youโll see this structure:
Once cloned, youโll see this structure:
Cora-Voice-Agent-Training/
โโโ src/ # ๐ Application source code
โ โโโ app.py # Flask web application
โ โโโ agent.py # Azure OpenAI agent logic
โ โโโ storage_service.py # Azure Table Storage
โ โโโ config.py # Configuration management
โ โโโ requirements.txt # Python dependencies
โ โโโ Dockerfile # Container image definition
โ โโโ static/ # CSS, JS, images
โ โโโ templates/ # HTML pages
โ
โโโ infra/ # โ๏ธ Infrastructure as Code (Bicep)
โ โโโ main.bicep # Main deployment template
โ โโโ main.parameters.json # Default parameters
โ โโโ core/ # Modular components
โ โโโ host/ # Container Apps, Registry
โ โโโ monitor/ # Logging, Application Insights
โ
โโโ docs/ # ๐ This training website
โ โโโ modules/ # Training modules you're reading now
โ
โโโ azure.yaml # ๐ Azure Developer CLI config
โโโ README.md # Repository overview
โโโ DEPLOYMENT_FILES_README.md # Deployment guide
Key Files to Know
| File | Purpose | Youโll Need This For |
|---|---|---|
azure.yaml |
Tells Azure Developer CLI how to deploy | Module 2 deployment |
infra/main.bicep |
Defines all Azure resources to create | Understanding what gets deployed |
src/config.py |
Application configuration | Understanding environment variables |
src/README.md |
Developer documentation | Reference during troubleshooting |
infra/README.md |
Infrastructure documentation | Deployment options & cost info |
๐ธ Screenshot placeholder: VS Code Explorer showing repository structure
๐ Step 3: Azure CLI Setup
Before deploying, you need to authenticate with Azure.
Install Azure CLI (if not already installed)
Windows:
winget install -e --id Microsoft.AzureCLI
Mac:
brew install azure-cli
Linux:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Log In to Azure
az login
This will:
- Open your browser
- Prompt you to sign in with your Azure account
- Return to the terminal when complete
Click to enlarge
Verify Your Subscription
# List all subscriptions you have access to
az account list --output table
# Set the subscription you want to use (if you have multiple)
az account set --subscription "Your Subscription Name"
# Verify it's set correctly
az account show --output table
Important: Make note of your Subscription ID - youโll need it later!
๏ฟฝ Step 4: Create Your .env File (Recommended!)
Do this now so you can fill it in as you go through the next steps!
Why Resource Groups Matter
Think of a resource group as a folder for your Azure resources. Everything for this project should go in the same resource group:
โ Benefits of keeping everything together:
- ๐งน Easy cleanup: Delete the resource group = delete everything (no orphaned resources!)
- ๐ฐ Cost tracking: See total cost for the entire project in one place
- ๐ Security management: Grant access to the whole project with one permission assignment
- ๐ Organization: All related resources grouped logically
Resource Group Naming
Recommended naming convention:
rg-cora-{environment}
Examples:
rg-cora-dev (for development)
rg-cora-test (for testing)
rg-cora-prod (for production)
Good news: When you run azd up in Module 2, it will automatically create the resource group for you! But itโs important to understand why we use this pattern.
Resources That Will Live Together
In Module 2, these will all be created in one resource group:
- Container Apps Environment
- Container App (your web application)
- Container Registry (stores Docker images)
- Storage Account (conversation scores)
- Log Analytics Workspace (logs)
- Application Insights (monitoring)
๐ก Pro Tip: Some organizations have policies requiring separate resource groups for different resource types (compute vs storage vs networking). If your organization has such policies, discuss with your cloud governance team before deploying!
๐ Step 4: Create Your .env File
Do this now so you can fill it in as you go through the next steps!
Why create this file now?
- ๐ Document as you go - Fill in values while fresh in your mind
- ๐ Easy redeployment - One file with everything you need
- ๐ฅ Team reference - Share the template (without secrets!)
- ๐งช Local testing - Run the app locally later
Quick start: Copy the example file and edit it:
# Copy the example file to .env
copy .env.example .env
# Or on Mac/Linux:
cp .env.example .env
Then open .env and fill in your actual values. Hereโs what the file contains:
# =================================================================
# CORA Voice Agent - Configuration Template
# =================================================================
# Fill in YOUR values as you complete the steps below
# This file is for local development and as reference
# =================================================================
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Step 3: Azure Account Information
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Your Azure subscription ID (from Step 3: az account show)
AZURE_SUBSCRIPTION_ID=
# Your preferred Azure region (we recommend eastus)
AZURE_LOCATION=eastus
# Your environment name - used by azd for tracking
# Keep it simple: dev, test, prod (or cora-dev, cora-test, etc.)
# This is NOT the resource group name, but they should align!
AZURE_ENV_NAME=dev
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Step 5: Resource Group Planning
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Your resource group name (will be created in Module 2)
# Should align with your environment name above
# Pattern: rg-cora-{AZURE_ENV_NAME}
# Example: if AZURE_ENV_NAME=dev, then use rg-cora-dev
RESOURCE_GROUP=rg-cora-dev
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Step 6: Azure AI Foundry Configuration
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Paste your Foundry endpoint URL here (from Step 6)
AZURE_AI_FOUNDRY_ENDPOINT=
# Your GPT model deployment name (from Step 6)
AZURE_AI_MODEL_NAME=gpt-4o
# Optional: API Key (only needed for local development)
# If deploying to Azure, Managed Identity is used automatically
# AZURE_AI_FOUNDRY_API_KEY=
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Auto-populated by azd (leave empty for now)
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# APPLICATIONINSIGHTS_CONNECTION_STRING=
๐ How to Use This Template:
- Create the file now - Copy the template above into
.env - Fill in Step 3 values - Add your subscription ID from
az account show - Skip to Step 6 - Leave AI Foundry fields empty for now
- Come back and fill them - After creating your Foundry project in Step 6
โ ๏ธ Security Notes:
- โ
.envis in.gitignore(wonโt be committed to Git) - โ Never share API keys in screenshots
- ๐ Azure deployment uses Managed Identity (no API keys!)
- ๐ก For team sharing, remove any API key values before sharing
๐ฆ Step 5: Plan Your Resource Group
Critical Planning Step: Before creating any Azure resources, letโs plan where everything will live.
Why Resource Groups Matter
Think of a resource group as a folder for your Azure resources. Everything for this project should go in the same resource group:
โ Benefits of keeping everything together:
- ๐งน Easy cleanup: Delete the resource group = delete everything (no orphaned resources!)
- ๐ฐ Cost tracking: See total cost for the entire project in one place
- ๐ Security management: Grant access to the whole project with one permission assignment
- ๐ Organization: All related resources grouped logically
Resource Group Naming
Recommended naming convention:
rg-cora-{environment}
Examples:
AZURE_ENV_NAME=dev โ RESOURCE_GROUP=rg-cora-dev
AZURE_ENV_NAME=test โ RESOURCE_GROUP=rg-cora-test
AZURE_ENV_NAME=prod โ RESOURCE_GROUP=rg-cora-prod
๐ก Keep them aligned: Your AZURE_ENV_NAME and RESOURCE_GROUP should match conceptually:
- Environment name (
AZURE_ENV_NAME): Simple name for azd tracking (e.g.,dev,test) - Resource group (
RESOURCE_GROUP): Azure resource container following naming conventions (e.g.,rg-cora-dev)
Recommended pattern: Use dev for env name and rg-cora-dev for resource group.
๐ก Fill this in: Go back to your .env file and make sure both values align:
AZURE_ENV_NAME=dev
RESOURCE_GROUP=rg-cora-dev
Good news: When you run azd up in Module 2, it will automatically create the resource group for you! But itโs important to understand why we use this pattern.
Resources That Will Live Together
In Module 2, these will all be created in one resource group:
- Container Apps Environment
- Container App (your web application)
- Container Registry (stores Docker images)
- Storage Account (conversation scores)
- Log Analytics Workspace (logs)
- Application Insights (monitoring)
๐ก Pro Tip: Some organizations have policies requiring separate resource groups for different resource types (compute vs storage vs networking). If your organization has such policies, discuss with your cloud governance team before deploying!
๐ค Step 6: Azure AI Foundry Project Setup
You need an Azure AI Foundry project with a deployed GPT model.
Important: When creating your AI Foundry project, use the same resource group you planned in Step 5, or be ready to specify an existing one.
Option A: You Already Have a Project
If your organization provided a project, you need to get:
- Project Endpoint
- Format:
https://your-project.cognitiveservices.azure.com/ - Found in: Azure Portal โ Your AI Foundry Project โ Overview โ Endpoint
- Format:
- Model Deployment Name
- The name you gave your GPT deployment (e.g.,
gpt-4o,gpt-4o-mini) - Found in: AI Foundry Studio โ Deployments
- The name you gave your GPT deployment (e.g.,
Click to enlarge
Click to enlarge
Option B: Create a New Project
If you need to create your own AI Foundry project:
Portal Experience Note ๐
Azure AI Foundry has two portal experiences:
- New Experience (default): Modern UI with updated navigation
- Legacy Experience: Classic UI with familiar layout
For this training: Our screenshots use the legacy experience for consistency. You can toggle between experiences using the switcher at the top of the portal.
๐ก Pro Tip: Both experiences work identically - itโs just different layouts for the same functionality!
Step-by-Step Setup
- Navigate to Azure AI Foundry
- Go to Azure AI Foundry Studio
- Log in with your Azure credentials
- Create a New Project
- Click + New project (or + Create new project in new experience)
- Youโll see the project creation form
-
Fill in Project Details:
Field What to Enter Why This Matters Project name cora-voice-agentIdentifies your project in the portal Subscription Select your Azure subscription Where costs will be billed Resource group Select or create rg-cora-devCRITICAL: Use the same resource group for everything! Location East USorEast US 2Must support both AI and Container Apps AI Services Create new or use existing Creates the underlying OpenAI resource ๐ Location tip: Stick with East US/East US 2 for best service availability!
- Configure Application Insights
- When prompted about Application Insights, select โEnableโ
- This sets up telemetry collection for monitoring
- Why? In Module 6, weโll use this for advanced observability and tracing
- Default settings are fine for now
- Click Create
- Azure provisions your AI Foundry project (~2-3 minutes)
- Wait for โDeployment succeededโ notification
-
Copy Your Endpoint ๐
Critical step - add this to your .env file!
After project creation:
- Go to project Overview page
- Find the Endpoint field (format:
https://your-project.openai.azure.com/) - Copy this URL and paste it into your
.envfile asAZURE_AI_FOUNDRY_ENDPOINT
Click to enlarge
-
Deploy a GPT Model
- Navigate to Deployments (left sidebar)
- Click + Create deployment or + Deploy model
-
Configure deployment:
Setting Value Notes Model gpt-4oorgpt-4o-minigpt-4o-mini is cheaper for testing Deployment name gpt-4oKeep it simple - use model name Model version Latest Auto-updates to newest version Deployment type Standard Default option - Click Deploy
- Wait for deployment to complete (~1-2 minutes)
- Add the deployment name to your .env file as
AZURE_AI_MODEL_NAME
Click to enlarge
About API Keys ๐
Youโll notice Azure AI Foundry provides API keys after deployment. You wonโt need them for this training!
Why?
- Weโre using Managed Identity for authentication (more secure)
- No keys to rotate, manage, or accidentally commit to Git
- Azure handles authentication automatically between services
When you would use API keys:
- Accessing the model from outside Azure (e.g., local development)
- Quick testing with REST API clients
- Legacy applications not using managed identity
โ ๏ธ Security Best Practice: If you ever need to use API keys, always store them in Azure Key Vault, never in code or configuration files. Azure Key Vault provides secure storage, access control, and audit logging for secrets.
For CORA: Managed Identity handles everything automatically in Module 2! ๐
Cost Note: GPT-4o charges per token. Budget approximately:
- Development/Testing: ~$5-20/month
- Production: Varies by usage
Token Cost Reference:
- gpt-4o: ~$5 per 1M input tokens, ~$15 per 1M output tokens
- gpt-4o-mini: ~$0.15 per 1M input tokens, ~$0.60 per 1M output tokens
๐ก Cost Tip: Start with gpt-4o-mini for training - itโs 97% cheaper!
โ Step 7: Verify Youโre Ready
Before moving to Module 2 (deployment), confirm you have:
- โ Repository code on your local machine (Git clone or ZIP download)
- โ
Azure CLI installed and logged in (
az loginsuccessful) - โ
Subscription ID identified and added to
.env - โ
Resource group naming pattern decided (e.g.,
rg-cora-dev) - โ
.envfile created with Steps 3 and 5 completed - โ Azure AI Foundry project created with GPT model deployed
- โ
AI Foundry endpoint URL added to
.envfile - โ
Model deployment name added to
.envfile
๐ฎ Whatโs Next: Validation Across Modules
Donโt worry if youโre not 100% sure everything is correct! Weโll validate and explore your setup in detail throughout the training:
๐ฆ Module 2: Infrastructure Validation
- Verify all Azure resources deployed correctly
- Check Container Apps, Storage, Registry, Log Analytics
- Confirm resource group organization
- Test endpoint URLs
๐ Module 3: Application Validation
- Test the deployed web application
- Verify conversation functionality
- Confirm voice features work
- Check analytics dashboard
๐ง Module 4: AI Foundry & Model Validation
- Deep dive into your Foundry project
- Test model responses in Playground
- Verify conversation scoring
- Explore OpenTelemetry traces
- Confirm cost and performance metrics
๐ก Bottom Line: If something isnโt quite right in Module 1, weโll catch it and fix it in the upcoming modules. Each module builds on and validates the previous work!
๐๏ธ What Youโll Deploy in Module 2
Now that youโre set up, hereโs what will be created when you deploy:
Azure Resources
| Resource | Purpose | Estimated Cost | Why This? |
|---|---|---|---|
| Container Apps Environment | Hosting platform for your web app | ~$10/month | ๐ฏ Scales to $0 when idle! |
| Container App | Runs your voice agent application | Included | ๐ช WebSocket-ready |
| Container Registry | Stores your Docker images | ~$5/month | ๐ฆ Private & secure |
| Storage Account | Stores conversation scores | <$1/month | ๐ฐ Cheapest option |
| Log Analytics Workspace | Collects logs and metrics | ~$3/month | ๐ First 5GB free |
| Application Insights | Monitoring and telemetry | Free | ๐ Because blind deployments are scary |
Total Estimated Cost: ~$18-25/month for development environment
๐ก Pro Tip: The Container App can scale to zero when idle = Netflix money saved! ๐ฌ
๐ญ Architectural Story Time: Why These Choices?
Or: โHow to sound smart in architecture review meetingsโ
Letโs talk about why we made specific technology choices. Spoiler alert: Itโs not just because theyโre shiny and new. ๐
๐ฅ The Great Platform Battle: Container Apps vs The World
The Contenders:
- ๐ Azure Container Apps (Our Champion!)
- ๐ฆธ Azure App Service (The Reliable Veteran)
- โก Azure Functions (The Speed Demon)
- ๐ข Azure Kubernetes Service (The โI Have a Team of DevOps Engineersโ)
- ๐จ Low-code (The โMy Boss Saw This Demoโ)
The Ultimate Showdown:
| Feature | Container Apps | App Service | Functions | AKS | Low-Code |
|---|---|---|---|---|---|
| WebSocket Support | โ Perfect | โ Works | โ โThatโs not my jobโ | โ Yes | โ Nope |
| Scale to Zero | โ $0 when idle! | โ Always hungry | โ Yes | โ Always running | โ Varies |
| Setup Complexity | โ Easy | โ Easy | โ Easy | โ PhD required | โ Point & click |
| Control Level | โ Full control | โ Full control | โ ๏ธ Stateless life | โ EVERYTHING | โ โYou canโt do thatโ |
| Monthly Cost (idle) | $0 ๐ | ~$50 ๐ธ | $0 | ~$200 ๐ | ~$5-20 |
Why Container Apps Wins This Round:
๐ฏ Reason #1: WebSockets Are Not Negotiable
Customer: "I want to talk to the AI in real-time!"
Functions: "Best I can do is check back every 5 seconds."
Container Apps: "Let's have a conversation!"
๐ฐ Reason #2: The CFO Will Love You
Traditional App Service:
Monday-Friday: Running ($$$)
Weekend: Still running ($$$ for nothing!)
Your vacation: Still running ($$$ while you're at the beach!)
Container Apps:
In use: Running ($$$)
Idle: Asleep ($0 - literally zero!)
Your boss: ๐
๐ Reason #3: Production Path Is Smooth
- Same platform from dev โ test โ prod
- No โworks on my machineโ surprises
- No re-architecture needed when traffic grows
- Your future self will thank you ๐
When to Pick the Alternatives:
๐ฆธ App Service - When:
- Your team already manages 50 App Services
- โIf it ainโt brokeโฆโ is your company motto
- You like paying for compute youโre not using (we donโt judge)
โก Functions - When:
- Youโre building a โprocess this fileโ app
- Stateless is your love language
- You enjoy debugging cold starts
๐ข AKS - When:
- You have a Kubernetes expert on speed dial
- Your architecture diagram looks like a city map
- You enjoy YAML files (lots of them)
๐จ Low-Code - When:
- Your app is basically a fancy form
- โCan you make this button blue?โ is your biggest challenge
- Real-time features are not on the menu
๐๏ธ Infrastructure as Code: Because Clicking is for Chumps
The Eternal Debate:
- ๐ Click through Azure Portal (The Manual Labor Approach)
- ๐ Write Bicep templates (The Smart Personโs Move)
Letโs Do Some Math:
Scenario: Deploy to 3 environments (Dev, Test, Prod)
Manual Clicking Method:
โฑ๏ธ First environment: 45 minutes of clicking
โฑ๏ธ Second environment: 45 minutes (click... click... click...)
โฑ๏ธ Third environment: 45 minutes (are we done yet?)
โฑ๏ธ Fix a typo in all three: 1 hour (oops, which button was it?)
โฑ๏ธ Disaster recovery: Half a day (what did we click again?)
๐ฏ Total: 3.5 hours + anxiety
๐ Risk of RSI: High
Bicep IaC Method:
โฑ๏ธ Write template once: 30 minutes
โฑ๏ธ Deploy all three: 15 minutes (azd up ร 3)
โฑ๏ธ Fix typo everywhere: 2 minutes (change 1 line, redeploy)
โฑ๏ธ Disaster recovery: 5 minutes (azd up again)
๐ฏ Total: 52 minutes + confidence
๐ Risk of RSI: Low (more time for coffee)
But Wait, Thereโs More!
๐ Version Control:
Portal Clicking:
Boss: "What changed last Tuesday?"
You: "Uh... I think I clicked... something?"
Bicep with Git:
Boss: "What changed last Tuesday?"
You: "Here's the exact commit with explanation and code review."
Boss: *promotes you*
๐ Security & Compliance:
Portal Clicking:
Auditor: "Show me your infrastructure configuration."
You: *takes 50 screenshots*
Bicep Templates:
Auditor: "Show me your infrastructure configuration."
You: "Here's the repo. Everything's documented, versioned, and reviewed."
Auditor: *smiles* (they never smile!)
๐ฐ Cost Control:
Portal Clicking:
Finance: "Why did our Azure bill double?"
You: "Someone probably clicked Premium instead of Basic?"
Bicep Templates:
Finance: "Why did our Azure bill double?"
You: "Impossible. It's in the code. Line 42. Someone would need to commit a change."
(Spoiler: It was Kevin. It's always Kevin.)
๐ Azure Developer CLI: The โDeployโ Button We Always Wanted
The Old Way:
# Step 1: Create resource group
az group create --name rg-cora-dev --location eastus
# Step 2: Deploy infrastructure
az deployment group create --resource-group rg-cora-dev --template-file infra/main.bicep --parameters @parameters.json
# Step 3: Build container
az acr build --registry myregistry --image app:v1 src/
# Step 4: Update container app
az containerapp update --name myapp --resource-group rg-cora-dev --image myregistry.azurecr.io/app:v1
# Steps 5-15: More commands...
# Step 16: Realize you forgot something
# Step 17: Start over
# Step 18: Question career choices
The azd Way:
azd up
Thatโs it. Seriously. โจ
What Just Happened?
- โ Created resource groups
- โ Deployed all infrastructure
- โ Built Docker images
- โ Pushed to registry
- โ Deployed application
- โ Configured environment variables
- โ Secured secrets
- โ Gave you deployment URLs
- โ Made you look good in standup
For Your Team:
Junior Dev: "How do I deploy to test?"
You: "azd env select test && azd up"
Junior Dev: "That's it?"
You: "That's it."
Junior Dev: *mind blown* ๐คฏ
Senior Architect: "What about the database connection?"
You: "In the Bicep template. Auto-configured."
Architect: *nods approvingly*
Manager: "Can we replicate this for other projects?"
You: "Already did. Same pattern."
Manager: "Promotion time."
๐ Managed Identity: The โDelete All Your Secretsโ Strategy
The Debate:
- ๐ API Keys (The Traditional โPlease Donโt Leak Thisโ Method)
- ๐ญ Managed Identity (The โWe Live in the Futureโ Method)
Comparison Time:
API Key Approach:
Step 1: Generate API key
Step 2: Store in Key Vault
Step 3: Grant app access to Key Vault
Step 4: App reads key from Key Vault
Step 5: App uses key to call service
Step 6: Rotate key every 90 days
Step 7: Update Key Vault
Step 8: Restart apps
Step 9: Get paged at 2 AM because rotation broke prod
Step 10: Reconsider life choices
Managed Identity Approach:
Step 1: Enable managed identity (checkbox)
Step 2: Grant identity access to service (one command)
Step 3: Done!
Step 4-10: Go home on time
The Real Kicker:
๐ When Someone Says โThe Key Leakedโ:
API Key Scenario:
Security Team: "The key is in a GitHub commit from 3 months ago!"
You: *panic*
You: *revoke key*
You: *generate new key*
You: *update Key Vault*
You: *restart all services*
You: *update documentation*
You: *send postmortem*
You: *update resume*
Managed Identity Scenario:
Security Team: "The key is in... wait, there is no key."
You: *sips coffee peacefully* โ
๐ฐ The Math:
API Key Management (Annual):
Key Vault: $0.03 per 10K operations = ~$200/year
Staff Time: 4 hours/quarter rotating keys = ~$5,000/year
Incident Response: 1 leaked key/year = ~$10,000/year
Total: ~$15,200/year
Managed Identity:
Azure AD: FREE
Staff Time: 0 hours
Incident Response: Can't leak what doesn't exist
Total: $0/year
Savings: ~$15,200/year (that's a nice conference budget!)
๐ฏ Why This Architecture Scales (Without Breaking Your Budget)
The Secret Sauce: We designed this like a LEGO set, not a monolith.
The Old Way (Monolith):
Everything in one big app:
Problem: Need to scale AI processing?
Solution: Scale EVERYTHING (including the HTML)
Result: Paying for CPU to serve static images ๐คฆ
The Smart Way (This Solution):
โโโโโโโโโโโโโโโ
โ Frontend โ โ Scales independently (or move to CDN for pennies)
โโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโ
โ API Layer โ โ Scales 1-100 instances based on traffic
โโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโ
โ AI Layer โ โ Microsoft scales this (not your problem!)
โโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโ
โ Storage โ โ Infinite scale (seriously, try to break it)
โโโโโโโโโโโโโโโ
Real Talk Example:
Black Friday Traffic Spike:
Monolith:
9 AM: 10 users โ 1 server ($50/day)
10 AM: 100 users โ "Server melting..." โ Emergency scale โ 5 servers ($250/day)
11 AM: 1000 users โ "EVERYTHING IS ON FIRE" โ 20 servers ($1,000/day)
12 PM: Traffic drops โ Still running 20 servers โ Still paying $1,000/day
Next Day: Manually scale down โ Pray you got it right
Container Apps (This Solution):
9 AM: 10 users โ Scales up โ $5/day
10 AM: 100 users โ Scales up more โ $15/day
11 AM: 1000 users โ Auto-scales to 20 instances โ $50/day
12 PM: Traffic drops โ Auto-scales down โ $10/day
Next Day: Already at right size โ $5/day
You: *sleeping peacefully*
๐จ Code vs Low-Code: The Honest Conversation
When Your Manager Says: โWhy canโt we just use [Low-Code Platform]?โ
Hereโs your diplomatic response (backed by facts):
Low-Code is GREAT for:
- โ โI need a form to collect vacation requestsโ
- โ โCan you connect Excel to SharePoint?โ
- โ โThe marketing team needs a simple dashboardโ
- โ โWe need this by Fridayโ (and itโs really simple)
Code is NECESSARY for:
- โ โI need real-time bidirectional communicationโ (this app!)
- โ โWe need custom AI logicโ
- โ โPerformance is criticalโ
- โ โWeโre expecting 10,000+ concurrent usersโ
- โ โWe need to integrate with 7 different APIs, 3 databases, and a carrier pigeonโ
The Real Comparison:
| Question | Low-Code Answer | Code Answer |
|---|---|---|
| โCan it do WebSockets?โ | โWhatโs a WebSocket?โ | โYes, and hereโs the code.โ |
| โCan it scale to 100K users?โ | โHave you triedโฆ fewer users?โ | โYes, and hereโs the load test.โ |
| โCan we customize the AI logic?โ | โYou get what you get.โ | โMake it however you want.โ |
| โWhat if we need to migrate?โ | โYouโre locked in, baby!โ | โExport and go.โ |
| โCan my nephew maintain this?โ | โMaybe!โ | โIf they know Python, yes.โ |
The Hybrid Approach (Best of Both Worlds):
Smart companies use BOTH:
Low-Code Frontend (Power Apps):
"Submit a training request"
โ calls API
Code Backend (This Solution):
Complex AI + Real-time chat + Analytics
โ stores data
Low-Code Dashboard (Power BI):
"Look at pretty charts"
Everyone wins! ๐
๐ Understanding Azure AI Foundry
Now that weโve had fun with architecture, letโs get serious for a momentโฆ
What is Azure AI Foundry?
Azure AI Foundry (formerly Azure AI Studio) is Microsoftโs unified platform for:
- Building and deploying AI applications
- Managing AI models and deployments
- Orchestrating agents and multi-agent workflows
- Evaluating AI performance
- Implementing responsible AI practices
How is it Different from Azure OpenAI?
| Azure OpenAI Service | Azure AI Foundry |
|---|---|
| Just the GPT API | Complete AI development platform |
| Single model calls | Agents, orchestration, evaluation |
| Basic deployment | Full lifecycle management |
| Limited tooling | Integrated development environment |
Think of it this way:
- Azure OpenAI = Just the GPT engine
- Azure AI Foundry = The full development studio + engine + tools
๐ฏ Real-World Use Cases
1. Customer Service Training
- New hire onboarding
- Skills refreshers for experienced agents
- Testing new scripts or procedures
- Performance benchmarking
2. Quality Assurance
- Evaluate agent performance objectively
- Identify training gaps
- Compare agent effectiveness
- Monitor improvement trends
3. Scenario Testing
- Test edge cases (angry customers, complex issues)
- Practice difficult conversations safely
- Experiment with different approaches
- Build confidence before real interactions
๐ฌ Demo: What Youโll Build
๐ธ Screenshot/GIF placeholder: Animated demo of the completed application
- Landing page with authentication
- Conversation interface with voice/text options
- Mood selector (happy, frustrated, curious, etc.)
- Live chat interaction
- Analytics dashboard with charts
Key Features:
- ๐ค Voice or Text Input (voice on desktop browsers only)
- ๐ฌ Real-time Conversation via WebSockets
- ๐ญ Mood-based Scenarios (6 different customer personalities)
- ๐ Performance Analytics (5-point scoring across 5 criteria)
- ๐ Azure AD Authentication (Easy Auth integration)
- ๐ Progress Tracking (historical scores with charts)
๐ Resources
Azure Documentation
Code References
- src/README.md - Application documentation
- infra/README.md - Infrastructure guide
- GitHub Repository
Learning Resources
โ Troubleshooting
โaz loginโ fails
Problem: Browser doesnโt open or authentication fails
Solutions:
- Try
az login --use-device-codefor manual code entry - Check if your organization requires VPN
- Verify you have an Azure account with active subscription
- Clear browser cache and try again
Canโt find Azure AI Foundry endpoint
Problem: Not sure where to get the endpoint URL
Solutions:
- Go to Azure Portal
- Search for your AI Foundry project name
- Click on the resource
- Look for โEndpointโ in the Overview or Keys and Endpoint section
- Should look like:
https://<project-name>.cognitiveservices.azure.com/
Repository clone fails
Problem: Git clone command doesnโt work
Solutions:
- Install Git: https://git-scm.com/downloads
- Check your internet connection
- Try downloading as ZIP from GitHub (Code โ Download ZIP)
๐ Knowledge Check
Before moving to Module 2, test your understanding:
- What are the three main folders in the repository?
Click to reveal answer
src/(application code)infra/(Azure infrastructure templates)docs/(training website)
</details>
- What information do you need from Azure AI Foundry?
Click to reveal answer
- Project endpoint URL
- Model deployment name (e.g., gpt-4o-deployment)
</details>
- What tool will you use to deploy in Module 2?
Click to reveal answer
Azure Developer CLI (azd) - What does CORA stand for?
Click to reveal answer
Customer-Oriented Response Agent - and it's the name of OUR application, not an industry acronym!
๐ Summary
In this module, you:
- โ Cloned the training repository
- โ Understood the code structure (src/, infra/, docs/)
- โ Logged in to Azure CLI
- โ Identified your AI Foundry project endpoint
- โ Prepared for deployment
Next up: Module 2 will walk you through deploying everything to Azure with a single command: azd up