···11+DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
22+ Version 2, December 2004
33+44+Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
55+66+Everyone is permitted to copy and distribute verbatim or modified
77+copies of this license document, and changing it is allowed as long
88+as the name is changed.
99+1010+DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
1111+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1212+1313+0. You just DO WHAT THE FUCK YOU WANT TO.
+54
README.md
···11+# Macharian
22+33+This repository contains everything I've got running on my home servers.
44+55+## Servers
66+77+My setup is currently as follows:
88+99+- Drimor: an ASUS NUC 14 running Debian with several KVM guests:
1010+ - Ayzinith: Alpine VM running [pi-hole](https://github.com/pi-hole/pi-hole)
1111+ - Yix: Ubuntu VM running [MinIO](https://github.com/minio/minio) for S3 storage
1212+ - Persepolis: Home Assistant OS VM
1313+ - Proteus Quartus: A [Talos](https://talos.dev) node
1414+- Proteus Secundus: an ASUS NUC 15 running a [Talos](https://talos.dev) node on bare metal
1515+- Paleon: A [Scaleway](https://scaleway.com/) VPS running an NGINX reverse proxy that exposes certain services over Tailscale to the outside world.
1616+1717+## Kubernetes
1818+1919+Kubernetes cluster Proteus currently consists of two nodes, Proteus Secundus and Proteus Quartus, both running Talos.
2020+The cluster is managed via [Flux](https://github.com/fluxcd/flux2) which uses the [`kubernetes`](./kubernetes) folder in this repository as source. [Renovate](https://github.com/renovatebot/renovate) helps keep everything up to date.
2121+2222+The core components are:
2323+2424+- [cert-manager](https://github.com/cert-manager/cert-manager) creates SSL certificates for everything running in the cluster
2525+- [Istio](https://istio.io) manages the network & ingress with [metallb](https://metallb.io) as load balancer
2626+- [Tailscale](https://tailscale.com) exposes certain services over VPN to the internet
2727+- [Longhorn](https://longhorn.io) manages storage for k8s
2828+- [authentik](https://github.com/goauthentik/authentik) provides Single Sign-On either via OIDC or integrated via istio
2929+- [sops](https://github.com/getsops/sops) keeps secrets commited in this repo actually secret
3030+3131+The applications running on kubernetes fall into several categories:
3232+3333+- Self-hosted storage for Photos via [Immich](https://immich.app/) and documents/calendars via [NextCloud](https://nextcloud.com/)
3434+- A Media Center, running in the media namespace, with automated tracking of movies, shows, and artists; using [Plex](https://plex.tv/), [*arr](https://wiki.servarr.com/), and more.
3535+- Smaller stuff like a [Unifi](https://ui.com) controller or a wiki for a [WarHammer 40k Imperium Maledictum](https://cubicle7games.com/warhammer-40k-roleplay-imperium-maledictum) roleplay group
3636+- Underlying technology such as [Redis](https://github.com/redis/redis) and [PostgreSQL](https://www.postgresql.org/)
3737+3838+## Hardware
3939+4040+- 1x ASUS NUC14RVHU7000R0 Revel Canyon U7 155H
4141+ - 64 GB RAM
4242+ - 1x 2TB M.2 NVMe
4343+ - 1x 4TB SATA SSD (warp)
4444+- 1x ASUS NUC 15 Pro Slim Kit RNUC15CRKU700002 barebone
4545+ - 64 GB RAM
4646+ - 1x 2TB M.2 NVMe
4747+4848+This hardware is currently situated next to our TV, which greatly hampers the options for expansion.
4949+I would love to expand and add proper storage (a NAS) and maybe one other server—having two k8s nodes has downsides that a third node would solve—but that has to wait until after we've moved to a house that doesn't only have network cables in the living room.
5050+5151+## Gratitude
5252+5353+I had little to no experience with Kubernetes and DevOps when I bought my first NUC to use as server.
5454+The [home-ops repo of GitHub user onedr0p](https://github.com/onedr0p/home-ops) has been instrumental in getting me started with flux and renovate, and I use a lot of [containers](https://github.com/home-operations/containers) they have set up.
···11+# knot
22+33+OCI Container to run your own [tangled](https://tangled.org) [knot](https://tangled.org/@tangled.org/core/blob/master/docs/knot-hosting.md) and host the data of your own repositories.
44+55+## Pre-built Images
66+77+Pre-built images are available in an ATCR [repository](https://atcr.io/r/bram.gotink.be/knot) starting at `v1.10.0-alpha`.
88+99+```sh
1010+docker pull atcr.io/bram.gotink.be/knot
1111+```
1212+1313+This image differs from the pseudo-official [tngl/knot](https://hub.docker.com/r/tngl/knot) image.
1414+The code is the same, but the image is set up differently:
1515+1616+- Run everything using a non-root user
1717+- Allow the OCI runtime to restart the container if anything fails, rather than package an entire init system that manages these programs
1818+1919+## Building The Image
2020+2121+```sh
2222+docker build --platform linux/amd64,linux/arm64 -t atcr.io/bram.gotink.be/knot --build-arg VERSION=v1.10.0-alpha .
2323+```
2424+2525+## Setting Up The Image
2626+2727+This image is designed to work with kubernetes.
2828+It requires three `volumeMounts`:
2929+3030+- `/repositories` for the repositories
3131+- `/data` for the database
3232+- `/ssh-keys` for the SSH host keys
3333+3434+The first two can be configured using `KNOT_REPO_SCAN_PATH` (default `/repositories`) and `KNOT_SERVER_DB_PATH` (default `/data/knotserver.db`).
3535+The latter cannot be changed, and it _must_ be a folder with strict permissions.
3636+3737+The container listens on two ports:
3838+- 5555 handles HTTP traffic and should be mapped onto port 443
3939+- 2222 handles SSH and should be mapped onto port 22
+30
containers/pihole/README.md
···11+# pihole
22+33+OCI Container to run pihole in kubernetes
44+55+## Pre-built Images
66+77+Pre-built images are available in a Codeberg [repository](https://codeberg.org/bgotink/-/packages/container/pihole)
88+99+```sh
1010+docker pull codeberg.org/bgotink/pihole
1111+```
1212+1313+This image differs from the official [pihole/pihole](https://hub.docker.com/r/pihole/pihole) image: everything runs as a non-root user, including cron tasks
1414+1515+## Building The Image
1616+1717+```sh
1818+docker build --platform linux/amd64,linux/arm64 -t codeberg.org/bgotink/pihole:6.2.3 .
1919+```
2020+2121+## Setting Up The Image
2222+2323+This image is designed to work with kubernetes.
2424+It requires two `volumeMounts`:
2525+2626+- `/etc/pihole` for the pihole configuration, this should map onto a persistent volume
2727+- `/var/lib/pihole` for the database, this should map onto a persistent volume
2828+- `/var/log/pihole` is used for logs, this can be persistent or you could leave it ephemeral
2929+3030+The image listens on standard ports (80 for HTTP, 53 for DNS), so it requires the `NET_BIND_SERVICE` capability.