# naveen359-g/devops-1 architecture

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

- Interactive diagram: https://gitdiagram.com/naveen359-g/devops-1
- Repository: https://github.com/naveen359-g/devops-1

## Overview

##### Project type and purpose
- Automation scripts for deploying an ELK stack (Elasticsearch, Logstash, Kibana) with self-signed certificates.
- Docker-Compose definitions and helper scripts to stand up a Nexus repository behind an Nginx reverse proxy.
- A set of Windows PowerShell utility scripts (algorithms and array operations).
- The README (“DevOps-1 Test-2”) is minimal, so the primary clues are in the directory names and Docker/automation files.

##### File structure
- Top-level modules:
- Automations/elk-stack – shell scripts and cert-generation for ELK stack.
- nginx-nexus-docker & associated docker-compose YAMLs – container definitions for Nexus + Nginx.
- PowershellScripts – standalone PowerShell utilities (not part of the containerized infra).
- Practicesession – presumably scratch or demo files (can be omitted or put in an “Other/Examples” area).
- Configuration/build:
- docker-compose YAML at root and in nginx-nexus-docker.
- Dockerfile under nginx-nexus-docker/nginx.
- Shell scripts for install/uninstall and cert gen under Automations/elk-stack and nginx-nexus-docker/scripts.

##### Detailed capture of architecture
- Don’t overcomplicate: break the repository into these 3-4 logical components.
- How Docker Compose files tie them together (e.g., one Compose project per module).
- Scripts that perform provisioning versus scripts that perform removal/uninstall.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Infrastructure Layer
    InfraHost["Docker Host"]:::infra

    %% Container Orchestration Layer
    subgraph "Docker-Compose Orchestration"
        direction TB
        ELKCompose["ELK docker-compose"]:::compose
        NexusCompose["Nexus & Nginx docker-compose"]:::compose
    end

    InfraHost --> ELKCompose
    InfraHost --> NexusCompose

    %% ELK Stack Module
    subgraph "ELK Stack Module"
        direction TB
        ElkDir["ELK Automation Dir"]:::script
        CertScript["certgen.sh"]:::script
        StartupScript["aws-startupscript.sh"]:::script
        ELKStack["ELK Stack"]:::container
        ES["Elasticsearch"]:::db
        LS["Logstash"]:::container
        KB["Kibana"]:::container
    end

    ELKCompose --> ElkDir
    ElkDir --> CertScript
    ElkDir --> StartupScript
    CertScript --> ELKStack
    StartupScript --> ELKStack
    ELKStack --> LS
    LS --> ES
    ES --> KB

    %% Nexus Repository Module
    subgraph "Nexus Repository Module"
        direction TB
        NexusDir["nginx-nexus-docker"]:::script
        ComposeFile1["docker-nginx-nexus-repository-docker-compose.yml"]:::compose
        ComposeFile2["nginx-nexus-docker-docker-compose.yml"]:::compose
        LaunchScript["nginx-nexus-docker-script-nexus-nginxproxy.sh"]:::script
        UninstallScript["uninstall.sh"]:::script
        Dockerfile["Dockerfile"]:::script
        Nginx["Nginx Proxy"]:::container
        Nexus["Nexus Repository"]:::container
        NexusDB["Nexus Storage"]:::db
    end

    NexusCompose --> NexusDir
    NexusDir --> ComposeFile1
    NexusDir --> ComposeFile2
    NexusDir --> LaunchScript
    NexusDir --> UninstallScript
    NexusDir --> Dockerfile
    ComposeFile1 --> Nginx
    ComposeFile2 --> Nexus
    Dockerfile --> Nginx
    LaunchScript --> Nginx
    LaunchScript --> Nexus
    UninstallScript --> Nginx
    UninstallScript --> Nexus
    Nginx --> Nexus
    Nexus --> NexusDB

    %% Client Interaction
    DevClient["Developers/CI"]:::external
    DevClient --> Nginx

    %% PowerShell Utilities Layer
    subgraph "PowerShell Utilities"
        direction TB
        PS1["KlargestElementInArray.ps1"]:::ps
        PS2["SearchElementinArray.ps1"]:::ps
        PS3["StackInfixPost.ps1"]:::ps
        PS4["Sum-of-3-numbers-is-N.ps1"]:::ps
    end

    %% Click Events
    click ElkDir "https://github.com/naveen359-g/devops-1/tree/master/Automations/elk-stack"
    click CertScript "https://github.com/naveen359-g/devops-1/blob/master/Automations/elk-stack/elkcerts/certgen.sh"
    click StartupScript "https://github.com/naveen359-g/devops-1/blob/master/Automations/elk-stack/elkcerts/aws-startupscript.sh"
    click NexusDir "https://github.com/naveen359-g/devops-1/tree/master/nginx-nexus-docker"
    click Dockerfile "https://github.com/naveen359-g/devops-1/tree/master/nginx-nexus-docker/nginx/Dockerfile"
    click UninstallScript "https://github.com/naveen359-g/devops-1/blob/master/nginx-nexus-docker/scripts/uninstall.sh"
    click LaunchScript "https://github.com/naveen359-g/devops-1/blob/master/nginx-nexus-docker-script-nexus-nginxproxy.sh"
    click ComposeFile1 "https://github.com/naveen359-g/devops-1/blob/master/docker-nginx-nexus-repository-docker-compose.yml"
    click ComposeFile2 "https://github.com/naveen359-g/devops-1/blob/master/nginx-nexus-docker- docker-compose.yml"
    click PS1 "https://github.com/naveen359-g/devops-1/blob/master/PowershellScripts/KlargestElementInArray.ps1"
    click PS2 "https://github.com/naveen359-g/devops-1/blob/master/PowershellScripts/SearchElementinArray.ps1"
    click PS3 "https://github.com/naveen359-g/devops-1/blob/master/PowershellScripts/StackInfixPost.ps1"
    click PS4 "https://github.com/naveen359-g/devops-1/blob/master/PowershellScripts/Sum-of-3-numbers-is-N.ps1"

    %% Styling
    classDef infra fill:#f0f8ff,stroke:#333,stroke-width:1px
    classDef compose fill:#add8e6,stroke:#333,stroke-width:1px
    classDef container fill:#87cefa,stroke:#333,stroke-width:1px
    classDef db fill:#98fb98,stroke:#333,stroke-width:1px
    classDef script fill:#ffa500,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
    classDef ps fill:#ffdead,stroke:#333,stroke-width:1px
    classDef external fill:#d3d3d3,stroke:#333,stroke-width:1px,stroke-dasharray: 2 2
```
