Module 6: Deploying and Managing Azure Applications
Module Overview
This module delves into the essential practices for deploying, managing, and monitoring your applications on Microsoft Azure. You will learn how to leverage Azure's robust platform services to ensure your applications are highly available, scalable, and performant.
Learning Objectives
- Understand deployment strategies for Azure applications.
- Learn to use Azure App Service for web application deployment.
- Explore containerization with Azure Kubernetes Service (AKS) and Azure Container Instances (ACI).
- Implement continuous integration and continuous delivery (CI/CD) using Azure DevOps.
- Master application monitoring and logging with Azure Monitor and Application Insights.
- Configure scaling and high availability for your applications.
Key Topics
- Azure App Service: Deployment Slots, Auto-scaling, Custom Domains
- Azure Kubernetes Service (AKS): Pods, Services, Deployments
- Azure Container Instances (ACI): Running containers without orchestration
- Azure DevOps Pipelines: Building and deploying code automatically
- Azure Monitor: Metrics, Logs, Alerting
- Application Insights: Performance monitoring, exception tracking
- Azure Traffic Manager and Azure Load Balancer
- Infrastructure as Code (IaC) with ARM templates and Bicep
Deploying to Azure App Service
Azure App Service provides a fully managed platform for building, deploying, and scaling web apps, mobile back ends, and even APIs. It simplifies the deployment process significantly.
Example: Deploying a Node.js App
Using Azure CLI for deployment:
az group create --name myResourceGroup --location eastus
az appservice plan create --name MyPlan --is-linux --sku F1 --resource-group myResourceGroup
az webapp create --resource-group myResourceGroup --plan MyPlan --name myuniqueappname --runtime "NODE:16- LTS"
az webapp deployment source config-zip --resource-group myResourceGroup --name myuniqueappname --src-zip-file webapp.zip
Deploy to App Service
Containerization with AKS
For more complex microservices architectures, Azure Kubernetes Service (AKS) offers a powerful managed Kubernetes experience, allowing you to deploy, scale, and manage containerized applications.
Key AKS Concepts
Understanding Pods, Deployments, Services, and Ingress is crucial for managing applications in AKS.
Example: Simple Deployment Manifest
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
Get Started with AKS
Monitoring with Azure Monitor
Azure Monitor is a comprehensive solution for collecting, analyzing, and acting on telemetry from your Azure and on-premises environments. Application Insights provides deep application performance monitoring.
Setting up Alerts
Configure alerts based on metrics like CPU usage, memory, or request failures to ensure your applications remain healthy.
Explore Azure Monitor