5.5 KiB
Homelab
A project to store homelab stuff.
Just here for the Arch distoolbox?
Table of Contents
Fun Facts
On linux, ctrl+shift+u, then, while holding ctrl+shift, typing b+0 will type a ° (degree) symbol. Also you can enter any unicode symbol this way.
To generate an SSH key with the correct comment and type run:
export KEYGEN_USER=myuser
export KEYGEN_HOST=something.com
ssh-keygen -C ${KEYGEN_USER}@${KEYGEN_HOST} -f ~/.ssh/id_${KEYGEN_HOST} -t ed25519
cat <<EOF >> ~/.ssh/config
Host ${KEYGEN_HOST}
Hostname ${KEYGEN_HOST}
IdentityFile ~/.ssh/id_${KEYGEN_HOST}
User ${KEYGEN_USER}
Port 22
EOF
In vim: esc + o will take you to the end of a file and insert a new line.
Important Dates and Times
- Machine updates happen at 4am on on Saturday
- VM updates happen at 5am on Saturday
- Backups happen at 6am every day
Project Lifecycle
Projects will either be active or retired.
Active projects are being actively developed. They are in-use, stable, and production ready. Active projects should meet and track the active project requirements
Retired projects are no longer in use or recommended. They are kept for reference. Retired projects must meet the retirement requirements
You'll notice that most of the active projects have scripts or examples that
use the active path as part of their install process. When moved outside the
active directory their scripts and examples break. This is intentional. If
you want a retired project to work again, bring it back to the active
directory.
Project Types
All projects will be prefixed with one of the following categories:
device_os_cloud_systemd_podman_docker_kubernetes_
Note, some projects will be named with just the prefix. These are projects for
configuring the underlying technology. The podman project, for example, will
tell you how to configure and install podman so it works correctly.
device_ will prefix projects that relate to specific machines or equipment.
3D printers, Raspberry Pis, and other IOT devices qualify as specialized
hardware that needs documentation and configuration. This is not limited to
computer equipment. The furnace is an important part of the homelab. the Air
Conditioner is integral to the homelab's function. These projects will also be
documented.
os_ will contain projects that set up operating systems. These include best
practices, backups, updates, default software, etc.
cloud_ projects are for specific cloud providers. This will contain
documentation and errata for things like AWS IAM, Route53, etc. Note these will
be prefixed with the cloud's name, not the word "cloud". So AWS services will
be prefixed with aws_ and azure would be azure_. This should make them more
searchable.
systemd_ projects are designed to be installed with ansible and run via
systemd on a linux VM or other linux hardware.
podman_ projects are either designed to be run as quadlets or as podman
containers outright.
docker_ projects are either docker-compose or some form of docker run
command.
kubernetes_ projects are helm, kustomize, kubectl, or some other kubernetes
compliant deployment.
Active Project Requirements
- Installation is documented
- Installation configuration examples are provided
- Hardening guidelines are documented
- Upgrade procedures are documented
- Maintenance procedures are documented
- Uninstall procedures are documented
- Backup and restore procedures are documented and tested
Retirement Requirements
- A reason for retirement is documented
- If applicable, a replacement has been identified and documented
- If applicable, backup data locations are documented
Project Structure
All projects will have, at minimum.
- A README named
project-name.md - A directory called
secretswhich will be gitignored.
Creating a Project
Assuming your project name is my-project and it runs on podman
- Create a new directory called
podman_my-projectunder theactivedirectory - Copy the readme template:
cp project_readme_template.md active/podman_my-project/my-project.md - Populate
my-project.mdas you work through the install process - Create a directory called
secretsinpodman_my-project. This will be automatically gitignored. Put all secrets here. - Push the changes when you have a working product
Order of Operations
- Configure cloud providers. These usually have no dependencies and typically provide critical services to other projects (DNS, email notifications, etc.)
- Install infrastructure projects. Usually these only have dependencies on cloud services.
- Install systemd, kubernetes, docker, podman, and other services.