By all mean, learn docker cluster, it is the wave of the future.I may need to do that. I was struggling with figuring out how to make docker easy as opposed to SSH to each host and run commands
Back in the stone age, before docker.
Here is a example of running command remotely from a single master host.
# Restart miners
if [ `hostname` == "s26miner41" ]
then
clusterhost="s26miner42 s26miner43 s26miner44"
fi
tohost=$clusterhost
for remotehost in $tohost
do
echo " "
echo "Running remote execution command with host: $remotehost"
echo "host: $remotehost"
ssh fun@$remotehost 'echo xmrstakcpu > /home/fun/bin/miner.txt'
ssh fun@$remotehost 'sudo pkill xmr-stak-cpu ; sudo pkill xmrig ; sudo pkill tmux'
ssh fun@$remotehost 'sudo /etc/rc.local'
echo " "
done