Update structure and docs
This commit is contained in:
parent
102b527797
commit
1b22f06798
36
docs/architecture.md
Normal file
36
docs/architecture.md
Normal 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
39
docs/setup.md
Normal 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
@ -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
|
|
@ -1,5 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- gotk-components.yaml
|
|
||||||
- gotk-sync.yaml
|
|
16
mkdocs.yaml
16
mkdocs.yaml
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user