Add table of contents to old blogs

This commit is contained in:
2024-09-27 13:56:48 -07:00
parent a93700b334
commit b357ab14b4
6 changed files with 70 additions and 10 deletions

View File

@@ -2,6 +2,14 @@ title: Managing configs on my homeservers.
description: Managing configuration files - some lessons I've learned over the years.
tags: post, git, gitops, devops, cicd, tech, scripting
date: 2024-09-26 05:21
edited: 2024-09-27 13:53
# Table of Contents <!-- omit in toc -->
- [Managing homeserver configs](#managing-homeserver-configs)
- [So how do I do things?](#so-how-do-i-do-things)
- [conclusion](#conclusion)
# Managing homeserver configs
@@ -11,7 +19,7 @@ Similarly, I seek to reduce complexity of my configuration management. I like to
> __Speaking of k3s/k8s - Fuck that noise entirely in a home environment. Unless you're doing it to learn, I recommend staying away from kubernetes. Its just docker with extra steps and its far more trouble than its worth for the home - in my very strong opinion.__
## So how do I do things?
# So how do I do things?
Well, as I alluded to earlier - I work in my text editor, out of git repositories. All of my services are deployed with docker - its just... easier, this way. I've run services so many different ways over the years and docker is simply the easiest to deal with. I can grab premade containers. Or I can make my own, push them to my gitea deployment, and pull them for use later. Its great. And its distro agnostic. Sure there are some security issues associated with it. But there are also well documented methods to nullify them. I can also use docker volumes to store everything in `/opt/{container_name}` which is super handy when it comes time to archive/back up the host since all I need to do to grab any important data is backup `/opt`!
@@ -24,7 +32,7 @@ These manually managed repos are pushed directly to a bare repo on the deploymen
In the case of the main config repo, there also resides an ssh authorized_keys file, some scripts in a folder called `ci`, docker configs, and a big folder of scripts to deploy the thing, manually run actions on the docker configs, and more. The authorized_keys file and `ci` folder allow me to use gitea actions to deploy docker images on the host. I generate an ssh keypair, I store the private key as a secret in each individual repo that deploys to the host, then i put the public key in the authorized_keys file with a command that points to a script in `ci` that pulls and redeploys docker images.
## conclusion
# conclusion
This is more or less some rambling about how I manage configs in git. I hope any amount of this made sense.