kube local storage migration

This commit is contained in:
2024-07-11 00:56:51 -04:00
parent 887df21477
commit f2f51a923a
90 changed files with 614 additions and 1087 deletions

134
README.md
View File

@@ -7,15 +7,12 @@ A project to store homelab stuff.
- [Homelab](#homelab)
- [Table of Contents](#table-of-contents)
- [Apps](#apps)
- [Dashboard](#dashboard)
- [Nextcloud](#nextcloud)
- [Test Deploy](#test-deploy)
- [Gitea](#gitea)
- [Staging](#staging)
- [Install](#install)
- [Minecraft](#minecraft)
- [Nimcraft](#nimcraft)
- [Testing](#testing)
- [Nimcraft](#nimcraft)
- [Courtnie](#courtnie)
- [Snapdrop](#snapdrop)
- [Jellyfin](#jellyfin)
@@ -25,95 +22,6 @@ A project to store homelab stuff.
## Apps
### Dashboard
The kubernetes dashboard isn't all that useful but it can sometimes give you a good
visual breakdown when things are going wrong. It's sometimes faster than running
`kubectl get` commands over and over.
Create the dashboard and an admin user with:
```bash
helm upgrade \
--install \
--namespace kubernetes-dashboard \
--create-namespace \
dashboard-user ./helm/dashboard-user
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
```
Then login with the following:
```bash
kubectl -n kubernetes-dashboard create token admin-user
kubectl proxy
```
### Nextcloud
The first chart we'll deploy is nextcloud. This is a custom chart because Nextcloud
doesn't support helm installation natively (yet). There is a native Docker image and
really detailed installation instructions so we can pretty easily piece together what's
required.
This image runs the nextcloud cron job automatically and creates random secrets for all
infrastructure - very helpful for a secure deployment, not very helpful for migrating
clusters. You'll want to export the secrets and save them in a secure location.
```bash
helm upgrade --install \
nextcloud \
./helm/nextcloud \
--namespace nextcloud \
--create-namespace
```
Need to add lots of files? Copy them to the user data dir and then run
```bash
./occ files:scan --all
```
Set up SES with the following links:
<https://docs.aws.amazon.com/general/latest/gr/ses.html>
To upgrade you'll need to:
1. Apply the new image in values.yaml
2. Exec into the container and run the following:
```bash
su -s /bin/bash www-data
./occ upgrade
./occ maintenance:mode --off
```
See <https://docs.nextcloud.com/server/latest/admin_manual/maintenance/upgrade.html#maintenance-mode>
for more information.
#### Test Deploy
You can create a test deployment with the following:
```bash
helm upgrade --install nextcloud ./helm/nextcloud \
--namespace nextcloud-test \
--create-namespace \
--set nextcloud.domain=nextcloud-test.reeseapps.com \
--set nextcloud.html.storageClassName=zfs-nfs-enc1 \
--set nextcloud.html.storage=8Gi \
--set nextcloud.data.storageClassName=zfs-nfs-enc1 \
--set nextcloud.data.storage=8Gi \
--set postgres.storageClassName=zfs-nfs-enc1 \
--set postgres.storage=8Gi \
--set redis.storageClassName=zfs-nfs-enc1 \
--set redis.storage=8Gi \
--set show_passwords=true \
--dry-run
```
### Gitea
Gitea provides a helm chart [here](https://gitea.com/gitea/helm-chart/). We're not
@@ -189,25 +97,24 @@ below installs nimcraft. For each installation you'll want to create your own va
with a new port. The server-downloader is called "minecraft_get_server" and is available on
[Github](https://github.com/ducoterra/minecraft_get_server).
#### Nimcraft
```bash
helm upgrade --install \
nimcraft \
./helm/minecraft \
--namespace nimcraft \
--create-namespace
```
#### Testing
```bash
helm upgrade --install \
testcraft \
./helm/minecraft \
--namespace testcraft \
--create-namespace \
--set port=25566
./minecraft \
--namespace minecraft \
--create-namespace
```
#### Nimcraft
```bash
helm upgrade --install \
nimcraft \
./minecraft \
--namespace minecraft \
--create-namespace
```
#### Courtnie
@@ -215,10 +122,9 @@ helm upgrade --install \
```bash
helm upgrade --install \
courtniecraft \
./helm/minecraft \
--namespace courtniecraft \
--create-namespace \
--set port=25568
./minecraft \
--namespace minecraft \
--create-namespace
```
### Snapdrop
@@ -228,7 +134,7 @@ Snapdrop is a file sharing app that allows airdrop-like functionality over the w
```bash
helm upgrade --install \
snapdrop \
./helm/snapdrop \
./snapdrop \
--namespace snapdrop \
--create-namespace
```
@@ -240,7 +146,7 @@ This assumes you have a media NFS share.
```bash
helm upgrade --install \
jellyfin \
./helm/jellyfin \
./jellyfin \
--namespace jellyfin \
--create-namespace
```
@@ -252,7 +158,7 @@ This creates a basic iperf3 server.
```bash
helm upgrade --install \
iperf3 \
./helm/iperf3 \
./iperf3 \
--namespace iperf3 \
--create-namespace
```