by jasongill · 1y ago · 0 comments
I didn't really expect them to write code on the spot (hate that in interviews), but just to describe a possible solution; there were no wrong answers. Seeing how people came up with a quick hack for 10 and then being able to evolve their thinking for thousands was the point of the question and it could be enlightening to see.
I had a lot of people come up with things that I never even thought of, such as SSH'ing in to all 10 machines and then using a terminal feature to type into all of the windows at once.
For more than that, I used Puppet at the time (this was a decade and a half ago); I was a contributor to Puppet and standardized on it in my company. Eventually we moved to Ansible and I sold that business but last I heard, they are still using Ansible and likely using playbooks that were ported over from my Puppet stuff
* 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