# thedevopsdude01/complete-devops-project architecture

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

- Interactive diagram: https://gitdiagram.com/thedevopsdude01/complete-devops-project
- Repository: https://github.com/thedevopsdude01/complete-devops-project

## Overview

##### Project type and purpose
- This is a complete DevOps “time‐printer” microservice project. It combines:
- A small Python app (app.py) packaged in Docker
- A CI pipeline (GitHub Actions)
- Terraform IaC to provision the cloud infra (including Kubernetes and Argo CD)
- A Helm chart to describe the app’s k8s resources
- Argo CD for GitOps-style automated deployment

##### File structure
- Top-level:
- .github/workflows/ci.yaml → CI build + push
- Dockerfile + app.py → containerized Python microservice
- argocd-app.yaml → Argo CD Application manifest
- Helm chart (complete-devops-project-time-printer/…):
- Chart.yaml, values.yaml, templates/{deployment,service,ingress,hpa,…}
- tests folder for smoke tests
- terraform-configs/:
- provider.tf, backend.tf → Terraform cloud state & provider setup
- main.tf, argocd.tf → provision the k8s cluster, install Argo CD
- variables.tf → input variables

##### README
- Minimal; title matches file structure. Rely on the files themselves for architecture.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Dev & CI
    subgraph "Dev & CI"
        direction TB
        Users["External Users"]:::dev
        GitHubRepo["GitHub Repo"]:::dev
        CIPipeline["CI Pipeline (GitHub Actions)"]:::cicd
        Registry["Docker Registry"]:::cicd
    end

    %% Infrastructure Provisioning
    subgraph "Infrastructure Provisioning (Terraform)" 
        direction TB
        Terraform["Terraform (IaC)"]:::iac
    end

    %% GitOps & App Deployment
    subgraph "GitOps & App Deployment"
        direction TB
        ArgoCD["Argo CD Controller"]:::iac
        HelmChart["Helm Chart"]:::iac
    end

    %% Runtime Environment
    subgraph "Kubernetes Cluster"
        direction TB
        Ingress["Ingress"]:::runtime
        Service["Service"]:::runtime
        HPA["HPA"]:::runtime
        ServiceAccount["ServiceAccount"]:::runtime
        Pod["Pod (app.py)"]:::runtime
    end

    %% Relationships
    Users -->|sends HTTP| Ingress
    Users -->|push code| GitHubRepo
    GitHubRepo -->|triggers| CIPipeline
    CIPipeline -->|build & push image| Registry
    CIPipeline -->|apply| Terraform
    Terraform -->|provision cluster & install Argo CD| ArgoCD
    ArgoCD -->|monitors| GitHubRepo
    ArgoCD -->|sync & deploy| HelmChart
    HelmChart -->|template & apply| ServiceAccount
    HelmChart -->|template & apply| Ingress
    HelmChart -->|template & apply| Service
    HelmChart -->|template & apply| HPA
    HelmChart -->|template & apply| Pod
    ArgoCD -->|manages| ServiceAccount
    ArgoCD -->|manages| Ingress
    ArgoCD -->|manages| Service
    ArgoCD -->|manages| HPA
    ArgoCD -->|manages| Pod
    Ingress -->|routes to| Service
    Service -->|forwards to| Pod

    %% Click Events
    click CIPipeline "https://github.com/thedevopsdude01/complete-devops-project/blob/main/.github/workflows/ci.yaml"
    click AppPy "https://github.com/thedevopsdude01/complete-devops-project/blob/main/app.py"
    click Dockerfile "https://github.com/thedevopsdude01/complete-devops-project/tree/main/Dockerfile"
    click ArgoApp "https://github.com/thedevopsdude01/complete-devops-project/blob/main/argocd-app.yaml"
    click ChartY "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/Chart.yaml"
    click Values "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/values.yaml"
    click TemplDep "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/deployment.yaml"
    click TemplSvc "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/service.yaml"
    click TemplIngress "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/ingress.yaml"
    click TemplHPA "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/hpa.yaml"
    click TemplSA "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/serviceaccount.yaml"
    click TemplHelpers "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/_helpers.tpl"
    click TemplNotes "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/NOTES.txt"
    click TemplTest "https://github.com/thedevopsdude01/complete-devops-project/blob/main/complete-devops-project-time-printer/templates/tests/test-connection.yaml"
    click Provider "https://github.com/thedevopsdude01/complete-devops-project/blob/main/terraform-configs/provider.tf"
    click Backend "https://github.com/thedevopsdude01/complete-devops-project/blob/main/terraform-configs/backend.tf"
    click MainTF "https://github.com/thedevopsdude01/complete-devops-project/blob/main/terraform-configs/main.tf"
    click ArgoTF "https://github.com/thedevopsdude01/complete-devops-project/blob/main/terraform-configs/argocd.tf"
    click Variables "https://github.com/thedevopsdude01/complete-devops-project/blob/main/terraform-configs/variables.tf"
    click Lock "https://github.com/thedevopsdude01/complete-devops-project/blob/main/terraform-configs/.terraform.lock.hcl"

    %% Styles
    classDef dev fill:#D0E6FF,stroke:#333,stroke-width:1px
    classDef cicd fill:#CFFFE0,stroke:#333,stroke-width:1px
    classDef iac fill:#DFFFD6,stroke:#333,stroke-width:1px
    classDef runtime fill:#FFE6CC,stroke:#333,stroke-width:1px
```
