From 4a681d46a60b2fa03a7830e2eef91340d132c30a Mon Sep 17 00:00:00 2001 From: Michel Jouvin Date: Wed, 27 Oct 2021 13:36:44 +0200 Subject: [PATCH] machines-types update based on new standard/machine-types/core - Requires https://github.com/quattor/template-library-standard/pull/140 - Support removed for WN profile cloning - Lemon support removed - EL6 support removed --- machine-types/grid/base.pan | 253 ++++++--------------------- machine-types/grid/condor_server.pan | 15 +- machine-types/grid/se_dpm.pan | 9 +- machine-types/grid/ui.pan | 42 ++--- machine-types/grid/vobox.pan | 29 +-- machine-types/grid/wn.pan | 87 ++++++--- personality/wn/cloning/clone.pan | 172 ------------------ personality/wn/cloning/selector.pan | 111 ------------ personality/wn/cloning/standard.pan | 77 -------- personality/wn/machine-features.pan | 2 +- personality/wn/rpms/config.pan | 23 ++- 11 files changed, 167 insertions(+), 653 deletions(-) delete mode 100644 personality/wn/cloning/clone.pan delete mode 100644 personality/wn/cloning/selector.pan delete mode 100644 personality/wn/cloning/standard.pan diff --git a/machine-types/grid/base.pan b/machine-types/grid/base.pan index 6e6310de..24ac7a8f 100644 --- a/machine-types/grid/base.pan +++ b/machine-types/grid/base.pan @@ -1,262 +1,124 @@ -############################################################ -# -# template machine-types/grid/base -# # Define base configuration of any type of gLite node. # Can be included several times. # # This template is included one. As it does VO initialization # the VO list and parameters cannot be redefined if included twice. -# -# RESPONSIBLE: Michel Jouvin -# -############################################################ unique template machine-types/grid/base; variable CONFIGURE_VOS ?= false; - -# Include static information and derived global variables. -variable SITE_DB_TEMPLATE ?= if_exists('pro_site_databases'); -variable SITE_DB_TEMPLATE ?= 'site/databases'; -include { SITE_DB_TEMPLATE }; -variable SITE_GLOBAL_VARIABLES ?= if_exists('site/global_variables'); -variable SITE_GLOBAL_VARIABLES ?= if_exists('pro_site_global_variables'); -variable SITE_GLOBAL_VARIABLES ?= error('site/global_variables not found'); -include { SITE_GLOBAL_VARIABLES }; # Default value for net params - # When true, only the initial part of NFS configuration is done during base OS configuration. variable OS_POSTPONE_NFS_CONFIG ?= false; - -# -# define site functions -# -variable SITE_FUNCTIONS_TEMPLATE ?= if_exists('pro_site_functions'); -variable SITE_FUNCTIONS_TEMPLATE ?= 'site/functions'; -include { SITE_FUNCTIONS_TEMPLATE }; - -# -# profile_base for profile structure -# -include { 'quattor/profile_base' }; - -# -# NCM core components -# -include { 'components/spma/config' }; -include { 'components/grub/config' }; - - -# -# hardware -# -include { 'hardware/functions' }; -"/hardware" = if ( exists(DB_MACHINE[escape(FULL_HOSTNAME)]) ) { - create(DB_MACHINE[escape(FULL_HOSTNAME)]); - } else { - error(FULL_HOSTNAME + " : hardware not found in machine database"); - }; -variable MACHINE_PARAMS_CONFIG ?= undef; -include { MACHINE_PARAMS_CONFIG }; -"/hardware" = if ( exists(MACHINE_PARAMS) && is_nlist(MACHINE_PARAMS) ) { - update_hw_params(); - } else { - SELF; - }; - - -# Cluster specific configuration -variable CLUSTER_INFO_TEMPLATE ?= if_exists('pro_site_cluster_info'); -variable CLUSTER_INFO_TEMPLATE ?= 'site/cluster_info'; -include { CLUSTER_INFO_TEMPLATE }; - - -# common site machine configuration -variable SITE_CONFIG_TEMPLATE ?= if_exists('pro_site_config'); -variable SITE_CONFIG_TEMPLATE ?= 'site/config'; -include { SITE_CONFIG_TEMPLATE }; - +# Do not configure filesystems and blockdevices during the OS configuration +variable OS_POSTPONE_FILESYSTEM_CONFIG ?= true; # File system configuration. -# pro_site_system_filesystems is legacy name and is used if present. # filesystem/config is new generic approach for configuring file systems : use if it is present. It requires # a site configuration template passed in FILESYSTEM_LAYOUT_CONFIG_SITE (same name as previous template # but not the same contents). -variable FILESYSTEM_CONFIG_SITE ?= if_exists("pro_site_system_filesystems"); variable FILESYSTEM_CONFIG_SITE ?= if_exists("filesystem/config"); variable FILESYSTEM_LAYOUT_CONFIG_SITE ?= "site/filesystems/glite"; variable FILESYSTEM_CONFIG_SITE ?= "site/filesystems/glite"; -# Define some other defaults if not defined in site/cluster configuration -# pro_site_system_filesystems is legacy name. -variable GLITE_BASE_CONFIG_SITE ?= null; -variable GLITE_SITE_PARAMS ?= if_exists("pro_lcg2_config_site"); -variable GLITE_SITE_PARAMS ?= "site/glite/config"; - - -# Select OS version based on machine name -include { 'os/version' }; +# Core initialisation of machine type +include 'machine-types/core-init'; # Load gLite version information -include { 'defaults/grid/version' }; - - -# variable indicating if namespaces must be used to access OS templates. -# Always true with gLite >= 3.1, defined for backward compatibility. -variable OS_TEMPLATE_NAMESPACE = true; - - -# Define OS related namespaces -variable OS_NS_CONFIG = 'config/'; -variable OS_NS_OS = OS_NS_CONFIG + 'core/'; -variable OS_NS_QUATTOR = OS_NS_CONFIG + 'quattor/'; -variable OS_NS_RPMLIST = 'rpms/'; -variable OS_NS_REPOSITORY = 'repository/'; - - -# -# software packages -# -include { 'pan/functions' }; +include 'defaults/grid/version'; -# -# Configure Bind resolver -# -variable SITE_NAMED_CONFIG_TEMPLATE ?= if_exists('pro_site_named_config'); -variable SITE_NAMED_CONFIG_TEMPLATE ?= 'site/named'; -include { SITE_NAMED_CONFIG_TEMPLATE }; +# Inclure the standard core machine type +include 'machine-types/core'; -# -# Kernel version and CPU architecture -# -include { 'os/kernel_version_arch' }; - -# # Default middleware architecture # variable PKG_ARCH_GLITE ?= PKG_ARCH_DEFAULT; -# -# Include OS version dependent RPMs -# -include { if_exists(OS_NS_OS + "base") }; - - -# -# Quattor client software -# -include { 'quattor/client/config' }; - - - -# # Include site configuration for gLite software -# -include { return(GLITE_SITE_PARAMS) }; - -# -# Include default gLite parameters (prevent absent variable in site parameter) -# +# Must be done before loading the cluster information (part of the OS configuration) +variable GLITE_SITE_PARAMS ?= "site/glite/config"; +variable DEBUG = debug('GLITE_SITE_PARAMS=%s', to_string(GLITE_SITE_PARAMS)); +include GLITE_SITE_PARAMS; -include { 'defaults/grid/config' }; +# Include default gLite parameters (prevent absent variable in site parameter) +include 'defaults/grid/config'; # Check if NFS server and/or client should be configured on the current system. # This template defines variables NFS_xxx_ENABLED used by other templates. # Also include NFS-related packages -include { 'features/nfs/init' }; -include { if ( NFS_CLIENT_ENABLED ) 'rpms/nfs-client' }; +include 'features/nfs/init'; +include if ( NFS_CLIENT_ENABLED ) 'rpms/nfs-client'; # Configure filesystem layout. # Must be done after NFS initialisation as it may tweak some mount points. -include { return(FILESYSTEM_CONFIG_SITE) }; +include FILESYSTEM_CONFIG_SITE; + + +# Configure AII (must be done after the filesystem configuration) +include 'config/quattor/aii'; -# # Configure VOs if needed. Some options in VO configuration # depend on NFS configuration (a NFS server requires VO accounts to be created). # If there is no VO configuration required, load standard base information # for VOs needed by some components -# variable CONFIGURE_VOS = if ( NFS_SERVER_ENABLED ) { - return(true); - } else { - return(SELF); - }; + true; +} else { + SELF; +}; variable NODE_VO_ACCOUNTS ?= if ( NFS_SERVER_ENABLED ) { - return(true); - } else { - if ( exists(NODE_VO_ACCOUNTS) ) { - return(SELF); - } else { - return(null); - }; - }; - -include { if ( CONFIGURE_VOS ) { - return ("vo/config"); - } else { - return ("vo/init"); - }; - }; + true; +} else { + if ( exists(NODE_VO_ACCOUNTS) ) { + SELF; + } else { + null; + }; +}; + +include { + if ( CONFIGURE_VOS ) { + "vo/config"; + } else { + "vo/init"; + }; +}; -# # Configure NFS if necessary -# -include { if ( NFS_SERVER_ENABLED && !OS_POSTPONE_NFS_CONFIG ) 'features/nfs/server/config' }; -include { if ( NFS_CLIENT_ENABLED && !OS_POSTPONE_NFS_CONFIG ) 'features/nfs/client/config' }; +include if ( NFS_SERVER_ENABLED && !OS_POSTPONE_NFS_CONFIG ) 'features/nfs/server/config'; +include if ( NFS_CLIENT_ENABLED && !OS_POSTPONE_NFS_CONFIG ) 'features/nfs/client/config'; -# # Add Lemon client if requested -# variable LEMON_CONFIGURE_AGENT ?= false; variable LEMON_AGENT_INCLUDE = if ( LEMON_CONFIGURE_AGENT ) { - return("monitoring/lemon/client/base/service"); - } else { - return(null); - }; -include { LEMON_AGENT_INCLUDE }; + "monitoring/lemon/client/base/service"; +} else { + null; +}; +include LEMON_AGENT_INCLUDE; -# # Site Monitoring -# variable MONITORING_CONFIG_SITE ?= 'site/monitoring/config'; -include { if_exists(MONITORING_CONFIG_SITE) }; - - -# -# AII component must be included after much of the other setup. -# -include { OS_NS_QUATTOR + 'aii' }; - - -# -# Add local users if some configured -# -variable USER_CONFIG_INCLUDE = if ( exists(USER_CONFIG_SITE) && is_defined(USER_CONFIG_SITE) ) { - return('users/config'); - } else { - return(null); - }; -include { USER_CONFIG_INCLUDE }; +include if_exists(MONITORING_CONFIG_SITE); -# # Add site specific configuration if any -# -include { return(GLITE_BASE_CONFIG_SITE) }; +variable GLITE_BASE_CONFIG_SITE ?= null; +variable DEBUG = debug('GLITE_BASE_CONFIG_SITE=%s', to_string(GLITE_BASE_CONFIG_SITE)); +include GLITE_BASE_CONFIG_SITE; # GLITE_OS_POSTCONFIG defines a template that must be executed at the very end of @@ -264,14 +126,15 @@ include { return(GLITE_BASE_CONFIG_SITE) }; # The template is called by machine-types templates. variable GLITE_OS_POSTCONFIG ?= OS_NS_OS + 'postconfig'; + # Default repository configuration template variable PKG_REPOSITORY_CONFIG ?= 'repository/config'; + +# Configure Pakiti variable PAKITI_ENABLED ?= false; -include { - if ( PAKITI_ENABLED ) { - 'features/pakiti/config'; - } else { - null; - }; +include if ( PAKITI_ENABLED) { + 'features/pakiti/config'; +} else { + null; }; diff --git a/machine-types/grid/condor_server.pan b/machine-types/grid/condor_server.pan index 40403ffd..c5691dfa 100644 --- a/machine-types/grid/condor_server.pan +++ b/machine-types/grid/condor_server.pan @@ -3,7 +3,6 @@ template machine-types/grid/condor_server; variable CONDOR_SERVER_CONFIG_SITE ?= undef; - # CREATE_HOME must be defined as undef ##variable CREATE_HOME ?= undef; @@ -30,32 +29,32 @@ variable VO_GRIDMAPFILE_MAP_VOMS_ROLES ?= true; # Include base configuration of a gLite node. # This includes configure NFS service. # -include { 'machine-types/grid/base' }; +include 'machine-types/grid/base'; # Configure Condor server and associated services -include { 'personality/condor_server/service' }; +include 'personality/condor_server/service'; # # Configure NFS if necessary # -include { if ( NFS_SERVER_ENABLED ) 'features/nfs/server/config' }; -include { if ( NFS_CLIENT_ENABLED ) 'features/nfs/client/config' }; +include if ( NFS_SERVER_ENABLED ) 'features/nfs/server/config'; +include if ( NFS_CLIENT_ENABLED ) 'features/nfs/client/config'; # # Add site specific configuration, if any -include { return(CONDOR_SERVER_CONFIG_SITE) }; +include CONDOR_SERVER_CONFIG_SITE; # # middleware updates # -include { if_exists('update/config') }; +include if_exists('update/config'); # Do any final configuration needed for some reasons (e.g. : run gLite 3.0 on SL4) # Should be done at the very end of machine configuration # -include { if_exists(GLITE_OS_POSTCONFIG) }; +include if_exists(GLITE_OS_POSTCONFIG); diff --git a/machine-types/grid/se_dpm.pan b/machine-types/grid/se_dpm.pan index 86ac91da..a326e9d5 100644 --- a/machine-types/grid/se_dpm.pan +++ b/machine-types/grid/se_dpm.pan @@ -25,20 +25,19 @@ variable NODE_VO_GRIDMAPDIR_CONFIG ?= true; # # Include base configuration of a gLite node # -include { 'machine-types/grid/base' }; +include 'machine-types/grid/base'; # Include DPM server configuration -include { 'personality/se_dpm/service' }; - +include 'personality/se_dpm/service'; # # middleware updates # -include { if_exists('update/config') }; +include if_exists('update/config'); # Do any final configuration needed for some reasons (e.g. : run gLite3 on SL4) # Should be done at the very end of machine configuration # -include { if_exists(GLITE_OS_POSTCONFIG) }; +include if_exists(GLITE_OS_POSTCONFIG); diff --git a/machine-types/grid/ui.pan b/machine-types/grid/ui.pan index 6d0ec539..984f78b9 100644 --- a/machine-types/grid/ui.pan +++ b/machine-types/grid/ui.pan @@ -41,53 +41,49 @@ variable ENABLE_MPI ?= false; # # Include base configuration of a gLite node # -include { 'machine-types/grid/base' }; +include 'machine-types/grid/base'; # Include UI GSISSH site parameters if GSISSH is configured variable UI_GSISSH_SITE_INCLUDE = if ( GSISSH_SERVER_ENABLED ) { - UI_GSISSH_CONFIG_SITE; - } else { - null; - }; -include { UI_GSISSH_SITE_INCLUDE }; + UI_GSISSH_CONFIG_SITE; +} else { + null; +}; +include UI_GSISSH_SITE_INCLUDE; # UI configuration # variable UI_INCLUDE = if ( GSISSH_SERVER_ENABLED ) { - return('personality/ui_gsissh/service'); - } else { - return('personality/ui/service'); - }; -include { UI_INCLUDE }; + 'personality/ui_gsissh/service'; +} else { + 'personality/ui/service'; +}; +include UI_INCLUDE; # # Add local users, if any # variable UI_USERS_INCLUDE = if ( GSISSH_SERVER_ENABLED ) { - return(null); - } else { - inc_file = if_exists('site/config/local_users'); - if ( ! is_defined(inc_file) ) { - inc_file = if_exists('pro_site_local_users'); - }; - return(inc_file); - }; -include { UI_USERS_INCLUDE }; + null; +} else { + if_exists('site/config/local_users'); +}; +include UI_USERS_INCLUDE; # # Add site specific configuration, if any -include { return(UI_CONFIG_SITE) }; +include UI_CONFIG_SITE; # # middleware updates # -include { if_exists('update/config') }; +include if_exists('update/config'); # Do any final configuration needed for some reasons (e.g. : run gLite 3.0 on SL4) # Should be done at the very end of machine configuration # -include { if_exists(GLITE_OS_POSTCONFIG) }; +include if_exists(GLITE_OS_POSTCONFIG); diff --git a/machine-types/grid/vobox.pan b/machine-types/grid/vobox.pan index 07642157..16eae8a6 100644 --- a/machine-types/grid/vobox.pan +++ b/machine-types/grid/vobox.pan @@ -5,10 +5,9 @@ variable VOBOX_CONFIG_SITE ?= null; # Ensure gsissh port is 1975, whatever is the site default defined later variable GSISSH_PORT ?= 1975; -# + # Virtual organization configuration options. # Must be done before calling machine-types/base -# variable CONFIGURE_VOS ?= true; variable NODE_VO_ACCOUNTS ?= true; variable CREATE_HOME ?= undef; @@ -22,42 +21,28 @@ variable GSISSH_SERVER_ENABLED ?= true; # undef will result in using the default value. variable X509_USER_PROXY_PATH ?= null; -# + # Include base configuration of a gLite node. # A specific template is executed a the very begining of the VO configuration to # ensure that only one VO is configured for access to VOBOX services. -# variable NODE_VO_CONFIG = 'personality/vobox/init'; -include { 'machine-types/grid/ui' }; - - -# -# LCG-2 CE configuration -# If CE uses Torque, do Torque configuration too -# -variable CE_TORQUE = (CE_BATCH_SYS == "pbs") || (CE_BATCH_SYS == "lcgpbs"); +include 'machine-types/grid/ui'; -# # VOBOX configuration -# -include { 'personality/vobox/service' }; +include 'personality/vobox/service'; -# # Add site specific configuration, if any -include { return(VOBOX_CONFIG_SITE) }; +include VOBOX_CONFIG_SITE; -# # gLite updates -# -include { if_exists('update/config') }; +include if_exists('update/config'); # Do any final configuration needed for some reasons (e.g. : run gLite 3.0 on SL4) # Should be done at the very end of machine configuration -# -include { return(GLITE_OS_POSTCONFIG) }; +include GLITE_OS_POSTCONFIG; diff --git a/machine-types/grid/wn.pan b/machine-types/grid/wn.pan index 90f46d0c..5b1669c7 100644 --- a/machine-types/grid/wn.pan +++ b/machine-types/grid/wn.pan @@ -1,28 +1,63 @@ -# This is a wrapper template for a workernode -# to enable a build speedup using profile cloning, also -# known as 'clone speedup' or 'dummy WN' - template machine-types/grid/wn; -# Include site configuration for profile cloning. -# If it doesn't exist, profile cloning will not be used. -variable PROFILE_CLONING_CONFIG_SITE ?= 'site/wn-cloning-config'; -variable PROFILE_CLONING_CONFIG_INCLUDE ?= if_exists(PROFILE_CLONING_CONFIG_SITE); -variable PROFILE_CLONING_CONFIG_INCLUDE ?= debug('Profile cloning not configured'); -include { PROFILE_CLONING_CONFIG_INCLUDE }; - - -# Check if the node must be cloned. -# The selector must define PROFILE_CLONING_CLONED_NODE according to what -# must be done. Define it to false in case it is not defined by the selector. -variable PROFILE_CLONING_SELECTOR ?= 'personality/wn/cloning/selector'; -include { PROFILE_CLONING_SELECTOR }; -variable PROFILE_CLONING_CLONED_NODE ?= false; - -include { - if ( is_defined(PROFILE_CLONING_CLONED_NODE) && PROFILE_CLONING_CLONED_NODE ) { - return('personality/wn/cloning/clone'); - } else { - return('personality/wn/cloning/standard'); - }; -}; +variable WN_CONFIG_SITE ?= null; +variable WN_CONFIG_NODE ?= null; + +# Use i386 architecture by default if not explicitly defined for backward compatibility +variable PKG_ARCH_GLITE ?= 'x86_64'; + +# Do actual NFS configuration after gLite configuration instead of during the OS +variable OS_POSTPONE_NFS_CONFIG ?= true; + +# Variable to define a template included after standard gLite updates. +# This can be used for configuration specific to this machine type. +# Template must reside in update/nn directory, where nn is the current update. +# If the template doesn't exist in current update, it is ignored. +variable GLITE_UPDATE_POSTCONFIG ?= 'wn'; + +# +# Virtual organization configuration options. +# Must be done before calling machine-types/grid/base +# Home directories for pool accounts are created only if a shared filesystem +# is not used or if the NFS server for the filesystem is the current node. +# +variable CONFIGURE_VOS = true; +variable CREATE_HOME ?= undef; +variable NODE_VO_PROFILE_ENV = true; + +# +# Configure NFS-served file systems in WN_SHARED_AREAS, if any +# +variable NFS_CLIENT_ENABLED ?= undef; + +# +# Include base configuration of a gLite node +# +include 'machine-types/grid/base'; + + +# Include WN components +include 'personality/wn/service'; + +# +# Add site specific configuration, if any +include WN_CONFIG_SITE; + +# Add node-specific configuration, if any +include WN_CONFIG_NODE; + +# +# Configure NFS if necessary +# +include if ( NFS_SERVER_ENABLED ) 'features/nfs/server/config'; +include if ( NFS_CLIENT_ENABLED ) 'features/nfs/client/config'; + +# +# middleware updates +# +include if_exists('update/config'); + +# Do any final configuration needed for some reasons (e.g. : run gLite3.0 on SL4) +# Should be done at the very end of machine configuration +# +include if_exists(GLITE_OS_POSTCONFIG); diff --git a/personality/wn/cloning/clone.pan b/personality/wn/cloning/clone.pan deleted file mode 100644 index df36722e..00000000 --- a/personality/wn/cloning/clone.pan +++ /dev/null @@ -1,172 +0,0 @@ -# This template does the actual cloning. This involves: -# - Copying the reference profile into this node profile (nothing must -# have been done before or this will be lost). -# - Do the node specific configuration by mimicing some wn/base.tpl steps - -template personality/wn/cloning/clone; - -# The real magic... MUST BE DONE FIRST. -# Copy the reference profile into the current node profile and delete -# the things that are really node specific: -# /aii -# /system/hardware -# /system/network -# /system/filesystems -# /system/blockdevices - -"/"= { - path = value(PROFILE_PREFIX+PROFILE_CLONING_REFERENCE_NODE+':/'); - path["system"]["hardware"] = null; - path["system"]["aii"] = null; - path["system"]["network"] = null; - path["system"]["filesystems"] = null; - path["system"]["blockdevices"] = null; - path; -}; - - -# Ensure appropriate defaults for some standard variables. -variable WN_CONFIG_SITE ?= null; -variable WN_CONFIG_NODE ?= null; -variable PROFILE_CLONING_CLONED_NODE_POSTCONFIG ?= null; - -# VO configuration-related variables -variable CONFIGURE_VOS = true; -variable CREATE_HOME ?= undef; -variable NODE_VO_PROFILE_ENV = true; - -# -# Variables refering to site-specific templates. -# Implement backward compatibility with legacy name: the new names are -# consistent with what is used in base.tpl. -# - -variable SITE_DATABASES ?= 'site/databases'; -variable SITE_DB_TEMPLATE ?= SITE_DATABASES; -variable GLOBAL_VARIABLES ?= 'site/global_variables'; -variable SITE_GLOBAL_VARS_TEMPLATE ?= GLOBAL_VARIABLES; -variable SITE_FUNCTION ?= 'site/functions'; -variable SITE_FUNCTIONS_TEMPLATE ?= SITE_FUNCTION; -variable CLUSTER_INFO_TEMPLATE ?= if_exists('pro_site_cluster_info'); -variable CLUSTER_INFO_TEMPLATE ?= 'site/cluster_info'; -variable SITE_CONFIG ?= 'site/config'; -variable SITE_CONFIG_TEMPLATE ?= SITE_CONFIG; - -variable FILESYSTEM_CONFIG_SITE ?= "filesystem/config"; -variable FILESYSTEM_LAYOUT_CONFIG_SITE ?= "site/filesystems/glite"; - - -# Include machine/IP databases and define site global variables. -include { SITE_DB_TEMPLATE }; -include { SITE_GLOBAL_VARS_TEMPLATE }; - -# Define site-specific functions and SPMA-related functions. -include { 'pan/functions' }; -include { SITE_FUNCTIONS_TEMPLATE }; -include { 'components/spma/functions' }; - - -# Load the profile schema -include { 'quattor/profile_base' }; - - -# Include node-specific HW configuration -"/hardware" = if ( exists(DB_MACHINE[escape(FULL_HOSTNAME)]) ) { - create(DB_MACHINE[escape(FULL_HOSTNAME)]); - } else { - error(FULL_HOSTNAME + " : hardware not found in machine database"); - }; - - -# Cluster specific configuration -include { CLUSTER_INFO_TEMPLATE }; - -# Reapply the site base configuration -include { SITE_CONFIG_TEMPLATE }; - -# Load gLite version information -include { 'defaults/grid/version' }; - - -# Define OS-dependent load path. -# Note that this has no effect on the OS version actually installed, -# inherited from reference node. This is only to define the appropriate -# loadpath for some templates include later. -include { 'os/version' }; -include { 'os/kernel_version_arch' }; - -# Redo network configuration -include { 'site/config/network' }; - -# variable indicating if namespaces must be used to access OS templates. -# Always true with gLite >= 3.1, defined for backward compatibility. -variable OS_TEMPLATE_NAMESPACE = true; -variable OS_NS_CONFIG = 'config/'; -variable OS_NS_OS = OS_NS_CONFIG + 'os/'; -variable OS_NS_CONFIG_GLITE = OS_NS_CONFIG + GRID_MIDDLEWARE_NAME + '/' + GRID_MIDDLEWARE_VERSION + '/'; -variable OS_NS_QUATTOR = OS_NS_CONFIG + 'quattor/'; -variable OS_NS_RPMLIST = 'rpms/'; -variable OS_NS_REPOSITORY = 'repository/'; - - -# Configure filesystem layout -include { FILESYSTEM_CONFIG_SITE }; - - -# Quattor client software -# just set the profile, everything else is already included from exact node -"/software/components/ccm/profile" = QUATTOR_PROFILE_URL+"/"+OBJECT+".xml"; - - -# Check if NFS server and/or client should be configured on the current system. -# This template defines variables NFS_xxx_ENABLED used by other templates. -include { 'features/nfs/init' }; - - -# -# Configure VOs if needed. Some options in VO configuration -# depend on NFS configuration (a NFS server requires VO accounts to be created). -# If there is no VO configuration required, load standard base information -# for VOs needed by some components -# -variable CONFIGURE_VOS = if ( NFS_SERVER_ENABLED ) { - return(true); - } else { - return(SELF); - }; -variable NODE_VO_ACCOUNTS = if ( NFS_SERVER_ENABLED ) { - return(true); - } else { - if ( exists(NODE_VO_ACCOUNTS) ) { - return(SELF); - } else { - return(null); - }; - }; - - -# -# Reconfigure NFS if necessary -# -include { if ( NFS_SERVER_ENABLED ) 'features/nfs/server/config' }; -include { if ( NFS_CLIENT_ENABLED ) 'features/nfs/client/config' }; - - -# -# AII component must be included after much of the other setup. -# -include { OS_NS_QUATTOR + 'aii' }; - - -# Undefine PKG_REPOSITORY_CONFIG to avoid rebuilding repository -# information already present (cloned from reference node) -variable PKG_REPOSITORY_CONFIG = null; - - -# Add WN-specific configuration, if any -include { WN_CONFIG_NODE }; - - -# Postconfig if defined -include { PROFILE_CLONING_CLONED_NODE_POSTCONFIG }; - diff --git a/personality/wn/cloning/selector.pan b/personality/wn/cloning/selector.pan deleted file mode 100644 index 7dce9394..00000000 --- a/personality/wn/cloning/selector.pan +++ /dev/null @@ -1,111 +0,0 @@ -# This template is responsible for deciding if a node profile must be -# rebuilt or cloned. Profile cloning allows a very significant compilation -# speed-up for nodes sharing the same configuration apart from hardware -# differences. -# -# Note that cloning relies on a Pan feature that guarantees the -# reference profile included in another profile will be compiled first -# if it is not up-to-date. - -unique template personality/wn/cloning/selector; - -# Disable profile cloning by default. -# For backward compatibility, use USE_DUMMY if defined and if -# PROFILE_CLONING_ENABLED is not defined. -variable USE_DUMMY ?= false; -variable PROFILE_CLONING_ENABLED ?= USE_DUMMY; - -# PROFILE_PREFIX defines the file name prefix that must be removed from -# the profile template to find the node name. -# For example when using the legacy naming for profile templates, the -# following can be used: -# variable PROFILE_PREFIX ?= 'profile_'; -variable PROFILE_PREFIX ?= ''; - -# Backward compatibility with legacy variable names -variable EXACT_NODE ?= undef; -variable PROFILE_CLONING_REFERENCE_NODE ?= EXACT_NODE; -variable NODE_REGEXP ?= '%%%invalid%%%node%%%'; -variable PROFILE_CLONING_ELIGIBLE_NODES ?= NODE_REGEXP; - -# Check PROFILE_CLONING_DISABLED to see if profile cloning must be disabled on -# the current node, despite PROFILE_CLONING_ENABLED=true. -# PROFILE_CLONING_DISABLED is a nlist where the key is the string (escaped) after -# PROFILE_PREFIX in the profile name (note that host name cannot be used -# at this early stage). -# For backward compatibility, if PROFILE_CLONING_DISABLED is not -# defined, check if WN_DUMMY_DSIABLED is defined. -variable WN_DUMMY_DISABLED ?= nlist(); -variable PROFILE_CLONING_DISABLED ?= WN_DUMMY_DISABLED; -variable PROFILE_CLONING_CURRENT_NODE = { - if ( length(PROFILE_PREFIX) > 0 ) { - node = replace(PROFILE_PREFIX,'',OBJECT); - } else { - node = OBJECT; - }; - node; -}; -variable PROFILE_CLONING_ENABLED = { - if ( is_defined(SELF) && SELF ) { - if ( is_defined(PROFILE_CLONING_DISABLED[escape(PROFILE_CLONING_CURRENT_NODE)]) && PROFILE_CLONING_DISABLED[escape(PROFILE_CLONING_CURRENT_NODE)] ) { - debug('Profile cloning disabled for node '+PROFILE_CLONING_CURRENT_NODE); - false; - } else { - true; - }; - } else { - debug('Profile cloning not enabled'); - false; - }; -}; - - -# Check if the current node must be cloned from a reference node. -# For the cloning to happen, the following conditions must be met: -# - PROFILE_CLONING_ENABLED must be true -# - Reference node must be defined and must exist in the same cluster -# - The current node must match the regexp in PROFILE_CLONING_ELIGIBLE -# - The machine must not be the reference node -# - The current node must match the regexp in PROFILE_CLONING_ELIGIBLE - -variable PROFILE_CLONING_CLONED_NODE ?= { - if ( PROFILE_CLONING_ENABLED ) { - if ( !is_string(PROFILE_CLONING_REFERENCE_NODE) || (length(PROFILE_CLONING_REFERENCE_NODE) == 0) ) { - debug('Reference node not defined. Cloning disabled'); - false; - } else if (match(PROFILE_CLONING_CURRENT_NODE,PROFILE_CLONING_ELIGIBLE_NODES)) { - if ( PROFILE_CLONING_CURRENT_NODE == PROFILE_CLONING_REFERENCE_NODE ) { - debug(PROFILE_CLONING_CURRENT_NODE+' is the reference node. Cloning disabled.'); - false; - } else { - reference_profile = PROFILE_PREFIX + PROFILE_CLONING_REFERENCE_NODE; - if ( is_defined(if_exists(reference_profile)) ) { - debug('Cloning '+OBJECT+' from '+reference_profile); - true; - } else { - debug(PROFILE_CLONING_CURRENT_NODE+' eligible to cloning but reference node profile ('+reference_profile+'.tpl) not found. Cloning disabled'); - false; - }; - }; - } else { - debug(PROFILE_CLONING_CURRENT_NODE+' not eligible to profile cloning (regexp='+PROFILE_CLONING_ELIGIBLE_NODES+')'); - false; - }; - } else { - false; - }; -}; - - -# Name of an optional template to execute at the end of the cloning. -# Default: none -variable PROFILE_CLONING_CLONED_NODE_POSTCONFIG ?= null; -variable PROFILE_CLONING_CLONED_NODE_POSTCONFIG = { - if (PROFILE_CLONING_CLONED_NODE) { - PROFILE_CLONING_CLONED_NODE_POSTCONFIG; - } else { - null; - }; -}; - - diff --git a/personality/wn/cloning/standard.pan b/personality/wn/cloning/standard.pan deleted file mode 100644 index 57496efd..00000000 --- a/personality/wn/cloning/standard.pan +++ /dev/null @@ -1,77 +0,0 @@ -# Equivalent of the machine-types/xxx.tpl for other machine types. -# Used when the node is not cloned from a reference node. - -template personality/wn/cloning/standard; - -variable WN_CONFIG_SITE ?= null; -variable WN_CONFIG_NODE ?= null; - -# Use i386 architecture by default if not explicitly defined for backward compatibility -variable PKG_ARCH_GLITE ?= 'x86_64'; - -# Do actual NFS configuration after gLite configuration instead of during the OS -variable OS_POSTPONE_NFS_CONFIG ?= true; - -# Variable to define a template included after standard gLite updates. -# This can be used for configuration specific to this machine type. -# Template must reside in update/nn directory, where nn is the current update. -# If the template doesn't exist in current update, it is ignored. -variable GLITE_UPDATE_POSTCONFIG ?= 'wn'; - -# -# Virtual organization configuration options. -# Must be done before calling machine-types/grid/base -# Home directories for pool accounts are created only if a shared filesystem -# is not used or if the NFS server for the filesystem is the current node. -# -variable CONFIGURE_VOS = true; -variable CREATE_HOME ?= undef; -variable NODE_VO_PROFILE_ENV = true; - -# -# Configure NFS-served file systems in WN_SHARED_AREAS, if any -# -variable NFS_CLIENT_ENABLED ?= undef; - -# -# Include base configuration of a gLite node -# -include { 'machine-types/grid/base' }; - - -# Include WN components -include { 'personality/wn/service' }; - -# -# Add site specific configuration, if any -include { return(WN_CONFIG_SITE) }; - -# Add node-specific configuration, if any -include { WN_CONFIG_NODE }; - -# -# Configure NFS if necessary -# -include { if ( NFS_SERVER_ENABLED ) 'features/nfs/server/config' }; -include { if ( NFS_CLIENT_ENABLED ) 'features/nfs/client/config' }; - -# -# middleware updates -# -include { if_exists('update/config') }; - -# -#lemon monitoring specific for WNs -# -variable LEMON_AGENT_NODE_SPECIFIC = if ( LEMON_CONFIGURE_AGENT ) { - return("monitoring/lemon/client/wn/config"); - } else { - return(null); - }; -include { LEMON_AGENT_NODE_SPECIFIC }; - - -# Do any final configuration needed for some reasons (e.g. : run gLite3.0 on SL4) -# Should be done at the very end of machine configuration -# -include { if_exists(GLITE_OS_POSTCONFIG) }; diff --git a/personality/wn/machine-features.pan b/personality/wn/machine-features.pan index d192d55a..99c5bbbb 100644 --- a/personality/wn/machine-features.pan +++ b/personality/wn/machine-features.pan @@ -23,7 +23,7 @@ variable MACHINE_FEATURES_STARTUP = '/etc/init.d/' + MACHINE_FEATURES_SCRIPT; prefix '/software/components/chkconfig'; 'dependencies/pre' = append('filecopy'); -'service' = {SELF[MACHINE_FEATURES_SCRIPT]['on'] = ''; SELF;}; +'service' = {SELF[MACHINE_FEATURES_SCRIPT]['on'] = ''; SELF; }; # Machine features can be defined through a structure template variable MACHINE_FEATURES ?= { diff --git a/personality/wn/rpms/config.pan b/personality/wn/rpms/config.pan index 133695c2..71a27cb3 100644 --- a/personality/wn/rpms/config.pan +++ b/personality/wn/rpms/config.pan @@ -1,20 +1,17 @@ unique template personality/wn/rpms/config; -# EMI WN -"/software/packages/{emi-wn}" ?= nlist(); - # Atlas Worker Node metapackage variable ATLAS_SUPPORT ?= true; + +# Packages "/software/packages" = { - if (ATLAS_SUPPORT ) { - # atlas-worker-node is broken due to castor-lib conflict w/ lcgdm-libs - #SELF['{atlas-worker-node}'] = nlist(); - SELF[{'xrootd-client'}] = nlist(); - SELF[{'ganglia-gmond'}] = nlist(); - SELF[{'condor'}] = nlist(); - # Not available on all sites -# SELF[{'cvmfs-init-scripts'}] = nlist(); - }; - SELF; + SELF['{wn}'] = dict(); + + if ( ATLAS_SUPPORT ) { + SELF[{'xrootd-client'}] = dict(); + SELF[{'ganglia-gmond'}] = dict(); + SELF[{'condor'}] = dict(); + }; + SELF; };