1. 62

  2. 13

    I thought rdist must be some new OpenBSD thing, but turns out it goes back to 4.3BSD! I can’t believe I never heard of it before.

    It doesn’t seem very common on Linux though. I can’t find any packages for Arch Linux or Alpine.

    1. 2

      Weird, it’s in the Ubuntu repos: rdist

      1. 2

        I wrote a wrapper around rsync(1) that does the file uploads: synk. I was planning to use bittorrent instead of rsync to be more distributed. It doesn’t let you run commands on change though. On that concern, tools like [drist])https://dataswamp.org/~solene/2018-11-29-drist-intro.html) (mentioned in another comment) are closer. It is not distributed, and configuration is done from a central place.

      2. 28

        This is the content I come here for. Unix knowledge lost to the annals of tech bro culture. Sometimes the solutions are readily available, but you’ve just never heard of the tool before because it’s not shiny and trendy.

        1. 29

          The reason people stopped using rdist and rsync et al took over was that it used to not support SSH or diffs. It appears it does now, but I last looked a long time ago. I think you may be ignoring the history of how we actually got here - It’s called shitty late 90’s sysadmin patterns, and ansible is a great solution to that life.

          rdist being unused has nothing to do with shine or trends, but humans and the very history you lament no one remembers.

          1. 0

            And to think, if we got rid of it we could make more room for news and content marketing!

          2. 6

            If it wasn’t for the fact that I use SaltStack for a bit more than just distributing config files, I would have given rdist(1) a shot.

            Nice write-up!

            1. 2

              Go SaltStack user. It really is a nice bit of software and fairly easy to extend.

            2. 3

              Another nice simple tool is drist: https://dataswamp.org/~solene/2018-11-29-drist-intro.html and https://dataswamp.org/~solene/tag-drist.html . It is written by solene (an OpenBSD ports developer). In a nutshell it is a simple well-structured shellscript that uses SSH and rsync to sync files to hosts.

              1. 3

                … (an OpenBSD ports developer) …

                An OpenBSD developer - her contributions aren’t confined only to ports :^)

                1. 3

                  From solene in IRC:

                  dunno if you can post on lobste.rs or if somebody has an account, but on https://lobste.rs/s/6bk4pp/rdist_1_when_ansible_is_too_much#c_fdspzh it’s said that drist copy files, but it miss the important part that it also execute scripts :D

                  1. 1

                    That does indeed look very interesting.

                  2. 2

                    The page is down for me at the moment.

                    1. 1

                      It’s back up.

                    2. 2

                      I used rdist to distribute my pf.conf and do a pfctl -f /etc/pf.conf after doing so to keep a cluster in sync :-)

                      1. 1

                        Cool tool I had never heard of before…

                        I can’t directly find this from the post/man/etc, but I see 3 things that would be required for me to use this simpler tool over Ansible/Salt/Chef/etc.

                        1. Can this install packages as well? Or be “driven” by something else than copying files around as the trigger?
                        2. Can files be copied from an arbitrary location? I want the host machine (usually my laptop) to be able to deliver files that aren’t actually deployed/installed locally.
                        3. Templating. Obviously not every single host (even in a 2-3 machine type installation) is going to have every files be the same. Can I change some minimal amount of file content based on the target host? Something as barebone as using envsubst for templating would work for me…

                        Maybe the problems this solves are of a much smaller scope than full blown configuration management tools

                        1. 2
                          1. primary driver is files/directories, you could probably force that in by using a file listing the packages and executing said file on the remote server. Which means the file has changed and you are able to install whatever is listed. But! I guess there are way better tools for that.

                          2. you can define any file/directory to be copied. Do pay close attention to the different options and flags. In some cases it might keep the destination in sync whipeing out all previous files.

                          3. not really the intention of the tool. There are probably ways you can get it to do it, but will be better served with Ansible and the likes.