# chameleoncloud/chi-in-a-box architecture

> Architecture diagram of the GitHub repository chameleoncloud/chi-in-a-box, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chameleoncloud/chi-in-a-box
- Repository: https://github.com/chameleoncloud/chi-in-a-box

## Overview

##### Main Components

a. Core Services Layer:
- OpenStack Services (Ironic, Blazar, Nova, Neutron, Glance, Keystone, Heat)
- Custom Services (Doni, Python-CHI, Experiment Precis)
- Authentication/Federation Services (Chameleon Identity Federation)

b. Operational Layer:
- Monitoring Stack (Prometheus, Alertmanager)
- Logging Stack (Fluentd, Elasticsearch, Kibana)
- Maintenance Tools (Hammers)
- Backup Systems

c. Infrastructure Layer:
- Bare Metal Resources
- Networking Infrastructure
- Storage Systems

##### Key Relationships to Highlight

- Authentication flow through Keystone federation
- Resource provisioning pipeline (Blazar → Ironic → Nova)
- Monitoring and logging data flow
- Backup processes
- Network connectivity between components

##### Implementation Details

- Service names and versions
- Annotations for key configuration points

##### Specific Elements from File Structure

- Configuration management (Ansible/Kolla)
- Monitoring rules from prometheus configs
- Custom policy implementations
- Network segregation from neutron configs

## Diagram (Mermaid)

```mermaid
graph TB
    %% Define styles
    classDef openstack fill:#b3d9ff,stroke:#333
    classDef custom fill:#90EE90,stroke:#333
    classDef monitoring fill:#FFB366,stroke:#333
    classDef infra fill:#E6E6E6,stroke:#333
    classDef auth fill:#FFD700,stroke:#333
    classDef logging fill:#DDA0DD,stroke:#333

    %% User Layer
    subgraph User_Interface
        API[API Endpoints]
        Jupyter[Jupyter Integration]
    end

    %% Authentication Layer
    subgraph Authentication
        KeystoneFed["Keystone Federation"]:::auth
        ChameleonID["Chameleon Identity Federation"]:::auth
    end
    click KeystoneFed "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/kolla/node_custom_config/keystone/federation/"

    %% Core Services Layer
    subgraph OpenStack_Core
        Keystone["Keystone"]:::openstack
        Nova["Nova"]:::openstack
        Neutron["Neutron"]:::openstack
        Ironic["Ironic"]:::openstack
        Blazar["Blazar"]:::openstack
        Glance["Glance"]:::openstack
        Heat["Heat"]:::openstack
    end
    click Keystone "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/keystone.conf"
    click Nova "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/nova.conf"
    click Neutron "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/neutron.conf"
    click Ironic "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/ironic.conf"
    click Blazar "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/blazar.conf"
    click Glance "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/glance.conf"
    click Heat "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/heat.conf"

    %% Custom Services
    subgraph Custom_Services
        Doni["Doni"]:::custom
        PythonCHI["Python-CHI"]:::custom
        ExpPrecis["Experiment Precis"]:::custom
        ImageTools["Image Tools"]:::custom
    end
    click Doni "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/doni.conf"
    click ImageTools "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/roles/chameleon_image_tools/"

    %% Monitoring and Logging
    subgraph Operations
        subgraph Monitoring
            Prometheus["Prometheus"]:::monitoring
            Alertmanager["Alertmanager"]:::monitoring
            Grafana["Grafana"]:::monitoring
        end
        subgraph Logging
            Fluentd["Fluentd"]:::logging
            Elasticsearch["Elasticsearch"]:::logging
            Kibana["Kibana"]:::logging
        end
        Hammers["Hammers"]:::monitoring
        MariaDB["MariaDB"]:::monitoring
    end
    click Prometheus "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/roles/chameleon_prometheus/"
    click Alertmanager "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/kolla/node_custom_config/prometheus/prometheus-alertmanager.yml"
    click Fluentd "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/kolla/node_custom_config/fluentd/"
    click Elasticsearch "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/kolla/node_custom_config/elasticsearch/"
    click Hammers "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/roles/hammers/"
    click Grafana "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/roles/chameleon_grafana/"
    click MariaDB "https://github.com/chameleoncloud/chi-in-a-box/tree/stable/2023.1/roles/chameleon_mariadb/"

    %% Infrastructure Layer
    subgraph Infrastructure
        BareMetal["Bare Metal Resources"]:::infra
        Network["Network Infrastructure"]:::infra
        Storage["Storage Systems"]:::infra
    end
    click BareMetal "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/docs/reference/baremetal-provisioning.md"
    click Network "https://github.com/chameleoncloud/chi-in-a-box/blob/stable/2023.1/docs/reference/ironic-flat-networking.md"

    %% Relationships
    API --> KeystoneFed
    KeystoneFed --> ChameleonID
    KeystoneFed --> Keystone
    
    Blazar --> Ironic
    Ironic --> Nova
    Nova --> Neutron
    Nova --> Glance
    
    Doni --> Ironic
    ImageTools --> Glance
    
    Prometheus --> Alertmanager
    Prometheus --> Grafana
    
    Fluentd --> Elasticsearch
    Elasticsearch --> Kibana
    
    Nova --> BareMetal
    Neutron --> Network
    Glance --> Storage

    %% Legend
    subgraph Legend
        L1["OpenStack Services"]:::openstack
        L2["Custom Services"]:::custom
        L3["Monitoring"]:::monitoring
        L4["Infrastructure"]:::infra
        L5["Authentication"]:::auth
        L6["Logging"]:::logging
    end
```
