This repository serves as the Abstraction Layer Template in the Release Engine three-tier solution. It contains reusable workload patterns that define "how" infrastructure and applications are deployed through Infrastructure as Code (Bicep) templates and pipeline configurations.
π¨ Important: This is a template repository. Organizations should clone this repository to create their own workload pattern collections.
Configuration Layer (Simple) β Abstraction Layer (THIS REPO) β Core Layer (Pipelines)
- Pattern Library: Contains proven deployment patterns for common workload types
- Infrastructure as Code: Azure Bicep templates with Azure Verified Modules integration
- Pipeline Orchestration: Workload-specific pipeline configurations and dependency management
- Template Foundation: Starting point for organizations to build their pattern collections
| Pattern | Description | Complexity | Deployment Scope | Documentation |
|---|---|---|---|---|
resource_group_scope_pattern |
Simple single-resource deployments within a resource group | β Basic | Resource Group | README |
subscription_scope_pattern |
Subscription-level resource deployments | ββ Intermediate | Subscription | README |
multi_stage_pattern |
Complex multi-stage deployments with dependencies | βββ Advanced | Subscription | README |
Each pattern directory contains:
patterns/{pattern_name}/
βββ workload.yml # Pipeline configuration and orchestration
βββ {pattern_name}.bicep # Main infrastructure template
βββ {pattern_name}.prerequisite.bicep # Prerequisites (if multi-stage)
βββ {pattern_name}.dependent.bicep # Dependent resources (if multi-stage)
βββ README.md # Pattern documentation and usage guide
- Comprehensive Patterns Overview - Detailed comparison, selection guide, and technical architecture
- Individual Pattern READMEs - Complete usage instructions, parameters, and examples for each pattern
- AI Assistant Instructions - Detailed guidance for AI agents working with patterns
# Clone this template repository
git clone https://github.com/thecloudexplorers/release-engine-example-workload-pattern.git
# Rename for your organization
mv release-engine-example-workload-pattern release-engine-myorg-workload-patterns
cd release-engine-myorg-workload-patterns# Add upstream remote for future updates
git remote add upstream https://github.com/thecloudexplorers/release-engine-example-workload-pattern.git
# Set new origin (your repository)
git remote set-url origin https://github.com/myorg/release-engine-myorg-workload-patterns.git
# Verify configuration
git remote -v- Update Service Connections: Modify service connection references in
workload.ymlfiles - Add Organization Patterns: Create patterns specific to your organization's needs
- Update Documentation: Customize READMEs and pattern documentation
- Test Patterns: Validate patterns work with your Azure environment
-
Create Pattern Directory
mkdir patterns/my_new_pattern cd patterns/my_new_pattern -
Required Files
workload.yml- Pipeline configuration and deployment orchestration{pattern_name}.bicep- Infrastructure as Code definitionsREADME.md- Pattern documentation and usage instructions
-
Follow Naming Conventions
- Use descriptive names:
webapp_with_database,function_app_premium - Use underscores for separation
- Keep names concise but clear
- Use descriptive names:
metadata resources = {
version: '0.1.0'
author: '<Your Name>'
company: '<Your Organization>'
description: '<Pattern Description>'
}
targetScope = 'subscription' // or 'resourceGroup'
@allowed([
'westeurope'
'uksouth'
'eastus'
])
@description('Region in which resources should be deployed')
param resourceLocation string
param tags object = {}- β
Always check AVM first: Use
br/public:avm/res/registry - β Pin versions: Always specify exact AVM versions
β οΈ Document exceptions: If AVM unavailable, document why using direct resources
Example AVM Usage:
module storageAccount 'br/public:avm/res/storage/storage-account:0.27.1' = {
name: 'storageAccountDeployment'
params: {
name: storageAccountName
location: resourceLocation
skuName: storageAccountSku
tags: tags
}
}parameters:
- name: deploymentSettings
type: object
variables:
- name: serviceConnection
value: <your-org-service-connection>
stages:
- template: /pipelines/01-orchestrators/pattern.orchestrator.yml@release-engine-core
parameters:
patternSettings:
name: <pattern_name>
configurationFilePath: ${{ parameters.deploymentSettings.configurationFilePath }}
environments: ${{ parameters.deploymentSettings.environments }}
patternArtifactsPath: /patterns/<pattern_name>
stages:
- infrastructure:
iac:
name: <deployment_name>
displayName: <human_readable_name>
deploymentScope: <Subscription|ResourceGroup>
serviceConnection: $(serviceConnection)
iacMainFileName: <bicep_file>.bicep
iacParameterFileName: ${{ parameters.deploymentSettings.iacParameterFileName }}For complex deployments with dependencies:
stages:
# Prerequisites (no dependencies)
- infrastructure:
iac:
name: prerequisite_stage
displayName: Prerequisites
deploymentScope: Subscription
iacMainFileName: prerequisite.bicep
# Dependent deployment (depends on prerequisites)
- infrastructure:
iac:
name: main_deployment
displayName: Main Infrastructure
deploymentScope: ResourceGroup
iacMainFileName: main.bicep
dependsOn: prerequisite_stage
lastInStage: trueInfrastructure foundations and shared services:
- Logging Infrastructure: Centralized logging with Log Analytics
- Monitoring Infrastructure: Azure Monitor and Application Insights
- Networking Hub: Hub network with firewall and gateway
- Security Baseline: Key Vault and security configurations
Application-specific deployment patterns:
- Web App Basic: Simple web app with app service plan
- Web App with Database: Web app with SQL database integration
- Function App Premium: Premium function app with dependencies
- Container App: Containerized application deployment
Data platform and analytics patterns:
- SQL Database: SQL Database with backup and security
- Cosmos Database: Cosmos DB with consistency configurations
- Synapse Workspace: Analytics workspace and pools
- Data Factory: ETL pipelines and data integration
# Fetch upstream changes
git fetch upstream
# Create integration branch
git checkout -b upstream-sync-$(date +%Y%m%d)
# Merge upstream improvements
git merge upstream/main
# Resolve conflicts (preserve your customizations)
# Test changes thoroughly
# Push and create PR to main- β New Patterns: Additional patterns that benefit your organization
- β Bug Fixes: Fixes to existing patterns and pipeline configurations
- β Security Updates: Security improvements and best practices
- β Documentation: Improved examples and documentation
- π Service Connections: Your organization-specific service connections
- π Custom Patterns: Your organization-specific deployment patterns
- π Naming Conventions: Your organization's naming standards
- π Customizations: Any modifications for your environment
- π― Universal Patterns: Patterns that would benefit multiple organizations
- π Bug Fixes: Fixes to existing patterns or configurations
- π Documentation: Improvements to pattern documentation
- β‘ Enhancements: Performance or security improvements
- Fork the upstream repository
- Create feature branch:
feature/new-pattern-name - Develop and test your improvements
- Document changes and provide examples
- Submit pull request with clear description
# Validate Bicep syntax
az bicep build --file patterns/pattern_name/pattern.bicep
# Validate pipeline YAML
az pipelines validate --yaml-path patterns/pattern_name/workload.yml- Deploy in Isolation: Test patterns in isolated test environments
- Validate Outputs: Ensure all expected outputs are generated
- Test Dependencies: Verify multi-stage dependencies work correctly
- Check Configuration: Validate parameter files work with patterns
- β Bicep Validation: All templates must compile without errors
- β Parameter Validation: All required parameters must be documented
- β Output Documentation: All outputs must be documented
- β Pattern Documentation: Each pattern must have comprehensive README
Each pattern should include a comprehensive README:
# [Pattern Name] Pattern
## Overview
Brief description of what this pattern deploys.
## Architecture
Description or diagram of deployed resources.
## Prerequisites
- Required permissions
- Dependencies
- Service principal requirements
## Parameters
| Parameter | Type | Description | Default | Required |
|-----------|------|-------------|---------|----------|
| param1 | string | Description | value | Yes |
## Outputs
List of outputs and their purposes.
## Usage Example
Reference to configuration setup.
## Dependencies
Any pattern dependencies.This repository integrates with:
- Release Engine Core: Provides pipeline orchestration framework
- Configuration Repositories: Uses patterns defined here for actual deployments
Configuration repositories reference patterns from this repository:
# In configuration repository azure-pipelines.yml
resources:
repositories:
- repository: workload
type: github
name: myorg/release-engine-myorg-workload-patterns
endpoint: myorg-github
ref: refs/heads/main
extends:
template: /patterns/webapp_basic/workload.yml@workload- Start Simple: Begin with basic patterns, add complexity gradually
- Test Thoroughly: Validate patterns in non-production environments first
- Document Everything: Comprehensive documentation enables self-service adoption
- Follow Conventions: Consistent naming and structure across patterns
- Least Privilege: Use minimal required permissions for deployments
- Managed Identities: Prefer system-assigned managed identities
- Secure Defaults: Configure resources with security-first defaults
- Compliance: Ensure patterns meet organizational compliance requirements
- Parallel Deployment: Structure patterns to enable parallel resource creation
- Resource Dependencies: Minimize unnecessary dependencies between resources
- Deployment Speed: Optimize for fast deployment times
- Error Recovery: Design patterns for easy rollback and recovery
- Documentation: Comprehensive guides in AGENTS.md
- Community: GitHub Discussions for questions and ideas
- Issues: Report bugs via GitHub Issues
- Contributions: Follow contribution guidelines for improvements
- Release Engine Core: Core pipeline framework
- Configuration Template: Configuration repository template
- Azure Bicep Documentation
- Azure Verified Modules
This template repository enables organizations to create sophisticated workload deployment patterns while maintaining consistency and leveraging community improvements. Clone, customize, and extend to meet your organization's specific needs.