strutture:lnf:dr:calcolo:scientifico:configurazione_lsf_8
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| strutture:lnf:dr:calcolo:scientifico:configurazione_lsf_8 [2012/07/23 18:15] – [Installazione di LSF 8] pistoni@infn.it | strutture:lnf:dr:calcolo:scientifico:configurazione_lsf_8 [2012/10/19 12:53] (current) – [Installazione di LSF 8] tonto@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Configurazione di LSF 8 ====== | ||
| + | |||
| + | |||
| + | ==== Operazioni preliminari all' | ||
| + | |||
| + | Creare l' | ||
| + | |||
| + | Creare l' | ||
| + | E' preferibile che l' | ||
| + | | ||
| + | adduser -d / | ||
| + | | ||
| + | Cambiare owner e protezioni al file / | ||
| + | |||
| + | chown lsf.alice / | ||
| + | chmod 400 / | ||
| + | |||
| + | Per poter leggere in AFS e scrivere nella cartella / | ||
| + | L' | ||
| + | |||
| + | Script / | ||
| + | |||
| + | #!/bin/sh | ||
| + | / | ||
| + | runuser -s /bin/bash lsf.alice -c "/ | ||
| + | exit | ||
| + | |||
| + | Aggiungere le seguenti 2 righe al file / | ||
| + | |||
| + | # Run get_ticket at startup | ||
| + | krb: | ||
| + | | ||
| + | Aggiungere le seguenti 2 righe al file / | ||
| + | | ||
| + | 10 0 * * * root / | ||
| + | 10 12 * * * root / | ||
| + | | ||
| + | Eseguire lo script a mano | ||
| + | |||
| + | / | ||
| + | |||
| + | Opzionalmente, | ||
| + | pam_afs_session.so ignore_root minimum_uid=1000 | ||
| + | sia sotituita con la seguente: | ||
| + | pam_krb5afs.so minimum_uid=1000 | ||
| + | |||
| + | Esempio di file / | ||
| + | |||
| + | #%PAM-1.0 | ||
| + | # This file is auto-generated. | ||
| + | # User changes will be destroyed the next time authconfig is run. | ||
| + | auth sufficient | ||
| + | auth required | ||
| + | auth sufficient | ||
| + | auth requisite | ||
| + | auth required | ||
| + | auth | ||
| + | | ||
| + | account | ||
| + | account | ||
| + | account | ||
| + | account | ||
| + | | ||
| + | password | ||
| + | password | ||
| + | password | ||
| + | password | ||
| + | | ||
| + | session | ||
| + | session | ||
| + | # session | ||
| + | session | ||
| + | session | ||
| + | session | ||
| + | session | ||
| + | |||
| + | Creare le coppie di chiavi SSH per evitare la richiesta della password tra un nodo e l' | ||
| + | Su tutte le macchine dare il comando: | ||
| + | | ||
| + | ssh-keygen -t rsa | ||
| + | | ||
| + | Raccogliere in un unico file temporaneo (ad esempio keys.pub) l' | ||
| + | | ||
| + | ssh root@alicn* cat / | ||
| + | cat keys.pub | ssh root@alicn* "cat >> / | ||
| + | rm keys.pub | ||
| + | |||
| + | Creare la directory / | ||
| + | |||
| + | #!/bin/bash | ||
| + | BaseName=" | ||
| + | LastNode=10 | ||
| + | i=1 | ||
| + | if [ " | ||
| + | read -p " | ||
| + | else | ||
| + | cmd=$* | ||
| + | fi | ||
| + | echo $cmd | ||
| + | #exit | ||
| + | for (( k=i; k< | ||
| + | do | ||
| + | echo | ||
| + | echo " | ||
| + | / | ||
| + | done | ||
| + | |||
| + | ==== Installazione di LSF 8 ==== | ||
| + | |||
| + | Scaricare i tar file di LSF dal sito my.platform.com | ||
| + | * lsf8.0.1_linux2.6-glibc2.3-x86_64.tar.Z | ||
| + | * lsf8.0.1_lsfinstall.tar.Z | ||
| + | |||
| + | Espandere il secondo nella directory di installazione e posizionare il primo tarball nella stessa directory (senza espanderlo): | ||
| + | / | ||
| + | |||
| + | Personalizzare il file " | ||
| + | LSF_TOP="/ | ||
| + | LSF_ADMINS=" | ||
| + | LSF_CLUSTER_NAME=" | ||
| + | LSF_MASTER_LIST=" | ||
| + | LSF_LICENSE="/ | ||
| + | Disabilitati i riferimenti a EGO | ||
| + | ENABLE_DYNAMIC_HOSTS=" | ||
| + | PATCH_BACKUP_DIR="/ | ||
| + | PATCH_HISTORY_DIR="/ | ||
| + | LSF_ADD_SERVERS=: | ||
| + | # | ||
| + | LSF_TARDIR="/ | ||
| + | |||
| + | * Nota: per l' | ||
| + | | ||
| + | Eventualmente compilare il file " | ||
| + | alicn1 | ||
| + | e il file " | ||
| + | alicn1 | ||
| + | alicn2 | ||
| + | alicn3 | ||
| + | alicn4 | ||
| + | alicn5 | ||
| + | alicn6 | ||
| + | alicn7 | ||
| + | alicn8 | ||
| + | alicn9 | ||
| + | alicn10 | ||
| + | |||
| + | |||
| + | Avviare l' | ||
| + | ./ | ||
| + | | ||
| + | Accertarsi che le ACL di AFS consentano la scrittura all' | ||
| + | fs sa -dir / | ||
| + | |||
| + | Quindi, con il token di lsf.alice, copiare i file installati localmente su AFS | ||
| + | cd .. | ||
| + | cp -R alice / | ||
| + | | ||
| + | Cancellare la directory /usr/lnf | ||
| + | cd /usr | ||
| + | rm -rf lnf | ||
| + | | ||
| + | Creare un link: | ||
| + | ln -s / | ||
| + | | ||
| + | Spostare i binary a un livello superiore del tree e creare il corrispondente link (sono indipendenti dal cluster) | ||
| + | cd / | ||
| + | mv 8.0 ../ | ||
| + | ln -s ../8.0 8.0 | ||
| + | |||
| + | * Nota: se non e' la prima installazione di LSF ai LNF, la directory con i binari esiste gia', quindi sostituire il precedente comando mv con | ||
| + | |||
| + | rm -rf 8.0 | ||
| + | |||
| + | Modificare il file " | ||
| + | |||
| + | # This file is produced automatically by lsfconfig according to | ||
| + | # installation setup. Refer to the " | ||
| + | # before changing any parameters in this file. | ||
| + | # Any changes to the path names of LSF files must be reflected | ||
| + | # in this file. Make these changes with caution. | ||
| + | LSB_SHAREDIR=/ | ||
| + | ### | ||
| + | # Configuration directories | ||
| + | LSF_CONFDIR=/ | ||
| + | LSB_CONFDIR=/ | ||
| + | # Daemon log messages | ||
| + | # | ||
| + | ### | ||
| + | LSF_LOG_MASK=LOG_DEBUG | ||
| + | # Batch mail message handling | ||
| + | LSB_MAILTO=!U | ||
| + | # Miscellaneous | ||
| + | LSF_AUTH=eauth | ||
| + | # General lsfinstall variables | ||
| + | LSF_MANDIR=/ | ||
| + | LSF_INCLUDEDIR=/ | ||
| + | LSF_MISC=/ | ||
| + | XLSF_APPDIR=/ | ||
| + | LSF_ENVDIR=/ | ||
| + | # Internal variable to distinguish Default Install | ||
| + | LSF_DEFAULT_INSTALL=y | ||
| + | # Internal variable indicating operation mode | ||
| + | LSB_MODE=batch | ||
| + | # Other variables | ||
| + | LSF_LIM_PORT=7869 | ||
| + | LSF_RES_PORT=6878 | ||
| + | LSB_MBD_PORT=6881 | ||
| + | LSB_SBD_PORT=6882 | ||
| + | LSF_DYNAMIC_HOST_WAIT_TIME=60 | ||
| + | # WARNING: Please do not delete/ | ||
| + | LSF_LINK_PATH=n | ||
| + | # LSF_MACHDEP and LSF_INDEP are reserved to maintain | ||
| + | # backward compatibility with legacy lsfsetup. | ||
| + | # They are not used in the new lsfinstall. | ||
| + | LSF_INDEP=/ | ||
| + | LSF_MACHDEP=/ | ||
| + | LSF_TOP=/ | ||
| + | LSF_VERSION=8.0 | ||
| + | LSF_ENABLE_EGO=N | ||
| + | # LSF_EGO_ENVDIR=/ | ||
| + | EGO_WORKDIR=/ | ||
| + | LSF_LIVE_CONFDIR=/ | ||
| + | LSF_SERVER_HOSTS=" | ||
| + | LSF_MASTER_LIST=" | ||
| + | LSF_EGO_DAEMON_CONTROL=N | ||
| + | # | ||
| + | LSF_LICENSE_FILE=1700@flexserver-1.cr.cnaf.infn.it: | ||
| + | LSF_RSH=" | ||
| + | LSF_LSLOGIN_SSH=yes | ||
| + | |||
| + | * Nota: Occorre configurare il file di configurazione del logserver centrale (host logsrv, file: / | ||
| + | |||
| + | |||
| + | Modificare conf/ | ||
| + | |||
| + | Begin Parameters | ||
| + | DEFAULT_QUEUE | ||
| + | MBD_SLEEP_TIME = 20 #Time used for calculating parameter values (60 secs is default) | ||
| + | SBD_SLEEP_TIME = 15 # | ||
| + | JOB_ACCEPT_INTERVAL = 1 # | ||
| + | # (default is 1 (one-fold of MBD_SLEEP_TIME)) | ||
| + | ENABLE_EVENT_STREAM = n # | ||
| + | JOB_SPOOL_DIR = /tmp | ||
| + | End Parameters | ||
| + | |||
| + | Modificare conf/ | ||
| + | |||
| + | Begin Host | ||
| + | HOST_NAME MXJ | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | alicn1 | ||
| + | default | ||
| + | End Host | ||
| + | | ||
| + | # Host groups can be referenced by the queue file. Each line defines a host | ||
| + | # group. | ||
| + | # group name, followed by white space, followed by the list of group members. | ||
| + | # The list of members should be enclosed in parentheses and separated by white | ||
| + | # space. | ||
| + | | ||
| + | # This example is commented out | ||
| + | Begin HostGroup | ||
| + | GROUP_NAME | ||
| + | # | ||
| + | End HostGroup | ||
| + | |||
| + | |||
| + | Creare le code in conf/ | ||
| + | |||
| + | |||
| + | Begin Queue | ||
| + | QUEUE_NAME | ||
| + | PRIORITY | ||
| + | NICE = 20 | ||
| + | #RUN_WINDOW | ||
| + | # | ||
| + | # | ||
| + | ### | ||
| + | # | ||
| + | #pg = 5/12 | ||
| + | #io = 140/400 | ||
| + | ### | ||
| + | CPULIMIT | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | #USERS | ||
| + | #HOSTS | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | #EXCLUSIVE | ||
| + | DESCRIPTION | ||
| + | Scheduled with higher priority. | ||
| + | End Queue | ||
| + | |||
| + | Begin Queue | ||
| + | QUEUE_NAME | ||
| + | PRIORITY | ||
| + | NICE = 20 | ||
| + | # | ||
| + | #r1m = 0.7/ | ||
| + | # | ||
| + | #pg = 4.0/8 | ||
| + | #ut = 0.2 | ||
| + | #io = 50/240 | ||
| + | CPULIMIT | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # LIMIT[[RSRC, | ||
| + | # GRACE_PERIOD[[QPRIORITY, | ||
| + | DESCRIPTION | ||
| + | lightly loaded. | ||
| + | End Queue | ||
| + | | ||
| + | Begin Queue | ||
| + | QUEUE_NAME | ||
| + | PRIORITY | ||
| + | NICE = 20 | ||
| + | # | ||
| + | #r1m = 0.7/ | ||
| + | # | ||
| + | #pg = 4.0/8 | ||
| + | #ut = 0.2 | ||
| + | #io = 50/240 | ||
| + | CPULIMIT | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # LIMIT[[RSRC, | ||
| + | # GRACE_PERIOD[[QPRIORITY, | ||
| + | DESCRIPTION | ||
| + | End Queue | ||
| + | | ||
| + | Begin Queue | ||
| + | QUEUE_NAME | ||
| + | PRIORITY | ||
| + | NICE = 20 | ||
| + | #RUN_WINDOW | ||
| + | r15s = 0.3/1.5 | ||
| + | r1m = 0.3/1.5 | ||
| + | pg = 4.0/15 | ||
| + | it = 10/1 | ||
| + | #CPULIMIT | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | #USERS | ||
| + | #HOSTS | ||
| + | # | ||
| + | #EXCLUSIVE | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | DESCRIPTION | ||
| + | End Queue | ||
| + | | ||
| + | Da utente autorizzato di AFS dare i seguenti comandi: | ||
| + | find / | ||
| + | find / | ||
| + | |||
| + | * Nota: il primo e' un volume dedicato ai dati statici di LSF, unico per tutti i cluster dei LNF (accesso read-lookup). | ||
| + | Il secondo e' un volume a parte e ne va creato uno per ogni cluster (accesso anche in scrittura da parte dell' | ||
| + | | ||
| + | Lanciare su tutti i nodi della farm il comando di configurazione hostsetup | ||
| + | cd / | ||
| + | ./farm "cd / | ||
| + | |||
| + | Impostare le variabile di environment nel profilo degli utenti, ad esempio creando il file temporaneo seguente (profile.upd) | ||
| + | |||
| + | ############################# | ||
| + | # Load LSF Parameters | ||
| + | # | ||
| + | . / | ||
| + | |||
| + | appenderlo al file / | ||
| + | |||
| + | cat profile.upd | ssh root@alicn* "cat >> / | ||
| + | |||
| + | oppure (csh.login.upd) | ||
| + | |||
| + | ############################# | ||
| + | # Load LSF Parameters | ||
| + | # | ||
| + | source / | ||
| + | |||
| + | appenderlo al file / | ||
| + | |||
| + | cat csh.login.upd | ssh root@alicn* "cat >> / | ||
| + | |||
| + | Fare login come root sul nodo master (alicn2) e far partire lsf | ||
| + | lsfstartup | ||
| + | |||
| + | Per lo shutdown di lsf: | ||
| + | lsfshutdown | ||
| + | | ||
| + | Per testare che tutto funzioni (con lsf started): | ||
| + | lsid | ||
| + | lshosts | ||
| + | bhosts | ||
| + | bqueues | ||
| + | | ||
| + | Per testare che i Job vadano in esecuzione, fare login come utente non privilegiato e posizionarsi du area NFS condivisa dalle macchine, quindi dare il seguente comando: | ||
| + | bsub -o o.txt test.sh | ||
| + | |||
| + | ove test.sh e' uno shell script di test, ad esempio: | ||
| + | #!/bin/bash | ||
| + | | ||
| + | date | ||
| + | sleep 10 | ||
| + | date | ||
| + | env | ||
| + | |||
| + | quindi verificare il contenuto di o.txt | ||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | --- // | ||
| + | |||
| + | --- // | ||
| + | |||
| + | --- // | ||
| + | |||
| + | |||
| + | |||
| + | |||
