• Sabata@ani.social
      link
      fedilink
      English
      arrow-up
      41
      arrow-down
      1
      ·
      8 months ago

      If you know how your setup works, then that’s a great time for another project that breaks everything.

      • cenzorrll@piefed.ca
        link
        fedilink
        English
        arrow-up
        20
        ·
        8 months ago

        Saturday morning: “Incus and podman seem interesting. I bet I could swap everything over while the family is out this afternoon”

        Sunday evening: “Dad, when will the lights work again?”

          • tal@lemmy.today
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            8 months ago

            Sure. What that guy is using is actually not the most-interesting diagram style, IMHO, for automatic layout of network maps, if you want large-scale stuff, which is where the automatic layout gets more interesting. I have some scripts floating around somewhere that will generate very large network maps — run a bunch of traceroutes, geolocate IPs, dump the results into an sqlite database, and then generate an automatically laid-out Internet network map. I don’t want to go to the trouble of anonymizing the addresses and locations right now, but if you have a graphviz graph and want to try playing with it, I used:

            goes looking

            Ugh, it’s Python 2, a decade-and-a-half old, and never got ported to Python 3. Lemme gin up an example for the non-hierarchical graphviz stuff:

            graph.dot:

            graph foo {
                a--b
                a--d
                b--c
                d--e
                c--e
                e--f
                b--d
            }
            

            Processed with:

            $ sfdp -Goverlap=prism -Gsep=+5 -Gesep=+4 -Gremincross -Gpack -Gsplines=true -Tpdf -o graph.pdf graph.dot
            

            Generates something like this:

            That’ll take a ton of graphviz edges and nicely lay them out while trying to avoid crossing edges and stuff, in a non-hierarchical map. You can create massive network maps like this. Note that I was last looking at graphviz’s automated layout stuff about 15 years ago, so it’s possible that they have better layout algorithms now, but this can deal with enormous numbers of nodes and will do reasonable things with them.

            I just grabbed his example because it was the first graphviz network map example that came up on a Web search.

    • Zink@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      This is just as true in my non-computer hobbies that involve physical systems instead of code and configs!

      If I had to just barely meet the requirements using as little budget as possible while making it easy for other people to work on, that would be called “work.” My brain needs to indulge in some over-engineering and “I need to see it for myself” kind of design decisions.

    • cenzorrll@piefed.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      I’ve moved my homelab twice because it became stable, I really liked the services it was running, and I didn’t want to disturb the last lab**cough**prod server.

      My current homelab will be moar containers. I’m sure I’ll push it to prod instead of changing the IP address and swapping name tags this time.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    41
    ·
    edit-2
    8 months ago

    logging is probably down

    You do, of course have a dedicated rsyslogd server? An isolated system to which logs are sent, so that if someone compromises another one of your systems, they can’t wipe traces of that compromise from those systems?

    Oh. You don’t. Well, that’s okay. Not every lab can be complete. That Raspberry Pi over there in the corner isn’t actually doing anything, but it’s probably happy where it is. You know, being off, not doing anything.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    37
    ·
    8 months ago

    You have remote power management set up for the systems in your homelab, right? A server set up that you can reach to power-cycle other servers, so that if they wedge in some unusable state and you can’t be physically there, you can still reboot them? A managed/smart PDU or something like that? Something like one of these guys?

    Oh. You don’t. Well, that’s probably okay. I mean, nothing will probably go wrong and render a device in need of being forcibly rebooted when you’re physically away from home.

      • TerHu@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        7
        ·
        8 months ago

        if you can cycle your home assistant with the shelly plug whilst your home assistant is down, yes. from experience it’s really quite annoying to have a smart plug switch off HA…

        • lemming741@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          HA is on the same proxmox host as the router. So yeah I can end up locked out. Hasn’t happened yet tho! The relay is on my test machine, it’s always nvidia that crashes there.

        • B0rax@feddit.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          The Shelly can be configured to automatically turn back on after a certain amount of time. It has local scripting capabilities.

          If they did that… I don’t know.

    • FauxLiving@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      8 months ago

      Oh. You don’t. Well, that’s probably okay. I mean, nothing will probably go wrong and render a device in need of being forcibly rebooted when you’re physically away from home.

      *furiously adds a new item to the TODO list*

    • tychosmoose@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 months ago

      If you do have the smart PSU and power management server you probably also went down the rabbit hole of scripting the power cycling, right? Maybe made that server hardened against power loss disk corruption so it can be run until UPS battery exhaustion.

      What if there is a power outage and NUT shuts everything down? Would be nice to have everything brought back up in an orderly way when power returns. Without manual intervention. But keeping you informed via logging and push notifications.

        • Caveman@lemmy.world
          link
          fedilink
          English
          arrow-up
          7
          ·
          8 months ago

          I set my homelab up on Bazzite immutable with podman and SELinux. It took a while to work everything out and have it boot up into a valid state hahaha

              • epicshepich@programming.dev
                link
                fedilink
                English
                arrow-up
                1
                ·
                8 months ago

                I honestly don’t know a ton about immutable distros other than that they let you front-load some difficulty in getting things set up in exchange for making it harder to break. I was just surprised that the distro of choice was Bazzite, since its target audience seems to be gamers.

        • The Stoned Hacker@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          8 months ago

          It’s not that difficult to get SELinux working with podman quadlets, especially if you run things rootless. I have a kerberized service account for each application I host and my quadlets are configured to run under those. I very rarely encounter applications that simoky can’t be run rootless but I usually can find an adequate alternative. I think right now the only thing that runs as root is one of the talk or collabora containers in my nextcloud stack. No selinux issues either.

          • epicshepich@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            8 months ago

            I use podman-compose with system accounts and I don’t have a ton of issues. The biggest one is that I can’t seem to get bluetooth and pip working on Home Assistant at the same time. Most of the servers I manage have SELinux and it works fine as long as I use :z/:Z with bind mounts.

            A few years ago, I set up a VPS for my friend’s business; at the time, I didn’t know how to work with SELinux so I just turned it off. I tried to flip it back on, and it somehow bricked the system. We had to restore from a backup. Since then, I’ve been afraid to enable it on my flagship homelab server.

            • WhyJiffie@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              8 months ago

              are you sure it really bricked it? when turning it on, on next boot it needs to go over all the files and retag them or something like that, and it can take a significant amount of time

              • epicshepich@programming.dev
                link
                fedilink
                English
                arrow-up
                1
                ·
                8 months ago

                Honestly, I don’t know what happened, but it was unreachable via SSH and the web console. There shouldn’t have been a ton of files to tag since it was an Almalinux system that started with SELinux enabled, and all we added was a container app or two.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    33
    ·
    8 months ago

    All of those systems in your homelab…they aren’t all pulling down their updates multiple times over your network link, right? You’re making use of a network-wide cache? For Debian-family systems, something like Apt-Cacher NG?

    Oh. You’re not. Well, that’s probably okay. I mean, not everyone can have their environment optimized to minimize network traffic.

    • the_tab_key@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      8 months ago

      I set this up years ago, but then decided it was better to just install different distros on each of my computers. Problem solved?

    • [object Object]@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 months ago

      You can forgejo with a container index enabled, I don’t know if there’s a way to use that as a proxy for downloading containers though.

  • DownByLaw@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    31
    ·
    8 months ago

    Have you already tried implementing an identity provider like Authentik, so you can add OIDC and ldap for all your services, while you are the only one that’s using them? 🤔

    • Pumpkin Escobar@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      ·
      8 months ago

      Behind a traefik reverse proxy with lets encrypt for ssl even though the services aren’t exposed to the internet?

      • diablomnky666@lemmy.wtf
        link
        fedilink
        English
        arrow-up
        11
        ·
        8 months ago

        To be fair a lot of apps don’t handle custom CAs like they should. Looking at you Home Assistant! 😠

      • suicidaleggroll@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        Who cares if it’s exposed to the internet?

        1. Encrypting your local traffic is still valuable to protect your systems from any bad actors on your local network (neighbor kid cracks your wifi password, some device on your network decides to start snooping on your local traffic, etc)

        2. Many services require HTTPS with a valid cert to function correctly, eg: Bitwarden. Having a real cert for a real domain is much simpler and easier to maintain than setting up your own CA

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      ·
      8 months ago

      At 71, I have to document. I started a long time ago. I worked for a mec. contractor long ago, and the rule was: ‘If you didn’t write it down, it didn’t happen.’ That just carried over to everything I do.

        • irmadlad@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          As in a blog or wiki? I do not because I am not authoritative. What I know came from reading, doing, screwing it up, ad nauseam. When something finally clicks for me, I write it down because 9 times out of 10, I will need that info later. But my writing would be so full of inaccuracies that it would be embarrassing and possibly lead someone astray.

  • FauxLiving@lemmy.world
    link
    fedilink
    English
    arrow-up
    23
    ·
    8 months ago

    The comments in this thread have collectively created thousands of person-hours worth of work for us all…

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    17
    ·
    edit-2
    8 months ago

    You have an intrusion detection system set up, right? A server watching your network’s traffic, looking for signs that systems on your network have been compromised, and to warn you? Snort or something like that?

    Oh. You don’t. Well, that’s probably okay. I mean, probably nothing on your network has been compromised. And probably nothing in the future will be.

  • nucleative@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    8 months ago

    Never run:

    docker compose pull
    docker compose down
    docker compose up -d
    

    Right before the end of your day. Ask me how I know 😂

    • shym3q@programming.dev
      link
      fedilink
      English
      arrow-up
      7
      ·
      8 months ago

      compose up will automatically recreate with newer images if the new one were pulled. so there is no need for compose down btw

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 months ago

      Right before the end of your day

      Oh, gosh, I did this last evening. I didn’t check what time it was, and initiated an update on some 70 containers. I have a cron that shuts down the server in the evening, and sure enough, right in the middle of the updates, it powered off. I didn’t even mess with it and went to bed. Re-initiated the update this morning, and everything is up and running. Whew!

  • Fedegenerate@fedinsfw.app
    link
    fedilink
    English
    arrow-up
    14
    ·
    8 months ago

    Going into spring/summer that’s ideal, I wanna go places do things. Mid winter, I’m feature creeping till something breaks.