$npx -y skills add ancoleman/ai-design-components --skill deploying-on-azureDesign and implement Azure cloud architectures using best practices for compute, storage, databases, AI services, networking, and governance. Use when building applications on Microsoft Azure or migrating workloads to Azure cloud platform.
| 1 | # Azure Patterns |
| 2 | |
| 3 | Design and implement Azure cloud architectures following Microsoft's Well-Architected Framework and best practices for service selection, cost optimization, and security. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | Use this skill when: |
| 8 | - Designing new applications for Azure cloud |
| 9 | - Selecting Azure compute services (Container Apps, AKS, Functions, App Service) |
| 10 | - Architecting storage solutions (Blob Storage, Files, Cosmos DB) |
| 11 | - Integrating Azure OpenAI or Cognitive Services |
| 12 | - Implementing messaging patterns (Service Bus, Event Grid, Event Hubs) |
| 13 | - Designing secure networks with Private Endpoints |
| 14 | - Applying Azure governance and compliance policies |
| 15 | - Optimizing Azure costs and performance |
| 16 | |
| 17 | ## Core Concepts |
| 18 | |
| 19 | ### Service Selection Philosophy |
| 20 | |
| 21 | Azure offers 200+ services. Choose based on: |
| 22 | 1. **Managed vs. IaaS** - Prefer fully managed services (lower operational burden) |
| 23 | 2. **Cost Model** - Consumption vs. dedicated capacity |
| 24 | 3. **Integration Requirements** - Microsoft 365, Active Directory, hybrid cloud |
| 25 | 4. **Control vs. Simplicity** - More control = more operational overhead |
| 26 | |
| 27 | ### Azure Well-Architected Framework (Five Pillars) |
| 28 | |
| 29 | | Pillar | Focus | Key Practices | |
| 30 | |--------|-------|---------------| |
| 31 | | **Cost Optimization** | Maximize value within budget | Reserved Instances, auto-scaling, lifecycle management | |
| 32 | | **Operational Excellence** | Run reliable systems | Azure Policy, automation, monitoring | |
| 33 | | **Performance Efficiency** | Scale to meet demand | Autoscaling, caching, CDN | |
| 34 | | **Reliability** | Recover from failures | Availability Zones, multi-region, backup | |
| 35 | | **Security** | Protect data and assets | Managed Identity, Private Endpoints, Key Vault | |
| 36 | |
| 37 | Reference `references/well-architected.md` for detailed pillar implementation patterns. |
| 38 | |
| 39 | ## Compute Service Selection |
| 40 | |
| 41 | ### Decision Framework |
| 42 | |
| 43 | ``` |
| 44 | Container-based workload? |
| 45 | YES → Need Kubernetes control plane? |
| 46 | YES → Azure Kubernetes Service (AKS) |
| 47 | NO → Azure Container Apps (recommended) |
| 48 | NO → Event-driven function? |
| 49 | YES → Azure Functions |
| 50 | NO → Web application? |
| 51 | YES → Azure App Service |
| 52 | NO → Legacy/specialized → Virtual Machines |
| 53 | ``` |
| 54 | |
| 55 | ### Service Comparison |
| 56 | |
| 57 | | Service | Best For | Pricing Model | Operational Overhead | |
| 58 | |---------|----------|---------------|---------------------| |
| 59 | | **Container Apps** | Microservices, APIs, background jobs | Consumption or dedicated | Low | |
| 60 | | **AKS** | Complex K8s workloads, service mesh | Node-based | High | |
| 61 | | **Functions** | Event-driven, short tasks (<10 min) | Consumption or premium | Low | |
| 62 | | **App Service** | Web apps, simple APIs | Dedicated plans | Low | |
| 63 | | **Virtual Machines** | Legacy apps, specialized software | VM-based | High | |
| 64 | |
| 65 | **Recommendation:** Start with Azure Container Apps for 80% of containerized workloads (simpler and cheaper than AKS). |
| 66 | |
| 67 | Reference `references/compute-services.md` for detailed comparison with Bicep and Terraform examples. |
| 68 | |
| 69 | ## Storage Architecture |
| 70 | |
| 71 | ### Blob Storage Tier Selection |
| 72 | |
| 73 | | Tier | Access Pattern | Cost/GB/Month | Minimum Storage Duration | |
| 74 | |------|---------------|---------------|--------------------------| |
| 75 | | **Hot** | Daily access | $0.018 | None | |
| 76 | | **Cool** | <1/month access | $0.010 | 30 days | |
| 77 | | **Cold** | <90 days access | $0.0045 | 90 days | |
| 78 | | **Archive** | Rare access | $0.00099 | 180 days | |
| 79 | |
| 80 | **Pattern:** Use lifecycle management policies to automatically move data to lower-cost tiers. |
| 81 | |
| 82 | ### Storage Service Decision |
| 83 | |
| 84 | ``` |
| 85 | File system interface required? |
| 86 | YES → Protocol? |
| 87 | SMB → Azure Files (or NetApp Files for high performance) |
| 88 | NFS → Azure Files (NFS 4.1) |
| 89 | NO → Object storage → Blob Storage |
| 90 | Block storage → Managed Disks (Standard/Premium SSD/Ultra) |
| 91 | Analytics → Data Lake Storage Gen2 |
| 92 | ``` |
| 93 | |
| 94 | Reference `references/storage-patterns.md` for lifecycle policies, redundancy options, and performance tuning. |
| 95 | |
| 96 | ## Database Service Selection |
| 97 | |
| 98 | ### Decision Framework |
| 99 | |
| 100 | ``` |
| 101 | Relational data? |
| 102 | YES → SQL Server compatible? |
| 103 | YES → Need VM-level access? |
| 104 | YES → SQL Managed Instance |
| 105 | NO → Azure SQL Database |
| 106 | NO → Open source? |
| 107 | PostgreSQL → PostgreSQL Flexible Server |
| 108 | MySQL → MySQL Flexible Server |
| 109 | NO → Data model? |
| 110 | Document/JSON → Cosmos DB (NoSQL API) |
| 111 | Graph → Cosmos DB (Gremlin API) |
| 112 | Wide-column → Cosmos DB (Cassandra API) |
| 113 | Key-value cache → Azure Cache for Redis |
| 114 | Time-series → Azure Data Explorer |
| 115 | ``` |
| 116 | |
| 117 | ### Cosmos DB Consistency Levels |
| 118 | |
| 119 | | Level | Use Case | Latency | Throughput | |
| 120 | |-------|----------|---------|------------| |
| 121 | | **Strong** | Financial transactions, inventory | Highest | Lowest | |
| 122 | | **Bounded Staleness** |