Instalação dos nodes 64 bits

Description

Instalação dos nodes 64 bits, primeiro colocando no tftpboot
LABEL linux
    kernel vmlinuz
    append ks=nfs:192.168.1.150:/export/linux/kickstart/ks_64bits.cfg initrd=initrd.img  devfs=nomount ksdevice=eth1
usando o seguinte kickstart, ks_64bits.cfg :
install
nfs --server=192.168.1.150 --dir=/export/linux/scientific/53/x86_64
lang en_US.UTF-8
#keyboard br-abnt2
keyboard us
#Reboot after installation
#reboot
rootpw --iscrypted $1$iRzYaom6746352fgsaZn6SMoIB/
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone --utc America/Sao_Paulo
network --device eth1 --bootproto dhcp
bootloader --location=mbr --driveorder=sda
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --all
part /boot --fstype ext3 --size=100 --asprimary
part / --fstype ext3 --size=10240 --asprimary
part swap --size=2048 --asprimary
part /var --fstype ext3 --size=2048
part /tmp --fstype ext3 --size=500
part /scratch --fstype ext3 --size=1 --grow
%packages --nobase
@Core
yum
openssh-clients
openssh-server
ntp
portmap
sendmail
mailx
make
logwatch
ypbind
wget
gcc
gcc-c++
bzip2
time
yp-tools
nfs-utils
tmpwatch
expect
readline-devel
nfs-utils-lib
lm_sensors
patch
setarch
openssl097a
compat-libf2c-34-3.4.6-4.i386
-yum-cron
%post
#dependencias do glexec
yum install libstdc++-4.1.2-44.el5.i386 -y
yum install openssl097a-0.9.7a-9.el5_2.1.i386 -y
TEMP=/teste
mkdir $TEMP
#importante: as opções ro,nolock,udp devem estar para funcionar a montagem
mount -t nfs -o ro,nolock,udp 192.168.1.150:/export/postinstall/ $TEMP 
cd $TEMP
mv /etc/ntp.conf /etc/ntp.conf.bck
cat < /etc/ntp.conf 
server 192.168.1.150
authenticate no
driftfile /var/lib/ntp/drift
EOF
        
mv /etc/hosts /etc/hosts.bck
cat < /etc/hosts 
# SPRACE SERVERS
# compute element
200.136.80.4    osg-ce.sprace.org.br    osg-ce
192.168.1.150   osgce.grid              osgce
# storage element
200.136.80.5    osg-se.sprace.org.br    osg-se
192.168.1.151   osgse.grid              osgse
# storage servers
200.136.80.6    spraid01.sprace.org.br  spraid01
192.168.1.152   storage01.grid          storage01
200.136.80.7    spraid02.sprace.org.br  spraid02
192.168.1.153   storage02.grid          storage02
# access server
200.136.80.8    access.sprace.org.br    access
192.168.1.154   acs.grid                acs
# Monitoramento
200.136.80.9    spruna.sprace.org.br    spruna
# SPRACE Workers
EOF

for i in `seq 1 83`; do
    if [ $i -lt 10  ] ;then a=0$i;else a=$i;fi
    echo "192.168.1.$i  node$a.grid             node$a" >> /etc/hosts
done

cp /etc/nsswitch.conf /etc/nsswitch.conf.preNIS
cat /etc/nsswitch.conf.preNIS \
        | sed -e 's#^passwd:\(.*\)#passwd:     files nis#g' \
              -e 's#^shadow:\(.*\)#shadow:     files nis#g' \
              -e 's#^group:\(.*\)#group:      files nis#g' \
          > /etc/nsswitch.conf

echo 192.168.1.150 > /etc/ntp/step-tickers
chkconfig ntpd on;
cp condor /etc/init.d/condor;
cp gmond.conf  /etc/.;
#copiando a chave para fazer scp e ssh
mkdir /root/.ssh;
chmod 600 /root/.ssh;
echo "ssh-rsa AAAAB3NzaC1yc2EfdadfadfadfafNzmuVnfMr8UDKNL8rTIvdRofMGTMg6Hf+oldLLvxy2CThCCsVA0BMoB/Sg6
B4+8UpMJy3412341341djtkvgYu0yImcDEtkYPVT6dJLA+NZVXu83UBLof7EM0U= root@osg-ce.sprace.org.br">> /root/.ssh/authorized_keys;
#removendo serviçoes desnecessários
chkconfig iptables off
chkconfig ip6tables off
#configuracao de rede
mv /etc/resolv.conf /etc/resolv.conf.old;
echo domain grid >>/etc/resolv.conf;
echo nameserver 192.168.1.150 >>/etc/resolv.conf;
echo nameserver 143.108.30.90 >>/etc/resolv.conf;
echo nameserver 143.107.128.16 >>/etc/resolv.conf;
mv /etc/sysconfig/network /etc/sysconfig/network.old;
NNAME=`ifconfig eth1 | grep Bcast |cut -c31- | cut -d " " -f1`; 
#bug: se o node for menor do que 10, tem que colocar um 0 na frente do numero
if [ $NNAME -lt 10  ] ;then NNAME=0$NNAME;fi
echo NETWORKING=yes >>/etc/sysconfig/network;
echo HOSTNAME=node${NNAME}| cat >>/etc/sysconfig/network; 
echo GATEWAY=192.168.1.150| cat>>/etc/sysconfig/network;
echo NISDOMAIN=grid|cat>>/etc/sysconfig/network;
mv /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1.bak; 
cat /etc/sysconfig/network-scripts/ifcfg-eth1.bak| sed -e "/BOOTPROTO=dhcp/d"| sed -e "/ONBOOT=no/d"|  sed -e "/HWADDR/d"|cat >> /etc/sysconfig
/network-scripts/ifcfg-eth1;
rm /etc/sysconfig/network-scripts/ifcfg-eth1.bak;
#echo ONBOOT=yes|cat>>/etc/sysconfig/network-scripts/ifcfg-eth1;
MACADDR=`ifconfig eth1 | grep HWaddr| cut -c39-`;
echo HWADDR=${MACADDR}|cat>>/etc/sysconfig/network-scripts/ifcfg-eth1;
echo BROADCAST=192.168.1.255|cat>>/etc/sysconfig/network-scripts/ifcfg-eth1;
IP=`ifconfig eth1 | grep Bcast |cut -c21- | cut -d " " -f1`;
echo IPADDR=${IP}|cat>>/etc/sysconfig/network-scripts/ifcfg-eth1 ;
echo NETMASK=255.255.255.0|cat>>/etc/sysconfig/network-scripts/ifcfg-eth1;
echo NETWORK=192.168.1.0| cat >> /etc/sysconfig/network-scripts/ifcfg-eth1;
#para permitir o logwatch de enviar e-mail para osg-ce
echo root: root@osgce.grid|cat>>/etc/aliases;
#alterando a configuracao default de e-mails
mv /etc/mail /etc/mail.old;
cp -pr $TEMP/mailnode /etc/mail;
chkconfig sendmail on;
#Definindo ponto de montagem dos nodes
echo "osgce:/home    /home           nfs     rw,hard,bg,rsize=32768,wsize=32768,udp,nfsvers=3"|cat >>/etc/fstab;
echo "osgce:/opt/osg-1.0.0  /OSG            nfs     rw,hard,bg,rsize=32768,wsize=32768,udp,nfsvers=3"| cat>>/etc/fstab;
echo "osgce:/export/condor-x86_64  /opt/condor-x86_64            nfs     rw,hard,bg,rsize=32768,wsize=32768,udp,nfsvers=3"| cat>>/etc/fstab;
echo "acs:/hdacs /hdacs nfs rw,hard,bg,noauto,rsize=32768,wsize=32768,udp,nfsvers=3"|cat >>/etc/fstab;
#criando pontos de montagem
mkdir /OSG
ln -s /OSG /opt/osg-1.0.0
mkdir /hdacs
mkdir /opt/condor-x86_64
#configurando NIS
echo ypserver 192.168.1.150|cat>>/etc/yp.conf;
chkconfig ypbind on;
service ypbind start;
mkdir /scratch/condor;
mkdir /scratch/OSG;
#configurando para o condor
useradd -d /scratch/condor -u 521 condor
chmod a+rw /scratch/OSG;
chown condor:condor /scratch/condor;
cd /scratch/condor;
touch condor_config.local;
mkdir execute log spool;
chown condor condor_config.local execute log spool;
chkconfig --add condor;
#instalando o gmond
#Em FNODE coloque o primeiro nó do rack, de baixo para cima, para acertar o physical view do gmond
RACK=4; FNODE=55;
let RANK=NNAME-FNODE;
#Este pedaço tem um erro: provavelmente tirar os \
echo location \"$RACK,$RANK,0\"| cat >>/etc/gmond.conf;
groupadd -g 104 ganglia;
useradd -d /var/lib/ganglia -s /bin/false -g ganglia -u 107 ganglia ;
rpm -ivh $TEMP/ganglia-monitor-core-gmond-2.5.7-1.x86_64.rpm;
#Para o tmpwatch
echo 'for d in /scratch/OSG/*; do' >>/etc/cron.daily/tmpwatch
echo '    if [ -d "$d" ]; then' >> /etc/cron.daily/tmpwatch
#tirar os \ aqi também
echo '         /usr/sbin/tmpwatch -f 192 $d' >>/etc/cron.daily/tmpwatch
echo '    fi' >>/etc/cron.daily/tmpwatch
echo 'done' >>/etc/cron.daily/tmpwatch
#Nagios
yum -y  --enablerepo=dag install nagios-nrpe
cp -f $TEMP/nrpe.cfg /etc/nagios/.
#resolver um problema do expect
expect -f $TEMP/auto_sensors |grep modprobe >> /etc/rc.d/rc.local
#instalação local do worker node client
cd $TEMP/pacman-3.26
source setup.sh
mkdir /opt/OSG-wn-client
cd /opt/OSG-wn-client
VDTSETUP_AGREE_TO_LICENSES=y
export VDTSETUP_AGREE_TO_LICENSES
VDTSETUP_INSTALL_CERTS=l
export VDTSETUP_INSTALL_CERTS
VDTSETUP_EDG_CRL_UPDATE=n
export VDTSETUP_EDG_CRL_UPDATE
VDTSETUP_ENABLE_ROTATE=y
export VDTSETUP_ENABLE_ROTATE
VDTSETUP_CA_CERT_UPDATER=n
export VDTSETUP_CA_CERT_UPDATER
pacman -trust-all-caches -get OSG:wn-client
#comecando a instalacao do glexec 
yum install openssl-devel -y
useradd  -u 7829 -s /bin/false glexec 
pacman  -trust-all-caches -get OSG:Glexec
sed -i 's/hostkey.pem/hostproxykey.pem/g'  /etc/glexec/contrib/gums_interface/getmapping.cfg
sed -i 's/hostcert.pem/hostproxy.pem/g'  /etc/glexec/contrib/gums_interface/getmapping.cfg
sed -i 's/yourmachine.yourdomain/osg-ce.sprace.org.br/g'  /etc/glexec/contrib/gums_interface/getmapping.cfg
sed -i 's/65049/65008/g' /etc/glexec/tracking_groups.cfg
source /opt/OSG-wn-client/setup.sh
vdt-control --on
# lembrar de montar o /OSG 
mount -t nfs -o ro,nolock,udp  192.168.1.150:/opt/osg-1.0.0 /OSG
mkdir /etc/grid-security;
ln -s /OSG/globus/share/certificates /etc/grid-security/certificates
ln -s /OSG/globus/TRUSTED_CA /opt/OSG-wn-client/globus/TRUSTED_CA
cd /;
umount $TEMP
rm -rf $TEMP;

Updates

Fulano em dd/mm/aaaa

Coloca o que fez.

Ciclano em dd/mm/aaaa

Mais comentarios
Topic revision: r2 - 2009-09-14 - MarcoAndreFerreiraDias
 

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

antalya escort bursa escort eskisehir escort istanbul escort izmir escort