# azure/mlops-v2 architecture

> Architecture diagram of the GitHub repository azure/mlops-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azure/mlops-v2
- Repository: https://github.com/azure/mlops-v2

## Overview

##### Project type and purpose
- This is an “Azure MLOps (v2) Solution Accelerator”: a template-based, modular, end-to-end MLOps implementation on Azure.
- Its goal is to help teams bootstrap repeatable, secure, scalable ML workflows by providing pipelines, infrastructure code, and pattern architectures.

##### File structure
- Top-level folders:
- .azuredevops: Azure DevOps YAML pipeline definitions and helper scripts for repo initialization and pipeline creation
- .github: Issue and pull-request templates for GitHub-based workflows
- documentation: Contains subfolders for architecture patterns (classical, NLP, vision), deployment guides (ADO, GHA), and overall project structure
- media: Header image used in README
- sparse_checkout.sh: helper script
- No application code is present—this repo supplies CI/CD definitions, Terraform templates (referenced indirectly), and docs.

##### README for additional insights
- Describes three pattern architectures: classical ML, NLP classification, supervised computer vision
- Supports both Azure DevOps and GitHub Actions for CI/CD
- Relies on Azure CLI with azure-devops extension and Terraform tasks
- Emphasizes modularity: users choose or extend patterns in documentation/architecture

##### Elements
- Clear labels for each component (e.g., “Azure Repos”, “Terraform”, “Azure ML Workspace”)
- Code push → pipeline trigger
- Pipeline → Terraform → Azure resources
- Pipeline → Azure ML training → Storage/Model Registry
- Model Registry → Deployment target
- Deployment target → Monitoring
- CI/CD services in another

##### Final advice
- Custom scripts (from .azuredevops/scripts) that perform setup tasks.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Layer
    subgraph "Developer Layer"
        DEV["Developer Workstation"]:::dev
    end

    %% Version Control Layer
    subgraph "Version Control Layer"
        ADORepos["Azure Repos"]:::vcs
        GitHub["GitHub"]:::vcs
    end

    DEV --> ADORepos
    DEV --> GitHub

    %% CI/CD Layer
    subgraph "CI/CD Layer"
        subgraph "Azure DevOps Pipelines"
            InitProj["initialise-project.yml"]:::cicd
            CreatePipelines["create_ado_pipelines.sh"]:::cicd
            InitRepoScript["initialise_repo.sh"]:::cicd
            InitProj --> CreatePipelines --> InitRepoScript
        end
        subgraph "GitHub Actions"
            IssueConfig["config.yml"]:::cicd
            FeatureReq["feature-request.md"]:::cicd
            RepoIssue["repository-issue.yml"]:::cicd
            PRTemplate["PULL_REQUEST_TEMPLATE.md"]:::cicd
        end
    end

    ADORepos --> InitProj
    GitHub --> IssueConfig

    %% Infrastructure Layer
    subgraph "Infrastructure Layer"
        Terraform["Terraform Tasks"]:::infra
        RG["Resource Group"]:::azure
        KV["Key Vault"]:::azure
        Storage["Storage Account"]:::azure
        AMLWorkspace["Azure ML Workspace"]:::azure
        Compute["Compute (VM/Cluster)"]:::azure
    end

    InitRepoScript --> Terraform
    IssueConfig --> Terraform

    Terraform --> RG
    RG --> KV
    RG --> Storage
    RG --> AMLWorkspace
    RG --> Compute

    %% ML Workload Layer
    subgraph "ML Workload Layer"
        DataIngest["Data Ingestion & Processing"]:::ml
        Training["Training Job"]:::ml
        ModelReg["Model Registry"]:::ml
        Deployment["Deployment (ACI/AKS)"]:::ml
    end

    Terraform --> DataIngest
    DataIngest --> Training --> ModelReg --> Deployment

    %% Monitoring Layer
    subgraph "Monitoring Layer"
        Monitor["Azure Monitor / App Insights"]:::monitor
    end

    Deployment --> Monitor

    %% Documentation & Scripts
    subgraph "Documentation & Helper Scripts"
        README["README.md"]:::docs
        Contrib["CONTRIBUTING.md"]:::docs
        Security["SECURITY.md"]:::docs
        Struct["documentation/structure/README.md"]:::docs
        Classical["classical.md"]:::docs
        NLP["nlp.md"]:::docs
        Vision["vision.md"]:::docs
        Media1["AzureML_CML_Architecture.vsdx"]:::docs
        Media2["AzureML_NLP_Classification_Architecture.vsdx"]:::docs
        Media3["AzureML_SupervisedCV_Architecture.vsdx"]:::docs
        DeployADO["deployguide_ado.md"]:::docs
        DeployGHA["deployguide_gha.md"]:::docs
        DeployImages["images/"]:::docs
        Sparse["sparse_checkout.sh"]:::docs
    end

    DEV --> README

    %% Click Events
    click InitProj "https://github.com/azure/mlops-v2/blob/main/.azuredevops/initialise-project.yml"
    click CreatePipelines "https://github.com/azure/mlops-v2/blob/main/.azuredevops/scripts/create_ado_pipelines.sh"
    click InitRepoScript "https://github.com/azure/mlops-v2/blob/main/.azuredevops/scripts/initialise_repo.sh"
    click IssueConfig "https://github.com/azure/mlops-v2/blob/main/.github/ISSUE_TEMPLATE/config.yml"
    click FeatureReq "https://github.com/azure/mlops-v2/blob/main/.github/ISSUE_TEMPLATE/feature-request.md"
    click RepoIssue "https://github.com/azure/mlops-v2/blob/main/.github/ISSUE_TEMPLATE/repository-issue.yml"
    click PRTemplate "https://github.com/azure/mlops-v2/blob/main/.github/PULL_REQUEST_TEMPLATE.md"
    click README "https://github.com/azure/mlops-v2/blob/main/README.md"
    click Contrib "https://github.com/azure/mlops-v2/blob/main/CONTRIBUTING.md"
    click Security "https://github.com/azure/mlops-v2/blob/main/SECURITY.md"
    click Struct "https://github.com/azure/mlops-v2/blob/main/documentation/structure/README.md"
    click Classical "https://github.com/azure/mlops-v2/blob/main/documentation/architecture/classical.md"
    click NLP "https://github.com/azure/mlops-v2/blob/main/documentation/architecture/nlp.md"
    click Vision "https://github.com/azure/mlops-v2/blob/main/documentation/architecture/vision.md"
    click Media1 "https://github.com/azure/mlops-v2/blob/main/documentation/architecture/media/AzureML_CML_Architecture.vsdx"
    click Media2 "https://github.com/azure/mlops-v2/blob/main/documentation/architecture/media/AzureML_NLP_Classification_Architecture.vsdx"
    click Media3 "https://github.com/azure/mlops-v2/blob/main/documentation/architecture/media/AzureML_SupervisedCV_Architecture.vsdx"
    click DeployADO "https://github.com/azure/mlops-v2/blob/main/documentation/deployguides/deployguide_ado.md"
    click DeployGHA "https://github.com/azure/mlops-v2/blob/main/documentation/deployguides/deployguide_gha.md"
    click DeployImages "https://github.com/azure/mlops-v2/tree/main/documentation/deployguides/images/"
    click Sparse "https://github.com/azure/mlops-v2/blob/main/sparse_checkout.sh"

    %% Styles
    classDef dev fill:#e3f2fd,stroke:#1e88e5;
    classDef vcs fill:#ffebee,stroke:#c62828;
    classDef cicd fill:#e8f5e9,stroke:#2e7d32;
    classDef infra fill:#fff3e0,stroke:#ef6c00;
    classDef azure fill:#e1f5fe,stroke:#0288d1;
    classDef ml fill:#f3e5f5,stroke:#6a1b9a;
    classDef monitor fill:#ede7f6,stroke:#5e35b1;
    classDef docs fill:#fafafa,stroke:#616161;
```
