Difference between revisions of "Beowulf Aug2010/Installation"
From Teknologisk videncenter
m (→mount.txt filen) |
m (→Installations scripts) |
||
Line 121: | Line 121: | ||
ssh $2 "aptitude update && aptitude install -y openmpi-dev openmpi-common nfs-common openmpi-bin" | ssh $2 "aptitude update && aptitude install -y openmpi-dev openmpi-common nfs-common openmpi-bin" | ||
− | #Opretter og mounter /var/mirror | + | #Sætter NFS Rettigheder |
+ | scp /etc/default/nfs-common $2:/etc/default/nfs-common | ||
+ | ssh $2 "/etc/init.d/idmapd restart" | ||
+ | ssh $2 "/etc/init.d/rpc_pipefs restart" | ||
+ | |||
+ | #Opretter og mounter /var/mirror og /home | ||
scp ./mount.txt $2:./ | scp ./mount.txt $2:./ | ||
ssh $2 "mkdir /var/mirror" | ssh $2 "mkdir /var/mirror" |
Revision as of 13:50, 20 December 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; host Node1 { hardware ethernet 00:0b:db:92:d5:f9; fixed-address 192.168.149.101; } host Node2 { hardware ethernet 00:0B:DB:92:D5:3C; fixed-address 192.168.149.102; } host Node3 { hardware ethernet 00:0B:DB:92:D5:1E; fixed-address 192.168.149.103; } host Node4 { hardware ethernet 00:0F:1F:65:EC:B1; fixed-address 192.168.149.104; } host Node5 { hardware ethernet 00:0B:DB:92:D5:E4; fixed-address 192.168.149.105; } host Node6 { hardware ethernet 00:0B:DB:92:D5:E2; fixed-address 192.168.149.106; } host Node7 { hardware ethernet 00:0B:DB:92:D5:50; fixed-address 192.168.149.107; } host Node8 { hardware ethernet 00:0B:DB:92:D6:72; fixed-address 192.168.149.108; } host Node9 { hardware ethernet 00:0B:DB:92:D5:A0; fixed-address 192.168.149.109; } host Node10 { hardware ethernet 00:0B:DB:92:D5:E0; fixed-address 192.168.149.110; } }
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
Installation af Distributed Shell
Nogle af de script til administration bruger dsh, så derfor skal det også installeres
aptitude install -y dsh
Installation af geany
aptitude install geany xterm -y
Installation af Nodes
Man kan installere nodes med nedenstående script. Man kalder det bare med ip og navn på maskinen som henholdvis 1. og 2. argument.
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, Client filen og mpd filen.
echo $1 $2 >> /etc/hosts
echo $2 >> Clients.txt
echo $2 >> mpd.hosts
#kopierer hosts filen ud til alle clienter, så de kan svare tilbage til ClusterH
scp /etc/hosts $2:/etc/hosts
#Sætter clienterne på til at bruge det lokale mirror
scp /etc/apt/sources.list $2:/etc/apt/sources.list
#Omdøber klienten
ssh $2 "echo $2 > /etc/hostname"
#Initializerer med den nye mirror server, og installerer nødvendige SW
ssh $2 "aptitude update && aptitude install -y openmpi-dev openmpi-common nfs-common openmpi-bin"
#Sætter NFS Rettigheder
scp /etc/default/nfs-common $2:/etc/default/nfs-common
ssh $2 "/etc/init.d/idmapd restart"
ssh $2 "/etc/init.d/rpc_pipefs restart"
#Opretter og mounter /var/mirror og /home
scp ./mount.txt $2:./
ssh $2 "mkdir /var/mirror"
ssh $2 "cat ./mount.txt >> /etc/fstab"
ssh $2 "mount -a && reboot"
mount.txt filen
ClusterH:/var/mirror/ /var/mirror nfs rw 0 0 ClusterH:/home/ /home nfs rw 0 0
nfs-common filen
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