# jamf/netsus architecture

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

- Interactive diagram: https://gitdiagram.com/jamf/netsus
- Repository: https://github.com/jamf/netsus

## Overview

##### Main Components
- Web Management Interface: This is the “webadmin” directory. It includes PHP files, JavaScript, and supporting assets to power the web application. This web interface is used to manage all other services (NetBoot, SUS, LDAP Proxy, and file sharing).
- Software Update Server (SUS): Found in the “SUS” directory, it provides the logic and configuration files needed to control and distribute software updates.
- NetBoot Server: Located in the “NetBoot” directory, it holds boot images and the necessary startup scripts (init.d, rc.d, etc.) for network booting.
- LDAP Proxy: The “LDAPProxy” directory includes installation scripts, configuration files (like slapd.conf), and supporting directories to set up a lightweight intermediary between LDAP clients and the LDAP directory servers.
- Configuration/Appliance Scripts & Assets: Directories like “appliance”, “base”, “includes”, and “makeself” contain installation scripts, configuration files, and helper libraries – these allow for automated setup and maintain service configurations.

##### Relationships & Interactions
- The Web Management Interface (webadmin) acts as a central control hub. It interacts with the SUS, NetBoot, and LDAP Proxy services to issue commands, change settings (via PHP scripts and included configuration files), and display system status.
- The SUS, NetBoot, and LDAP Proxy services are deployed side-by-side on the same Linux system and share underlying system resources. They are typically managed and monitored through the web interface, which communicates with each service’s configuration/output files.
- Installation and system “appliance” configuration scripts (from directories like base and makeself) are used during deployment and updates. They set up the directory structure, launch system daemons, and configure init scripts for automatic start-ups.
- The system relies on preconfigured network and file-share settings (SMB, AFP, HTTP) to deliver file sharing and netboot images to client machines.

##### Architectural Patterns & Design Principles
- Modularity: Each major service (web interface, SUS, NetBoot, LDAP Proxy) is kept in its own directory with a dedicated set of configuration and script files.
- Separation of Concerns: The web-based administration cleanly separates the user interface from the backend logic for service provisioning and monitoring.
- Script-Driven Installations: Multiple shell scripts (for instance, installers in LDAPProxy, NetBoot, and SUS) encapsulate the deployment logic, ensuring repeatable installations.

##### Essential Elements
- Clear labels for each component (e.g., “NetBoot”, “SUS”, “LDAP Proxy”, “Webadmin”).
- Administrative actions flowing from the user to the Web interface.
- Commands/data exchanged from the Web interface to each backend service.
- The initialization/configuration process from the installation scripts to the live services.
- Frontend (the web-based UI),
- Backend services,
- Support/installation scripts,
- Static configuration/documentation resources.

Happy diagramming!

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interaction
    Admin("Administrator/User"):::external

    %% Management Console
    Webadmin("Webadmin – Management Console"):::frontend

    %% Backend Services
    SUS("Software Update Server (SUS)"):::backend
    NetBoot("NetBoot Server"):::backend
    LDAP("LDAP Proxy"):::backend
    FileShare("File Sharing Service"):::backend

    %% Setup & Configuration
    Installer("Installer/Appliance Setup Scripts"):::scripts
    Docs("Documentation & Configuration"):::docs

    %% External Clients
    Clients("Client Systems"):::external

    %% Relationships
    Admin -->|"uses"| Webadmin

    Webadmin -->|"manages"| SUS
    Webadmin -->|"manages"| NetBoot
    Webadmin -->|"manages"| LDAP
    Webadmin -->|"configures"| FileShare

    Installer -->|"bootstraps"| Webadmin
    Installer -->|"deploys"| SUS
    Installer -->|"deploys"| NetBoot
    Installer -->|"deploys"| LDAP
    Installer -->|"deploys"| FileShare

    SUS -->|"provides_updates_to"| Clients
    NetBoot -->|"provides_boot_images_to"| Clients
    LDAP -->|"provides_directory_info_to"| Clients
    FileShare -->|"provides_file_shares_to"| Clients

    %% Click Events
    click Webadmin "https://github.com/jamf/netsus/tree/master/webadmin/var/www/webadmin"
    click SUS "https://github.com/jamf/netsus/tree/master/SUS"
    click NetBoot "https://github.com/jamf/netsus/tree/master/NetBoot"
    click LDAP "https://github.com/jamf/netsus/tree/master/LDAPProxy"
    click Installer "https://github.com/jamf/netsus/tree/master/appliance"
    click Installer "https://github.com/jamf/netsus/tree/master/base"
    click Installer "https://github.com/jamf/netsus/tree/master/includes"
    click Installer "https://github.com/jamf/netsus/tree/master/makeself"
    click Docs "https://github.com/jamf/netsus/tree/master/docs"
    click Docs "https://github.com/jamf/netsus/blob/master/README.md"

    %% Styles
    classDef external fill:#f9c,stroke:#333,stroke-width:2px;
    classDef frontend fill:#bbf,stroke:#333,stroke-width:2px;
    classDef backend fill:#bfb,stroke:#333,stroke-width:2px;
    classDef scripts fill:#ffebcd,stroke:#333,stroke-width:2px;
    classDef docs fill:#eef,stroke:#333,stroke-width:2px;
```
