# intel/intel-inb-manageability architecture

> Architecture diagram of the GitHub repository intel/intel-inb-manageability, 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/intel/intel-inb-manageability
- Repository: https://github.com/intel/intel-inb-manageability

## Overview

##### Main Components

a) Agent Layer (Core Services):
- Dispatcher Agent (central coordinator)
- Configuration Agent
- Diagnostic Agent
- Telemetry Agent
- Cloud Adapter Agent

b) Communication Layer:
- MQTT Broker (messaging backbone)
- Protocol Buffers (for INBS communication)

c) External Interfaces:
- Cloud Services (Azure IoT Central, ThingsBoard)
- INBC Command Line Tool
- Docker Registry
- Package Repositories

d) Security Components:
- TPM Module
- AppArmor Profiles
- Signature Verification

##### Architectural Patterns to Highlight

a) Microservices Architecture:
- Agent as an independent service
- MQTT message paths between services

b) Plugin Architecture:
- Cloud adapter interfaces
- OTA update mechanisms (FOTA, SOTA, AOTA)

**[Cloud Layer]**
**Azure IoT Central <-> ThingsBoard <-> Custom Cloud**
- ↕
**[Security Layer]**
**TPM | AppArmor | Signatures**
- ↕
**[Communication Layer]**
**MQTT Broker <-> Protocol Buffers**
- ↕
**[Agent Layer]**
**Cloud Adapter Agent**
- ↕
**Dispatcher Agent ←→ Configuration Agent**
- ↕
**Diagnostic Agent ←→ Telemetry Agent**
- ↕
**[System Layer]**
**Docker | OS | Firmware | BTRFS**

##### Important Relationships

- Dispatcher Agent as the central coordinator
- MQTT broker as the communication backbone
- Bidirectional flows between agents
- Security layer spanning across components
- External interface connections

##### Implementation Details

- Version/update flows for FOTA/SOTA/AOTA

##### Additional Elements

- Manifest flow paths
- Telemetry data routes
- Configuration paths
- Security checkpoints
- Rollback paths

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef cloud fill:#e1f5fe,stroke:#01579b
    classDef security fill:#fff3e0,stroke:#e65100
    classDef communication fill:#e8f5e9,stroke:#1b5e20
    classDef agent fill:#f3e5f5,stroke:#4a148c
    classDef system fill:#fafafa,stroke:#424242
    classDef external fill:#fff8e1,stroke:#ff6f00

    %% Cloud Layer
    subgraph CloudServices
        Azure["Azure IoT Central"]:::cloud
        ThingsBoard["ThingsBoard"]:::cloud
        CustomCloud["Custom Cloud Solutions"]:::cloud
    end

    %% Security Layer
    subgraph SecurityLayer
        TPM["TPM Module"]:::security
        AppArmor["AppArmor Profiles"]:::security
        SigVerify["Signature Verification"]:::security
    end

    %% Communication Layer
    subgraph CommunicationLayer
        MQTT["MQTT Broker"]:::communication
        ProtoBuf["Protocol Buffers"]:::communication
    end

    %% Agent Layer
    subgraph AgentLayer
        CloudAdapter["Cloud Adapter Agent"]:::agent
        Dispatcher["Dispatcher Agent"]:::agent
        Config["Configuration Agent"]:::agent
        Diagnostic["Diagnostic Agent"]:::agent
        Telemetry["Telemetry Agent"]:::agent
    end

    %% System Layer
    subgraph SystemLayer
        Docker["Docker Runtime"]:::system
        OS["Operating System"]:::system
        Firmware["Firmware"]:::system
        BTRFS["BTRFS Storage"]:::system
    end

    %% External Tools
    INBC["INBC CLI Tool"]:::external

    %% Relationships
    CloudServices <--> CloudAdapter
    CloudAdapter <--> Dispatcher
    Dispatcher <--> Config
    Dispatcher <--> Diagnostic
    Dispatcher <--> Telemetry
    MQTT --- ProtoBuf
    MQTT --- CloudAdapter
    MQTT --- Dispatcher
    MQTT --- Config
    MQTT --- Diagnostic
    MQTT --- Telemetry
    SecurityLayer --- AgentLayer
    INBC --> Dispatcher
    SystemLayer --- AgentLayer

    %% Click Events
    click TPM "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/tpm2-simulator/"
    click MQTT "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/fpm/mqtt/"
    click ProtoBuf "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/proto/"
    click CloudAdapter "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/cloudadapter-agent/"
    click Dispatcher "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/dispatcher-agent/"
    click Config "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/configuration-agent/"
    click Diagnostic "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/diagnostic-agent/"
    click Telemetry "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/telemetry-agent/"
    click Docker "https://github.com/intel/intel-inb-manageability/tree/develop/inbm/trtl/realdocker/"
    click INBC "https://github.com/intel/intel-inb-manageability/tree/develop/inbc-program/"
    click AppArmor "https://github.com/intel/intel-inb-manageability/blob/develop/inbm/cloudadapter-agent/fpm-template/etc/apparmor.d/usr.bin.inbm-cloudadapter"

    %% Legend
    subgraph Legend
        L1["Cloud Services"]:::cloud
        L2["Security Components"]:::security
        L3["Communication Layer"]:::communication
        L4["Agent Services"]:::agent
        L5["System Components"]:::system
        L6["External Tools"]:::external
    end
```
