2022-07-15 20:28:57 +07:00
|
|
|
# Overview
|
2022-07-06 12:33:35 +07:00
|
|
|
|
|
|
|
## Components
|
|
|
|
|
|
|
|
```
|
|
|
|
+--------------+
|
|
|
|
| ./apps |
|
|
|
|
|--------------|
|
|
|
|
| ./platform |
|
|
|
|
|--------------| +------------+
|
|
|
|
| ./system |- - - -| ./external |
|
|
|
|
|--------------| +------------+
|
|
|
|
| ./metal |
|
|
|
|
|--------------|
|
|
|
|
| HARDWARE |
|
|
|
|
+--------------+
|
|
|
|
```
|
|
|
|
|
|
|
|
Main components:
|
|
|
|
|
|
|
|
- `./metal`: bare metal management, install Linux and Kubernetes
|
|
|
|
- `./system`: critical system components for the cluster (load balancer, storage, ingress, operation tools...)
|
2023-11-26 03:00:12 +07:00
|
|
|
- `./platform`: essential components for service hosting platform (git, build runners, dashboards...)
|
2022-07-06 12:33:35 +07:00
|
|
|
- `./apps`: user facing applications
|
|
|
|
- `./external` (optional): externally managed services
|
|
|
|
|
|
|
|
Support components:
|
|
|
|
|
|
|
|
- `./tools`: tools container, includes all the tools you'll need
|
|
|
|
- `./docs`: all documentation go here, this will generate a searchable web UI
|
|
|
|
- `./scripts`: scripts to automate common tasks
|
|
|
|
|
|
|
|
## Provisioning flow
|
|
|
|
|
|
|
|
Everything is automated, after you edit the configuration files, you just need to run a single `make` command and it will:
|
|
|
|
|
|
|
|
- (1) Build the `./metal` layer:
|
|
|
|
- Create an ephemeral, stateless PXE server
|
|
|
|
- Install Linux on all servers in parallel
|
|
|
|
- Build a Kubernetes cluster (based on k3s)
|
2024-04-17 15:21:10 +07:00
|
|
|
- (2) Bootstrap the `./system` layer:
|
|
|
|
- Install ArgoCD and the root app to manage itself and other layers, from now on ArgoCD will do the rest
|
|
|
|
- Install the remaining components (storage, monitoring, etc)
|
|
|
|
- (3) Build the `./platform` layer (Gitea, Grafana, SSO, etc)
|
|
|
|
- (4) Deploy applications in the `./apps` layer
|
2022-07-06 12:33:35 +07:00
|
|
|
|
|
|
|
```mermaid
|
|
|
|
flowchart TD
|
|
|
|
subgraph metal[./metal]
|
2022-07-20 22:49:12 +07:00
|
|
|
pxe[PXE Server] -.-> linux[Fedora Server] --> k3s
|
2022-07-06 12:33:35 +07:00
|
|
|
end
|
|
|
|
|
|
|
|
subgraph system[./system]
|
2024-04-17 15:21:10 +07:00
|
|
|
argocd[ArgoCD and root app]
|
2022-07-06 12:33:35 +07:00
|
|
|
nginx[NGINX]
|
2024-03-13 00:27:52 +07:00
|
|
|
rook-ceph[Rook Ceph]
|
2022-07-06 12:33:35 +07:00
|
|
|
cert-manager
|
|
|
|
external-dns[External DNS]
|
|
|
|
cloudflared
|
|
|
|
end
|
|
|
|
|
|
|
|
subgraph external[./external]
|
|
|
|
letsencrypt[Let's Encrypt]
|
|
|
|
cloudflare[Cloudflare]
|
|
|
|
end
|
|
|
|
|
|
|
|
letsencrypt -.-> cert-manager
|
|
|
|
cloudflare -.-> cert-manager
|
|
|
|
cloudflare -.-> external-dns
|
|
|
|
cloudflare -.-> cloudflared
|
|
|
|
|
2024-04-17 15:21:10 +07:00
|
|
|
subgraph platform[./platform]
|
2023-11-26 03:00:12 +07:00
|
|
|
Gitea
|
2024-01-08 23:37:12 +07:00
|
|
|
Woodpecker
|
2023-11-26 03:00:12 +07:00
|
|
|
Grafana
|
2022-07-06 12:33:35 +07:00
|
|
|
end
|
|
|
|
|
2024-04-17 15:21:10 +07:00
|
|
|
subgraph apps[./apps]
|
2024-01-19 22:22:12 +07:00
|
|
|
homepage[Homepage]
|
2022-07-06 12:33:35 +07:00
|
|
|
jellyfin[Jellyfin]
|
|
|
|
matrix[Matrix]
|
|
|
|
paperless[Paperless]
|
|
|
|
end
|
|
|
|
|
2024-04-17 15:21:10 +07:00
|
|
|
make[Run make] -- 1 --> metal -- 2 --> system -. 3 .-> platform -. 4 .-> apps
|
2022-07-06 12:33:35 +07:00
|
|
|
```
|