Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
cm0002 ( cm0002@programming.dev )  to Linux@programming.dev · 1 year ago

systemd has been a complete, utter, unmitigated success

blog.tjll.net

external-link
message-square
34
link
fedilink
  • cross-posted to:
  • linux@programming.dev
111
external-link

systemd has been a complete, utter, unmitigated success

blog.tjll.net

cm0002 ( cm0002@programming.dev )  to Linux@programming.dev · 1 year ago
message-square
34
link
fedilink
  • cross-posted to:
  • linux@programming.dev
Eleven init systems enter, one init system leaves.
alert-triangle
You must log in or # to comment.
  • Quik ( Quik@infosec.pub ) 
    link
    fedilink
    English
    arrow-up
    57
    ·
    edit-2
    1 year ago

    One thing the author probably hasn’t done yet or just doesn’t mention is that you can configure .container services with systemd-podman units (often called quadlets), e.g. a simple MariaDB container would look like this:

    [Unit]
    Description=MariaDB container
    
    [Container]
    Image=docker.io/mariadb:latest
    Environment=MYSQL_ROOT_PASSWORD=rootpassword
    Environment=MYSQL_USER=testuser
    Environment=MYSQL_PASSWORD=testpassword
    Environment=MYSQL_DATABASE=testdb
    
    [Install]
    WantedBy=multi-user.target
    

    Short intro Full reference

    This is superb, because it means your containers finally feel well-integrated with the rest of the OS and you can use systemctl, journalctl, etc. just like you would with other services.

    Personally, I use this as an alternative to Podman/Docker compose and have been very happy with it running rootless containers from Nextcloud, Pufferpanel, Forgejo, Authentik, etc. (ask me for .container files if you need any help, I’m currently working on a small repo with a collection)

    • sip ( sip@programming.dev ) 
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      awesome!

    • Feyd ( Feyd@programming.dev ) 
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      TIL. That’s pretty useful!

    • monomon ( monomon@programming.dev ) 
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      It’s amazing, the gitea container supports this. Autostarts on machine restart, etc.

      • Quik ( Quik@infosec.pub ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Yeah, it’s great that Gitea/Forgejo has a copy-paste snippet in the docs, but you can actually use that with pretty much every container.

        There is this useful tool to convert containers, podman commands or even compose files to podman-systemd units: https://github.com/containers/podlet

    • Barbecue Cowboy ( BarbecueCowboy@lemmy.dbzer0.com ) 
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      That idea feels very useful but I also distrust it and it makes me angry for reasons I can’t articulate.

      • Quik ( Quik@infosec.pub ) 
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Your distrust is kind of reasonable: I’ve been using this a lot for the past year and there definitely were two or three moments where it was a bit annoying, too little transparent on what commands will be run, etc.

      • Possibly linux ( possiblylinux127@lemmy.zip ) 
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Do the reasons include gate keeping?

    • dwt ( dwt@feddit.org ) 
      link
      fedilink
      Deutsch
      arrow-up
      1
      ·
      1 year ago

      I like this, but even though pod man runs perfect rootless, quadlets can only run as root for now :-(

      • Quik ( Quik@infosec.pub ) 
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Just place your Quadlets in the $HOME/.config/containers/systemd/ directory for this ;)

        The reference I linked to earlier also contains more information on rootless.

        • dwt ( dwt@feddit.org ) 
          link
          fedilink
          Deutsch
          arrow-up
          1
          ·
          1 year ago

          While that is true, that is not how I would run services normally with SystemD. Those would be defined globally, but run as a user.

          Definitiv then in the user home, means that I dint see them with systemctl which is very annoying.

          • Quik ( Quik@infosec.pub ) 
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Yes, you’d have to do systemctl --user

    • renegadespork ( renegadespork@lemmy.jelliefrontier.net ) 
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      That’s neat! There’s so many advanced features of systemd I swear I learn something new every time it comes up.

      • Jade ( JadedBlueEyes@programming.dev ) 
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        This is due to systems generators allowing Podman to plug in to that system

  • troed ( troed@fedia.io ) 
    link
    fedilink
    arrow-up
    43
    ·
    1 year ago

    Unix grey beard here.

    Yes. Distros with systemd are simply easier to maintain.

    • SheeEttin ( SheeEttin@lemmy.zip ) 
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Even when DNS resolution isn’t working properly?

      • Balinares ( Balinares@pawb.social ) 
        link
        fedilink
        arrow-up
        12
        ·
        1 year ago

        Especially then. Great documentation and support tooling make troubleshooting much easier.

        • SheeEttin ( SheeEttin@lemmy.zip ) 
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 year ago

          Can you give me a link to that documenation and tooling? Because every time I go to troubleshoot an issue, I end up in a tangled mess of trying to figure out how systemd and NetworkManager have decided to configure themselves on this particular system, and I give up.

          I don’t know how it happens, but I can set up Ubuntu on a dozen laptops in exactly the same way, and a week later they all have different configurations.

          • Balinares ( Balinares@pawb.social ) 
            link
            fedilink
            arrow-up
            8
            ·
            1 year ago

            Can you give me a link to that documenation and tooling?

            Linux daemons and utilities typically come with manuals that get installed alongside the software. There’s a command line tool, aptly called man, that can be used to search and display these manuals. So for instance, man resolvectl displays the manual for the command line utility that you can use to control, configure, monitor and debug the systemd-resolved daemon. (Although I usually look up the man page online because it’s more convenient to scroll through than in a terminal.) Man pages for a given daemon will typically mention near the bottom related man pages for e.g. control utilities like resolvectl, so it’s not necessary to remember it by heart.

            a week later they all have different configurations.

            I’m trying to remember any situation where one of the systemd components would change its configuration on its own, but I’m coming up blank. It may be my memory failing me, but possibly that’s the wrong tree to bark up?

      • troed ( troed@fedia.io ) 
        link
        fedilink
        arrow-up
        7
        ·
        1 year ago

        Never had a systemd caused DNS issue.

        • eutampieri ( eutampieri@feddit.it ) 
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          Then I must be using it wrong. I kept systemd-resolved on my laptop but on my desktop I use plain old /etc/resolv.conf

  • SaharaMaleikuhm ( SaharaMaleikuhm@feddit.org ) 
    link
    fedilink
    arrow-up
    38
    ·
    1 year ago

    You won’t ever get me to care about what init system I run on my machine. I just need it to work.

    • veroxii ( veroxii@aussie.zone ) 
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      Exactly. There are more important holy wars and bigger hills to die on.

      • silasmariner ( silasmariner@programming.dev ) 
        link
        fedilink
        arrow-up
        10
        ·
        1 year ago

        Sounds like something an Emacs user would say

    • FizzyOrange ( FizzyOrange@programming.dev ) 
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      Those two things are related.

  • db0 ( db0@lemmy.dbzer0.com ) 
    link
    fedilink
    arrow-up
    36
    ·
    1 year ago

    The comments in here are going to be normal

    • BeardedGingerWonder ( BeardedGingerWonder@feddit.uk ) 
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      Upstart was perfect!

  • Safeguard ( Safeguard@beehaw.org ) 
    link
    fedilink
    arrow-up
    17
    ·
    1 year ago

    I agree. For a init system.

    I don’t like the “takeover” of network and home folders. (It feels like a takeover for me)

  • Sibbo ( Sibbo@sopuli.xyz ) 
    link
    fedilink
    arrow-up
    12
    ·
    1 year ago

    When I was starting to use Linux in the late 2010s, I was quite confused by how all the init stuff worked. Now that I use NixOS and systemd, I’m things have become really easy. I could write a simple backup system by chaining a few services together without problems.

    • dwt ( dwt@feddit.org ) 
      link
      fedilink
      Deutsch
      arrow-up
      3
      ·
      1 year ago

      Might it be, that you have also learned a bit here and there?

  • who ( who@feddit.org ) 
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    [disputed]

    • Swedneck ( Swedneck@discuss.tchncs.de ) 
      link
      fedilink
      arrow-up
      22
      ·
      1 year ago

      Introducing: Being a contrarian asshat!
      Yes, by being a contrarian asshat you too can legitimately claim that any statement is disputed, because You dispute it!

  • ISO ( ISO@lemmy.zip ) 
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    The first thing forcing an option does, is depriving that option the ability to know what it could achieve on pure merit.

  • Possibly linux ( possiblylinux127@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    No one cares about systemd at this point

    If you want to use your computer like it is 2005 go for it. Just don’t keep bringing up this dead topic.

Linux@programming.dev

linux@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@programming.dev

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

  • !linux_memes@programming.dev
  • !linuxphones@lemmy.ca
  • our Matrix group chat
  • !reactos@programming.dev

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 100 users / day
  • 1.01K users / week
  • 2.24K users / month
  • 5.55K users / 6 months
  • 125 local subscribers
  • 15.2K subscribers
  • 4.41K Posts
  • 22.9K Comments
  • Modlog
  • mods:
  • Ategon ( Ategon@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • dwraf_of_ignorance ( dwraf_of_ignorance@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code