Mercurial > hg > cc > azure
diff master/src/wecu/setup.sh @ 58:a3edba8dab11
move to right place in tree
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Thu, 28 May 2020 09:56:42 +0000 |
parents | master/wecu/setup.sh@ac1a20e627a9 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/master/src/wecu/setup.sh Thu May 28 09:56:42 2020 +0000 @@ -0,0 +1,24 @@ +#!/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