# teradata/ai-unlimited architecture

> Architecture diagram of the GitHub repository teradata/ai-unlimited, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/teradata/ai-unlimited
- Repository: https://github.com/teradata/ai-unlimited

## Overview

##### Project’s Main Purpose and Type
- The project isn’t a typical full-stack application but instead focuses on provisioning and automating deployments across cloud providers. Evidence for this includes the directories “deployments/aws”, “deployments/azure”, and “deployments/docker”, alongside detailed parameter files, policy files, and templates.
- It supports deploying AI-oriented services (e.g., “AI Unlimited”, “Jupyter”) and contains examples (e.g., Jupyter notebooks in “examples”) that likely demonstrate how to interact with the deployed systems, but the core emphasis is on infrastructure setup and deployment automation.

##### File Structure for Architectural Clues
- Multiple Directories for Cloud Providers: The “deployments/aws” and “deployments/azure” directories contain separate folders for templates (CloudFormation/YAML for AWS, ARM and Bicep for Azure) and parameters/policies. This suggests that the system must abstract or parameterize deployment configurations depending on the target environment.
- Deployment Tools and CI/CD Integration: Files in the “.github/workflows” folder and configuration files like “.pre-commit-hooks.yaml” indicate integration with a CI/CD pipeline that might automatically test, build, or deploy these configurations.
- Docker Deployments: The “deployments/docker” directory includes YAML configuration files and helper scripts, showing that containerized deployment is supported and perhaps used for local testing or alternatives to cloud deployments.
- Examples and Notebooks: The “examples” directory, containing notebooks and sample data, hints at usage examples—likely showing how once the infrastructure is deployed, users can start working with the AI and Jupyter services.

##### Key Components
- Configuration & Deployment Management:
- CI/CD Pipeline: Represented by GitHub workflows and pre-commit hooks.
- Infrastructure-as-Code (IaC) Templates: Separate blocks for AWS (CloudFormation templates in YAML, JSON parameter files and policies), Azure (ARM templates in JSON, Bicep files, parameters, and initialization scripts), and Docker (YAML deployment files and associated scripts).
- Cloud Infrastructure Components:
- AWS Components: Could show components like network load balancers (NLB) and other AWS-specific resources configured via the templates (e.g., AI Unlimited and Jupyter with/without NLB) along with related IAM policies.
- Azure Components: Map out resources provisioned through ARM/Bicep scripts that involve compute, network (load balancers), and identity resources.
- Containerization:
- Docker Deployments: Indicate how Docker-based deployments integrate with cloud credentials (both AWS and Azure) and how they may run AI services.
- Example/User Interaction Layer:
- Notebooks and Data Exploration Examples: Represent these separately as “Client / User Examples” that demonstrate the consumption of the deployed services.

##### Relationships, Interactions, and Flow
- Flow from source (GitHub repository) to deployment:
- Branches of the CI/CD pipeline trigger the processing of IaC templates.
- Choose the desired deployment path (AWS, Azure, or Docker) by selecting the appropriate parameter and policy files.
- Link configuration inputs (parameters and policies) with their corresponding templates.
- Dependencies such as:
- The role of policies and parameters shaping the deployed resources (e.g., determining whether to deploy with or without a Network Load Balancer).
- The interplay between different deployment scripts and initialization routines (e.g., cloudinit scripts, scheduler services).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Repo["Repository"]:::repo
    subgraph "CI/CD Pipeline"
        CI1["GitHub Workflows"]:::ci
        CI2["Pre-commit Hooks"]:::ci
    end
    Repo --> CI1
    Repo --> CI2
    CI1 --> DeploymentManager["Deployment Manager"]:::manager
    CI2 --> DeploymentManager

    subgraph "Deployments"
        direction TB
        subgraph "AWS Deployment"
            A_Templates["AWS Templates"]:::iac
            A_Parameters["AWS Parameters"]:::iac
            A_Policies["AWS Policies"]:::iac
            A_Parameters -->|"configures"| A_Templates
            A_Policies -->|"configures"| A_Templates
            AWS_Node["Deployed Services (AWS)"]:::cloud
            A_Templates --> AWS_Node
        end

        subgraph "Azure Deployment"
            AZ_Templates["Azure Templates"]:::iac
            AZ_Parameters["Azure Parameters"]:::iac
            AZ_Policies["Azure Policies"]:::iac
            AZ_Scripts["Azure Scripts"]:::iac
            AZ_Parameters -->|"configures"| AZ_Templates
            AZ_Policies -->|"configures"| AZ_Templates
            AZ_Scripts -->|"initializes"| AZ_Templates
            Azure_Node["Deployed Services (Azure)"]:::cloud
            AZ_Templates --> Azure_Node
        end

        subgraph "Docker Deployment"
            Docker_Config["Docker Configurations"]:::container
            Docker_Node["Deployed Services (Docker)"]:::container
            Docker_Config --> Docker_Node
        end
    end

    DeploymentManager -->|"triggers"| AWS_Node
    DeploymentManager -->|"triggers"| Azure_Node
    DeploymentManager -->|"triggers"| Docker_Node

    AWS_Node -->|"accessible"| UserExamples["Usage Examples/Notebooks"]:::user
    Azure_Node -->|"accessible"| UserExamples
    Docker_Node -->|"accessible"| UserExamples

    click CI1 "https://github.com/teradata/ai-unlimited/tree/main/.github/workflows"
    click CI2 "https://github.com/teradata/ai-unlimited/blob/main/.pre-commit-hooks.yaml"
    click A_Templates "https://github.com/teradata/ai-unlimited/tree/main/deployments/aws/templates"
    click A_Parameters "https://github.com/teradata/ai-unlimited/tree/main/deployments/aws/parameters"
    click A_Policies "https://github.com/teradata/ai-unlimited/tree/main/deployments/aws/policies"
    click AZ_Templates "https://github.com/teradata/ai-unlimited/tree/main/deployments/azure/templates"
    click AZ_Parameters "https://github.com/teradata/ai-unlimited/tree/main/deployments/azure/parameters"
    click AZ_Policies "https://github.com/teradata/ai-unlimited/tree/main/deployments/azure/policies"
    click AZ_Scripts "https://github.com/teradata/ai-unlimited/tree/main/deployments/azure/scripts"
    click Docker_Config "https://github.com/teradata/ai-unlimited/tree/main/deployments/docker"
    click UserExamples "https://github.com/teradata/ai-unlimited/tree/main/examples"

    classDef repo fill:#AED6F1,stroke:#2874A6,stroke-width:2px;
    classDef ci fill:#F9E79F,stroke:#D4AC0D,stroke-width:2px;
    classDef iac fill:#D5F5E3,stroke:#28B463,stroke-width:2px;
    classDef cloud fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;
    classDef container fill:#FADBD8,stroke:#C0392B,stroke-width:2px;
    classDef user fill:#D6EAF8,stroke:#3498DB,stroke-width:2px;
    classDef manager fill:#F0E68C,stroke:#B8860B,stroke-width:2px;
```
