Difference between revisions of "Beowulf Aug2010/Installation"
From Teknologisk videncenter
m (→Installation af apt-cacher) |
m (→Installation af NFS server) |
||
Line 48: | Line 48: | ||
<pre> | <pre> | ||
/etc/init.d/nfs-kernel-server restart | /etc/init.d/nfs-kernel-server restart | ||
+ | </pre> | ||
+ | ==Node Installations script== | ||
+ | |||
+ | =Installation af Nodes= | ||
+ | ==Installations scripts== | ||
+ | <source lang=bash> | ||
+ | #!/bin/bash | ||
+ | # Laver en .ssh folder og kopierer nøgler ind i den på node | ||
+ | ssh $1 mkdir .ssh | ||
+ | scp .ssh/* $1:.ssh/ | ||
+ | |||
+ | #Tilføjer ip og navn til hosts filen. | ||
+ | echo $1 $2 >> /etc/hosts | ||
+ | echo $2 >> Clients.txt | ||
+ | echo $2 >> mpd.hosts | ||
+ | scp /etc/hosts $2:/etc/hosts | ||
+ | scp /etc/apt/sources.list $2:/etc/apt/sources.list | ||
+ | ssh $2 "echo $2 > /etc/hostname" | ||
+ | ssh $2 "aptitude update && aptitude install -y openmpi-dev openmpi-common nfs-common openmpi-bin" | ||
+ | scp ./mount.txt $2:./ | ||
+ | ssh $2 "mkdir /var/mirror" | ||
+ | ssh $2 "cat ./mount.txt >> /etc/fstab" | ||
+ | ssh $2 "mount -a" | ||
+ | ssh $2 reboot | ||
+ | </source> | ||
+ | ==NTP opsætning== | ||
+ | Jeg har sat headnode op til at opdatere tiden på alle nodes. Uden nogen god grund:-)<br/><br/> | ||
+ | Ændre lidt i crontab med crontab -e | ||
+ | <pre> | ||
+ | |||
+ | # m h dom mon dow command | ||
+ | */10 * * * * ~/RunOnClients.sh "ntpdate 192.168.139.29" | ||
+ | */10 * * * * /usr/sbin/ntpdate 192.168.139.29 | ||
</pre> | </pre> |
Revision as of 15:19, 13 November 2010
Design Typologi
Headnode
Installation af SSH nøgle
Ændre source.list til local mirror
Ændre source.list til den defineret her.
aptitude update aptitude dist-upgrade
Installation af DHCP Server
aptitude install dhcp3-server -y
tilføj 192.168.149.0 scopet i config filen: /etc/dhcp3/dhcpd.conf
subnet 192.168.149.0 netmask 255.255.255.0 { range 192.168.149.50 192.168.149.200; option domain-name-servers 172.16.4.66; option domain-name "cluster.tekkom.dk"; option routers 192.168.149.1; default-lease-time 600; max-lease-time 7200; filename "pxelinux.0"; next-server 172.16.4.83; }
Installation af apt-cacher
aptitude install apt-cacher -y
har droppet det og bruger den vi har i forvejen
Installation af OpenMPI
aptitude install -y libopenmpi-dev openmpi-bin openmpi-doc
Installation af NFS server
aptitude install -y nfs-kernel-server mkdir /var/mirror
Tilføj folderen i /etc/exports
/var/mirror *(rw,sync,no_subtree_check)
Genstart NFS Serveren
/etc/init.d/nfs-kernel-server restart
Node Installations script
Installation af Nodes
Installations scripts
#!/bin/bash
# Laver en .ssh folder og kopierer nøgler ind i den på node
ssh $1 mkdir .ssh
scp .ssh/* $1:.ssh/
#Tilføjer ip og navn til hosts filen.
echo $1 $2 >> /etc/hosts
echo $2 >> Clients.txt
echo $2 >> mpd.hosts
scp /etc/hosts $2:/etc/hosts
scp /etc/apt/sources.list $2:/etc/apt/sources.list
ssh $2 "echo $2 > /etc/hostname"
ssh $2 "aptitude update && aptitude install -y openmpi-dev openmpi-common nfs-common openmpi-bin"
scp ./mount.txt $2:./
ssh $2 "mkdir /var/mirror"
ssh $2 "cat ./mount.txt >> /etc/fstab"
ssh $2 "mount -a"
ssh $2 reboot
NTP opsætning
Jeg har sat headnode op til at opdatere tiden på alle nodes. Uden nogen god grund:-)
Ændre lidt i crontab med crontab -e
# m h dom mon dow command */10 * * * * ~/RunOnClients.sh "ntpdate 192.168.139.29" */10 * * * * /usr/sbin/ntpdate 192.168.139.29