Difference between revisions of "Tutorial: Running MPI Programs on Hadoop Cluster"

From dftwiki3
Jump to: navigation, search
(Setup password-less ssh)
Line 1: Line 1:
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 13:57, 15 October 2013 (EDT)
+
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 13:57, 15 October 2013 (EDT)<br />
 +
Revised: --[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 12:02, 15 March 2017 (EDT)
 
----
 
----
  
=Setup to run MPI on multiple Linux-Mint computers=
+
=Setup to run MPI Hadoop servers=
* Follow general directions from [https://source.ggy.bris.ac.uk/wiki/Install_and_configure_MPI this page], or follow the steps summarized below.
+
* Follow general directions from [http://www.linuxproblem.org/art_9.html this page], or follow the steps summarized below.
  
* First set up password-less login setup
+
:# ssh to hadoop01
=Setup password-less ssh=
+
<onlysmith>  
* Follow directions in [https://source.ggy.bris.ac.uk/wiki/Configure_ssh_for_MPI this page], or follow the steps summarized below.
+
* We'll use 3 of the Linux-Mint machines for this demo.
+
ssh -Y yourusername@hadoop01.dyndns.org
<onlysmith>
+
** 131.229.103.46 a.k.a. FH345-03
 
** 131.229.103.62 a.k.a. FH345-09
 
** 131.229.103.63 a.k.a. FH345-04
 
 
</onlysmith>
 
</onlysmith>
* login to one of the Linux-Mint machines with your 352a-xx account.
+
:# enter the following commands
* enter the following commands:
 
 
  ssh-keygen -t rsa  ''(and press ENTER 3 times)''
 
  ssh-keygen -t rsa  ''(and press ENTER 3 times)''
 
  ls .ssh
 
  ls .ssh
Line 21: Line 18:
 
  mv id_rsa id_rsa.mpi
 
  mv id_rsa id_rsa.mpi
 
  mv id_rsa.pub id_rsa.mpi.pub
 
  mv id_rsa.pub id_rsa.mpi.pub
  ls -l
+
  ssh yourusername@hadoop02.dyndns.org mkdir -p .ssh
total 12
+
  cat id_rsa.mpi.pub | ssh dominique@hadoop02.dyndns.org 'cat >> .ssh/authorized_keys'
-rw------- 1 352a 352a 1675 Oct 15 13:33 id_rsa.mpi
+
   
  -rw------- 1 352a 352a  396 Oct 15 13:33 id_rsa.mpi.pub
+
</onlysmith>
-rw-r--r-- 1 352a 352a  444 Oct 14 14:26 known_hosts
+
* Now ssh to hadoop02 and verify that you can ssh without password, as the authentication is now done through rsa keys.
cat id_rsa.mpi.pub > authorized_keys
+
* exit from hadoop02 and find yourself again on hadoop01
  emacs -nw config    ''(and add the next line to the file)''
+
* repeat the last 2 commands above (ssh and cat) for hadoop03, and hadoop04.
IdentityFile ~/.ssh/id_rsa.mpi
+
* verify that you can ssh to hadoop03 and hadoop04 without password.
 
 
* Now login to another Linux-Mint machine. You should be able to login without having to enter a password.
 
  
 
=Configuration=
 
=Configuration=

Revision as of 11:02, 15 March 2017

--D. Thiebaut (talk) 13:57, 15 October 2013 (EDT)
Revised: --D. Thiebaut (talk) 12:02, 15 March 2017 (EDT)


Setup to run MPI Hadoop servers

  • Follow general directions from this page, or follow the steps summarized below.
  1. ssh to hadoop01

This section is only visible to computers located at Smith College

  1. enter the following commands
ssh-keygen -t rsa  (and press ENTER 3 times)
ls .ssh
cd .ssh
mv id_rsa id_rsa.mpi
mv id_rsa.pub id_rsa.mpi.pub
ssh yourusername@hadoop02.dyndns.org mkdir -p .ssh
cat id_rsa.mpi.pub | ssh dominique@hadoop02.dyndns.org 'cat >> .ssh/authorized_keys'

</onlysmith>

  • Now ssh to hadoop02 and verify that you can ssh without password, as the authentication is now done through rsa keys.
  • exit from hadoop02 and find yourself again on hadoop01
  • repeat the last 2 commands above (ssh and cat) for hadoop03, and hadoop04.
  • verify that you can ssh to hadoop03 and hadoop04 without password.

Configuration

  • create a file called hosts in the directory where the mpi programs are located.
  • Store the following IP addresses in it:

This section is only visible to computers located at Smith College