# jygastaud/ubuntu-installer architecture

> Architecture diagram of the GitHub repository jygastaud/ubuntu-installer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jygastaud/ubuntu-installer
- Repository: https://github.com/jygastaud/ubuntu-installer

## Overview

##### Main Components Organization

a) Automation Controller Layer
- Ansible as the central orchestrator
- Run.sh script as the entry point
- To the configuration management (config.yml, ansible.cfg)

b) Role Categories (organize in distinct groups):
- System Roles
- Dev Tools Roles
- Editors Roles
- Others Roles
- Custom Roles

##### Component Relationships

- Entry point (run.sh) → Ansible Playbook
- Playbook → Role Categories
- Roles → Package Managers (apt, snap)
- Roles → External Sources (repositories, direct downloads)

##### Specific Implementation Details

- Hexagons for package managers
- Circles for external sources

##### Detailed Component Breakdown

Create nested groups showing:
a) Dev Tools Section:
- Cloud Tools (Azure, AWS, GCP)
- Container Tools (Docker, Kubernetes)
- Database Tools
- Version Control
- Development Environments

b) System Tools Section:
- Shell Configuration (Zsh)
- System Utilities
- Network Tools

c) Application Section:
- Editors
- Browsers
- Productivity Tools

##### Flow Representation

Installation flow:
**User Input → run.sh → Ansible Playbook → Role Selection → Package Installation → Configuration**

##### Specific elements

a) Configuration Management:
- Config.yml as the central configuration source
- Default.config.yml as the template
- Relationship with ansible.cfg

b) Role Structure (for each role):
- tasks/
- defaults/
- vars/
- handlers/
- meta/

##### Technical Details

- Tag system for selective installation
- User configuration options
- System requirements
- Version compatibility

- Blue: Core components (Ansible, playbook)
- Green: Successfully tested/stable components
- Yellow: Optional components
- Gray: External dependencies
- Red: Critical paths/requirements

- All symbols used
- Component types

Keep the abstraction level focused on the architectural components while showing the relationship between:
- Configuration management
- Role organization
- Package management
- System integration points

This will create a clear visualization of how the Ubuntu installer automates the setup process while maintaining flexibility through its role-based structure and configuration options.

Remember to indicate the flow of both control and data, showing how user configurations propagate through the system and how different roles interact with the system's package managers and external sources.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Legend
        A[Regular Component]
        B([Entry Point])
        C[(Package Manager)]
        D{Decision Point}
        E[[External Source]]
        style A fill:#blue
        style B fill:#green
        style C fill:#gray
        style D fill:#yellow
        style E fill:#red
    end

    EntryPoint([run.sh]):::entryPoint
    AnsibleConfig[ansible.cfg]:::config
    DefaultConfig[default.config.yml]:::config
    Playbook[playbook.yml]:::config
    Hosts[hosts]:::config
    UninstallPlaybook[uninstall.yml]:::config

    PackageManager[(Package Manager)]:::package
    ExternalSources[[External Sources]]:::external

    EntryPoint --> Playbook
    Playbook --> AnsibleConfig
    Playbook --> DefaultConfig
    Playbook --> Hosts

    subgraph RoleCategories
        direction TB
        SystemTools[System Tools]:::system
        DevTools[Development Tools]:::devtools
        Editors[Editors]:::editors
        Others[Others]:::others
        CustomRoles[Custom Roles]:::custom
    end

    Playbook --> RoleCategories

    subgraph SystemToolsDetail
        direction TB
        CoreSystem[Core System Tasks]:::system
    end

    subgraph DevToolsDetail
        direction TB
        CloudTools[Cloud Tools]:::devtools
        ContainerTools[Container Tools]:::devtools
        GitTools[Git]:::devtools
        MySQLWB[MySQL Workbench]:::devtools
        FaaSCLI[FaaS CLI]:::devtools
        Footloose[Footloose]:::devtools
    end

    subgraph CloudToolsDetail
        direction TB
        AzureCLI[Azure CLI]:::cloud
        OpenShiftClient[OpenShift Client]:::cloud
    end

    subgraph EditorsDetail
        direction TB
        Typora[Typora]:::editors
    end

    subgraph CustomDetail
        direction TB
        ZSHPlugins[ZSH Plugins]:::custom
        ZSHThemes[ZSH Themes]:::custom
    end

    subgraph OthersDetail
        direction TB
        Calibre[Calibre E-book]:::others
        Chezmoi[Chezmoi]:::others
        Insync[Insync]:::others
        XChat[XChat]:::others
    end

    SystemTools --> SystemToolsDetail
    DevTools --> DevToolsDetail
    DevTools --> CloudToolsDetail
    Editors --> EditorsDetail
    CustomRoles --> CustomDetail
    Others --> OthersDetail

    RoleCategories --> PackageManager
    RoleCategories --> ExternalSources

    %% Click Events
    click EntryPoint "https://github.com/jygastaud/ubuntu-installer/blob/main/run.sh"
    click AnsibleConfig "https://github.com/jygastaud/ubuntu-installer/blob/main/ansible.cfg"
    click DefaultConfig "https://github.com/jygastaud/ubuntu-installer/blob/main/default.config.yml"
    click Playbook "https://github.com/jygastaud/ubuntu-installer/blob/main/playbook.yml"
    click Hosts "https://github.com/jygastaud/ubuntu-installer/tree/main/hosts"
    click UninstallPlaybook "https://github.com/jygastaud/ubuntu-installer/blob/main/uninstall.yml"
    click SystemTools "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/system/"
    click DevTools "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/dev-tools/"
    click Editors "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/editors/"
    click Others "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/others/"
    click CustomRoles "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/custom/"
    click AzureCLI "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/dev-tools/azure/"
    click OpenShiftClient "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/dev-tools/openshift_client/"
    click GitTools "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/dev-tools/git/"
    click MySQLWB "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/dev-tools/mysql-workbench/"
    click FaaSCLI "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/dev-tools/faas-cli/"
    click Footloose "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/dev-tools/footloose/"
    click Typora "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/editors/typora/"
    click ZSHPlugins "https://github.com/jygastaud/ubuntu-installer/blob/main/roles/custom/tasks/zsh-plugins.yml"
    click ZSHThemes "https://github.com/jygastaud/ubuntu-installer/blob/main/roles/custom/tasks/zsh-themes.yml"
    click CoreSystem "https://github.com/jygastaud/ubuntu-installer/blob/main/roles/system/tasks/main.yml"
    click Calibre "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/others/calibre-ebook/"
    click Chezmoi "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/others/chezmoi/"
    click Insync "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/others/insync/"
    click XChat "https://github.com/jygastaud/ubuntu-installer/tree/main/roles/others/xchat/"

    %% Styles
    classDef entryPoint fill:#90EE90
    classDef config fill:#ADD8E6
    classDef system fill:#87CEEB
    classDef devtools fill:#98FB98
    classDef editors fill:#DDA0DD
    classDef others fill:#F0E68C
    classDef custom fill:#FFB6C1
    classDef cloud fill:#B0C4DE
    classDef package fill:#D3D3D3
    classDef external fill:#FF6B6B
```
