Crypto Blood Bath? Mining ideas...

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Marsh

Moderator
May 12, 2013
2,645
1,496
113
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
By all mean, learn docker cluster, it is the wave of the future.

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
 

Joel

Active Member
Jan 30, 2015
856
199
43
42
By all mean, learn docker cluster, it is the wave of the future.

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
I don't even have to do that at all with Docker (even without clustering). Just use the "--restart always" flag when creating the containers. Now I can just power on the machine and it starts mining.
 
  • Like
Reactions: gigatexal

ServeTheSam

Member
Dec 10, 2017
38
14
8
By all mean, learn docker cluster, it is the wave of the future.

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
This is Docker Cluster? Same/better than Docker Swarm or Kubernetes??

This looks like exactly what I need!
 

Marsh

Moderator
May 12, 2013
2,645
1,496
113
The shell script above lets me control what coin and which pool to mine.

I could switched all or part of the miners to mine various coin , use different miner software and mining pool.