comparison master/wecu/setup.sh @ 57:ac1a20e627a9

from lukasz git repo 2020-05-26 (see ~/src/wecu), then editted, sac not quite working yet
author Henry S. Thompson <ht@markup.co.uk>
date Wed, 27 May 2020 20:54:34 +0000
parents
children
comparison
equal deleted inserted replaced
56:8ce6a81e2bb4 57:ac1a20e627a9
1 #!/bin/sh
2
3 # Usage:
4 # Pass password to cluster as parameter 1
5
6 cp /etc/hadoop/conf/slaves ./hosts
7
8 # Dependencies
9 sudo apt-get install parallel
10 sudo apt-get install pigz
11 sudo apt install sshpass
12
13 # Matplot lib
14 python -m pip install -U pip
15 sudo python -m pip install -U matplotlib
16 sudo pip install numpy python-dateutil pytz pyparsing six --force-reinstall --upgrade
17 sudo apt-get install python-tk
18
19 xargs -I '{}' sshpass -p $1 ssh -o "StrictHostKeyChecking no" {} "sudo apt install pigz" < hosts
20
21 # Set up password-less communication
22 ssh-keygen -t rsa -f /home/cc/.ssh/id_rsa -P ""
23 cat hosts | parallel "cat /home/cc/.ssh/id_rsa.pub | sshpass -p '$1' ssh {} 'cat >> .ssh/authorized_keys'"
24 parallel --sshloginfile hosts --onall --jobs 1 --will-cite "grep -c ^processor" ::: "/proc/cpuinfo" 2>/dev/null | head -1 > cores.txt