# davydocsurg/ops-tutorials architecture

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

- Interactive diagram: https://gitdiagram.com/davydocsurg/ops-tutorials
- Repository: https://github.com/davydocsurg/ops-tutorials

## Overview

##### Project Type and Purpose
- This repository is a monorepo of DevOps example code, written to accompany Baeldung articles on ops topics.
- It is not a running application, but a structured collection of independent modules illustrating infrastructure-as-code, containerization, CI/CD pipelines, and orchestration patterns.

##### High-Level Architecture & Component Identification
- Treat the repo itself as a “DevOps Examples Platform.” Within it, there are eight major domains:
- aws-modules (CloudFormation templates)
- docker-modules (Dockerfiles, Docker Compose, caching, networking, environment variables, Kaniko, Podman…)
- github-actions (GitHub CI workflows)
- gitlab-modules (GitLab CI pipelines, shared configs, artifact passing)
- jenkins-modules (Jenkins jobs and Spring-Jenkins pipelines)
- kubernetes-modules (K8s Deployments, StatefulSets, JKube demo)
- mesos-marathon (Mesos + Marathon Dockerized Java demo)
- server-module (scripts for deploying React apps via Nginx and Tomcat)

##### Logical Grouping and Relationships
- Although each domain is functionally independent, they represent stages in a typical DevOps lifecycle:
a. Infrastructure as Code (aws-modules) →
b. Container Build & Packaging (docker-modules) →
c. CI/CD (github-actions, gitlab-modules, jenkins-modules) →
d. Orchestration & Runtime (kubernetes-modules, mesos-marathon) →
e. Application Deployment Patterns (server-module)

##### Architectural Patterns & Design Principles
- Monorepo pattern: single repository, multiple loosely-coupled modules grouped by domain.
- Layered DevOps pipeline: each module folder corresponds to a logical layer.
- Template-driven IaC: aws-modules uses CloudFormation YAML templates.
- Modular container demos: docker-modules subdivided into caching, networking, compose, images.
- Multi-CI support: separate clusters for GitHub, GitLab, and Jenkins pipelines.
- Polyglot orchestration: Kubernetes vs. Mesos Marathon examples demonstrate two orchestration platforms.

##### Technologies & Frameworks to Call Out
- AWS CloudFormation (YAML)
- Docker Engine, Docker Compose, BuildKit, Kaniko, Podman
- GitHub Actions workflows (.yml)
- GitLab CI (.gitlab-ci.yml) with includes, templates, needs, artifacts
- Jenkins Pipeline (Declarative & Scripted) + Spring Boot demo
- Kubernetes (Deployment, StatefulSet, PVC, Service) + JKube plugin
- Mesos Marathon + Spring Boot
- Nginx & Tomcat shell scripts for React app hosting

## Diagram (Mermaid)

```mermaid
graph TB
    %% Central repository
    Repo["DevOps Examples Repository"]:::repo

    %% Infrastructure as Code Layer
    subgraph "Infrastructure as Code"
        direction TB
        AWS["aws-modules"]:::iac
    end

    %% Container Build & Packaging Layer
    subgraph "Container Build & Packaging"
        direction TB
        DM["docker-modules"]:::build
        DC["caching"]:::build
        DCP["compose"]:::build
        DI["images"]:::build
        DN["networking"]:::build
        DEV["env-vars"]:::build
        KN["kaniko"]:::build
        PO["podman"]:::build
        DW["windows"]:::build
        DG["git-strategies"]:::build
    end

    %% CI/CD Layer
    subgraph "CI/CD Pipelines"
        direction TB
        GH["github-actions"]:::ci
        GH1["get-current-branch example"]:::ci
        GH2["env-file example"]:::ci
        GL["gitlab-modules"]:::ci
        GL1["multiple pipelines"]:::ci
        GL2["artifact passing"]:::ci
        GL3["shared configs"]:::ci
        GL4["curl cmd examples"]:::ci
        JK["jenkins-modules"]:::ci
        JK1["Jenkins jobs"]:::ci
        JK2["Spring-Jenkins pipeline"]:::ci
    end

    %% Orchestration & Runtime Layer
    subgraph "Orchestration & Runtime"
        direction TB
        K8s["kubernetes-modules"]:::orchestration
        K8s1["Deployment & StatefulSet configs"]:::orchestration
        K8s2["JKube demo"]:::orchestration
        MM["mesos-marathon"]:::orchestration
    end

    %% Deployment Scripts Layer
    subgraph "Application Deployment Patterns"
        direction TB
        SM["server-module"]:::deploy
        SM1["Nginx React deploy"]:::deploy
        SM2["Tomcat React deploy"]:::deploy
    end

    %% Connections
    Repo -->|"contains"| AWS
    AWS -->|"AWS CFN"| DM
    DM -->|"Docker Engine, BuildKit, Kaniko"| GH
    DM -->|"Docker Engine, BuildKit, Kaniko"| GL
    DM -->|"Docker Engine, BuildKit, Kaniko"| JK
    GH -->|"GitHub Actions"| K8s
    GL -->|"GitLab CI"| K8s
    JK -->|"Jenkins Pipelines"| K8s
    K8s -->|"Kubernetes"| SM
    MM -->|"Mesos Marathon"| SM

    %% AWS Click
    click AWS "https://github.com/davydocsurg/ops-tutorials/tree/main/aws-modules/cloudformation"
    %% Docker modules click
    click DM "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules"
    click DC "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/docker-caching"
    click DCP "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/docker-compose"
    click DI "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/docker-images"
    click DN "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/docker-networking"
    click DEV "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/docker-environment-variables"
    click KN "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/kaniko"
    click PO "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/podman"
    click DW "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/windows"
    click DG "https://github.com/davydocsurg/ops-tutorials/tree/main/docker-modules/dockerfile-git-strategies"
    %% GitHub Actions click
    click GH "https://github.com/davydocsurg/ops-tutorials/tree/main/github-actions"
    click GH1 "https://github.com/davydocsurg/ops-tutorials/tree/main/github-actions/get-current-branch-in-github-actions"
    click GH2 "https://github.com/davydocsurg/ops-tutorials/tree/main/github-actions/using-an-env-file-in-github-actions/.github/workflows"
    %% GitLab modules click
    click GL "https://github.com/davydocsurg/ops-tutorials/tree/main/gitlab-modules"
    click GL1 "https://github.com/davydocsurg/ops-tutorials/tree/main/gitlab-modules/multiple-pipline-same-repo"
    click GL2 "https://github.com/davydocsurg/ops-tutorials/tree/main/gitlab-modules/pass-artifacts"
    click GL3 "https://github.com/davydocsurg/ops-tutorials/tree/main/gitlab-modules/share-yaml-configs"
    click GL4 "https://github.com/davydocsurg/ops-tutorials/tree/main/gitlab-modules/using-curl-cmd"
    %% Jenkins modules click
    click JK "https://github.com/davydocsurg/ops-tutorials/tree/main/jenkins-modules"
    click JK1 "https://github.com/davydocsurg/ops-tutorials/tree/main/jenkins-modules/jenkins-jobs"
    click JK2 "https://github.com/davydocsurg/ops-tutorials/tree/main/jenkins-modules/spring-jenkins-pipeline"
    %% Kubernetes modules click
    click K8s "https://github.com/davydocsurg/ops-tutorials/tree/main/kubernetes-modules"
    click K8s1 "https://github.com/davydocsurg/ops-tutorials/tree/main/kubernetes-modules/deployment-and-statefulset-configs"
    click K8s2 "https://github.com/davydocsurg/ops-tutorials/tree/main/kubernetes-modules/jkube-demo"
    %% Mesos Marathon click
    click MM "https://github.com/davydocsurg/ops-tutorials/tree/main/mesos-marathon"
    %% Server module click
    click SM "https://github.com/davydocsurg/ops-tutorials/tree/main/server-module"
    click SM1 "https://github.com/davydocsurg/ops-tutorials/tree/main/server-module/deploy-create-react-app-nginx"
    click SM2 "https://github.com/davydocsurg/ops-tutorials/tree/main/server-module/deploy-react-application-tomcat-server"

    %% Styles
    classDef repo fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef iac fill:#AED6F1,stroke:#21618C
    classDef build fill:#A9DFBF,stroke:#196F3D
    classDef ci fill:#F9E79F,stroke:#B9770E
    classDef orchestration fill:#F5B7B1,stroke:#922B21
    classDef deploy fill:#D7DBDD,stroke:#1C2833
```
