# seokpan/seokpan-infra architecture

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

- Interactive diagram: https://gitdiagram.com/seokpan/seokpan-infra
- Repository: https://github.com/seokpan/seokpan-infra

## Overview

This repository automates on-premises server, network, database, and Kubernetes infrastructure with Ansible. The principal workflow is an operator selecting a playbook through the safe-run entry point; Ansible uses the inventory to target hosts and invokes role-based automation that configures infrastructure. Major documented branches include networking, Kubernetes bootstrap, TLS, data and disaster recovery, storage, CI/CD secrets, and observability. The README documents these capabilities and broad execution relationships; source excerpts do not expose task-level calls, so the graph stays at that level.

Main entry points: [`ansible/playbooks`](https://github.com/seokpan/seokpan-infra/tree/main/ansible/playbooks) (Playbook entrypoints), [`ansible/roles`](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles) (CI/CD secrets), [`ansible/ansible-safe-run`](https://github.com/seokpan/seokpan-infra/blob/main/ansible/ansible-safe-run) (Safe-run entry), [`ansible/inventory`](https://github.com/seokpan/seokpan-infra/tree/main/ansible/inventory) (Host inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Ansible execution"]
  node_runner["Safe-run entry"]
  node_playbooks["Playbook entrypoints"]
  node_inventory["Host inventory"]
end

subgraph group_network["Network and platform"]
  node_networking["Network and LB"]
  node_kubernetes["Kubernetes bootstrap"]
  node_registry["Harbor registry"]
end

subgraph group_data["Data and recovery"]
  node_database[("MariaDB and MaxScale")]
  node_backup["Database backup DR"]
  node_etcd["Etcd recovery"]
  node_storage[("NFS storage")]
end

subgraph group_security["Security and integrations"]
  node_certificates["Certificate and TLS"]
  node_secrets["CI/CD secrets"]
end

subgraph group_observability["Observability"]
  node_exporters["Metrics exporters"]
  node_alerting["Alertmanager secret"]
end

node_operator(("Operator"))
node_gitops["GitOps repository"]
node_applications["Application repository"]

node_operator -->|"invokes"| node_runner
node_runner -->|"runs selected"| node_playbooks
node_playbooks -->|"targets hosts"| node_inventory
node_playbooks -->|"configures"| node_networking
node_playbooks -->|"bootstraps"| node_kubernetes
node_playbooks -->|"configures"| node_registry
node_playbooks -->|"configures"| node_database
node_playbooks -->|"runs recovery"| node_backup
node_playbooks -->|"runs recovery"| node_etcd
node_playbooks -->|"configures"| node_storage
node_playbooks -->|"deploys TLS"| node_certificates
node_playbooks -->|"manages secrets"| node_secrets
node_secrets -.->|"supports integration"| node_gitops
node_secrets -.->|"supports integration"| node_applications
node_playbooks -->|"installs"| node_exporters
node_playbooks -->|"manages secrets"| node_alerting

click node_runner "https://github.com/seokpan/seokpan-infra/blob/main/ansible/ansible-safe-run"
click node_playbooks "https://github.com/seokpan/seokpan-infra/tree/main/ansible/playbooks"
click node_inventory "https://github.com/seokpan/seokpan-infra/tree/main/ansible/inventory"
click node_networking "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles"
click node_kubernetes "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles"
click node_registry "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/harbor"
click node_database "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles"
click node_backup "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/backup_transfer"
click node_etcd "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/etcd_dr"
click node_storage "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/nfs_server"
click node_certificates "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles"
click node_secrets "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles"
click node_exporters "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles"
click node_alerting "https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/alertmanager_secret"

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_runner,node_playbooks,node_inventory toneBlue
class node_networking,node_kubernetes,node_registry toneAmber
class node_database,node_backup,node_etcd,node_storage toneMint
class node_certificates,node_secrets toneRose
class node_exporters,node_alerting,node_operator,node_gitops,node_applications toneIndigo
```

## Components

### Ansible execution

- [Safe-run entry](https://github.com/seokpan/seokpan-infra/blob/main/ansible/ansible-safe-run): `ansible/ansible-safe-run`
- [Playbook entrypoints](https://github.com/seokpan/seokpan-infra/tree/main/ansible/playbooks): `ansible/playbooks`
- [Host inventory](https://github.com/seokpan/seokpan-infra/tree/main/ansible/inventory): `ansible/inventory`

### Network and platform

- [Network and LB](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles): `ansible/roles`
- [Kubernetes bootstrap](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles): `ansible/roles`
- [Harbor registry](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/harbor): `ansible/roles/harbor`

### Data and recovery

- [MariaDB and MaxScale](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles): `ansible/roles`
- [Database backup DR](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/backup_transfer): `ansible/roles/backup_transfer`
- [Etcd recovery](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/etcd_dr): `ansible/roles/etcd_dr`
- [NFS storage](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/nfs_server): `ansible/roles/nfs_server`

### Security and integrations

- [Certificate and TLS](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles): `ansible/roles`
- [CI/CD secrets](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles): `ansible/roles`

### Observability

- [Metrics exporters](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles): `ansible/roles`
- [Alertmanager secret](https://github.com/seokpan/seokpan-infra/tree/main/ansible/roles/alertmanager_secret): `ansible/roles/alertmanager_secret`

### Other components

- **Operator**
- **GitOps repository**
- **Application repository**

## Connections

- Operator → Safe-run entry: invokes (evidence: `README.md`)
- Safe-run entry → Playbook entrypoints: runs selected (evidence: `README.md`)
- Playbook entrypoints → Host inventory: targets hosts (evidence: `README.md`)
- Playbook entrypoints → Network and LB: configures (evidence: `README.md`)
- Playbook entrypoints → Kubernetes bootstrap: bootstraps (evidence: `README.md`)
- Playbook entrypoints → Harbor registry: configures (evidence: `README.md`)
- Playbook entrypoints → MariaDB and MaxScale: configures (evidence: `README.md`)
- Playbook entrypoints → Database backup DR: runs recovery (evidence: `README.md`)
- Playbook entrypoints → Etcd recovery: runs recovery (evidence: `README.md`)
- Playbook entrypoints → NFS storage: configures (evidence: `README.md`)
- Playbook entrypoints → Certificate and TLS: deploys TLS (evidence: `README.md`)
- Playbook entrypoints → CI/CD secrets: manages secrets (evidence: `README.md`)
- CI/CD secrets → GitOps repository: supports integration (evidence: `README.md`)
- CI/CD secrets → Application repository: supports integration (evidence: `README.md`)
- Playbook entrypoints → Metrics exporters: installs (evidence: `README.md`)
- Playbook entrypoints → Alertmanager secret: manages secrets (evidence: `README.md`)
