Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 5e4ab66

Browse files
committed
Major update, remove hero, update apps, switch to rke2
1 parent 2286a69 commit 5e4ab66

File tree

32 files changed

+59
-220
lines changed

32 files changed

+59
-220
lines changed

Diff for: README.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ These VMs are ran on the dedicated server (`OMORI`) at Hetzner. I have purchased
5151
| `Basil` | Rancher upstream cluster | Ubuntu 22.04 | 4 vCPU | 16GiB | 1x 100GiB (boot) |
5252
| `Aubrey` | Rancher cluster for personal applications | Ubuntu 22.04 | 10 vCPU | 48GiB | 1x 350GiB (boot) |
5353
| `Kel` | Rancher cluster for public facing applications | Ubuntu 22.04 | 6 vCPU | 24GiB | 1x 100GiB (boot) |
54-
| `Hero` | Rancher cluster for [Queer Coded](https://github.com/queercoded-dev) (pending) | Ubuntu 22.04 | 6 vCPU | 32GiB | 1x 300GiB (boot) |
5554
###### These are characters from the game OMORI, quite fitting if you are familiar with the story ;)
5655

5756
## Applications
@@ -60,7 +59,7 @@ These are the applications I run on my homelab.
6059
| --- | --- | --- |
6160
| [Rancher](https://rancher.com/) | Kubernetes cluster management | Upstream cluster (`Basil`) |
6261
| [Longhorn](https://longhorn.io/) | Storage for Kubernetes | All rancher clusters |
63-
| [Joplin Server](https://joplinapp.org/) | Cloud sync for Joplin notes application | Personal cluster (`Aubrey`) |
62+
| [Nextcloud](https://nextcloud.com/) | Personal cloud | Personal cluster (`Aubrey`) |
6463
| [Vaultwarden](https://github.com/dani-garcia/vaultwarden) | Password manager | Personal cluster (`Aubrey`) |
6564
| [GitLab](https://gitlab.com/) | Git mirror | Personal cluster (`Aubrey`) |
6665
| [Nextcloud](https://nextcloud.com/) | Personal cloud | Personal cluster (`Aubrey`) |
@@ -79,7 +78,7 @@ These repositories are included in this project. This includes Ansible roles, co
7978
| Repository | Type | Purpose |
8079
| --- | --- | --- |
8180
| [ansible_role_docker](https://github.com/diademiemi/ansible_role_docker) | Ansible role | Install Docker on my NAS |
82-
| [ansible_role_k3s](https://github.com/diademiemi/ansible_role_k3s) | Ansible role | Install K3S on the `Basil` VM for Rancher |
81+
| [ansible_role_rke2](https://github.com/diademiemi/ansible_role_rke2) | Ansible role | Install rke2 on the `Basil` VM for Rancher |
8382
| [ansible_role_helm](https://github.com/diademiemi/ansible_role_helm) | Ansible role | Install Helm on the `Basil` VM for Rancher |
8483
| [ansible_role_openzfs](https://github.com/diademiemi/ansible_role_openzfs) | Ansible role | Install OpenZFS on my NAS |
8584
| [ansible_role_wireguard](https://github.com/diademiemi/ansible_role_wireguard) | Ansible role | Install Wireguard on the `OMORI` host to connect to the `Undertale` router |
@@ -132,13 +131,12 @@ File | Type | Purpose
132131
[`playbooks/hetzner/05-applications.yml`](./playbooks/hetzner/05-applications.yml) | Ansible Playbook | Playbook to deploy the ArgoCD application to the Rancher clusters
133132
[`playbooks/hetzner/backups/create.yml`](./playbooks/hetzner/backups/create.yml) | Ansible Playbook | Playbook to backups of all Longhorn volumes to the NAS and store the backup names in a temporary file
134133
[`playbooks/hetzner/backups/restore.yml`](playbooks/hetzner/backups/restore.yml) | Ansible Playbook | Playbook to restore the Longhorn volumes from the NAS
135-
[`inventory/main/group_vars/all/main.yml`](./inventory/main/group_vars/all/main.yml) | Ansible Variables | Variables used by all hosts in the inventory. This includes Wireguard options, Hetzner, K3S and Rancher options
134+
[`inventory/main/group_vars/all/main.yml`](./inventory/main/group_vars/all/main.yml) | Ansible Variables | Variables used by all hosts in the inventory. This includes Wireguard options, Hetzner, rke2 and Rancher options
136135
[`inventory/main/host_vars/omori/wireguard.yml`](./inventory/main/host_vars/omori/wireguard.yml) | Ansible Variables | Variables used to deploy Wireguard on the `omori` host. This includes the Wireguard IP addresses, keys and hosts to connect
137136
[`inventory/main/host_vars/omori/system.yml`](./inventory/main/host_vars/omori/system.yml) | Ansible Variables | Variables used to configure the `omori` host.
138-
[`inventory/main/host_vars/basil/main.yml`](./inventory/main/host_vars/basil/main.yml) | Ansible Variables | Variables used by the `basil` host. This includes options for the K3S deployment and the secret age key
137+
[`inventory/main/host_vars/basil/main.yml`](./inventory/main/host_vars/basil/main.yml) | Ansible Variables | Variables used by the `basil` host. This includes options for the rke2 deployment and the secret age key
139138
[`inventory/main/host_vars/aubrey/main.yml`](./inventory/main/host_vars/aubrey/main.yml) | Ansible Variables | Variables used by the `aubrey` host. This includes the cluster name and secret age key
140139
[`inventory/main/host_vars/kel/main.yml`](./inventory/main/host_vars/kel/main.yml) | Ansible Variables | Variables used by the `kel` host. This includes the cluster name and secret age key
141-
[`inventory/main/host_vars/hero/main.yml`](./inventory/main/host_vars/hero/main.yml) | Ansible Variables | Variables used by the `hero` host. This includes the cluster name and secret age key
142140
[`inventory/main/host_vars/localhost/terraform.yml`](./inventory/main/host_vars/localhost/terraform.yml) | Ansible Variables | Variables used that are fed into Terraform. This includes extra DNS records, Cloudflare variables and the Rancher users so that they can be encrypted with Ansible Vault
143141
[`inventory/main/host_vars/localhost/hetzner.yml`](./inventory/main/host_vars/localhost/hetzner.yml) | Ansible Variables | Variables used that are used to communicate with the Hetzner API
144142
[`terraform/vms/*.tf`](./terraform/vms/) | Terraform | Terraform files to deploy the VMs to the dedicated server

Diff for: inventory/main/group_vars/all/all.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
---
22
wireguard_master_inventory_hostname: omori
33

4-
k3s_version: "v1.25.10+k3s1"
5-
6-
k3s_extra_server_args: "--node-name {{ ansible_facts['hostname'] }}"
7-
8-
kubeconfig_path: "/etc/rancher/k3s/k3s.yaml"
4+
kubeconfig_path: "/etc/rancher/rke2/rke2.yaml"
95

106
rancher_bootstrap_password: "{{ vault_rancher_bootstrap_password }}"
117

Diff for: inventory/main/group_vars/all/vault.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
$ANSIBLE_VAULT;1.1;AES256
2-
64363063376630323430336431343032643036353235366331383335633066366339356234353430
3-
3737653439363532303136376662643838303539666231620a303565613432323038623563313265
4-
61326533623064373366373131386139393239643838303565616562613133643164376333363030
5-
3138343263666333660a303339303362653637383563373661383836613031336663646363366662
6-
34633934386638323066383161616463303665313663643433623234386135343962363031333632
7-
39623232643263366436326230616131613031646337393462313535613565386333363438626234
8-
30356338393963633464396639396630653739646231633262303766386633333532393265663732
9-
34643635366332396361633933343233306664383930636166343761623331336431313935633636
10-
66363639356233366333323132343639333635316135646634376231666437623234656566623837
11-
3835393961353433623539306565646363346239616466616131
2+
33376462376233653338623765306165373133633535343263383139613432333032326334313631
3+
3561353836623761623264626663323035383137306238390a666265656633313330336136386638
4+
36356237353761313030366138636530363837313766663366613062633461373934643666623230
5+
6533366662343034310a613530373733313632396239363765653466363337666636393431393465
6+
62333563323463356564346530383731616665393363643665376135313038623765333234333236
7+
36613630386466643661326130666530353262383666656663383139396432346537383261663731
8+
61376132626462363334386133653435363635656136323038656333376332633730393637656539
9+
66363631666465386334373862323465363138353736616361616633306262363436363234616438
10+
32373939386139613765393437323964383564666133346339386131663237613864386230643536
11+
3836303630353835396164643965623831373765653130393165

Diff for: inventory/main/host_vars/basil/main.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
22
system_hostname: "basil.blahaj.sh"
3-
k3s_role: "master"
3+
rke2_channel: "v1.26"
4+
rke2_type: "server"
5+
rke2_tls_san:
6+
- "blahaj.sh"
47

5-
k3s_retrieve_kubeconfig: true
6-
k3s_kubeconfig_local_dest: ~/.kube/config-hetzner_server
8+
# rke2_retrieve_kubeconfig: true
9+
# rke2_kubeconfig_local_dest: ~/.kube/config-hetzner_server
710

811
agekey: "{{ vault_agekey }}"
912

Diff for: inventory/main/host_vars/hero/main.yml

-7
This file was deleted.

Diff for: inventory/main/host_vars/hero/vault.yml

-22
This file was deleted.

Diff for: inventory/main/host_vars/localhost/terraform.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,32 @@ dns_records:
1010
type: "CNAME"
1111
ttl: 1
1212
value: "aubrey.blahaj.sh"
13-
proxied: false
13+
proxied: true
1414
allow_overwrite: true
1515
- name: "blahaj.sh"
1616
zone_id: "{{ terraform_domain_zone_map['blahaj']['sh'] }}"
1717
type: "CNAME"
1818
ttl: 1
1919
value: "aubrey.blahaj.sh"
20+
proxied: true
21+
allow_overwrite: true
22+
- name: "tonetag.is"
23+
zone_id: "{{ terraform_domain_zone_map['tonetag']['is'] }}"
24+
type: "CNAME"
25+
ttl: 1
26+
value: "kel.blahaj.sh"
2027
proxied: false
2128
allow_overwrite: true
2229

2330
terraform_domain_zone_map:
31+
diademiemi:
32+
me: "72bea38f2a542b196e1b6454f359e7a7"
2433
blahaj:
2534
sh: "26c4cee4cc505e99a566c577895cab4a"
2635
queercoded:
2736
dev: "6a3f0f8093ccbe852a7212bb81df6c03"
37+
tonetag:
38+
is: "d78598f3e1da5133c88e3bf61b7cca21"
2839

2940
terraform_rancher_users:
3041
- name: "diademiemi"

Diff for: kubernetes/argocd-gitlab/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ helmCharts:
2121
apiVersion: "policy/v1"
2222
ingress:
2323
apiVersion: "networking.k8s.io/v1"
24-
class: "traefik"
24+
class: "nginx"
2525
enabled: true
2626
tls:
2727
secretName: gitlab-blahaj-cert

Diff for: kubernetes/argocd-personal/applications/joplin-server/kustomization.yaml

-41
This file was deleted.

Diff for: kubernetes/argocd-personal/applications/kustomization.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
resources:
2-
- ./joplin-server
32
- ./vaultwarden
43
- ./gitlab
54
- ./site-blahaj-sh

Diff for: kubernetes/argocd-personal/applications/libreddit/kustomization.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ helmCharts:
88
version: "0.1.1"
99
valuesInline:
1010
ingress:
11+
annotations:
12+
ingress.kubernetes.io/force-ssl-redirect: "true"
1113
enabled: true
1214
hosts:
1315
- host: libreddit.blahaj.sh

Diff for: kubernetes/argocd-personal/applications/nextcloud/kustomization.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ helmCharts:
88
releaseName: nextcloud
99
namespace: nextcloud
1010
repo: https://nextcloud.github.io/helm/
11-
version: "3.5.15"
11+
version: "4.3.1"
1212
valuesInline:
1313
nextcloud:
1414
host: cloud.blahaj.sh
@@ -27,7 +27,7 @@ helmCharts:
2727
enabled: true
2828

2929
ingress:
30-
className: traefik
30+
className: nginx
3131
enabled: true
3232
tls:
3333
- hosts:

Diff for: kubernetes/argocd-personal/applications/site-blahaj-sh/ingress.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ kind: Ingress
33
metadata:
44
name: site-blahaj-sh
55
namespace: site-blahaj-sh
6+
annotations:
7+
ingress.kubernetes.io/force-ssl-redirect: "true"
68
spec:
79
rules:
810
- host: blahaj.sh

Diff for: kubernetes/argocd-personal/applications/vaultwarden/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ helmCharts:
55
releaseName: vaultwarden
66
namespace: vaultwarden
77
repo: https://diademiemi.github.io/charts
8-
version: "0.2.0"
8+
version: "0.3.0"
99
valuesInline:
1010
image:
1111
repository: vaultwarden/server

Diff for: kubernetes/argocd-personal/cert-manager/certificates/home.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ spec:
88
secretName: home-blahaj-cert
99
commonName: home.blahaj.sh
1010
dnsNames:
11-
- blahaj.sh # To work around https://letsencrypt.org/docs/duplicate-certificate-limit/
1211
- home.blahaj.sh
1312
issuerRef:
1413
name: blahaj-issuer

Diff for: kubernetes/argocd-personal/cert-manager/certificates/media.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ spec:
88
secretName: media-blahaj-cert
99
commonName: media.blahaj.sh
1010
dnsNames:
11-
- blahaj.sh # To work around https://letsencrypt.org/docs/duplicate-certificate-limit/
1211
- media.blahaj.sh
1312
issuerRef:
1413
name: blahaj-issuer

Diff for: kubernetes/argocd-personal/ingresses/home-assistant.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ kind: Ingress
3232
metadata:
3333
name: homeassistant-service
3434
namespace: ingresses
35+
annotations:
36+
ingress.kubernetes.io/force-ssl-redirect: "true"
3537
spec:
3638
rules:
3739
- host: home.blahaj.sh

Diff for: kubernetes/argocd-personal/ingresses/jellyfin.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ kind: Ingress
3232
metadata:
3333
name: jellyfin-service
3434
namespace: ingresses
35+
annotations:
36+
ingress.kubernetes.io/force-ssl-redirect: "true"
3537
spec:
3638
rules:
3739
- host: media.blahaj.sh

Diff for: kubernetes/argocd-qc/.sops.yaml

-4
This file was deleted.

Diff for: kubernetes/argocd-qc/kustomization.yaml

-2
This file was deleted.

Diff for: kubernetes/argocd-qc/rancher-backups/schedule.yaml

-8
This file was deleted.

Diff for: kubernetes/fleet-argocd-projects/fleet.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,3 @@ targetCustomizations:
1414
identifier/name: public
1515
kustomize:
1616
dir: overlays/public
17-
18-
- name: qc
19-
clusterSelector:
20-
matchLabels:
21-
identifier/name: qc
22-
kustomize:
23-
dir: overlays/qc

Diff for: kubernetes/fleet-argocd-projects/overlays/qc/app.yaml

-8
This file was deleted.

Diff for: kubernetes/fleet-argocd-projects/overlays/qc/kustomization.yaml

-5
This file was deleted.

Diff for: kubernetes/fleet-global/cert-manager/fleet.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ helm:
44
releaseName: cert-manager
55
chart: cert-manager
66
repo: https://partner-charts.rancher.io/
7-
version: "v1.12.0"
7+
version: "v1.13.1"
88

99
values:
1010
installCRDs: true

Diff for: kubernetes/fleet-global/longhorn/fleet.yaml

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ helm:
44
releaseName: longhorn
55
chart: longhorn
66
repo: https://charts.rancher.io/
7-
version: "102.2.1+up1.4.2"
7+
version: "102.3.0+up1.5.1"
88

99
values:
1010
persistence:
@@ -35,12 +35,3 @@ targetCustomizations:
3535
values:
3636
defaultSettings:
3737
backupTarget: "s3://longhorn-backups-public@minio/"
38-
39-
- name: qc
40-
clusterSelector:
41-
matchLabels:
42-
identifier/name: qc
43-
helm:
44-
values:
45-
defaultSettings:
46-
backupTarget: "s3://longhorn-backups-qc@minio/"

Diff for: kubernetes/fleet-global/rancher-backup/fleet.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ helm:
44
releaseName: rancher-backup
55
chart: rancher-backup
66
repo: https://charts.rancher.io/
7-
version: "102.0.0+up3.1.0"
7+
version: "102.0.2+up3.1.2"
88

99
values:
1010
s3:

0 commit comments

Comments
 (0)