Module 2: Azure Architecture and Services

Azure App Services
& Containers

Discover Platform-as-a-Service (PaaS) with Azure App Service, serverless computing with Azure Functions, and modern container solutions with ACI and AKS. Learn when to use each service for your applications.

Learning Objectives

After completing this session, you'll be ready for Quiz 12 and able to:

Understand Azure App Service as a PaaS solution
Compare App Service plans and pricing models
Master serverless computing with Azure Functions
Learn container basics with Azure Container Instances
Understand Azure Kubernetes Service (AKS) fundamentals
Know when to choose each service type
Compare PaaS vs IaaS vs Containers
Understand scaling options and deployment features

Azure App Service - Platform as a Service (PaaS)

Azure App Service is like having a fully managed hosting platform where you just upload your web application code, and Azure handles all the infrastructure for you. Think of it as renting a fully-furnished apartment where everything (electricity, water, internet) is included - you just bring your belongings!

🍕 Restaurant Analogy: App Service vs Virtual Machines

🏪 Virtual Machines

Like building your own restaurant. You handle everything: kitchen, equipment, staff, utilities, permits.

🍕 App Service (PaaS)

Like a food truck space rental. Kitchen and utilities provided. You just bring recipes and cook!

📱 Benefits

Focus on your food (code), not managing the kitchen (infrastructure). Faster setup, easier scaling!

✨ Why Developers Love App Service (PaaS)

Focus on Code, Not Infrastructure
Write your app:

Use .NET, Java, Node.js, Python, PHP - whatever you prefer

Deploy easily:

Upload from GitHub, Visual Studio, or command line

Azure handles:

OS updates, security patches, scaling, load balancing

Student-Friendly Features
Free tier available:

Perfect for learning and small projects

Easy scaling:

Scale up/down with a few clicks

Built-in security:

SSL certificates, authentication, and more

📋 App Service Plans - Like Hosting Packages

🆓 Free (F1)
  • • Perfect for learning
  • • 1GB storage
  • • No custom domains
  • • 60 minutes/day
  • • Great for demos!
🔧 Basic (B1)
  • • Custom domains
  • • SSL certificates
  • • Manual scaling
  • • ~$13/month
  • • Good for simple sites
⚡ Standard (S1)
  • • Autoscaling
  • • Deployment slots
  • • Daily backups
  • • ~$56/month
  • • Production ready
🚀 Premium (P1V3)
  • • High performance
  • • VNet integration
  • • Advanced scaling
  • • ~$146/month
  • • Enterprise features

💡 Student Tip: Start with Free tier for learning, upgrade to Basic when you need custom domains!

⚖️ Scale Up vs Scale Out - Important for Quiz!

Scale Up (Vertical)
  • What it is: Upgrade to a bigger/better plan (F1 → B1 → S1)
  • Like: Moving from a small apartment to a big house
  • Gets you: More CPU, RAM, storage, features
  • When: Single app needs more power
Scale Out (Horizontal)
  • What it is: Add more instances (1 → 2 → 3 servers)
  • Like: Having multiple identical apartments
  • Gets you: Handle more users simultaneously
  • When: Need to serve more people at once

🧠 Remember: Scale UP = Bigger machine, Scale OUT = More machines!

Hands-on Lab: Deploy Your Static Website to App Service

Now let's put App Service into practice! You'll deploy a simple static website (HTML, CSS, JavaScript) to Azure App Service and see PaaS in action. This lab shows you how easy it is to go from code to live website.

Before You Start - Prerequisites

✅ What You Need:

  • • Azure free account with $200 credits
  • • A static HTML project folder on your computer
  • • Basic HTML/CSS files (we'll help you create if needed)
  • • Web browser and internet connection

💰 Cost Awareness:

  • • We'll use the Free (F1) App Service plan
  • • Completely free for this lab!
  • • Perfect for learning and small projects
  • • Remember to delete when done practicing

📁 Step 0: Create Your Sample Website (If You Don't Have One)

Create these files in a new folder called "my-azure-site":
📄 index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Azure Website</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <header>
        <h1>Welcome to My Azure Website!</h1>
    </header>
    <main>
        <p>This website is hosted on Azure App Service (PaaS)</p>
        <button onclick="showMessage()">Click Me!</button>
        <p id="message"></p>
    </main>
    <script src="script.js"></script>
</body>
</html>
🎨 style.css
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

main {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #ff5252;
}
⚡ script.js
function showMessage() {
    document.getElementById('message').innerHTML = 
        'Hello from Azure App Service! This is PaaS in action! 🚀';
}
1

Create App Service in Azure Portal

Let's create your first App Service to host your website

🌐 Portal Steps:

  1. 1. Go to portal.azure.com and sign in
  2. 2. Click "+ Create a resource"
  3. 3. Search for "Web App" and select it
  4. 4. Click "Create"
  5. 5. Fill in the basic information as shown below

📝 Configuration Details:

Basic Settings:
  • Subscription: Your free trial
  • Resource Group: Create new "MyWebsite-RG"
  • Name: "myazuresite2024" (must be unique)
  • Publish: Code
Runtime & Plan:
  • Runtime stack: .NET 8 (or any)
  • Operating System: Windows
  • Region: East US (or closest)
  • Pricing plan: Free F1 ⭐

💡 Important Notes:

  • • App name must be globally unique (try adding numbers/year)
  • • Free F1 plan = $0 cost, perfect for learning!
  • • Don't change default settings for Monitoring
  • • Click "Review + create" then "Create"
2

Deploy Your Website Files

Now let's upload your HTML, CSS, and JavaScript files to App Service

Method 1: ZIP Upload (Easiest for Beginners)

  1. 1. Create ZIP file: Select all your files (index.html, style.css, script.js) and create a ZIP archive
  2. 2. Go to your App Service: After deployment completes, click "Go to resource"
  3. 3. Open Advanced Tools: In left menu, find "Development Tools" → "Advanced Tools" → "Go"
  4. 4. Upload ZIP: In Kudu, go to "Tools" → "ZIP Push Deploy" → drag your ZIP file
  5. 5. Wait for deployment: Green checkmark means success!

Method 2: GitHub Integration (For Git Users)

  1. 1. Upload to GitHub: Push your website files to a GitHub repository
  2. 2. Connect to GitHub: In App Service, go to "Deployment Center"
  3. 3. Choose Source: Select "GitHub" and authorize Azure
  4. 4. Select Repository: Choose your repository and branch
  5. 5. Auto-deploy: Any changes you push to GitHub will automatically deploy!

Method 3: Visual Studio Code Extension

  1. 1. Install Extension: "Azure App Service" extension in VS Code
  2. 2. Sign in to Azure: Use Command Palette → "Azure: Sign In"
  3. 3. Deploy: Right-click your folder → "Deploy to Web App"
  4. 4. Select App Service: Choose the one you just created
  5. 5. Confirm: VS Code will upload and deploy your files
3

Test Your Live Website

See your website running live on the internet!

🌍 Access Your Website:

  1. 1. In Azure Portal, go to your App Service overview page
  2. 2. Look for "URL" - it will be something like: https://myazuresite2024.azurewebsites.net
  3. 3. Click the URL or copy-paste into a new browser tab
  4. 4. You should see your website live on the internet!
  5. 5. Test the button click to see JavaScript working

✅ What You Should See:

  • • Your website with the gradient background
  • • "Welcome to My Azure Website!" heading
  • • A red button that shows a message when clicked
  • • The URL ends with .azurewebsites.net

🎉 Congratulations!

You've successfully deployed a website using Azure App Service (PaaS)! Your website is now accessible from anywhere in the world. Share the URL with friends to show off your Azure skills!

4

Explore App Service Features

See what PaaS gives you automatically

🔍 Monitoring & Logs:
  • • Go to "Monitoring" → "Metrics" to see traffic
  • • Check "Log stream" to see real-time logs
  • • View "Deployment Center" for deployment history
⚙️ Configuration:
  • • "Configuration" to add app settings
  • • "Custom domains" to add your own domain
  • • "TLS/SSL settings" for HTTPS certificates
💡 Try These PaaS Features:
  1. 1. Edit files online: Go to "Development Tools" → "App Service Editor" to edit files directly in the browser
  2. 2. View file structure: "Advanced Tools" → "Kudu" → "Debug console" to see your deployed files
  3. 3. Check performance: "Monitoring" → "Metrics" to see CPU and memory usage
  4. 4. Restart app: Click "Restart" button to restart your website
5

💰 IMPORTANT: Clean Up to Save Credits

Don't forget this step to keep your free trial credits!

🗑️ Delete Resources:

  1. 1. Delete App Service: Go to your App Service → "Overview" → "Delete"
  2. 2. Delete Resource Group: Go to "Resource Groups" → "MyWebsite-RG" → "Delete resource group"
  3. 3. Type the name: Confirm by typing the resource group name exactly
  4. 4. Click Delete: This removes everything and stops all charges

✅ Verification:

  • • Website URL should show "404 Not Found" after deletion
  • • Resource group should disappear from your Azure portal
  • • No ongoing charges for this lab

🎉 Lab Complete - You've Experienced PaaS!

You just deployed a real website to the cloud using Platform-as-a-Service! Notice how you:

Focused on Code
You only worried about HTML/CSS/JS

Fast Deployment
From code to live site in minutes

Built-in Features
HTTPS, monitoring, scaling ready

🔧 Common Issues and Solutions

❌ Website shows default page:

  • • Make sure you named your main file "index.html"
  • • Check files were uploaded to the root directory
  • • Wait 1-2 minutes after deployment
  • • Try refreshing browser (Ctrl+F5)

❌ App Service name already exists:

  • • Add numbers or year to make it unique
  • • Try different combinations like "mysite2024abc"
  • • Keep it simple and easy to remember

Azure Functions - Serverless Computing

Azure Functions is serverless computing - imagine having a personal assistant who only appears when you call them, does the specific task you asked for, and then disappears. You only pay for the exact time they're working!

⚡ What "Serverless" Really Means

🖥️ There ARE Servers

Microsoft manages all the servers. You never see or worry about them!

📱 Event-Driven

Functions run only when something happens (HTTP request, timer, file upload).

💰 Pay-Per-Use

Only pay for execution time. If nothing happens, you pay nothing!

🎯 Function Triggers - What Makes Functions Run

Common Triggers
HTTP Request:

Someone visits a URL or calls an API

Timer:

Run every hour, daily, or on schedule

File Upload:

When someone uploads a file to storage

Queue Message:

Process messages from a queue

Real-World Examples
Image Processing:

User uploads photo → Function resizes it automatically

Daily Reports:

Timer triggers daily → Function emails sales report

API Backend:

Mobile app calls HTTP → Function processes data

Data Processing:

New data arrives → Function transforms and stores it

💰 Azure Functions Pricing - Perfect for Students

🆓 Free Tier
  • • 1 million executions/month
  • • 400,000 GB-seconds/month
  • • Perfect for learning!
⚡ Consumption
  • • Pay only when running
  • • $0.20 per million executions
  • • Automatic scaling
📊 Premium
  • • Dedicated instances
  • • VNet integration
  • • For enterprise needs

🎯 Example: If your function runs 100,000 times/month for 1 second each = FREE!

Azure Container Services

Containers are like shipping boxes for your applications. Just like how shipping containers make it easy to move goods anywhere in the world, software containers make it easy to run your applications anywhere - your laptop, testing, or production.

📦 Containers vs Virtual Machines

🖥️ Virtual Machines

  • • Like having separate houses
  • • Each has full OS (Windows/Linux)
  • • Uses more resources
  • • Takes minutes to start
  • • Complete isolation
  • • Good for: Legacy apps, different OS needs

📦 Containers

  • • Like having separate apartments in same building
  • • Share the host OS
  • • Lightweight and efficient
  • • Start in seconds
  • • Process-level isolation
  • • Good for: Modern apps, microservices

Key Benefit: "Works on my machine" → "Works everywhere!"

🚀 Azure Container Instances (ACI) - Simplest Containers

What is ACI?
No infrastructure management:

Just say "run this container" and Azure does it

Fast startup:

Containers start in seconds

Pay-per-second:

Only pay while container is running

Perfect For
Simple containers:

Single container apps, batch jobs

Quick testing:

Test containerized apps quickly

CI/CD builds:

Build and deploy automation

⚓ Azure Kubernetes Service (AKS) - Container Orchestration

🎭 What is Kubernetes?

Like a smart manager for containers. Handles starting, stopping, scaling, and replacing containers automatically.

🏗️ AKS Benefits

Azure manages the complex Kubernetes control plane. You focus on your apps, not infrastructure.

📈 When to Use

Multiple containers, microservices, complex applications that need orchestration and scaling.

Think of it as: ACI = Single container, AKS = Managing hundreds of containers

📚 Azure Container Registry - Container Library

What It Does
Store container images:

Like GitHub but for containers

Private and secure:

Only your team can access your containers

CI/CD integration:

Automatically build and deploy

Typical Workflow
1 Build container image
2 Push to Container Registry
3 Deploy to ACI or AKS
4 Update and redeploy easily

What You DON'T Need to Know for AZ-900

AZ-900 is a fundamentals exam! You don't need to be an expert in advanced topics. Here's what you can safely skip to avoid overwhelm and focus on what actually matters for the certification.

🚫 AZ-900 Does NOT Require Advanced Knowledge

Many students stress about learning complex topics that aren't tested on AZ-900. Focus on fundamentals and concepts, not implementation details!

🚫 Deep Kubernetes/AKS Details

❌ DON'T Study These:

  • • Kubernetes YAML configuration files
  • • kubectl commands and syntax
  • • Pod, Service, Deployment object details
  • • Kubernetes networking (ingress, services)
  • • Helm charts and package management
  • • Advanced scheduling and resource limits
  • • Custom Resource Definitions (CRDs)

✅ DO Know These Basics:

  • • AKS is managed Kubernetes service
  • • Used for container orchestration
  • • Good for complex, multi-container apps
  • • Azure manages the control plane
  • • When to choose AKS vs ACI

🚫 DevOps Pipelines & CI/CD

❌ DON'T Study These:

  • • Azure DevOps pipeline YAML syntax
  • • GitHub Actions workflow configuration
  • • Build and release pipeline setup
  • • Deployment strategies (blue-green, canary)
  • • Infrastructure as Code with ARM/Bicep
  • • Testing frameworks and automation
  • • Container image building processes

✅ DO Know These Basics:

  • • App Service supports GitHub deployment
  • • Functions can be deployed from VS Code
  • • Container Registry stores container images
  • • Basic concept of source code → deployed app
  • • Azure DevOps exists (don't need to use it)

🎯 Other Advanced Topics You Can Skip

⚙️ Configuration Details:
  • • Detailed networking configuration
  • • Complex scaling rules and policies
  • • Advanced monitoring and alerting setup
  • • Custom domain SSL certificate management
  • • Environment variable management
🔧 Development Tools:
  • • Visual Studio integration details
  • • Advanced debugging techniques
  • • Performance profiling tools
  • • Local development environment setup
  • • Code editing in Azure portal
🏗️ Architecture Patterns:
  • • Microservices architecture design
  • • Event-driven architecture patterns
  • • Distributed systems concepts
  • • Service mesh implementations
  • • API gateway configurations

🎯 What AZ-900 DOES Focus On

Service Understanding
What each service does:

App Service hosts web apps, Functions run code on events

When to use what:

VM vs App Service vs Functions vs Containers

Service models:

IaaS vs PaaS vs SaaS differences

Key Concepts
Scaling concepts:

Scale up vs scale out differences

Pricing models:

Consumption vs plan-based pricing

Basic features:

What's included vs what requires extra configuration

Remember: AZ-900 tests your understanding of WHAT Azure services do and WHEN to use them, not HOW to configure them in detail.

📚 Smart Study Strategy for AZ-900

High-Level View

Focus on "what" and "when", not "how" to implement

Compare Services

Understand differences between similar services

Use Cases

Know which service fits which business scenario

When to Use Each Service

🤔 Service Decision Tree (Important for Quiz!)

Do you want to manage servers and operating systems?

✅ YES → Use Virtual Machines (IaaS)

Full control over OS, legacy apps, specific configurations

❌ NO → Continue to next question...

Focus on application code, not infrastructure

Is your application event-driven or runs occasionally?

✅ YES → Use Azure Functions

Pay only when running, automatic scaling, serverless

❌ NO → Need always-on web app...

Choose between App Service or Containers

📊 Service Comparison Chart

Service Best For Management Pricing
Virtual Machines
IaaS
Legacy apps, specific OS needs, full control You manage everything Pay for VM size, running time
App Service
PaaS
Web apps, APIs, quick deployment Azure manages infrastructure Pay for App Service Plan
Azure Functions
Serverless
Event-driven, background tasks, APIs Fully managed by Azure Pay per execution
Container Instances
CaaS
Simple containers, testing, batch jobs Azure manages container runtime Pay per second of usage
Kubernetes Service
CaaS
Complex apps, microservices, orchestration Shared management Pay for worker nodes

✅ Good Choices

E-commerce Website → App Service

Always-on web app, easy scaling, built-in SSL, perfect for PaaS

Image Resizer → Azure Functions

Triggered by uploads, runs only when needed, perfect serverless use case

Microservices App → AKS

Multiple containers, complex orchestration, scaling needs

Batch Processing → Container Instances

Short-lived tasks, simple containers, pay per use

❌ Poor Choices

Always-on API → Azure Functions

Functions are for occasional use, not 24/7 APIs. Use App Service instead.

Simple Website → AKS

Too complex for a simple site. App Service is much easier and cheaper.

Legacy .NET Framework → Containers

Old frameworks don't containerize well. VM or modern App Service better.

File Storage → Functions

Functions are for compute, not storage. Use Azure Storage services.

🧠 Get Ready for Quiz 12 - Sample Questions

Here are some example questions similar to what you'll see in Quiz 12. Make sure you understand these concepts!

Sample Question 1:

"What is Azure App Service?"

  • A) A virtual machine hosting service
  • B) A Platform as a Service (PaaS) for hosting web applications ✅
  • C) A container orchestration platform
  • D) A database service

Sample Question 2:

"What is the difference between scale up and scale out in App Service?"

  • A) Scale up adds more instances, scale out adds more power
  • B) Scale up adds more power to existing instances, scale out adds more instances ✅
  • C) They are the same thing
  • D) Scale up is automatic, scale out is manual

📝 Quiz 12 Topics: App Service (PaaS), Functions (serverless), containers (ACI/AKS), scaling, pricing models, when to use each service

Take Quiz 12 Now

Session 12 Summary

🎯 Key Takeaways - Everything You Need for Quiz 12

🌐 Azure App Service (PaaS):

  • Platform-as-a-Service: Focus on code, Azure manages infrastructure
  • Languages: .NET, Java, Node.js, Python, PHP, and more
  • Scaling: Scale UP = bigger plan, Scale OUT = more instances
  • Features: SSL certificates, deployment slots, autoscaling

⚡ Azure Functions (Serverless):

  • Event-driven: HTTP, timer, file upload, queue triggers
  • Pay-per-execution: Only pay when code runs

📦 Container Services:

  • Containers vs VMs: Lightweight, fast startup, share OS
  • ACI: Simple containers, no infrastructure management
  • AKS: Managed Kubernetes for complex container orchestration
  • Container Registry: Private storage for container images

🎯 When to Use What:

  • App Service: Web apps, APIs, always-on applications
  • Functions: Event-driven, background tasks, occasional use
  • Containers: Modern apps, microservices, portability

🎉 Service Models Mastered!

You now understand the differences between IaaS (Virtual Machines), PaaS (App Service), and modern application platforms (Functions & Containers). You know when to use each service and how they compare in terms of management, pricing, and use cases.

PaaS Concepts ✓ Serverless Computing ✓ Container Basics ✓ Service Selection ✓ Scaling Strategies ✓

🚀 Ready for Quiz 12?

Excellent! You've mastered Azure's Platform-as-a-Service offerings and container solutions. Now test your knowledge with Quiz 12, which covers all the app services and container concepts from this session.