Live data from Hacker News

Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

github.com

51–60 of 77 posts

Re: Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

#52

In a past life, this is an interview question that I would ask people: "We have thousands of servers, and you need to run the same command on 10 of them, what's one way you would do it?" and follow up with "What if you wanted to run the command on hundreds or thousands - what problems would you expect with this approach, and what might you do differently?" I didn't really expect them to write code on the spot (hate t…

Is there a standard way of doing this that comes shipped with GNU/Linux?

I'd just use Ansible for that.

Re: Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

#53

In a past life, this is an interview question that I would ask people: "We have thousands of servers, and you need to run the same command on 10 of them, what's one way you would do it?" and follow up with "What if you wanted to run the command on hundreds or thousands - what problems would you expect with this approach, and what might you do differently?" I didn't really expect them to write code on the spot (hate t…

Is there a standard way of doing this that comes shipped with GNU/Linux?

I dunno about standard, but it's been done a bunch.

* As sibling notes, there's ansible (or chef/puppet/salt/...)

* The traditional solution was https://github.com/duncs/clusterssh which opens an xterm to each target plus a window that you type into to mirror input to all of them

* I do the same-ish in tmux with

  bind-key a set-window-option synchronize-panes
and I expect screen and such have equivalent features

* Likewise, there are terminal emulators that let you do splits and then select a menu option to mirror input to all of them

Re: Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

#54
post #40

Earlier quoted context omitted.

Ansible requires python to be installed on all of the target computers.

That's not necessarily true. There is the raw module that executes a bare command. https://docs.ansible.com/ansible/latest/collections/ansible/...

Yeah, but at that point you've lost a lot of the benefits to using ansible.

Re: Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

#55
post #41

Earlier quoted context omitted.

Ansible requires python to be installed on all of the target computers.

are there any linux distributions which don't require python installed, other than embedded?

OpenSUSE, Fedora/RHEL, Gentoo, and probably Debian (and derivatives of all of the above) have it by default, but Alpine and Arch don't appear to.

Re: Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

#57
post #40

Earlier quoted context omitted.

That's not necessarily true. There is the raw module that executes a bare command. https://docs.ansible.com/ansible/latest/collections/ansible/...

Yeah, but at that point you've lost a lot of the benefits to using ansible.

Ansible uses this module to configure devices where it is impossible to install python, like network devices, which is one of ansible's big strengths.

Re: Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

#58

Earlier quoted context omitted.

Is there a standard way of doing this that comes shipped with GNU/Linux?

I'd just use Ansible for that.

Just found out about pssh through the comments

Re: Show HN: Sshsync – CLI tool to run shell commands across multiple remote servers

#60

In a past life, this is an interview question that I would ask people: "We have thousands of servers, and you need to run the same command on 10 of them, what's one way you would do it?" and follow up with "What if you wanted to run the command on hundreds or thousands - what problems would you expect with this approach, and what might you do differently?" I didn't really expect them to write code on the spot (hate t…

That's a great question you used in interviews! I'm curious – how would you personally approach this situation? What would your solution be for running a command on 10 servers, and how would you scale it to thousands?
Post reply on HN