# fmalejki/sre-training architecture

> Architecture diagram of the GitHub repository fmalejki/sre-training, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fmalejki/sre-training
- Repository: https://github.com/fmalejki/sre-training

## Overview

This repository is a collection of SRE interview-preparation examples, not a single application. One runnable workflow is the Express monitoring demo: a client requests the backend, which serves pages and exposes Prometheus metrics; a Python script requests the backend and parses the response into a pandas table. The tree also documents container, Kubernetes, IaC, and Jenkins examples, but their runtime wiring is not established by the sampled source. Python algorithm exercises are independent. The README is a generic template, so capability details beyond names and sampled code are limited.

Main entry points: [`SRE-monitoring/backend/server.js`](https://github.com/fmalejki/sre-training/blob/main/SRE-monitoring/backend/server.js) (Express server), [`SRE-pandas/monitoring-pandas/req.py`](https://github.com/fmalejki/sre-training/blob/main/SRE-pandas/monitoring-pandas/req.py) (Metrics parser), [`SRE-monitoring/frontend`](https://github.com/fmalejki/sre-training/tree/main/SRE-monitoring/frontend) (Static frontend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_monitoring["Monitoring demo"]
  node_express["Express server<br/>[server.js]"]
  node_frontend["Static frontend"]
  node_prommetrics["Prometheus metrics<br/>[server.js]"]
  node_pandas["Metrics parser<br/>[req.py]"]
end

subgraph group_containers["Container examples"]
  node_dockercompose["Compose stack<br/>[docker-compose.yml]"]
  node_monitorconfig["Prometheus config<br/>[prometheus.yml]"]
  node_alertconfig["Alert rules<br/>[alert_rules.yml]"]
  node_alertmanager["Alertmanager config<br/>[alertmanager.yml]"]
  node_bindmount["Bind-mount apps"]
  node_multicontainer["Multi-container app"]
  node_dockerserver["Docker server demos"]
  node_welcomedocker["Docker welcome demo"]
end

subgraph group_orchestration["Kubernetes examples"]
  node_k8scompose["Compose conversion"]
  node_webappk8s["Web app manifest<br/>[webapp.yml]"]
  node_mongok8s["Mongo manifests<br/>[mongo.yml]"]
  node_mongoconfig["Mongo config<br/>[mongo-config.yml]"]
  node_mongosecret["Mongo secret<br/>[mongo-secret.yml]"]
end

subgraph group_automation["Infrastructure automation"]
  node_ansible["Ansible example<br/>[sample-ansible.yml]"]
  node_terraform["Terraform examples"]
  node_jenkins["Jenkins examples"]
end

subgraph group_exercises["Python exercises"]
  node_linkedlists["Linked-list operations<br/>[linked-lists.py]"]
  node_recursion["Algorithm exercises<br/>[recurssion.py]"]
end

node_client(("HTTP client"))

node_client -->|"HTTP requests"| node_express
node_express -->|"serves files"| node_frontend
node_express -->|"increments and exposes"| node_prommetrics
node_pandas -->|"requests port 3030"| node_express
node_pandas -->|"parses response"| node_pandas

click node_express "https://github.com/fmalejki/sre-training/blob/main/SRE-monitoring/backend/server.js"
click node_frontend "https://github.com/fmalejki/sre-training/tree/main/SRE-monitoring/frontend"
click node_prommetrics "https://github.com/fmalejki/sre-training/blob/main/SRE-monitoring/backend/server.js"
click node_pandas "https://github.com/fmalejki/sre-training/blob/main/SRE-pandas/monitoring-pandas/req.py"
click node_dockercompose "https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/docker-compose.yml"
click node_monitorconfig "https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/prometheus.yml"
click node_alertconfig "https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/alert_rules.yml"
click node_alertmanager "https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/alertmanager.yml"
click node_bindmount "https://github.com/fmalejki/sre-training/tree/main/SRE-docker/bindmount-apps"
click node_multicontainer "https://github.com/fmalejki/sre-training/tree/main/SRE-docker/multi-container-app"
click node_dockerserver "https://github.com/fmalejki/sre-training/tree/main/SRE-docker/docker-server"
click node_welcomedocker "https://github.com/fmalejki/sre-training/tree/main/SRE-docker/welcome-to-docker"
click node_k8scompose "https://github.com/fmalejki/sre-training/tree/main/SRE-k8s/compose-to-k8s"
click node_webappk8s "https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/webapp.yml"
click node_mongok8s "https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/mongo.yml"
click node_mongoconfig "https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/mongo-config.yml"
click node_mongosecret "https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/mongo-secret.yml"
click node_ansible "https://github.com/fmalejki/sre-training/blob/main/SRE-IaC/ansible/sample-ansible.yml"
click node_terraform "https://github.com/fmalejki/sre-training/tree/main/SRE-IaC/terraform"
click node_jenkins "https://github.com/fmalejki/sre-training/tree/main/SRE-CICD/Jenkins"
click node_linkedlists "https://github.com/fmalejki/sre-training/blob/main/SRE-python/linked-lists.py"
click node_recursion "https://github.com/fmalejki/sre-training/blob/main/SRE-python/recurssion.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_express,node_frontend,node_prommetrics,node_pandas,node_client toneBlue
class node_dockercompose,node_monitorconfig,node_alertconfig,node_alertmanager,node_bindmount,node_multicontainer,node_dockerserver,node_welcomedocker toneAmber
class node_k8scompose,node_webappk8s,node_mongok8s,node_mongoconfig,node_mongosecret toneMint
class node_ansible,node_terraform,node_jenkins toneRose
class node_linkedlists,node_recursion toneIndigo
```

## Components

### Monitoring demo

- [Express server](https://github.com/fmalejki/sre-training/blob/main/SRE-monitoring/backend/server.js): `SRE-monitoring/backend/server.js`
- [Static frontend](https://github.com/fmalejki/sre-training/tree/main/SRE-monitoring/frontend): `SRE-monitoring/frontend`
- [Prometheus metrics](https://github.com/fmalejki/sre-training/blob/main/SRE-monitoring/backend/server.js): `SRE-monitoring/backend/server.js`
- [Metrics parser](https://github.com/fmalejki/sre-training/blob/main/SRE-pandas/monitoring-pandas/req.py): `SRE-pandas/monitoring-pandas/req.py`

### Container examples

- [Compose stack](https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/docker-compose.yml): `SRE-docker/docker-compose/docker-compose.yml`
- [Prometheus config](https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/prometheus.yml): `SRE-docker/docker-compose/prometheus.yml`
- [Alert rules](https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/alert_rules.yml): `SRE-docker/docker-compose/alert_rules.yml`
- [Alertmanager config](https://github.com/fmalejki/sre-training/blob/main/SRE-docker/docker-compose/alertmanager.yml): `SRE-docker/docker-compose/alertmanager.yml`
- [Bind-mount apps](https://github.com/fmalejki/sre-training/tree/main/SRE-docker/bindmount-apps): `SRE-docker/bindmount-apps`
- [Multi-container app](https://github.com/fmalejki/sre-training/tree/main/SRE-docker/multi-container-app): `SRE-docker/multi-container-app`
- [Docker server demos](https://github.com/fmalejki/sre-training/tree/main/SRE-docker/docker-server): `SRE-docker/docker-server`
- [Docker welcome demo](https://github.com/fmalejki/sre-training/tree/main/SRE-docker/welcome-to-docker): `SRE-docker/welcome-to-docker`

### Kubernetes examples

- [Compose conversion](https://github.com/fmalejki/sre-training/tree/main/SRE-k8s/compose-to-k8s): `SRE-k8s/compose-to-k8s`
- [Web app manifest](https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/webapp.yml): `SRE-k8s/webapp.yml`
- [Mongo manifests](https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/mongo.yml): `SRE-k8s/mongo.yml`
- [Mongo config](https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/mongo-config.yml): `SRE-k8s/mongo-config.yml`
- [Mongo secret](https://github.com/fmalejki/sre-training/blob/main/SRE-k8s/mongo-secret.yml): `SRE-k8s/mongo-secret.yml`

### Infrastructure automation

- [Ansible example](https://github.com/fmalejki/sre-training/blob/main/SRE-IaC/ansible/sample-ansible.yml): `SRE-IaC/ansible/sample-ansible.yml`
- [Terraform examples](https://github.com/fmalejki/sre-training/tree/main/SRE-IaC/terraform): `SRE-IaC/terraform`
- [Jenkins examples](https://github.com/fmalejki/sre-training/tree/main/SRE-CICD/Jenkins): `SRE-CICD/Jenkins`

### Python exercises

- [Linked-list operations](https://github.com/fmalejki/sre-training/blob/main/SRE-python/linked-lists.py): `SRE-python/linked-lists.py`
- [Algorithm exercises](https://github.com/fmalejki/sre-training/blob/main/SRE-python/recurssion.py): `SRE-python/recurssion.py`

### Other components

- **HTTP client**

## Connections

- HTTP client → Express server: HTTP requests
- Express server → Static frontend: serves files
- Express server → Prometheus metrics: increments and exposes
- Metrics parser → Express server: requests port 3030
- Metrics parser → Metrics parser: parses response
