User Tools

Site Tools


cluster:instalacion_condor_head

Instalación de Condor en el nodo principal (c-head)

Control de versiones

Fecha Actividad Autor
24/07/2010 Publicación inicial Jorge Iván Meza Martínez.
18/11/2010 Se agregó el archivo de configuración para los nodos worker+interactive Jorge Iván Meza Martínez.

Introducción

En este capítulo se obtiene, descomprime e instala la distribución de Condor en el nodo principal (c-head) del cluster. De igual manera se crean los archivos de configuración, general y para cada uno de los nodos, y se establecen las ubicaciones necesarias para la interacción con los nodos trabajadores, así como el establecimiento de la contraseña para autenticar sus conexiones.

Tiempo estimado

1 hora.

Precondición

Supuestos

  • El archivo de distribución de Condor (condor-7.4.2-linux-x86-rhel5-dynamic.tar.gz) se encuentra ubicado en /root.

Obtener la distribución ''7.4.2'' de Condor

En la siguiente ubicación elegir la distribución RHEL 5 Intel x86 (32 bits) y descargar el archivo condor-7.4.2-linux-x86-rhel5-dynamic.tar.gz en una ubicación conocida.

Establecer las ubicaciones locales necesarias

Crear los directorios y enlaces, necesarios para la instalación de Condor.

# mkdir -p /etc/condor
 
# mkdir /exports/condor/etc
 
# mkdir /exports/condor/condor-7.4.2
 
# cd /exports/condor
 
# ln -s condor-7.4.2 current
 
# ln -s /opt/condor/current/etc/condor_config /home/condor/condor_config
 
# ln -s /exports/condor /opt/condor

Descomprimir e instalar Condor

# mkdir /tmp/condor-src ; cd /tmp/condor-src
 
# tar zxvf /root/condor-7.4.2-linux-x86-rhel5-dynamic.tar.gz
 
# cd condor-7.4.2
 
# ./condor_install --prefix=/opt/condor/condor-7.4.2 --local-dir=/etc/condor --type=manager
 
Installing Condor from /tmp/condor-src/condor-7.4.2 to /exports/condor/condor-7.4.2
 
    WARNING: Unable to determine local IP address. Condor  might not work
    propertly until you set  NETWORK_INTERFACE=<machine IP address>
 
    Unable to find a valid Java installation 
    Java Universe will not work properly until the JAVA 
    (and JAVA_MAXHEAP_ARGUMENT) parameters are set in the configuration file!
 
    Condor has been installed into:
        /exports/condor/condor-7.4.2
 
    Configured condor using these configuration files:
      global: /exports/condor/condor-7.4.2/etc/condor_config
      local:  /etc/condor/condor_config.local
 
    In order for Condor to work properly you must set your CONDOR_CONFIG
    environment variable to point to your Condor configuration file:
    /exports/condor/condor-7.4.2/etc/condor_config before running Condor
    commands/daemons.
    Created scripts which can be sourced by users to setup their
    Condor environment variables.  These are:
       sh: /exports/condor/condor-7.4.2/condor.sh
      csh: /exports/condor/condor-7.4.2/condor.csh

Establecer los archivos de configuración

Archivo de configuración específico para las máquinas.

# mv /etc/condor/condor_config.local /opt/condor/current/etc/
 
# vi /opt/condor/current/etc/condor_config
 
    (actualizar)
    LOCAL_CONFIG_FILE = /opt/condor/current/etc/condor_config.local
 
# vi /opt/condor/current/etc/condor_config.local
 
    (agregar)
    LOCAL_CONFIG_FILE = /opt/condor/etc/condor_config.cluster
 
    (actualizar)
    RELEASE_DIR = /opt/condor/current

Archivo de configuración general del cluster

# vi /opt/condor/etc/condor_config.cluster
condor_config.cluster
## Condor configuration for C-Cluster
LOCAL_CONFIG_FILE = /opt/condor/etc/condor_config.$(HOSTNAME)
LOCAL_DIR = $(TILDE)/hosts/$(HOSTNAME)
####################################################################
# The following should be your T3 domain
UID_DOMAIN = micluster.com
####################################################################
# Human readable name for your Condor pool
COLLECTOR_NAME = “Mi cluster en $(UID_DOMAIN)# A shared file system (NFS), e.g. job dir, is assumed if the name is the same
FILESYSTEM_DOMAIN = $(UID_DOMAIN)
ALLOW_WRITE = *.$(UID_DOMAIN)
CONDOR_ADMIN = root@$(FULL_HOSTNAME)
####################################################################
# The following should be the full name of the head node
CONDOR_HOST = c-head
## CONDOR_HOST = c-head.micluster.com
####################################################################
# Port range should be opened in the firewall (can be different on different machines)
# This 9000-9999 is coherent with the iptables configuration in the T3 documentation
IN_HIGHPORT = 9999
IN_LOWPORT = 9000
# This is to enforce password authentication
SEC_DAEMON_AUTHENTICATION = required
SEC_DAEMON_AUTHENTICATION_METHODS = password
SEC_CLIENT_AUTHENTICATION_METHODS = password,fs,gsi,kerberos
SEC_PASSWORD_FILE = /etc/condor/condor_credential
ALLOW_DAEMON = condor_pool@*
##  Sets how often the condor_negotiator starts a negotiation cycle
##  for negotiator and schedd).
#  It is defined in seconds and defaults to 60 (1 minute), default is 300.
NEGOTIATOR_INTERVAL = 20
##  Scheduling parameters for the startd
TRUST_UID_DOMAIN = TRUE
# start as available and do not suspend, preempt or kill
START = TRUE
SUSPEND = FALSE
PREEMPT = FALSE
KILL = FALSE

Crear los archivos de configuración para cada uno de los diferentes tipos de nodos del cluster

# vi /opt/condor/etc/condor_config.headnode
condor_config.headnode
## OSG T3 host configuration
## For more info: http://www.cs.wisc.edu/condor/manual/v7.4/3_3Configuration.html
# List of daemons on the node (headnode requires collector and negotiator,
# schedd required to submit jobs, startd to run jobs)
DAEMON_LIST = MASTER, COLLECTOR, NEGOTIATOR
# vi /opt/condor/etc/condor_config.worker
condor_config.worker
## OSG T3 host configuration
## For more info: http://www.cs.wisc.edu/condor/manual/v7.4/3_3Configuration.html
# List of daemons on the node (headnode requires collector and negotiator,
# schedd required to submit jobs, startd to run jobs)
DAEMON_LIST = MASTER, STARTD
# vi /opt/condor/etc/condor_config.interactive
condor_config.interactive
## OSG T3 host configuration
## For more info: http://www.cs.wisc.edu/condor/manual/v7.4/3_3Configuration.html
# List of daemons on the node (headnode requires collector and negotiator,
# schedd required to submit jobs, startd to run jobs)
DAEMON_LIST = MASTER, SCHEDD
# vi /opt/condor/etc/condor_config.headnode+interactive
condor_config.headnode+interactive
## OSG T3 host configuration
## For more info: http://www.cs.wisc.edu/condor/manual/v7.4/3_3Configuration.html
DAEMON_LIST = MASTER, COLLECTOR, NEGOTIATOR, SCHEDD
# vi /opt/condor/etc/condor_config.worker+interactive
condor_config.worker+interactive
## OSG T3 host configuration
## For more info: http://www.cs.wisc.edu/condor/manual/v7.4/3_3Configuration.html
DAEMON_LIST = MASTER, STARTD, SCHEDD

Cada nodo debe tener su propio archivo de configuración del estilo condor_config.${HOST}. Si algún nodo requiere de una configuración especial es posible crear un archivo específico tomando a otro como plantilla.

# cd /opt/condor/etc/
 
# ln -s condor_config.headnode+interactive condor_config.c-head
 
# ln -s condor_config.worker condor_config.c-wn1
 
# ln -s condor_config.worker condor_config.c-wn2

Establecer la contraseña del cluster

# source /opt/condor/current/condor.sh
 
# condor_store_cred -c add
 
     Account: condor_pool@micluster.com
 
     Enter password:   Julieta
 
     Operation succeeded.

Crear directorios para los archivos de registro

Por defecto Condor crea un conjunto de directorios para todos los nodos bajo /etc/condor. Con las siguientes modificaciones se crean directorios independientes para cada uno de los nodos del cluster para facilitar su administración y mantenimiento.

# mkdir ~condor/hosts
 
# cd ~condor/hosts
 
# mkdir -p c-head/execute c-head/log c-head/spool
 
# mkdir -p c-wn1/execute c-wn1/log c-wn1/spool
 
# mkdir -p c-wn2/execute c-wn2/log c-wn2/spool
 
# chmod 755 -R ~condor/hosts
 
# chmod a+rwx c-head/execute c-wn1/execute c-wn2/execute
 
# chmod +t c-head/execute c-wn1/execute c-wn2/execute
 
# chown -R condor:condor ~condor/hosts
 
# chmod 711 ~condor

Remover los directorios creados por defecto que no se utilizarán.

# rmdir /etc/condor/execute  /etc/condor/log  /etc/condor/spool

Iniciar Condor

# /opt/condor/current/sbin/condor_master
 
# ps -ef | grep condor
 
     condor    2167     1  0 20:26 ?        00:00:00 /opt/condor/current/sbin/condor_master
     condor    2178  2167  0 20:26 ?        00:00:00 condor_collector -f
     condor    2363  2167  0 20:26 ?        00:00:00 condor_negotiator -f
     condor    2364  2167  0 20:26 ?        00:00:00 condor_schedd -f
     root      2367  2364  0 20:26 ?        00:00:00 condor_procd -A /tmp/condor-lock.c-head0.482303673940809/procd_pipe.SCHEDD -S 60 -C 501
     root      2442  2402  0 20:27 pts/0    00:00:00 grep condor

Detener Condor

# /opt/condor/current/sbin/condor_off -master

Configurar a Condor al inicio del sistema operativo

# vi /opt/condor/current/etc/examples/condor.boot
 
    (reemplazar)
    MASTER=/opt/condor/current/sbin/condor_master
 
# cp /opt/condor/current/etc/examples/condor.boot /etc/init.d/condor
 
# chkconfig --level 235 condor on

Añadir los comandos de Condor al ambiente del usuario

# cp /opt/condor/current/condor.sh /opt/condor/current/condor.sh.orig
 
# cp /opt/condor/current/condor.csh /opt/condor/current/condor.csh.orig
 
# vi /opt/condor/current/condor.sh
 
    # The script should be sourced by /bin/sh or similar
    CONDOR_CONFIG="/opt/condor/current/etc/condor_config"
    export CONDOR_CONFIG
    PATH="/opt/condor/current/bin:/opt/condor/current/sbin:$PATH"
    export PATH
 
# vi /opt/condor/current/condor.csh
 
    # The script should be sourced by /bin/csh or similar
    setenv CONDOR_CONFIG "/opt/condor/current/etc/condor_config"
    setenv PATH "/opt/condor/current/bin:/opt/condor/current/sbin:$PATH"
 
# cp /opt/condor/current/condor.sh /opt/condor/current/condor.csh /etc/profile.d/
 
# chmod +x /etc/profile.d/condor.sh /etc/profile.d/condor.csh

Enlaces

cluster/instalacion_condor_head.txt · Last modified: 2012/02/26 22:35 (external edit)