view 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
line wrap: on
line source

#!/bin/sh

# Usage:
#   Pass password to cluster as parameter 1

cp /etc/hadoop/conf/slaves ./hosts

# Dependencies
sudo apt-get install parallel
sudo apt-get install pigz
sudo apt install sshpass

# Matplot lib
python -m pip install -U pip
sudo python -m pip install -U matplotlib
sudo pip install numpy python-dateutil pytz pyparsing six --force-reinstall --upgrade
sudo apt-get install python-tk

xargs -I '{}' sshpass -p $1 ssh -o "StrictHostKeyChecking no" {} "sudo apt install pigz" < hosts

# Set up password-less communication
ssh-keygen -t rsa -f /home/cc/.ssh/id_rsa -P ""
cat hosts | parallel "cat /home/cc/.ssh/id_rsa.pub | sshpass -p '$1' ssh {} 'cat >> .ssh/authorized_keys'"
parallel --sshloginfile hosts --onall --jobs 1 --will-cite "grep -c ^processor" ::: "/proc/cpuinfo" 2>/dev/null | head -1 > cores.txt