Update structure and docs

This commit is contained in:
Tyler Perkins 2024-11-02 20:19:58 -04:00
parent 102b527797
commit 1b22f06798
Signed by: tyler
GPG Key ID: 03B27509E17EFDC8
16 changed files with 86 additions and 12544 deletions

36
docs/architecture.md Normal file
View File

@ -0,0 +1,36 @@
# Cluster Architecture
The cluster consists of a `k3s` cluster, a dedicated bastion host
running an nginx reverse proxy, and a dedicated NAS.
```mermaid
architecture-beta
service internet(internet)[Internet]
group home(server)[Home]
service bastion(server)[Bastion] in home
service nas(disk)[Gluttony NAS] in home
group cluster(server)[K3S Cluster] in home
service gluttony(server)[Gluttony] in cluster
service gluttonygpu(server)[Gluttony GPU] in cluster
service gluttonym3(server)[Gluttony M3] in cluster
service metallb(cloud)[MetalLB] in cluster
service storage(cloud)[K3S Storage] in cluster
internet:L -- R:bastion
bastion:T -- R:metallb
metallb:T -- B:gluttony
metallb:T -- B:gluttonygpu
metallb:T -- B:gluttonym3
storage:B -- T:nas
```

39
docs/setup.md Normal file
View File

@ -0,0 +1,39 @@
# Setup Cluster
## Configure Bare Metal (Ansible)
To bootstrap the Cluster
1) Update the `inventory.yml` in the ansible directory to reflect the cluster
2) Ensure all ansible secrets are up to date
3) Run the playbooks in the following order
```
ping.yaml
bootstrap-systemd-debian.yaml
update-cluster.yaml
bootstrap-debian-nvidia-cuda.yaml
bootstrap-kubeseal.yaml
bootstrap-longhorn-drive.yaml
```
> Tip
>
> You can run an ansible script with,
>
> ```
> ansible-playbook -i inventory.yaml --ask-vault-pass ./playbooks/ping.yaml
> ```
## Setup Cluster (Flux)
Flux is the tool that will pull from the git repository and update the cluster state.
If you ran the ansible scripts, all hosts will have `flux` installed.
To bootstrap the cluster, run the following,
```bash
flux bootstrap gitea --owner=Infrastructure --repository=Gluttony-Cluster --private=false --path=cluster/ --branch=main
```

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
# This manifest was generated by flux. DO NOT EDIT.
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 1m0s
ref:
branch: main
secretRef:
name: flux-system
url: ssh://git@git.clortox.com/Infrastructure/Gluttony-Cluster
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 10m0s
path: ./
prune: true
sourceRef:
kind: GitRepository
name: flux-system

View File

@ -1,5 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml

View File

@ -5,6 +5,12 @@ docs_dir: docs/
repo_name: Gitea repo_name: Gitea
repo_url: https://git.clortox.com/Infrastructure/Gluttony-Cluster repo_url: https://git.clortox.com/Infrastructure/Gluttony-Cluster
nav:
- Introduction:
- Overview: index.md
- Architecture: architecture.md
- Setup: setup.md
theme: theme:
name: material name: material
#custom_dir: docs/overrides #custom_dir: docs/overrides
@ -22,11 +28,11 @@ theme:
markdown_extensions: markdown_extensions:
- pymdownx.highlight - pymdownx.highlight
#- pymdownx.superfences: - pymdownx.superfences:
# custom_fences: custom_fences:
# - name: mermaid - name: mermaid
# class: mermaid class: mermaid
# format: !!python/name:pymdownx.superfences.fence_code_format format: !!python/name:pymdownx.superfences.fence_code_format
- admonition - admonition
- footnotes - footnotes
- def_list - def_list