YAIM configuration of the information system (v1)

Introduction

The following Glue objects are configured by YAIM:

  • GlueCE and GlueVOView
  • GlueCESEBindSE and GlueCESEBindGroup
  • GlueCluster and GlueSubCluster
  • GlueService
  • GlueSite
  • GlueSE, GlueGlueSEAccessProtocol, GlueSEControlProtocol, GlueSA and GlueSAVOInfo

In the case of GlueService, we are using the new glite-info-provider-service rpm. See how YAIM implements the configuration to use it in this wiki page.

In the case of the other Glue objects, YAIM used to define a set of variables in the configuration files that match the corresponding Glue attributes. We want to get rid of this approach since everytime a new Glue attribute needs to be "configurable" via YAIM, we need to wait for a new patch to be certified and released, and moreover, the number of variables in the configuration files increases. In the end, we have a duplication of the Glue attributes with the corresponding YAIM variable.

It's also important to add that when we finally move towards the possibility of configuring real clusters and subclusters (remember that now one GlueCE = GlueCluster = GlueSubcluster) the current variables won't be able to configure such scenario. Therefore, we also need to change the current configuration bearing the clusters and subclusters in mind.

Taken all this into account, we have thought that the best solution is to use a new naming convention where we shall be able to relate clusters, subclusters, CEs, queues, etc among each other and allow the possibility of adding new Glue variables to the configuration without the need of waiting for a new yaim release containing new variables.

An example site-info.def with the new naming convention and the cluster/subcluster definition is presented below:


SITE_UniqueID=my-yaim-site
SITE_Name=yaim                                                                  # $SITE_NAME
SITE_Description="This is my yaim site"                                         # $SITE_DESC
SITE_UserSupportContact="yaim-contact@cern.ch"                                  # $SITE_SUPPORT_EMAIL
SITE_SysAdminContact="yaim-contact@cern.ch"                                     # $SITE_EMAIL
SITE_SecurityContact="yaim-contact@cern.ch"                                     # $SITE_SECURITY_EMAIL
SITE_Location="Geneva,Switzerland"                                              # $SITE_LOC
SITE_Latitude=1                                                                 # $SITE_LAT
SITE_Longitude=1                                                                # $SITE_LONG
SITE_Web="www.yaim.info"                                                        # $SITE_WEB
SITE_Sponsor="EGEE"
SITE_OtherInfo_GRID="WLCG|EGEE                                                  # $SITE_OTHERS

CLUSTERS="yaim"

# The Cluster variables should contain the name of the cluster variable in upper case and replace '.' and '-' with '_'

CLUSTER_YAIM_CLUSTER_UniqueID=my-yaim
CLUSTER_YAIM_CLUSTER_Name="this is the yaim cluster"

# The CE host variables should contain the name of the CE hostname in lower case and replace '.' and '-' with '_'

CLUSTER_YAIM_CE_HOSTS="ctb-generic-1.cern.ch ctb-generic-2.cern.ch"             # CE_HOST
CE_HOST_ctb_generic_1_cern_ch_QUEUES="atlas dteam"                              # QUEUES
CE_HOST_ctb_generic_1_cern_ch_CE_InfoJobManager="lcgpbs"                               # JOB_MANAGER


CLUSTER_YAIM_SUBCLUSTERS="slc4"

# The Subcluster variables should contain the name of the subcluster variable in upper case and replace '.' and '-' with '_'

SUBCLUSTER_SLC4_SUBCLUSTER_UniqueID=slc4                                                                            
SUBCLUSTER_SLC4_HOST_ApplicationSoftwareRunTimeEnvironment="LCG-2|LCG-2_1_0|LCG-2_1_1|LCG-2_2_0"         # CE_RUNTIMEENV
SUBCLUSTER_SLC4_HOST_ArchitectureSMPSize=2                                                               # CE_SMPSIZE
SUBCLUSTER_SLC4_HOST_ArchitecturePlatformType=i686                                                       # CE_OS_ARCH 
SUBCLUSTER_SLC4_HOST_BenchmarkSF00=0                                                                     # CE_SF00
SUBCLUSTER_SLC4_HOST_BenchmarkSI00=381                                                                   # CE_SI00
SUBCLUSTER_SLC4_HOST_MainMemoryRAMSize=513                                                               # CE_MINPHYSMEM
SUBCLUSTER_SLC4_HOST_MainMemoryVirtualSize=1025                                                          # CE_MINVIRTMEM
SUBCLUSTER_SLC4_HOST_NetworkAdapterInboundIP=FALSE                                                       # CE_INBOUNDIP 
SUBCLUSTER_SLC4_HOST_NetworkAdapterOutboundIP=TRUE                                                       # CE_OUTBOUNDIP
SUBCLUSTER_SLC4_HOST_OperatingSystemName="Scientific Linux"                                              # CE_OS
SUBCLUSTER_SLC4_HOST_OperatingSystemRelease=3.0.6                                                        # CE_OS_RELEASE
SUBCLUSTER_SLC4_HOST_OperatingSystemVersion="SL"                                                         # CE_OS_VERSION
SUBCLUSTER_SLC4_HOST_ProcessorClockSpeed=1001                                                            # CE_CPU_SPEED
SUBCLUSTER_SLC4_HOST_ProcessorModel=PIII                                                                 # CE_CPU_MODEL
SUBCLUSTER_SLC4_HOST_ProcessorVendor=intel                                                               # CE_CPU_VENDOR
SUBCLUSTER_SLC4_SUBCLUSTER_Name="my subcluster YAIM"
SUBCLUSTER_SLC4_SUBCLUSTER_PhysicalCPUs=1                                                                # CE_PHYSCPU
SUBCLUSTER_SLC4_SUBCLUSTER_LogicalCPUs=1                                                                 # CE_LOGCPU
SUBCLUSTER_SLC4_SUBCLUSTER_TmpDir=/tmp
SUBCLUSTER_SLC4_SUBCLUSTER_WNTmpDir=/tmp

# The QUEUE variables should contain the name of the queue in upper case and replace '.' and '-' with '_'

CE_HOST_ctb_generic_1_cern_ch_QUEUE_ATLAS_CE_AccessControlBaseRule="atlas /atlas/Role=lcgadmin"          # ATLAS_GROUP_ENABLE
CE_HOST_ctb_generic_1_cern_ch_QUEUE_DTEAM_CE_AccessControlBaseRule="dteam /dteam/production"             # DTEAM_GROUP_ENABLE

# The VOVIEW variables should contain the name of the VOView in lower case and replace '.', '-', '/' and '=' with _

CE_HOST_ctb_generic_1_cern_ch_QUEUE_ATLAS_VOVIEW_atlas_Role_lcgadmin_CE_InfoDefaultSE=lxb1234.cern.ch

In the previous file we can find different type of variables:

  • New variables that didn't exist before
  • Renamed variables that exist in the current configuration with another name (current name appears on the right)

The variable naming convention is basically a prefix + variable name. The prefix uses a set of key words preceding an identifier to distinguish each particular element:

CLUSTER_<cluster-name>_
SUBCLUSTER_<subcluster-name>_
CE_HOST_<hostname>_
CE_HOST_<hostname>_QUEUE_<queue-name>_
CE_HOST_<hostname>_QUEUE_<queue-name>_VOVIEW_<voview-name>_

Only the SITE_ variables are an exception, since there's only one SITE variable in the whole configuration, so there's no need to include the site identifier into the variable name.

The variable name is most of the times the Glue attribute name. However, I have decided to remove the Glue word and separate the type of object from the real property name. This is for the internal handling done by YAIM with the variables.

_HOST_MainMemoryRAMSize
_CE_AccessControlBaseRule

However, apart from the Glue variables, I forsee there may be other variables that are related to one specific element. I still have to study the impact of these variables in other parts of the configuration not related the information system.

In the following examples, I present how the information system configuration for the lcg CE (GlueCE + GlueVOViews), the BDII (GlueSite) and the cluster/subcluster (GlueCluster) configuration would be.

Note: this code hasn't been tested. It should be regarded as a guideline to understand the new infosys configuration approach

lcg CE

Note: starting with lcg-CE version 3.1.46 the "cluster mode" can be enabled by setting LCGCE_CLUSTER_MODE=yes, which stops the publication of GlueCluster and GlueSubCluster objects by the CE (allowing glite-CLUSTER to do that). The following variables have been introduced for the lcg-CE in cluster mode:

The following are needed to be configured by the sys admin. This will be distributed under /opt/glite/yaim/examples/siteinfo/services/lcg-ce and/or the general site-info.def (to be decided depending on which other services uses these variables as well):

CLUSTERS=cluster_name
CLUSTER_<cluster-name>_CE_TYPE=ce_type
CLUSTER_<cluster-name>_INFO_PORT=port
CLUSTER_<cluster-name>_INFO_TYPE=info_type
CLUSTER_<cluster-name>_CE_HOSTS="hostname1 [hostname2 [.. hostnameN]]"
CE_HOST_<hostname>_QUEUES="queue_name1 [queue_name2 [.. queue_nameN]]"
CE_HOST_<hostname>_CE_InfoJobManager=jobmanager
CE_HOST_<hostname>_QUEUE_<queue-name>_CE_AccessControlBaseRule="fqan1 [fqan2 .. [fqan3]]"

# Define SE_LIST if there's no specific CE, QUEUE or VOVIEW variable
# for the GlueCEInfoDefaultSE variable
# Example: CE_HOST_ctb_generic_42_cern_ch_QUEUE_Q1_CE_InfoDefaultSE=lxb1234.cern.ch
SE_LIST="hostname1 [hostname2 [.. hostnameN]]"

# Define VO_SW_DIR if there's no specific CE or QUEUE variable
# for the GlueCEInfoApplicationDir variable
# Example: CE_HOST_ctb_generic_42_cern_ch_QUEUE_Q1_CE_InfoApplicationDir=lxb1234.cern.ch
VO_SW_DIR=exp_soft_dir

# Define the relevant VOS, SW_DIR and DEFAULT_SE variables
# per VO if there's no specific CE, QUEUE or VOVIEW variable
# Example: CE_HOST_ctb_generic_42_cern_ch_QUEUE_Q1_VOVIEW_atlas_CE_InfoDefaultSE=lxb1234.cern.ch
# Example: CE_HOST_ctb_generic_42_cern_ch_QUEUE_Q1_VOVIEW_atlas_CE_InfoApplicationDir=lxb1234.cern.ch
VOS="vo1 [vo2 ..[voN]]"
VO_<vo-name>_SW_DIR=exp_soft_dir
VO_<vo-name>_DEFAULT_SE=hostname

YAIM would distribute a set of default variables that could be used in the ce, queues and voviews where there's no specific value specified by the user. This will be distributed under /opt/glite/yaim/defaults/lcg-ce.pre:

CE_ImplementationName: LCG-CE
CE_InfoGatekeeperPort: 2119
CE_InfoLRMSVersion: not defined
CE_InfoTotalCPUs: 0
CE_InfoDataDir: unset
CE_StateEstimatedResponseTime: 2146660842
CE_StateFreeCPUs: 0
CE_StateRunningJobs: 0
CE_StateStatus: Production
CE_StateTotalJobs: 0
CE_StateWaitingJobs: 444444
CE_StateWorstResponseTime: 2146660842
CE_StateFreeJobSlots: 0
CE_PolicyMaxCPUTime: 0
CE_PolicyMaxRunningJobs: 0
CE_PolicyMaxTotalJobs: 0
CE_PolicyMaxWallClockTime: 0
CE_PolicyMaxObtainableCPUTime: 0
CE_PolicyMaxObtainableWallClockTime: 0
CE_PolicyMaxWaitingJobs: 0
CE_PolicyMaxSlotsPerJob: 0
CE_PolicyPreemption: 0
CE_PolicyPriority: 1
CE_PolicyAssignedJobSlots: 0

When some of these default variables depend on others, we put them in lcg-ce.post:

CE_ImplementationVersion: ${GLITE_VERSION}
CE_InfoLRMSType: $CE_BATCH_SYS
CE_InfoApplicationDir: ${VO_SW_DIR}
CE_InfoDefaultSE=`set x $SE_LIST; echo "$2"`

The config_gip_ce function which will configure the corresponding ldif file:

config_gip_ce_check () {


requires $1 CLUSTERS CLUSTER__INFO_PORT CLUSTER__INFO_TYPE CLUSTER__CE_TYPE \
            CLUSTER__CE_HOSTS CE_HOST__QUEUES CE_HOST__JOBMANAGER VO_SW_DIR SE_LIST \

retcode=$?
return ${retcode}

}

config_gip_ce () {

if [ -f ${OUTFILE} ]; then
  rm -rf ${OUTFILE}
else
  mkdir -p ${CONF_DIR}
fi

yaimlog DEBUG "Configuring the CE information"

for CLUSTER in ${CLUSTERS}; do

  CLUSTER=`echo ${CLUSTER} | tr '[:lower:]' '[:upper:]'`
  for CE in `eval echo "\\$CLUSTER_${CLUSTER}_CE_HOSTS"`; do

    CE_name=`echo $CE | sed -e 's/[\.-]/_/g' | tr '[:upper:]' '[:lower:]'`     # Transform . and - into _ for the variable name.
    for QUEUE in `eval echo "\\$CE_HOST_${CE_name}_QUEUES"`; do
      QUEUE_name= echo ${QUEUE} | sed -e 's/[\.-]/_/g' |  tr '[:lower:]' '[:upper:]'

      yaimlog DEBUG "Configuring the queue information for CE ${CE_name}"

      echo "dn: GlueCEUniqueID=${CE}:2119/`eval echo "\\$CLUSTER_${CLUSTER}_CE_TYPE"`-`eval echo "\\$CE_HOST_${CE_name}_JOBMANAGER-${QUEUE}"`" >> $OUTFILE
      echo "GlueCEHostingCluster: ${CE}"  >> $OUTFILE
      echo "GlueCEName: ${QUEUE}" >> $OUTFILE
      echo "GlueCEInfoHostName: ${CE}"  >> $OUTFILE
      echo "GlueCEInfoContactString: gram://${CE}:2119/`eval echo "\\$CLUSTER_${CLUSTER}_CE_TYPE"`-`eval echo "\\$CE_HOST_${CE_name}_JOBMANAGER"`" >> $OUTFILE
      
      for i in ${CE_VAR}; do
        if [ -n `eval echo "\\$CE_HOST_${CE_name}_QUEUE_${QUEUE_name}_CE_$i"` ]; then       # user defined value for CE - queue
          echo "GlueCE$i: `eval echo "\\$CE_HOST_${CE_name}_QUEUE_${QUEUE_name}_CE_$i"`" >> ${OUTFILE}
        else
          if [ -n `eval echo "\\$CE_HOST_${CE_name}_CE_$i"` ]; then
            echo "GlueCE$i: `eval echo "\\$CE_HOST_${CE_name}_CE_$i"`" >> ${OUTFILE}       # user defined value for CE
          else
            if [ $i == "InfoDefaultSE" ]; then
              if [ -n `eval echo "\\$CE_$i"` ]; then
                echo "GlueCE$i: `eval echo "\\$CE_$i"`" >> ${OUTFILE}                      # default SE taken from SE_LIST
              else
                yaimlog ERROR "SE_LIST is not set !"
                exit 1
              fi
            else
              if [ $i == "InfoApplicationDir" ]; then
                if [ -n `eval echo "\\$CE_$i"` ]; then
                  echo "GlueCE$i: `eval echo "\\$CE_$i"`" >> ${OUTFILE}                    # default SW_DIR taken from VO_SW_DIR
                else
                  yaimlog ERROR "VO_SW_DIR is not set !"
                  exit 1
                fi
              else
                echo "GlueCE$i: `eval echo "\\$CE_$i"`" >> ${OUTFILE}                      # default value
              fi # SW DIR
            fi # default SE
          fi # CE
        fi # CE - queue
      done # Glue CE
      echo "GlueForeignKey: GlueClusterUniqueID=`eval echo "\\$CLUSTER_${CLUSTER}_UniqueID"`" >> $OUTFILE
      echo "GlueInformationServiceURL: ldap://`hostname -f`:`eval echo "\\$CLUSTER_${CLUSTER}_INFO_PORT"`/mds-vo-name=`eval echo "\\${CLUSTER_${CLUSTER}_INFO
_TYPE}"`,o=grid"
      OLDIFS=$IFS
      IFS="|"
      var=CE_HOST_${CE_name}_QUEUE_${QUEUE_name}_AccessControlBaseRule
      eval var=\$$var
      for j in $var; do
        convert_fqan "${j}"
        if [ ! `echo ${j} | grep "/"` ]; then
                 echo "GlueCEAccessControlBaseRule: VO:${newfqanvo}" >> ${OUTFILE}
        else
                 echo "GlueCEAccessControlBaseRule: VOMS:${newfqan}" >> ${OUTFILE}
        fi
      done
      IFS=$OLDIFS

      yaimlog DEBUG "Configuring the VOView information for queue $QUEUE for CE ${CE_name}"

      for j in $var; do
        if [ "x${FQANVOVIEWS}" = "xyes" ] || ([ ! `echo $var | grep "/"` ] && [ "x${FQANVOVIEWS}" = "xno" ] ) ; then
          convert_fqan "${j}"
          voview=`echo ${j} | sed -e 's/=/_/g'`
          voview_name=`echo ${voview} | sed -e 's/\//_/g'`
          echo "dn: GlueVOViewLocalID=${voview}" >> ${OUTFILE}
          echo "GlueCEUniqueID=${CE}:2119/`eval echo "\\$CLUSTER_${CLUSTER}_CE_TYPE"`-`eval echo "\\$CE_HOST_${CE_name}_JOBMANAGER-${QUEUE}"`" >> $OUTFILE
          for i in ${VOVIEW_VAR}; do
            if [ -n `eval echo "\\$CE_HOST_${CE_name}_QUEUE_${QUEUE_name}_VOVIEW_${voview_name}_CE_$i"` ]; then # user defined value for CE - queue - voview
              echo "GlueCE$i: `eval echo "\\$CE_HOST_${CE_name}_QUEUE_${QUEUE_name}_VOVIEW_${voview_name}_CE_$i"`" >> ${OUTFILE}
            else
              if [ -n `eval echo "\\$CE_HOST_${CE_name}_QUEUE_${QUEUE_name}_CE_$i"` ]; then                     # user defined value for CE - queue
                echo "GlueCE$i: `eval echo "\\$CE_HOST_${CE_name}_QUEUE_${QUEUE_name}_CE_$i"`" >> ${OUTFILE}
              else
                if [ -n `eval echo "\\$CE_HOST_${CE_name}_CE_$i"` ]; then                                       # user defined value for CE
                  echo "GlueCE$i: `eval echo "\\$CE_HOST_${CE_name}_CE_$i"`" >> ${OUTFILE}
                else
                  if [ $i == "InfoDefaultSE" ]; then
                    default_se=get_vo_param ${newfqanvo} DEFAULT_SE
                    if [ "${default_se}" ]; then
                      echo "GlueCE$i: ${default_se}" >> ${OUTFILE}                                              # VO default SE
                    else
                      if [ -n `eval echo "\\$CE_$i"` ]; then
                        echo "GlueCE$i: `eval echo "\\$CE_$i"`" >> ${OUTFILE}                                   # default value
                      else
                        yaimlog ERROR "SE_LIST is not set !"
                        exit 1
                      fi
                    fi
                  else
                    if [ $i == "InfoApplicationDir" ]; then
                      sw_dir=get_vo_param ${newfqanvo} SW_DIR
                      if [ "${sw_dir}" ]; then
                        echo "GlueCE$i: ${sw_dir}" >> ${OUTFILE}                                                # VO default SW_DIR
                      else
                        yaimlog ERROR "SW_DIR for ${VO} is not set !"
                        exit 1
                      fi
                    else
                      echo "GlueCE$i: `eval echo "\\$CE_$i"`" >> ${OUTFILE}                                     # default value
                    fi # SW_DIR
                  fi #default SE
                fi # CE
              fi # CE - queue
            fi  # CE - queue - voview
          done # Glue VOView
          echo "GlueChunkKey: GlueCEUniqueID=${CE}:2119/`eval echo "\\$CLUSTER_${CLUSTER}_CE_TYPE"`-`eval echo "\\$CE_HOST_${CE_name}_JOBMANAGER-${QUEUE}"`"
>> $OUTFILE
          if [ ! `echo ${j} | grep "/"` ]; then
            echo "GlueCEAccessControlBaseRule: VO:${newfqanvo}" >> ${OUTFILE}
          else
            echo "GlueCEAccessControlBaseRule: VOMS:${newfqan}" >> ${OUTFILE}
          fi

          ##################
          # Configure DENY #
          ##################

          for deny_QUEUE in `eval echo "\\$CE_HOST_${CE_name}_QUEUES"`; do
            deny_QUEUE_name= echo ${deny_QUEUE} | sed -e 's/[\.-]/_/g' |  tr '[:lower:]' '[:upper:]'
            deny_var=CE_HOST_${CE_name}_QUEUE_${deny_QUEUE_name}_AccessControlBaseRule
            allowview="${allowview} ${!deny_var}"
          done

          # Sort and drop entries whic appears twice
          allvoview=`for kk in $allvoview; do echo $kk; done  | sort | uniq`;

          # Add the DENY stuff only if it is the generic VOview, i.e the VO itself -> no '/' in it's name
          if [ ! `echo ${j} | grep "/"` ]; then
            vomsgroupvo="${newfqanvo}"
            for myview in ${allvoview}; do
              convert_fqan ${myview}
              # We don't deny ourselves...
              if [ "x${myview}" != "x${j}" ]; then
              # .. and we put DENY only if it is in the same VO, otherwise it doesn't match, so DENY is not necessary
                if [ "x${vomsgroupvo}" = "x${newfqanvo}" ] && [ "x${FQANVOVIEWS}" = "xyes" ]; then
                  echo -n "GlueCEAccessControlBaseRule: DENY:${newfqan}" >> ${OUTFILE}
                fi
              fi
           done
          fi # DENY

        fi #  FQANVOVIEWS
      done # VOView
    done # QUEUE
  done # CE
done # CLUSTER

return 0
}

BDII

The following variables are needed to be configured by the sys admin. This will be distributed under /opt/glite/yaim/examples/siteinfo/services/lglite-bdii_site and/or the general site-info.def (to be decided depending on which other services uses these variables as well):

SITE_UniqueID=id                                         
SITE_Name=name               
SITE_Description="long description"                     
SITE_UserSupportContact=mail                         
SITE_SysAdminContact=mail                               
SITE_SecurityContact=mail                                
SITE_Location=city,country                                         
SITE_Latitude=lat                                   
SITE_Longitude=long                                           
SITE_Web=web                                 
SITE_Sponsor=sponsor
SITE_OtherInfo_NAME=value

The config_gip_site function which will configure the corresponding ldif file:

config_gip_site_check () {

requires $1 SITE_BDII_HOST

for i in ${SITE_VAR}; do
  requires $1 SITE_$i
done

retcode=$?
return ${retcode}

}

config_gip_site () {

if [ -f ${OUTFILE} ]; then
  rm -rf ${OUTFILE}
else
  mkdir -p ${CONF_DIR}
fi

yaimlog DEBUG "Configuring the site information"

echo "dn: GlueSiteUniqueID=`eval echo "\\$SITE_UniqueID"`" >> $OUTFILE
for i in ${SITE_VAR}; do
  if [ $i == "OtherInfo" ]; then
    SUFFIX=${i//SITE_OtherInfo_/}
    OLDIFS=$IFS
    IFS="|"
    for j in ${!i}
    do
      echo "GlueSiteOtherInfo: $SUFFIX=$j" >> $OUTFILE
    done
    IFS=$OLDIFS
  else
    echo "GlueSite$i: `eval echo "\\$SITE_$i"`" >> ${OUTFILE}
  fi
done
echo "dn: GlueForeignKey: GlueSiteUniqueID=`eval echo "\\$SITE_UniqueID"`" >> $OUTFILE


return 0
}

Cluster/Subcluster

The following variables are needed to be configured by the sys admin. This will be distributed under /opt/glite/yaim/examples/siteinfo/services/glite-cluster and/or the general site-info.def (to be decided depending on which other services uses these variables as well):

SITE_UniqueID=my-yaim-site
CLUSTERS=cluster_name
CLUSTER_<cluster-name>_CLUSTER_UniqueID=my-yaim
CLUSTER_<cluster-name>_CLUSTER_Name="this is the yaim cluster"

CLUSTER_<cluster-name>_CE_TYPE=ce_type
CLUSTER_<cluster-name>_INFO_PORT=port
CLUSTER_<cluster-name>_INFO_TYPE=info_type
CLUSTER_<cluster-name>_CE_HOSTS="hostname1 [hostname2 [.. hostnameN]]"
CE_HOST_<hostname>_QUEUES="queue_name1 [queue_name2 [.. queue_nameN]]"
CE_HOST_<hostname>_CE_InfoJobManager=jobmanager
CLUSTER_<cluster-name>_SUBCLUSTERS="sub_name1 [sub_name2 [.. sub_nameN]]"

SUBCLUSTER_<sub-name>_SUBCLUSTER_UniqueID=slc4                                                                            
SUBCLUSTER_<sub-name>_HOST_ApplicationSoftwareRunTimeEnvironment="LCG-2|LCG-2_1_0|LCG-2_1_1|LCG-2_2_0"     
SUBCLUSTER_<sub-name>_HOST_ArchitectureSMPSize=2                                                              
SUBCLUSTER_<sub-name>_HOST_ArchitecturePlatformType=i686                                                   
SUBCLUSTER_<sub-name>_HOST_BenchmarkSF00=0                                                                  
SUBCLUSTER_<sub-name>_HOST_BenchmarkSI00=381                                                                
SUBCLUSTER_<sub-name>_HOST_MainMemoryRAMSize=513                                                         
SUBCLUSTER_<sub-name>_HOST_MainMemoryVirtualSize=1025                                                     
SUBCLUSTER_<sub-name>_HOST_NetworkAdapterInboundIP=FALSE                                               
SUBCLUSTER_<sub-name>_HOST_NetworkAdapterOutboundIP=TRUE                                             
SUBCLUSTER_<sub-name>_HOST_OperatingSystemName="Scientific Linux"                                     
SUBCLUSTER_<sub-name>_HOST_OperatingSystemRelease=3.0.6                                                  
SUBCLUSTER_<sub-name>_HOST_OperatingSystemVersion="SL"                                                    
SUBCLUSTER_<sub-name>_HOST_ProcessorClockSpeed=1001                                                        
SUBCLUSTER_<sub-name>_HOST_ProcessorModel=PIII                                                                 
SUBCLUSTER_<sub-name>_HOST_ProcessorVendor=intel                                                              
SUBCLUSTER_<sub-name>_SUBCLUSTER_Name="my subcluster YAIM"
SUBCLUSTER_<sub-name>_SUBCLUSTER_PhysicalCPUs=1                                                             
SUBCLUSTER_<sub-name>_SUBCLUSTER_LogicalCPUs=1                                                               
SUBCLUSTER_<sub-name>_SUBCLUSTER_TmpDir=/tmp
SUBCLUSTER_<sub-name>_SUBCLUSTER_WNTmpDir=/tmp

The config_gip_cluster and config_gip_subcluster functions which will configure the corresponding ldif file:

config_cluster_check () {

requires $1 CLUSTERS CLUSTER__CLUSTER_UniqueID CLUSTER__CLUSTER_Name CLUSTER__SITE_UniqueID CLUSTER__INFO_PORT CLUSTER__INFO_TYPE 
return $?
            
}

config_cluster_setenv () {

echo ""
return 0

}

config_cluster () {

if [ -f ${OUTFILE} ]; then
  rm -rf ${OUTFILE}
else
  mkdir -p ${CONF_DIR}
fi

yaimlog DEBUG "Temp config file in ${OUTFILE}"

for CLUSTER in ${CLUSTERS}; do

CLUSTER=`echo ${CLUSTER} | tr '[:lower:]' '[:upper:]'`
yaimlog DEBUG "Configuring cluster ${CLUSTER}"

    cat <<EOF >> ${OUTFILE}
dn: GlueClusterUniqueID=`eval echo "\\$CLUSTER_${CLUSTER}_CLUSTER_UniqueID"`
GlueClusterName: `eval echo "\\$CLUSTER_${CLUSTER}_CLUSTER_Name"`
GlueForeignKey: GlueSiteUniqueID="SITE_UniqueID"
GlueInformationServiceURL: ldap://`hostname -f`:`eval echo "\\$CLUSTER_${CLUSTER}_INFO_PORT"`/mds-vo-name=`eval echo "\\${CLUSTER_${CLUSTER}_INFO_TYPE}"`,o=grid
EOF


  for CE in `eval echo "\\$CLUSTER_${CLUSTER}_CE_HOSTS"`; do
  yaimlog DEBUG "Configuring CE information for CE ${CE}"

    CE_name=`echo $CE | sed -e 's/-/_/g' -e 's/\./_/g' | tr '[:upper:]' '[:lower:]'`                # Transform . and - into _ for the variable name.
   
    for QUEUE in `eval echo "\\$CE_HOST_${CE_name}_QUEUES"`; do
        echo "GlueClusterService: ${CE}:2119/`eval echo "\\$CLUSTER_${CLUSTER}_CE_TYPE"`-`eval echo "\\$CE_HOST_${CE_name}_JOBMANAGER-${QUEUE}"`" >> ${OUTFILE}
    done

    for QUEUE in `eval echo "\\$CE_HOST_${CE_name}_QUEUES"`; do
        echo "GlueForeignKey:" \
	    "GlueCEUniqueID=${CE}:2119/`eval echo "\\$CLUSTER_${CLUSTER}_CE_TYPE"`-`eval echo "\\$CE_HOST_${CE_name}_JOBMANAGER-${QUEUE}"`" >> ${OUTFILE}
    done

  done

done #cluster

}

config_subcluster_check () {

requires $1 CLUSTERS CLUSTER__INFO_PORT CLUSTER__INFO_TYPE CLUSTER__SUBCLUSTERS 

for i in ${HOST_VAR}; do
  requires $1 SUBCLUSTER__HOST_$i
done
for i in ${SUBCLUSTER_VAR}; do
  requires $1 SUBCLUSTER__SUBCLUSTER_$i
done

}

config_subcluster_setenv () {

echo ""
return 0

}

config_subcluster () {

for CLUSTER in ${CLUSTERS}; do

  CLUSTER=`echo ${CLUSTER} | tr '[:lower:]' '[:upper:]'`
  for SUBCLUSTER in `eval echo "\\$CLUSTER_${CLUSTER}_SUBCLUSTERS"`; do

    SUBCLUSTER=`echo ${SUBCLUSTER} | tr '[:lower:]' '[:upper:]'`
    yaimlog DEBUG "Configuring subcluster ${SUBCLUSTER}"

    echo "dn: GlueSubClusterUniqueID=`eval echo "\\$SUBCLUSTER_${SUBCLUSTER}_SUBCLUSTER_UniqueID"`,GlueClusterUniqueID=`eval echo "\\$CLUSTER_${CLUSTER}_CLUSTER_UniqueID"`" >> ${OUTFILE}
    echo "GlueChunkKey: GlueClusterUniqueID=`eval echo "\\$CLUSTER_${CLUSTER}_CLUSTER_UniqueID"`" >> ${OUTFILE}
    for i in ${HOST_VAR}; do
      if [ $i == "ApplicationSoftwareRunTimeEnvironment" ]; then
        OLDIFS=$IFS
        IFS="|"
        var=SUBCLUSTER_${SUBCLUSTER}_HOST_ApplicationSoftwareRunTimeEnvironment
        eval var=\$$var
        for j in $var; do
          echo "GlueHostApplicationSoftwareRunTimeEnvironment: $j" >> ${OUTFILE}
        done
        IFS=$OLDIFS
      else
        echo "GlueHost$i: `eval echo "\\$SUBCLUSTER_${SUBCLUSTER}_HOST_$i"`" >> ${OUTFILE}
      fi
    done
    for i in ${SUBCLUSTER_VAR}; do
      if [ $i != "UniqueID" ]; then
        echo "GlueSubCluster$i: `eval echo "\\$SUBCLUSTER_${SUBCLUSTER}_SUBCLUSTER_$i"`" >> ${OUTFILE}
      fi
    done
    echo "GlueInformationServiceURL: ldap://`hostname -f`:`eval echo "\\$CLUSTER_${CLUSTER}_INFO_PORT"`/mds-vo-name=`eval echo "\\$CLUSTER_${CLUSTER}_INFO_TYPE"`,o=grid" >> ${OUTFILE}

  done # subcluster

done #cluster

}

-- MariaALANDESPRADILLO - 23 Apr 2008

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2011-01-20 - DavidSmith
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback