khuedoan-homelab/README.md

113 lines
8.7 KiB
Markdown
Raw Normal View History

2021-07-18 12:49:42 +07:00
# Homelab
2021-12-05 10:13:15 +07:00
<!-- ANCHOR: introduction -->
This is my homelab set up, it focused on automation to simplify provisioning, upgrading, and operating self-hosted services.
<!-- ANCHOR_END: introduction -->
2021-07-18 12:49:42 +07:00
```diff
! ⚠️ WORK IN PROGRESS
```
## Overview
### Hardware
2021-07-18 12:49:42 +07:00
![Hardware](https://user-images.githubusercontent.com/27996771/98970963-25137200-2543-11eb-8f2d-f9a2d45756ef.JPG)
- 4 nodes of NEC SFF `PC-MK26ECZDR` (Japanese version of the ThinkCentre M700):
- CPU: `Intel Core i5-6600T @ 2.70GHz`
- RAM: `16GB`
- SSD: `128GB`
- TP-Link `TL-SG108` switch:
- Ports: `8`
- Speed: `1000Mbps`
2021-12-14 09:31:34 +07:00
### Features
Status: **Alpha**
- [x] Common applications: Gitea, Seafile, Jellyfin, Paperless...
- [x] Automated bare metal provisioning with PXE boot
- [x] Automated Kubernetes installation and management
- [x] Installing and managing applications using GitOps
- [x] Modular architecture, easy to add or remove features/components
- [x] Automated certificate management
2021-12-25 01:07:53 +07:00
- [x] Automatically update DNS records for exposed services
2021-12-14 09:31:34 +07:00
- [x] Expose services to the internet securely with [Cloudflare Tunnel](https://www.cloudflare.com/products/tunnel/)
- [x] CI/CD platform
2021-12-25 15:23:03 +07:00
- [x] Private container registry
2021-12-14 09:31:34 +07:00
- [x] Distributed storage
2021-12-25 01:07:53 +07:00
- [ ] Monitoring and alerting 🚧
- [ ] Support multiple environments (dev, stag, prod) 🚧
- [ ] Automated offsite backups 🚧
- [ ] Single sign-on 🚧
2021-12-14 09:31:34 +07:00
See [Roadmap](#roadmap) for more details.
### Tech stack
2021-12-12 18:41:14 +07:00
| Logo | Name | Description |
| :------------------------------------------------------------------------------------------------------------------------------------: | :---------- | :-------------------------------------------------------------------------------------------- |
| <img width="32" alt="Ansible" src="https://simpleicons.org/icons/ansible.svg"> | Ansible | Automate bare metal provisioning and configuration |
| <img width="32" alt="ArgoCD" src="https://cncf-branding.netlify.app/img/projects/argo/icon/color/argo-icon-color.svg"> | ArgoCD | GitOps tool built to deploy applications to Kubernetes |
| <img width="32" alt="Cloudflare" src="https://avatars.githubusercontent.com/u/314135?s=200&v=4"> | Cloudflare | DNS and Tunnel |
| <img width="32" alt="Docker" src="https://www.docker.com/sites/default/files/d8/2019-07/Moby-logo.png"> | Docker | Ephermeral PXE server and convenient tools container |
| <img width="32" alt="Gitea" src="https://upload.wikimedia.org/wikipedia/commons/b/bb/Gitea_Logo.svg"> | Gitea | Self-hosted Git service |
| <img width="32" alt="Grafana" src="https://grafana.com/static/img/menu/grafana2.svg"> | Grafana | Operational dashboards |
| <img width="32" alt="Helm" src="https://cncf-branding.netlify.app/img/projects/helm/icon/color/helm-icon-color.svg"> | Helm | The package manager for Kubernetes |
| <img width="32" alt="K3s" src="https://cncf-branding.netlify.app/img/projects/k3s/icon/color/k3s-icon-color.svg"> | K3s | Lightweight distribution of Kubernetes |
| <img width="32" alt="Kubernetes" src="https://cncf-branding.netlify.app/img/projects/kubernetes/icon/color/kubernetes-icon-color.svg"> | Kubernetes | Container-orchestration system, the backbone of this project |
| <img width="32" alt="Let's Encrypt" src="https://avatars.githubusercontent.com/u/9289019?s=200&v=4"> | Let's Encrypt | Free, automated (via [cert-manager](https://cert-manager.io)), and open certificate authority |
| <img width="32" alt="Loki" src="https://github.com/grafana/loki/blob/main/docs/sources/logo.png?raw=true"> | Loki | Log aggregation system |
| <img width="32" alt="Longhorn" src="https://cncf-branding.netlify.app/img/projects/longhorn/icon/color/longhorn-icon-color.svg"> | Longhorn | Cloud native distributed block storage for Kubernetes |
2021-12-12 18:42:30 +07:00
| <img width="32" alt="MetalLB" src="https://avatars.githubusercontent.com/u/60239468?s=200&v=4"> | MetalLB | Bare metal load-balancer for Kubernetes |
2021-12-12 18:41:14 +07:00
| <img width="32" alt="NGINX" src="https://avatars.githubusercontent.com/u/1412239?s=200&v=4"> | NGINX | Kubernetes Ingress Controller |
| <img width="32" alt="Prometheus" src="https://cncf-branding.netlify.app/img/projects/prometheus/icon/color/prometheus-icon-color.svg"> | Prometheus | Systems monitoring and alerting toolkit |
| <img width="32" alt="Rocky Linux" src="https://avatars.githubusercontent.com/u/75713131?s=200&v=4"> | Rocky Linux | Base OS for Kubernetes nodes |
| <img width="32" alt="Tekton" src="https://avatars.githubusercontent.com/u/47602533?s=200&v=4"> | Tekton | Cloud native solution for building CI/CD systems |
2021-12-25 15:23:03 +07:00
| <img width="32" alt="Trow" src="https://trow.io/trow.png"> | Trow | Private container registry |
2021-12-12 18:41:14 +07:00
| <img width="32" alt="Vault" src="https://simpleicons.org/icons/vault.svg"> | Vault | Secrets and encryption management system |
2021-07-18 12:49:42 +07:00
## Get Started
2021-11-28 14:00:44 +07:00
- [Try it out on a VM](https://homelab.khuedoan.com/try_on_a_vm) without any hardware
- [Deploy on real hardware](https://homelab.khuedoan.com/deployment) for real workload
2021-08-04 00:13:48 +07:00
2021-07-18 12:49:42 +07:00
## Roadmap
2021-11-28 14:00:44 +07:00
See [roadmap](https://homelab.khuedoan.com/roadmap) and [open issues](https://github.com/khuedoan/homelab/issues) for a list of proposed features and known issues.
2021-07-18 12:49:42 +07:00
## Contributing
2021-12-14 09:31:34 +07:00
Any contributions you make, either big or small, are greatly appreciated.
2021-07-18 12:49:42 +07:00
## License
2021-12-31 17:05:27 +07:00
> Copyright (c) 2021 Khue Doan
Distributed under the GPLv3 License.
This project is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This project is distributed in the hope that it will be useful, but **WITHOUT ANY WARRANTY**; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this project (`LICENSE.md`).
If not, see <https://www.gnu.org/licenses>.
2021-07-18 12:49:42 +07:00
## Acknowledgements
- [ArgoCD usage in my coworker's homelab](https://github.com/locmai/humble)
2021-07-18 12:49:42 +07:00
- [README template](https://github.com/othneildrew/Best-README-Template)
- [Run the same Cloudflare Tunnel across many `cloudflared` processes](https://developers.cloudflare.com/cloudflare-one/tutorials/many-cfd-one-tunnel)
- [MAC address environment variable in GRUB config](https://askubuntu.com/questions/1272400/how-do-i-automate-network-installation-of-many-ubuntu-18-04-systems-with-efi-and)
2021-09-01 05:39:04 +07:00
- [Official k3s systemd service file](https://github.com/k3s-io/k3s/blob/master/k3s.service)
- [Official Cloudflare Tunnel examples](https://github.com/cloudflare/argo-tunnel-examples)
- [Initialize GitOps repository on Gitea and integrate with Tekton by RedHat](https://github.com/redhat-scholars/tekton-tutorial/tree/master/triggers)
2021-11-30 12:24:25 +07:00
## Stargazers over time
[![Stargazers over time](https://starchart.cc/khuedoan/homelab.svg)](https://starchart.cc/khuedoan/homelab)