Live data from Hacker News

My self-hosting infrastructure, fully automated

github.com

71–80 of 228 posts

Re: My self-hosting infrastructure, fully automated

#71
post #46

Earlier quoted context omitted.

No. It never gets a habit. It is torture, and you have to look up the commands every time you do it, because you do it infrequently enough not to learn by heart.

Huh? Compared to... running commands infrequently to administer servers? IaC is strictly and comically better.

Commands you use every day in the CLI? In your editor?

I can trivially enter Emacs and modify Apache config when it breaks backwards compat between distribution upgrades, but when it's infrastructure as code...

Re: My self-hosting infrastructure, fully automated

#72
post #14
post #2

This is very cool! Have you considered something like Tailscale so you can securely access it from outside your home? I've been thinking about spinning up my own home server that way, seeing as Tailscale makes it easy to securely access it from my phone when I'm out and about.

Are there any major benefits to using Tailscale over vanilla Wireguard?

On the flip side, the main downside I found was my travel router supports vanilla WireGuard but not Tailscale.

Re: My self-hosting infrastructure, fully automated

#73

Earlier quoted context omitted.

Probably no worse than the alternatives. Just about everything is going to be easy to upgrade except possibly the Kubernetes masters (and even that isn’t so bad if you can spare a bit of downtime).

For sure no worse than the alternatives. I also don't care about downtime. But I'm looking for something that minimizes the overheads over not self-hosting . I'd love to prove Moxie Marlinspike wrong that "people don't want to run their own servers, and never will." ( https://moxie.org/2022/01/07/web3-first-impressions.html ) This is the key bottleneck in getting people to run their own servers.

For sure. There’s not much of an economical argument for self-hosting—if you’re doing it, it’s almost implied that you’re doing it for fun. Although having run a small (but really scaleable c/o k8s) homelab for <$2/month, I’m not sure I’d save much effort versus using some PaaS or cloud provider now that I know what I’m doing. Like I’d need a real load balancer and a few other things so we’re talking < ~$100/month to productionize.

Re: My self-hosting infrastructure, fully automated

#74

This is a very good example of how you can save yourself the mental hurdle of remembering how to configure something etc. I can only suspect how much time, trial and error this must've taken. This is my main issue with IaC. The concept really lends itself to any kind of modern infra, however I'm really put off by the sheer amount of time it takes me to whip out a bunch of Ansible playbooks and helper scripts, and on…

Projects are making this easier. For example moving from large mono config files to using conf.d/ directories where you can drop in extra files and manage each one independently is great for IaC.

While it's challenging up front I do enjoy being able to freshly install the latest version of Fedora, run my playbook and be more or less up and running.

It feels cleaner and more reliable (at least until this week when a broken selinux policy made it to stable) rather then trying to upgrade packages across major release versions in place.

If I've somehow acquired secret hidden malware or someone has opened up something to come back in later that's also going to get flushed out at least once every six months.

Re: My self-hosting infrastructure, fully automated

#75

This is a very good example of how you can save yourself the mental hurdle of remembering how to configure something etc. I can only suspect how much time, trial and error this must've taken. This is my main issue with IaC. The concept really lends itself to any kind of modern infra, however I'm really put off by the sheer amount of time it takes me to whip out a bunch of Ansible playbooks and helper scripts, and on…

Pretty sure you're not doing anything wrong - well, if you are then I am too :-)

What's often overlooked (I believe) is that when you're doing this work in your day job you've for existing infra to support your infra along with other folks you can rely on to for help.

With home infra, you first must invent the universe (apologies to Carl). Having built 3 variations of home infra (Swarm on x64/Beelink, K3s on Pi, K3s on x64/Odroid) I've gained a strong admiration for anyone who take this on irregardless of there relative success.

What I've learnt over time is to add as little accidental complexity as is possible which I think is what you're getting at. One incarnation of the Pi K3s was provisioned by Ansible (on it's own stand alone Pi that the cluster would netboot from). Was Ansible better that imaging the usb drives manually and running a small script on each of the nodes? - probably a wash. I did however learn a bit of Ansible.

Re: My self-hosting infrastructure, fully automated

#76

Earlier quoted context omitted.

For sure no worse than the alternatives. I also don't care about downtime. But I'm looking for something that minimizes the overheads over not self-hosting . I'd love to prove Moxie Marlinspike wrong that "people don't want to run their own servers, and never will." ( https://moxie.org/2022/01/07/web3-first-impressions.html ) This is the key bottleneck in getting people to run their own servers.

For sure. There’s not much of an economical argument for self-hosting—if you’re doing it, it’s almost implied that you’re doing it for fun. Although having run a small (but really scaleable c/o k8s) homelab for <$2/month, I’m not sure I’d save much effort versus using some PaaS or cloud provider now that I know what I’m doing. Like I’d need a real load balancer and a few other things so we’re talking < ~$100/month to…

I still believe :) I'm looking not for an economic argument but for a strategic one. I think[1] a self-hosted setup with minimal dependencies can be more resilient than a conventional one, whether with a vendor or self-hosted.

https://sandstorm.io got a lot right. I wish they'd paid more attention to upgrade burdens.

[1] https://github.com/akkartik/mu

Re: My self-hosting infrastructure, fully automated

#77
post #57
post #54

Earlier quoted context omitted.

I run mine using HashiStack (Nomad, Vault, Consul), highly recommend going that route over Kubernetes which I have also used.

I've come from bare metal, to virtualisation, to Cloud. I then went from AutoScaling Groups and AMIs to K8s and Docker Images. Recently I went from K8s to Nomad+Consul and Docker Images. Now I'm building a small platform to host a business I've started and I'm going back to ASGs with simple EC2 Instances. There's really no need for the features Nomad/K8s offer at almost any scale outside of a few big companies.

It depends. Orchestrators like Nomad can give you a lot of leverage as a small team. It's not very difficult to manage and can give you lots of redundancy, control, and a path to scalability while utilizing best practices so you don't have to think about it. There are lots of ways to do this and not every app needs this but as you begin to get traction, you either have a choice of outsourcing your devops or bringing it in-house which happens way before you are even a big company. Nomad solves the problem of the latter.

Also, I'm curious why you didn't just end up sticking with Nomad now that you know it.

Re: My self-hosting infrastructure, fully automated

#78
post #28

This needs a companion guide about how to set up the host machine. Which Linux distro to choose, how to set it up / harden it, nftables / firewall, public key login, etc. If anyone has one handy, I'd appreciate a link.

(Repo owner here) I've already automated that with Ansible, including Linux installation (Rocky Linux). There's no hardening yet but that's on the roadmap.

Re: My self-hosting infrastructure, fully automated

#80

The question I have whenever I see something like this is what the upgrade process looks like. How much time do you spend per month upgrading dependencies, how many mailing lists you're subscribed to, etc. When the log4j thing blew up, how long did it take you to gain confidence that you were no longer impacted?

(Repo onwer here) The upgrade process can mostly be automated (for example using Dependabot). I haven't configured it yet, but that's on my TODO list.
Post reply on HN